|NRAO Home > CASA > CASA Toolkit Reference Manual||
1.1.1 Set the miscellaneous information record for an image
A CASA image file can accumulate miscellaneous information during its lifetime; it is stored in a record called the miscinfo record. For example, the FITS reader (fromfits) puts header keywords it doesn’t otherwise use into the miscinfo record. The miscinfo record is not guaranteed to have any entries, so it’s up to you to check for any fields that you require.
This function sets the miscinfo record of the image file. Note that this function replaces the record, it doesn’t add to it, so if you want to augment the existing record, you should first capture it with the miscinfo function, add to the record, and then put it back. The FITS writer will attempt to write all the fields in the miscinfo record to the FITS file. It can do so for scalars and 1-dimensional arrays. Records will be omitted, and multi-dimensional arrays will be flattened into 1-dimensional arrays.
Miscellaneous REPLACEMENT header
print "\t----\t setmiscinfo Ex 1 \t----"
info = ia.miscinfo() # capture the miscinfo record
info[’extra’] = ’a test entry’ # add our information
ia.setmiscinfo(info) # put it back into the image
More information about CASA may be found at the CASA web page
Copyright © 2016 Associated Universities Inc., Washington, D.C.