This class has functions to interconvert with a record in a "lossless" fashion, and to also interconvert between a record that contains a list of FITS keywords.
ObsInfo oi; oi.setTelescope("VLA").setObserver("Glendenning"); ... cout << "The date observed is: " << oi.obsDate() << endl;
Destructor
Copy all fields from "other" to this object. Uses copy semantics.
Telescope identifier. If this is a "standard" telescope, you should use the same name as is available in the Observatories method of class MeasTable. Defaults to "UNKNOWN".
The name (or initials) of the observer. Defaults to "UNKNOWN".
When was the observation taken (start time)? This is somewhat problematical for observations which are taken at multiple epochs. You should use the start time of the first sample. The default is the MEpoch default: MJD 0 UTC
What was the pointing centre, as distinct from the phase centre ? This value is specified as an MVDirection. This means it is you, the callers responsibility, to know what its reference type is in order to turn it into an MDirection. The default is (0,0) (or [1,0,0]). After you have called setPointingCenter, the function isPointingCenterInitial will return False.
Because the default pointing center is a valid value (0,0), this function is available to tell you whether the pointing center has been set (with setPointingCenter) to some value other than its initial (return False)
Functions to interconvert between an ObsInfo and a record. These functions are inherited from class RecordTransformable. As new fields get added to ObsInfo these functions should be augmented. Missing fields should not generate an error to in fromRecord to allow for backwards compatibility - null values should be supplied instead. The field names are "observer", "telescope", "obsdate", and "pointingcenter"
Functions to interconvert between an ObsInfo and FITS keywords (converted to a Record). For the pointing center, the FITS keywords OBSRA and OBSDEC are used. Failure of fromFITS should probably not be regarded as fatal as the default ObsInfo values are viable. For each item contained in the ObsInfo, an attempt to decode it from FITS is made. If any of them fail, False is returned, but it attempts to decode them all. For those that fail an error message is held in error in the order telescope (error(0)), observer (error(1)), date (error(2)), pointing center (error(3)). error will be returned of length 0 if the return value is True, else it will be length 4.
In some circumstances it might be useful to know what the defaults for the various values are so you can check if they have been set.
It might be useful to know what FITS keyword names are used in to/from FITS so we can remove them so they won't be used more than once. The names are in lower case.
Common copy ctor/assignment operator code.