Changes

Jump to: navigation, search

SHOC

3 bytes added, 07:24, 16 April 2015
/* Header Keyword Conversion */
A [https://bitbucket.org/api/2.0/snippets/saao/L5Xp/8b966320eef5a75c056563ea4cd0ef7df56acb72/files/convert_keywords.py script] is provided to convert back and forth between the two versions of the keywords. This is useful when working with a data pipeline that is still based on the old version of the keywords or to make old data compatible with a new data pipeline. The script can be used as follows from a command line terminal:
$ convert_headersconvert_keywords.py mydatacube.fits
This will convert the keywords in an old data cube to the new version. To convert the keywords back to the old version, run the script with the "revert" option:
$ convert_headersconvert_keywords.py --revert mydatacube.fits
In both cases the program will try to save the updated cube to a file with the same name, but postfixed with "_converted". So, "mydatacube_converted.fits" in the examples above. If the file already exists, you will be asked if you want to overwrite the file. If you do not want to overwrite the file you will be given the opportunity to enter a different file name. Multiple files can be converted at once by providing a list of them when running the program:
$ convert_headersconvert_keywords.py cube1.fits cube2.fits cube3.fits
'''NOTE:''' The conversion script makes use of [http://astropy.org Astropy]. See the official documentation for [http://astropy.readthedocs.org/en/stable/install.html installation instructions].
79
edits