View Javadoc
1   package nom.tam.fits.header;
2   
3   /*-
4    * #%L
5    * nom.tam.fits
6    * %%
7    * Copyright (C) 1996 - 2024 nom-tam-fits
8    * %%
9    * This is free and unencumbered software released into the public domain.
10   * 
11   * Anyone is free to copy, modify, publish, use, compile, sell, or
12   * distribute this software, either in source code form or as a compiled
13   * binary, for any purpose, commercial or non-commercial, and by any
14   * means.
15   * 
16   * In jurisdictions that recognize copyright laws, the author or authors
17   * of this software dedicate any and all copyright interest in the
18   * software to the public domain. We make this dedication for the benefit
19   * of the public at large and to the detriment of our heirs and
20   * successors. We intend this dedication to be an overt act of
21   * relinquishment in perpetuity of all present and future rights to this
22   * software under copyright law.
23   * 
24   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27   * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
28   * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29   * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30   * OTHER DEALINGS IN THE SOFTWARE.
31   * #L%
32   */
33  
34  /**
35   * Date-time related keywords defined by the FITS standard.
36   * 
37   * @author Attila Kovacs
38   *
39   * @see    WCS
40   * 
41   * @since  1.19
42   */
43  public enum DateTime implements IFitsHeader {
44  
45      /**
46       * The date on which the HDU was created, in the format specified in the FITS Standard. The old date format was
47       * 'yy/mm/dd' and may be used only for dates from 1900 through 1999. the new Y2K compliant date format is
48       * 'yyyy-mm-dd' or 'yyyy-mm-ddTHH:MM:SS[.sss]'.
49       * 
50       * @since 1.19
51       */
52      DATE(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "date of file creation"),
53  
54      /**
55       * The date of the observation, in the format specified in the FITS Standard. The old date format was 'yy/mm/dd' and
56       * may be used only for dates from 1900 through 1999. The new Y2K compliant date format is 'yyyy-mm-dd' or
57       * 'yyyy-mm-ddTHH:MM:SS[.sss]'.
58       * 
59       * @since 1.19
60       */
61      DATE_OBS("DATE-OBS", SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "date of observation"),
62  
63      /**
64       * The date of the observation for the given column index, in the format specified in the FITS Standard. The old
65       * date format was 'yy/mm/dd' and may be used only for dates from 1900 through 1999. The new Y2K compliant date
66       * format is 'yyyy-mm-dd' or 'yyyy-mm-ddTHH:MM:SS[.sss]'.
67       * 
68       * @since 1.19
69       */
70      DOBSn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "date of observation for column"),
71  
72      /**
73       * The average date of the observation, in the format specified in the FITS Standard. The old date format was
74       * 'yy/mm/dd' and may be used only for dates from 1900 through 1999. The new Y2K compliant date format is
75       * 'yyyy-mm-dd' or 'yyyy-mm-ddTHH:MM:SS[.sss]'.
76       * 
77       * @since 1.19
78       */
79      DATE_AVG("DATE-AVG", SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "mean date of observation"),
80  
81      /**
82       * Avearge date of the observation for the given column index, in the format specified in the FITS Standard. The old
83       * date format was 'yy/mm/dd' and may be used only for dates from 1900 through 1999. The new Y2K compliant date
84       * format is 'yyyy-mm-dd' or 'yyyy-mm-ddTHH:MM:SS[.sss]'.
85       * 
86       * @since 1.19
87       */
88      DAVGn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "mean date of observation for column"),
89  
90      /**
91       * The start date of the observation, in the format specified in the FITS Standard. The old date format was
92       * 'yy/mm/dd' and may be used only for dates from 1900 through 1999. The new Y2K compliant date format is
93       * 'yyyy-mm-dd' or 'yyyy-mm-ddTHH:MM:SS[.sss]'.
94       * 
95       * @since 1.19
96       */
97      DATE_BEG("DATE-BEG", SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "start of observation"),
98  
99      /**
100      * The end date of the observation, in the format specified in the FITS Standard. The old date format was 'yy/mm/dd'
101      * and may be used only for dates from 1900 through 1999. The new Y2K compliant date format is 'yyyy-mm-dd' or
102      * 'yyyy-mm-ddTHH:MM:SS[.sss]'.
103      * 
104      * @since 1.19
105      */
106     DATE_END("DATE-END", SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "end of observation"),
107 
108     /**
109      * The reference date of the observation, in the format specified in the FITS Standard. The old date format was
110      * 'yy/mm/dd' and may be used only for dates from 1900 through 1999. The new Y2K compliant date format is
111      * 'yyyy-mm-dd' or 'yyyy-mm-ddTHH:MM:SS[.sss]'.
112      * 
113      * @since 1.19
114      */
115     DATEREF(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "reference date"),
116 
117     /**
118      * [day] Modified Julian Date of observation
119      * 
120      * @since 1.19
121      */
122     MJD_OBS("MJD-OBS", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[day] Modified Julian Date of observation"),
123 
124     /**
125      * [day] Modified Julian Date of observation for the given column index
126      * 
127      * @since 1.19
128      */
129     MJDOBn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[day] MJD of observation for column"),
130 
131     /**
132      * [day] Average Modified Julian Date of observation
133      * 
134      * @since 1.19
135      */
136     MJD_AVG("MJD-AVG", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[day] mean Modified Julian Date of observation"),
137 
138     /**
139      * [day] Average Modified Julian Date of observation for the given column index
140      * 
141      * @since 1.19
142      */
143     MJDAn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[day] mean MJD of observation for column"),
144 
145     /**
146      * [day] Modified Julian Date of the start of observation
147      * 
148      * @since 1.19
149      */
150     MJD_BEG("MJD-BEG", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[day] Modified Julian Date of start of observation"),
151 
152     /**
153      * [day] Average Modified Julian Date of the end of observation
154      * 
155      * @since 1.19
156      */
157     MJD_END("MJD-END", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[day] Modified Julian Date of start of observation"),
158 
159     /**
160      * [day] Reference Modified Julian Date
161      * 
162      * @since 1.19
163      */
164     MJDREF(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[day] reference Modified Julian Date"),
165 
166     /**
167      * [day] Reference Julian Date
168      * 
169      * @since 1.19
170      */
171     JDREF(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[day] reference Julian Date"),
172 
173     /**
174      * The start time of the observation, in the format specified in the FITS Standard, in the format HH:MM:SS[.s...]'.
175      * 
176      * @since 1.19
177      */
178     TSTART(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "start time of observation"),
179 
180     /**
181      * The end time of the observation, in the format specified in the FITS Standard, in the format HH:MM:SS[.s...]'.
182      * 
183      * @since 1.19
184      */
185     TSTOP(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "end time of observation"),
186 
187     /**
188      * [yr] Besselian epoch of observation
189      * 
190      * @since 1.19
191      */
192     BEPOCH(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[Ba] Besselian epoch of observation"),
193 
194     /**
195      * [yr] Julian epoch of observation
196      * 
197      * @since 1.19
198      */
199     JEPOCH(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[yr] Julian epoch of observation"),
200 
201     /**
202      * Net exposure duration (in specified time units, or else seconds)
203      * 
204      * @since 1.19
205      */
206     XPOSURE(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "net exposure duration"),
207 
208     /**
209      * Wall clock exposure duration (in specified time units, or else seconds)
210      * 
211      * @since 1.19
212      */
213     TELAPSE(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "wall-clock exposure duration"),
214 
215     /**
216      * Time reference system name
217      * 
218      * @since 1.19
219      */
220     TIMESYS(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time reference system"),
221 
222     /**
223      * Time reference location
224      * 
225      * @since 1.19
226      */
227     TREFPOS(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time reference location"),
228 
229     /**
230      * Time reference location for given column index.
231      * 
232      * @since 1.19
233      */
234     TRPOSn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "time reference location in column"),
235 
236     /**
237      * Pointer to time reference direction
238      * 
239      * @since 1.19
240      */
241     TREFDIR(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time reference direction"),
242 
243     /**
244      * Time reference direction for given column index, e.g. 'TOPOCENT'
245      * 
246      * @since 1.19
247      */
248     TRDIRn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "time reference direction in column"),
249 
250     /**
251      * Solar system ephemeris used, e.g. 'DE-405'.
252      * 
253      * @since 1.19
254      */
255     PLEPHEM(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "solar-system ephemeris ID"),
256 
257     /**
258      * Time unit name
259      * 
260      * @since 1.19
261      */
262     TIMEUNIT(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time unit"),
263 
264     /**
265      * Precision time offset (in specified time units, or else seconds)
266      * 
267      * @since 1.19
268      */
269     TIMEOFFS(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "time offset"),
270 
271     /**
272      * Systematic time error (in specified time units, or else seconds)
273      * 
274      * @since 1.19
275      */
276     TIMESYER(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "systematic time error"),
277 
278     /**
279      * Random time error (in specified time units, or else seconds)
280      * 
281      * @since 1.19
282      */
283     TIMERDER(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "random time error"),
284 
285     /**
286      * Time resolution (in specified time units, or else seconds)
287      * 
288      * @since 1.19
289      */
290     TIMEDEL(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "time resolution"),
291 
292     /**
293      * Time location within pixel, between 0.0 and 1.0 (default 0.5).
294      * 
295      * @since 1.19
296      */
297     TIMEPIXR(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "time location within pixel");
298 
299     /** International Atomic Time (TAI) timescale value. */
300     public static final String TIMESYS_TAI = "TAI";
301 
302     /** Terrestrial Time (TT) timescale value. */
303     public static final String TIMESYS_TT = "TT";
304 
305     /** Terrestrial Dynamical Time (TDT) timescale value. */
306     public static final String TIMESYS_TDT = "TDT";
307 
308     /** Ephemeris Time (ET) timescale value. */
309     public static final String TIMESYS_ET = "ET";
310 
311     /** @deprecated Deprecated by the FITS standard, use {@link #TIMESYS_TAI} instead. */
312     public static final String TIMESYS_IAT = "IAT";
313 
314     /** Earth rotation time (UT1) timescale value. */
315     public static final String TIMESYS_UT1 = "UT1";
316 
317     /** Universal Coordinated Time (UTC) timescale value. */
318     public static final String TIMESYS_UTC = "UTC";
319 
320     /**
321      * @deprecated Greenwich Mean time (GMT) timescale value; deprecated by the FITS standard, use {@link #TIMESYS_UTC}
322      *                 instead.
323      */
324     public static final String TIMESYS_GMT = "GMT";
325 
326     /** Global Positioning System (GPS) time timescale value. */
327     public static final String TIMESYS_GPS = "GPS";
328 
329     /** Geocentric Coordinated Time (TCG) timescale value. */
330     public static final String TIMESYS_TCG = "TCG";
331 
332     /** Barycentric Coordinated Time (TCB) timescale value. */
333     public static final String TIMESYS_TCB = "TCB";
334 
335     /** Barycentric Dynamical Time (TDB) timescale value. */
336     public static final String TIMESYS_TDB = "TDB";
337 
338     /** Local time timescale value for free-running clocks. */
339     public static final String TIMESYS_LOCAL = "LOCAL";
340 
341     /** Topocentric time reference position */
342     public static final String TREFPOS_TOPOCENTER = "TOPOCENTER";
343 
344     /** Geocentric time reference position */
345     public static final String TREFPOS_GEOCENTER = "GEOCENTER";
346 
347     /** Barycentric (Solar-system) time reference position */
348     public static final String TREFPOS_BARYCENTER = "BARYCENTER";
349 
350     /** Relocatable time reference position (for simulations only) */
351     public static final String TREFPOS_RELOCATABLE = "RELOCATABLE";
352 
353     /** Topocentric time reference position that is not the observatory location */
354     public static final String TREFPOS_CUSTOM = "CUSTOM";
355 
356     /** Helioentric time reference position */
357     public static final String TREFPOS_HELIOCENTER = "HELIOCENTER";
358 
359     /** Galactocentric time reference position */
360     public static final String TREFPOS_GALACTIC = "GALACTIC";
361 
362     /** Earth-Moon barycenter time reference position */
363     public static final String TREFPOS_EMBARYCENTER = "EMBARYCENTER";
364 
365     /** Time reference position at the center of Mercury */
366     public static final String TREFPOS_MERCURY = "MERCURY";
367 
368     /** Time reference position at the center of Venus */
369     public static final String TREFPOS_VENUS = "VENUS";
370 
371     /** Time reference position at the center of Mars */
372     public static final String TREFPOS_MARS = "MARS";
373 
374     /** Time reference position at the center of Jupiter */
375     public static final String TREFPOS_JUPITER = "JUPITER";
376 
377     /** Time reference position at the center of Saturn */
378     public static final String TREFPOS_SATURN = "SATURN";
379 
380     /** Time reference position at the center of Uranus */
381     public static final String TREFPOS_URANUS = "URANUS";
382 
383     /** Time reference position at the center of Neptune */
384     public static final String TREFPOS_NEPTUNE = "NEPTUNE";
385 
386     /** Solar System ephemeris value for {@link #PLEPHEM} for Standish (1990). */
387     public static final String PLEPHEM_DE200 = "DE200";
388 
389     /** Solar System ephemeris value for {@link #PLEPHEM} for Standish (1998). Default */
390     public static final String PLEPHEM_DE405 = "DE405";
391 
392     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2009). */
393     public static final String PLEPHEM_DE421 = "DE421";
394 
395     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2014). */
396     public static final String PLEPHEM_DE430 = "DE430";
397 
398     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2014). */
399     public static final String PLEPHEM_DE431 = "DE431";
400 
401     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2014). */
402     public static final String PLEPHEM_DE432 = "DE432";
403 
404     /** Solar System ephemeris value for {@link #PLEPHEM} for Park, et al. (2021). */
405     public static final String PLEPHEM_DE440 = "DE440";
406 
407     /** Solar System ephemeris value for {@link #PLEPHEM} for Park, et al. (2021). */
408     public static final String PLEPHEM_DE441 = "DE441";
409 
410     /** Time unit value for time measured in seconds */
411     public static final String TIMEUNIT_SECOND = "s";
412 
413     /** Time unit value for time measured in days */
414     public static final String TIMEUNIT_DAY = "d";
415 
416     /** Time unit value for time measured in Julian years (1 a = 365.25 d) */
417     public static final String TIMEUNIT_JULIAN_YEAR = "a";
418 
419     /** Time unit value for time measured in seconds (1 cy = 36525 d) */
420     public static final String TIMEUNIT_JULIAN_CENTURY = "cy";
421 
422     /** Time unit value for time measured in minutes */
423     public static final String TIMEUNIT_MINUTE = "min";
424 
425     /** Time unit value for time measured in hours */
426     public static final String TIMEUNIT_HOUR = "h";
427 
428     /** Time unit value for time measured in Julian years (same as {@link #TIMEUNIT_JULIAN_YEAR}) */
429     public static final String TIMEUNIT_YEAR = "yr";
430 
431     /** Time unit value for time measured in tropical years (1 ta ~ 365.2421988 d) */
432     public static final String TIMEUNIT_TROPICAL_YEAR = "ta";
433 
434     /**
435      * Time unit value for time measured in Besselian years (essentially the same as {@link #TIMEUNIT_TROPICAL_YEAR})
436      */
437     public static final String TIMEUNIT_BESSELIAN_YEAR = "Ba";
438 
439     private final FitsKey key;
440 
441     DateTime(SOURCE status, HDU hdu, VALUE valueType, String comment) {
442         this(null, status, hdu, valueType, comment);
443     }
444 
445     DateTime(String headerName, SOURCE status, HDU hdu, VALUE valueType, String comment) {
446         key = new FitsKey(headerName == null ? name() : headerName, status, hdu, valueType, comment);
447         FitsKey.registerStandard(this);
448     }
449 
450     @Override
451     public final FitsKey impl() {
452         return key;
453     }
454 
455 }