1 package nom.tam.fits.header;
2
3 /*
4 * #%L
5 * nom.tam FITS library
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 * <p>
36 * This data dictionary contains FITS keywords that have been widely used within the astronomical community. Many of
37 * them are not part of the FITS standard. For more standard FITS keywords relating to date-time see {@link DateTime}
38 * instead. It is recommended that these keywords only be used as defined here. These are the Keywords that describe the
39 * observation.
40 * </p>
41 * <p>
42 * See <a href=
43 * "http://heasarc.gsfc.nasa.gov/docs/fcg/common_dict.html">http://heasarc.gsfc.nasa.gov/docs/fcg/common_dict.html</a>
44 * </p>
45 *
46 * @author Richard van Nieuwenhoven
47 *
48 * @see DateTime
49 */
50 public enum ObservationDurationDescription implements IFitsHeader {
51 /**
52 * The value field shall contain a character string that gives the date on which the observation ended. This keyword
53 * has the same format, and is used in conjunction with, the standard DATA-OBS keyword that gives the starting date
54 * of the observation. These 2 keywords may give either the calendar date using the 'yyyy-mm-dd' format, or may give
55 * the full date and time using the 'yyyy-mm-ddThh:mm:ss.sss' format.
56 *
57 * @deprecated Part of the FITS standard, use {@link DateTime#DATE_END} instead
58 */
59 @Deprecated
60 DATE_END("DATE-END", SOURCE.HEASARC, HDU.ANY, VALUE.STRING, "date of the end of observation"),
61 /**
62 * The value field shall contain a floating point number giving the difference between the stop and start times of
63 * the observation in units of seconds. This keyword is synonymous with the {@link #TELAPSE} keyword.
64 *
65 * @see #TELAPSE
66 */
67 ELAPTIME(SOURCE.UCOLICK, HDU.ANY, VALUE.REAL, "[s] elapsed time of the observation"),
68 /**
69 * The value field shall contain a floating point number giving the exposure time of the observation in units of
70 * seconds. The exact definition of 'exposure time' is mission dependent and may, for example, include corrections
71 * for shutter open and close duration, detector dead time, vignetting, or other effects. This keyword is synonymous
72 * with the EXPTIME keyword.
73 *
74 * @see DateTime#XPOSURE
75 */
76 EXPOSURE(SOURCE.HEASARC, HDU.ANY, VALUE.REAL, "[s] exposure time"),
77 /**
78 * The value field shall contain a floating point number giving the exposure time of the observation in units of
79 * seconds. The exact definition of 'exposure time' is mission dependent and may, for example, include corrections
80 * for shutter open and close duration, detector dead time, vignetting, or other effects. This keyword is synonymous
81 * with the EXPOSURE keyword.
82 *
83 * @see DateTime#XPOSURE
84 */
85 EXPTIME(SOURCE.NOAO, HDU.ANY, VALUE.REAL, "[s] exposure time"),
86 /**
87 * The value field shall contain a floating point number giving the total integrated exposure time in units of
88 * seconds corrected for detector 'dead time' effects which reduce the net efficiency of the detector. The ratio of
89 * LIVETIME/ONTIME gives the mean dead time correction during the observation, which lies in the range 0.0 to 1.0.
90 */
91 LIVETIME(SOURCE.HEASARC, HDU.ANY, VALUE.REAL, "[s] exposure time after deadtime correction"),
92 /**
93 * The value field shall contain a floating point number giving the total integrated exposure time of the
94 * observation in units of seconds. ONTIME may be less than TELAPSE if there were intevals during the observation in
95 * which the target was not observed (e.g., the shutter was closed, or the detector power was turned off).
96 *
97 * @see DateTime#XPOSURE
98 */
99 ONTIME(SOURCE.HEASARC, HDU.ANY, VALUE.REAL, "[s] integration time during the observation"),
100 /**
101 * The value field shall contain a floating point number giving the difference between the stop and start times of
102 * the observation in units of seconds. This keyword is synonymous with the ELAPTIME keyword.
103 *
104 * @deprecated Part of the FITS standard, use {@link DateTime#TELAPSE} instead.
105 */
106 @Deprecated
107 TELAPSE(SOURCE.HEASARC, HDU.ANY, VALUE.REAL, "[s] elapsed time of the observation"),
108 /**
109 * The value field shall contain a character string that gives the time at which the observation ended. This keyword
110 * is used in conjunction with the DATE-END keyword to give the ending time of the observation; the DATE-END keyword
111 * gives the ending calendar date, with format 'yyyy-mm-dd', and TIME-END gives the time within that day using the
112 * format 'hh:mm:ss.sss...'. This keyword should not be used if the time is included directly as part of the
113 * DATE-END keyword value with the format 'yyyy-mm-ddThh:mm:ss.sss'.
114 *
115 * @see DateTime#TSTOP
116 */
117 TIME_END("TIME-END", SOURCE.HEASARC, HDU.ANY, VALUE.STRING, "time at the end of the observation"),
118 /**
119 * The value field shall contain a character string that gives the time at which the observation started. This
120 * keyword is used in conjunction with the standard DATE-OBS keyword to give the starting time of the observation;
121 * the DATE-OBS keyword gives the starting calendar date, with format 'yyyy-mm-dd', and TIME-OBS gives the time
122 * within that day using the format 'hh:mm:ss.sss...'. This keyword should not be used if the time is included
123 * directly as part of the DATE-OBS keyword value with the format 'yyyy-mm-ddThh:mm:ss.sss'.
124 *
125 * @see DateTime#TSTART
126 */
127 TIME_OBS("TIME-OBS", SOURCE.HEASARC, HDU.ANY, VALUE.STRING, "time at the start of the observation");
128
129 private final FitsKey key;
130
131 ObservationDurationDescription(SOURCE status, HDU hdu, VALUE valueType, String comment) {
132 this(null, status, hdu, valueType, comment);
133 }
134
135 ObservationDurationDescription(String key, SOURCE status, HDU hdu, VALUE valueType, String comment) {
136 this.key = new FitsKey(key == null ? name() : key, status, hdu, valueType, comment);
137 }
138
139 @Override
140 public final FitsKey impl() {
141 return key;
142 }
143
144 }