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, as decimal or in the format
175      * HH:MM:SS[.s...]'.
176      * 
177      * @since 1.19
178      */
179     TSTART(SOURCE.RESERVED, HDU.ANY, VALUE.ANY, "start time of observation"),
180 
181     /**
182      * The end time of the observation, in the format specified in the FITS Standard, as decimal or in the format
183      * HH:MM:SS[.s...]'.
184      * 
185      * @since 1.19
186      */
187     TSTOP(SOURCE.RESERVED, HDU.ANY, VALUE.ANY, "end time of observation"),
188 
189     /**
190      * [yr] Besselian epoch of observation
191      * 
192      * @since 1.19
193      */
194     BEPOCH(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[Ba] Besselian epoch of observation"),
195 
196     /**
197      * [yr] Julian epoch of observation
198      * 
199      * @since 1.19
200      */
201     JEPOCH(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[yr] Julian epoch of observation"),
202 
203     /**
204      * Net exposure duration (in specified time units, or else seconds)
205      * 
206      * @since 1.19
207      */
208     XPOSURE(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "net exposure duration"),
209 
210     /**
211      * Wall clock exposure duration (in specified time units, or else seconds)
212      * 
213      * @since 1.19
214      */
215     TELAPSE(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "wall-clock exposure duration"),
216 
217     /**
218      * Time reference system name
219      * 
220      * @since 1.19
221      */
222     TIMESYS(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time reference system"),
223 
224     /**
225      * Time reference location
226      * 
227      * @since 1.19
228      */
229     TREFPOS(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time reference location"),
230 
231     /**
232      * Time reference location for given column index.
233      * 
234      * @since 1.19
235      */
236     TRPOSn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "time reference location in column"),
237 
238     /**
239      * Pointer to time reference direction
240      * 
241      * @since 1.19
242      */
243     TREFDIR(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time reference direction"),
244 
245     /**
246      * Time reference direction for given column index, e.g. 'TOPOCENT'
247      * 
248      * @since 1.19
249      */
250     TRDIRn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "time reference direction in column"),
251 
252     /**
253      * Solar system ephemeris used, e.g. 'DE-405'.
254      * 
255      * @since 1.19
256      */
257     PLEPHEM(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "solar-system ephemeris ID"),
258 
259     /**
260      * Time unit name
261      * 
262      * @since 1.19
263      */
264     TIMEUNIT(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "time unit"),
265 
266     /**
267      * Precision time offset (in specified time units, or else seconds)
268      * 
269      * @since 1.19
270      */
271     TIMEOFFS(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "time offset"),
272 
273     /**
274      * Systematic time error (in specified time units, or else seconds)
275      * 
276      * @since 1.19
277      */
278     TIMESYER(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "systematic time error"),
279 
280     /**
281      * Random time error (in specified time units, or else seconds)
282      * 
283      * @since 1.19
284      */
285     TIMERDER(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "random time error"),
286 
287     /**
288      * Time resolution (in specified time units, or else seconds)
289      * 
290      * @since 1.19
291      */
292     TIMEDEL(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "time resolution"),
293 
294     /**
295      * Time location within pixel, between 0.0 and 1.0 (default 0.5).
296      * 
297      * @since 1.19
298      */
299     TIMEPIXR(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "time location within pixel");
300 
301     /** International Atomic Time (TAI) timescale value. */
302     public static final String TIMESYS_TAI = "TAI";
303 
304     /** Terrestrial Time (TT) timescale value. */
305     public static final String TIMESYS_TT = "TT";
306 
307     /** Terrestrial Dynamical Time (TDT) timescale value. */
308     public static final String TIMESYS_TDT = "TDT";
309 
310     /** Ephemeris Time (ET) timescale value. */
311     public static final String TIMESYS_ET = "ET";
312 
313     /** @deprecated Deprecated by the FITS standard, use {@link #TIMESYS_TAI} instead. */
314     public static final String TIMESYS_IAT = "IAT";
315 
316     /** Earth rotation time (UT1) timescale value. */
317     public static final String TIMESYS_UT1 = "UT1";
318 
319     /** Universal Coordinated Time (UTC) timescale value. */
320     public static final String TIMESYS_UTC = "UTC";
321 
322     /**
323      * @deprecated Greenwich Mean time (GMT) timescale value; deprecated by the FITS standard, use {@link #TIMESYS_UTC}
324      *                 instead.
325      */
326     public static final String TIMESYS_GMT = "GMT";
327 
328     /** Global Positioning System (GPS) time timescale value. */
329     public static final String TIMESYS_GPS = "GPS";
330 
331     /** Geocentric Coordinated Time (TCG) timescale value. */
332     public static final String TIMESYS_TCG = "TCG";
333 
334     /** Barycentric Coordinated Time (TCB) timescale value. */
335     public static final String TIMESYS_TCB = "TCB";
336 
337     /** Barycentric Dynamical Time (TDB) timescale value. */
338     public static final String TIMESYS_TDB = "TDB";
339 
340     /** Local time timescale value for free-running clocks. */
341     public static final String TIMESYS_LOCAL = "LOCAL";
342 
343     /** Topocentric time reference position */
344     public static final String TREFPOS_TOPOCENTER = "TOPOCENTER";
345 
346     /** Geocentric time reference position */
347     public static final String TREFPOS_GEOCENTER = "GEOCENTER";
348 
349     /** Barycentric (Solar-system) time reference position */
350     public static final String TREFPOS_BARYCENTER = "BARYCENTER";
351 
352     /** Relocatable time reference position (for simulations only) */
353     public static final String TREFPOS_RELOCATABLE = "RELOCATABLE";
354 
355     /** Topocentric time reference position that is not the observatory location */
356     public static final String TREFPOS_CUSTOM = "CUSTOM";
357 
358     /** Helioentric time reference position */
359     public static final String TREFPOS_HELIOCENTER = "HELIOCENTER";
360 
361     /** Galactocentric time reference position */
362     public static final String TREFPOS_GALACTIC = "GALACTIC";
363 
364     /** Earth-Moon barycenter time reference position */
365     public static final String TREFPOS_EMBARYCENTER = "EMBARYCENTER";
366 
367     /** Time reference position at the center of Mercury */
368     public static final String TREFPOS_MERCURY = "MERCURY";
369 
370     /** Time reference position at the center of Venus */
371     public static final String TREFPOS_VENUS = "VENUS";
372 
373     /** Time reference position at the center of Mars */
374     public static final String TREFPOS_MARS = "MARS";
375 
376     /** Time reference position at the center of Jupiter */
377     public static final String TREFPOS_JUPITER = "JUPITER";
378 
379     /** Time reference position at the center of Saturn */
380     public static final String TREFPOS_SATURN = "SATURN";
381 
382     /** Time reference position at the center of Uranus */
383     public static final String TREFPOS_URANUS = "URANUS";
384 
385     /** Time reference position at the center of Neptune */
386     public static final String TREFPOS_NEPTUNE = "NEPTUNE";
387 
388     /** Solar System ephemeris value for {@link #PLEPHEM} for Standish (1990). */
389     public static final String PLEPHEM_DE200 = "DE200";
390 
391     /** Solar System ephemeris value for {@link #PLEPHEM} for Standish (1998). Default */
392     public static final String PLEPHEM_DE405 = "DE405";
393 
394     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2009). */
395     public static final String PLEPHEM_DE421 = "DE421";
396 
397     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2014). */
398     public static final String PLEPHEM_DE430 = "DE430";
399 
400     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2014). */
401     public static final String PLEPHEM_DE431 = "DE431";
402 
403     /** Solar System ephemeris value for {@link #PLEPHEM} for Folkner, et al. (2014). */
404     public static final String PLEPHEM_DE432 = "DE432";
405 
406     /** Solar System ephemeris value for {@link #PLEPHEM} for Park, et al. (2021). */
407     public static final String PLEPHEM_DE440 = "DE440";
408 
409     /** Solar System ephemeris value for {@link #PLEPHEM} for Park, et al. (2021). */
410     public static final String PLEPHEM_DE441 = "DE441";
411 
412     /** Time unit value for time measured in seconds */
413     public static final String TIMEUNIT_SECOND = "s";
414 
415     /** Time unit value for time measured in days */
416     public static final String TIMEUNIT_DAY = "d";
417 
418     /** Time unit value for time measured in Julian years (1 a = 365.25 d) */
419     public static final String TIMEUNIT_JULIAN_YEAR = "a";
420 
421     /** Time unit value for time measured in seconds (1 cy = 36525 d) */
422     public static final String TIMEUNIT_JULIAN_CENTURY = "cy";
423 
424     /** Time unit value for time measured in minutes */
425     public static final String TIMEUNIT_MINUTE = "min";
426 
427     /** Time unit value for time measured in hours */
428     public static final String TIMEUNIT_HOUR = "h";
429 
430     /** Time unit value for time measured in Julian years (same as {@link #TIMEUNIT_JULIAN_YEAR}) */
431     public static final String TIMEUNIT_YEAR = "yr";
432 
433     /** Time unit value for time measured in tropical years (1 ta ~ 365.2421988 d) */
434     public static final String TIMEUNIT_TROPICAL_YEAR = "ta";
435 
436     /**
437      * Time unit value for time measured in Besselian years (essentially the same as {@link #TIMEUNIT_TROPICAL_YEAR})
438      */
439     public static final String TIMEUNIT_BESSELIAN_YEAR = "Ba";
440 
441     private final FitsKey key;
442 
443     DateTime(SOURCE status, HDU hdu, VALUE valueType, String comment) {
444         this(null, status, hdu, valueType, comment);
445     }
446 
447     DateTime(String headerName, SOURCE status, HDU hdu, VALUE valueType, String comment) {
448         key = new FitsKey(headerName == null ? name() : headerName, status, hdu, valueType, comment);
449         FitsKey.registerStandard(this);
450     }
451 
452     @Override
453     public final FitsKey impl() {
454         return key;
455     }
456 
457 }