Keywords: mrtcal-prog-manual

Next: Patching IMB-FITS at read Up: mrtcal-prog-manual Previous: Contents Contents

# Scan date vs observation date: Midnight issue

When a new scan is prepared6.1 at the telescope, the associated IMBFITS file name is constructed with the current date. Later in this process (up to several minutes after), the scan is actually started6.2, and the current date and time are used to build the `MJD-OBS` and `DATE-OBS` in the FITS Primary header. If those two steps are performed exactly before and after midnight respectively, the file name and the Primary header refer to 2 different dates, e.g.

    iram30m-fts-20120809s323-imb.fits:
      MJD-OBS =     56149.0038078704 / MJD at observation start
      DATE-OBS= '2012-08-10T00:05:29.000'

For several purposes, MRTCAL saves the observing date and time of each file in the index. In order to deal correctly with the above issue, it is decided

1. to save the date as found in the file name, so that there is no difference for the user between the file name and the date exposed by MRTCAL;
2. the time value saved for this file refers to the above date.

The direct consequence of those 2 rules is that, in case of the midnight issue exposed above, the UT value will be larger then 24h. Note that the UT value associated to each file is saved for bookkeeping purpose, e.g. for analysis of the calibration though date and time. It is considered as a typical value for the whole scan. Each individual spectrum produced by MRTCAL uses its own date and time.

In details, the observing date saved in the index is used

- to check the entry uniqueness (date, scan and backend triplet should be unique),
- to sort the entries (by date, scan and backend),
- through the command `MFIND /DATE`,
- in the output of the command `MLIST`,
- in the Sic variables `MDX%DOBS` and `MHEAD%KEY%DOBS`

and the associated UT value is used

- to sort the entries,
- in the output of the command `MLIST`,
- in the Sic variables `MDX%UT` and `MHEAD%KEY%UT`

The user should be ready to encounter UT values larger than 24h in the `MLIST` output and larger than in the Sic variables.

Next: Patching IMB-FITS at read Up: mrtcal-prog-manual Previous: Contents Contents