Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
info | in | Miscellaneous REPLACEMENT header | |
Allowed: | Record |
An AIPS++ image file can accumulate various miscellaneous information during its lifetime; it is stored in a Glish record called the miscinfo record. For example, the FITS reader (imagefromfits) 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 FITS file argument. 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.
- im := image('myfile') - x := something(im) # calculate something interesting from im - info := im.miscinfo() # capture the miscinfo record - info.mycalc := x # add our result to it - im.setmiscinfo(info) # put it back into the image