[ Home | About | Tech Info & Data | Publications | References ] [ Site by Jeffrey Hall | Research funded by NSF ]
The BasicFITSHeader class implements a one-unit FITS header of 36 fields with 80 characters each. (This is the format used by all SSS raw data files.) It inherits Filelink.
2008 July 08 - Documentation written.
struct pointer[ ] hdr { fields:StrArr(numFields) }
Calls Filelink::cleanup
Destructor. Clears its history list by calling Filelink::cleanup, and freeing its own hdr pointer. Never call this procedure directly; it is invoked by IDL's Obj_Destroy function.
Structure definition. Specifies the contents of the IDL structure instantiated by the BasicFITSHeader class. Used by Obj_New; do not invoke directly.
Prints the content of the hdr data member to stdout.
Calls Filelink::dump_stat
This is a standard OIL class method. For the BasicFITSHeader class, it dumps the current header, followed by the data members of the parent Filelink object, to the command output window. The dump will look best if the output font is fixed rather than proportional width.
keyword int num
keyword int keyword
Calls Root::add_history
Return bool, string field
Returns card image num or having keyword keyword from the object's hdr data member, or FALSE if hdr is invalid. This function can throw two errors to the event history list (if the header is an invalid pointer, if the field number is out of range, or if no keyword match is found in the header).
keyword struct _EXTRA
Return pointer subImage
Constructor. The obect's hdr data member is set to be a 36-element array of strings. Never call this function directly; it is invoked by IDL's Obj_New function.
Calls Root::add_history, Filelink::is_valid
Return long[3] valid
Each OIL class has an is_valid function that performs class-specific tests on its data members. If all members are found to be valid, however validity is defined for that class, this funtion returns 1. Otherwise, a negative number is returned that contains a bitwise combination of all errors detected. In the case of BasicFITSHeader, the validity state is -1 if the header is NULL. The function returns a three-element array of longs, the first element containing the validity state of the Root, and the second that of the Filelink. An event is written to the log if the BasicFITSHeader is invalid.
Calls Filelink::open_datafile, Filelink::close_datafile, Filelink::modified, Root::add_history
Return bool b
Reads the FITS header from the linked file and stores it in the object's hdr data member. Returns TRUE if read successfully and FALSE if there was an error.
argument long num
argument string value
argument string cardImNum
keyword string comment
keyword int sigFig
Calls Root::add_history
Return bool b
Sets the card image num to have keyword keyword and value value, returning TRUE. It throws an error if the header is null or the field numer is out of range, and returns FALSE in those cases. A comment is added if the comment keyword is set, and the number of significant figures can be controlled using the sigFig keyword.
argument int bitpix
argument int nAxis1
argument int nAxis2
Calls BasicFITSHeader::set_card_image, Root::add_history
Return bool b
Generates the five mandatory fields at the start of the FITS header, setting them to the values specified by the arguments. Additionally, the SIMPLE card image is set to "T" and the NAXIS card image to 2.
Calls Filelink::open_datafile, Filelink::close_datafile, Filelink::modified, Root::add_history
Return bool b
Writes the header to the linked file. Returns TRUE if read successfully and FALSE if there was an error.
obj = Obj_New( 'BasicFITSHeader', logCodes = !OIL_ALL, f = 'C:\mydir\somefile' )
Obj_Destroy( obj )