[Gbtpipeline-announce] GBT Pipeline and idlToSdfits channel offset bug fix

Announcements related to the Green Bank Telescope pipeline. gbtpipeline-announce at listmgr.nrao.edu
Tue May 12 15:51:19 EDT 2015


We discovered and fixed a bug in idlToSdfits (and the gbtpipeline) that affects the frequency and velocity scales of output FITS files when channel averaging was used.  The bug was triggered by the "-a" argument in the idlToSdfits program, and also invoked by the "-a" argument in the gbtpipeline program.

Affected FITS cubes have a systematic offset of channel frequencies by 0.25 to 0.5 channels, after averaging. Specifically, the correct frequency for each channel in the affected data should be:

f_correct = f - CDELT3 * (0.5 - 0.5 / W)

where "f" is the frequency associated with a channel, "W" is the number of channels that were averaged (the argument value when using "-a") and CDELT3 is the channel spacing after averaging, as recorded in the FITS header of the output image cube.

This bug was fixed on Friday, 8 May 2015 and the fix is included in idlToSdfits version 8.6 and beyond.  The idlToSdfits program now inserts a HISTORY card in the output FITS files to show the version number used.

If you know that you used channel averaging, and you know the number of channels averaged, it is not necessary to regenerate output FITS cubes to correct for this error.  Instead, you can correct affected FITS cubes by replacing the values of CRVAL3 and ALTRPIX in the FITS header with the correct values, which are:

 CRVAL3_correct  = CRVAL3 - CDELT3 * (0.5 - 0.5 / W)
 ALTRPIX_correct = ALTRPIX + (0.5 - 0.5/W)

We are providing a tool to help you fix affected FITS cubes.  Keep in mind that you need to know what channel width was used in the original averaging with idlToSdfits when creating your image cube.  Our tool will check if the cube was processed with idlToSdfits, but it can not know the averaging parameters as they are not stored in the header.  If you do not remember the averaging parameters you used when creating the cube, your safest path is to recreate the image from the SDFITS spectra.

To use the tool you need to supply the image cube name and the channel width used for averaging by idlToSdfits when creating the cube.  For example:

/home/gbtpipeline/bin/fix_idlToSdfits_header_bug   affected_image_cube.fits  16

Type '/home/gbtpipeline/bin/fix_idlToSdfits_header_bug -h’ at the command line to get full usage information.

Pipeline users who have used the "-a" option in the "image.py" script are unaffected by this bug since image.py uses different code for the channel averaging.

If you have any questions or concerns, please don’t hesitate to contact me, Jim Braatz (jbraatz) or Bob Garwood (bgarwood).

--
Joe Masters
Software Engineer
GBT Pipeline Program Manager
National Radio Astronomy Observatory
520 Edgemont Road,
Charlottesville, VA 22903-2475, USA
Tel: +1 434-244-6806 <tel:%2B1%20434-244-6806>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/gbtpipeline-announce/attachments/20150512/cc99e434/attachment.html>


More information about the gbtpipeline-announce mailing list