View Javadoc
1   package nom.tam.fits.header.extra;
2   
3   import nom.tam.fits.header.DateTime;
4   
5   /*
6    * #%L
7    * nom.tam FITS library
8    * %%
9    * Copyright (C) 1996 - 2024 nom-tam-fits
10   * %%
11   * This is free and unencumbered software released into the public domain.
12   *
13   * Anyone is free to copy, modify, publish, use, compile, sell, or
14   * distribute this software, either in source code form or as a compiled
15   * binary, for any purpose, commercial or non-commercial, and by any
16   * means.
17   *
18   * In jurisdictions that recognize copyright laws, the author or authors
19   * of this software dedicate any and all copyright interest in the
20   * software to the public domain. We make this dedication for the benefit
21   * of the public at large and to the detriment of our heirs and
22   * successors. We intend this dedication to be an overt act of
23   * relinquishment in perpetuity of all present and future rights to this
24   * software under copyright law.
25   *
26   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29   * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
30   * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
31   * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
32   * OTHER DEALINGS IN THE SOFTWARE.
33   * #L%
34   */
35  
36  import nom.tam.fits.header.FitsKey;
37  import nom.tam.fits.header.IFitsHeader;
38  import nom.tam.fits.header.InstrumentDescription;
39  
40  /**
41   * This is the file content.txt that presents a comprehensive compilation of all classes of data products in the Chandra
42   * Data Archive for the "flight" dataset. This file is the definitive authority on the values of various FITS header
43   * keywords.
44   * <p>
45   * All files are identified by the CONTENT value of their principal HDUs.
46   * </p>
47   * Originally based on the <a href="http://cxc.harvard.edu/contrib/arots/fits/content.txt">Guide to Chandra Data
48   * Products</a>, with additional keyword entries added in 1.20.1 based on the
49   * <a href="https://planet4589.org/astro/sds/asc/ps/sds73.pdf">FITS Keyword Conventions in CXC Data Model files
50   * SDS-7.3</a>.
51   * 
52   * @author Attila Kovacs and Richard van Nieuwenhoven
53   */
54  public enum CXCExt implements IFitsHeader {
55  
56      /**
57       * ASC-DS processing system revision (release)
58       */
59      ASCDSVER(VALUE.STRING, "ASC-DS processing system revision (release)"),
60  
61      /**
62       * Correction applied to Basic Time rate (s)
63       */
64      BTIMCORR(VALUE.REAL, "[s] time rate correction"),
65  
66      /**
67       * Basic Time clock drift (s / VCDUcount<sup>2</sup>)
68       */
69      BTIMDRFT(VALUE.REAL, "'[s/ct**2] clock drift"),
70  
71      /**
72       * Basic Time offset (s)
73       */
74      BTIMNULL(VALUE.REAL, "[s] time offset"),
75  
76      /**
77       * Basic Time clock rate (s / VCDUcount)
78       */
79      BTIMRATE(VALUE.REAL, "[s/ct] clock rate"),
80  
81      /**
82       * Data product identification
83       */
84      CONTENT(VALUE.STRING, "data product identification"),
85  
86      /**
87       * The format of the CONVERS keyword is 'i.j.k'. if missing, the default value will be '1.0.0'
88       */
89      CONVERS(VALUE.STRING, "version info"),
90  
91      /**
92       * Data class: 'observed' or 'simulated'
93       * 
94       * @see #DATACLAS_OBSERVED
95       * @see #DATACLAS_SIMULATED
96       */
97      DATACLAS(VALUE.STRING, "observed or simulated"),
98  
99      /**
100      * Dead time correction factor [0.0:1.0].
101      */
102     DTCOR(VALUE.REAL, "[s] dead time correction [0.0:1.0]"),
103 
104     /**
105      * Assumed focal length, mm; Level 1 and up
106      */
107     FOC_LEN(VALUE.REAL, "[mm] assumed focal length"),
108 
109     /**
110      * ICD reference. E.g. 'HRC Level 1 Data Products ICD, Version 1.1'
111      */
112     HDUSPEC(VALUE.STRING, "ICD reference"),
113 
114     /**
115      * The OGIP long string convention may be used.
116      */
117     LONGSTRN(VALUE.STRING, "The OGIP long string convention may be used."),
118 
119     /**
120      * Mission specifier, e.g. 'AXAF'
121      */
122     MISSION(VALUE.STRING, "mission identifier"),
123 
124     /**
125      * Processing version of data
126      */
127     REVISION(VALUE.STRING, "processing version of data"),
128 
129     /**
130      * Nominal roll angle, deg
131      */
132     ROLL_NOM(VALUE.REAL, "[deg] nominal roll angle"),
133 
134     /**
135      * Sequence number
136      */
137     SEQ_NUM(VALUE.INTEGER, "sequence number"),
138 
139     /**
140      * SIM focus pos (mm)
141      */
142     SIM_X(VALUE.REAL, "[mm] SIM focus pos"),
143 
144     /**
145      * SIM orthogonal axis pos (mm)
146      */
147     SIM_Y(VALUE.REAL, "[mm] SIM orthogonal axis pos"),
148 
149     /**
150      * SIM translation stage pos (mm)
151      */
152     SIM_Z(VALUE.REAL, "[mm] SIM translation stage pos"),
153 
154     /**
155      * Major frame count at start
156      */
157     STARTMJF(VALUE.INTEGER, "major frame count at start"),
158 
159     /**
160      * Minor frame count at start
161      */
162     STARTMNF(VALUE.INTEGER, "minor frame count at start"),
163 
164     /**
165      * On-Board MET close to STARTMJF and STARTMNF
166      */
167     STARTOBT(VALUE.INTEGER, "on-board MET close to STARTMJF and STARTMNF"),
168 
169     /**
170      * Major frame count at stop
171      */
172     STOPMJF(VALUE.INTEGER, "major frame count at stop"),
173 
174     /**
175      * Minor frame count at stop
176      */
177     STOPMNF(VALUE.INTEGER, "minor frame count at stop"),
178 
179     /**
180      * Absolute timing error.
181      */
182     TIERABSO(VALUE.REAL, "[s] absolute timing error"),
183 
184     /**
185      * Clock rate error
186      */
187     TIERRELA(VALUE.REAL, "[s/s] clock rate error"),
188 
189     /**
190      * Time stamp reference as bin fraction
191      */
192     TIMEPIXR(VALUE.REAL, "[bin] time stamp reference"),
193 
194     /**
195      * Telemetry revision number (IP&amp;CL)
196      */
197     TLMVER(VALUE.STRING, "telemetry revision number (IP&CL)"),
198 
199     // Inherited from CXCStscISharedExt ----------------------------------------->
200 
201     /**
202      * Same as {@link STScIExt#CLOCKAPP}.
203      * 
204      * @since 1.20.1
205      */
206     CLOCKAPP(STScIExt.CLOCKAPP),
207 
208     /**
209      * Same as {@link STScIExt#TASSIGN}.
210      * 
211      * @since 1.20.1
212      */
213     TASSIGN(STScIExt.TASSIGN),
214 
215     /**
216      * Same as {@link DateTime#TIMEDEL}.
217      * 
218      * @since 1.20.1
219      */
220     TIMEDEL(DateTime.TIMEDEL),
221 
222     /**
223      * Same as {@link STScIExt#TIMEREF}.
224      * 
225      * @since 1.20.1
226      * 
227      * @see   #TIMEREF_LOCAL
228      * @see   #TIMEREF_GEOCENTRIC
229      * @see   #TIMEREF_HELIOCENTRIC
230      * @see   #TIMEREF_SOLARSYSTEM
231      */
232     TIMEREF(STScIExt.TIMEREF),
233 
234     /**
235      * Same as {@link STScIExt#TIMEUNIT}.
236      * 
237      * @since 1.20.1
238      */
239     TIMEUNIT(STScIExt.TIMEUNIT),
240 
241     /**
242      * Same as {@link STScIExt#TIMVERSN}.
243      * 
244      * @since 1.20.1
245      */
246     TIMVERSN(STScIExt.TIMVERSN),
247 
248     /**
249      * Same as {@link STScIExt#TIMEZERO}.
250      * 
251      * @since 1.20.1
252      */
253     TIMEZERO(STScIExt.TIMEZERO),
254 
255     /**
256      * Same as {@link STScIExt#TSTART}.
257      */
258     TSTART(STScIExt.TSTART),
259 
260     /**
261      * Same as {@link STScIExt#TSTOP}.
262      */
263     TSTOP(STScIExt.TSTOP),
264 
265     // ---- Added in 1.20.1 from the CXC Data Model specification ------------>
266 
267     // Standard header keywords
268     // MISSION(VALUE.STRING, "Grouping of related telesopes"),
269 
270     // SEQ_NUM(VALUE.INTEGER, "Sequence_number"),
271 
272     // ASCDSVER(VALUE.STRING, "Processing system revision"),
273 
274     /**
275      * Defocus distance of instrument in mm rel to best.
276      * 
277      * @since 1.20.1
278      */
279     DEFOCUS(VALUE.REAL, "[mm] Defocus distance from best"),
280 
281     // FOC_LEN(VALUE.REAL, "Telessope focal length in mm"),
282 
283     /**
284      * Configuration of instrument
285      * 
286      * @since 1.20.1
287      */
288     READMODE(VALUE.STRING, "instrument config"),
289 
290     /** Data class "observed" or "simulated". */
291     // DATACLAS(VALUE.STRING, "observed or simulated"),
292 
293     // ONTIME(VALUE.REAL, "Sum of GTIs"),
294 
295     // DTCOR(VALUE.REAL, "Dead time corretion [0.0:1.0]"),
296 
297     /**
298      * CALDB file for gain corretion
299      * 
300      * @since 1.20.1
301      */
302     GAINFILE(VALUE.STRING, "CALDB file for gain correction"),
303 
304     /**
305      * CALDB file for grade correction
306      * 
307      * @since 1.20.1
308      */
309     GRD_FILE(VALUE.STRING, "CALDB file for grade correction"),
310 
311     // Data model keywords
312 
313     /**
314      * Override {@link nom.tam.fits.header.Standard#CTYPEn} image coordinate axis name
315      * 
316      * @since 1.20.1
317      */
318     CNAMEn(VALUE.STRING, HDU.IMAGE, "coordinate axis name"),
319 
320     /**
321      * List of 'preferred cols' for making image from table
322      * 
323      * @since 1.20.1
324      */
325     CPREF(VALUE.STRING, HDU.TABLE, "list of image columns"),
326 
327     /**
328      * Data Subspace column name for column <i>n</i>.
329      * 
330      * @since 1.20.1
331      */
332     DSTYPn(VALUE.STRING, HDU.TABLE, "data subspace column name"),
333 
334     /**
335      * Data Subspace data type name (optional) for column <i>n</i>.
336      * 
337      * @since 1.20.1
338      */
339     DSFORMn(VALUE.STRING, HDU.TABLE, "data subspace data type"),
340 
341     /**
342      * Data Subspace unit name (optional) for column <i>n</i>.
343      * 
344      * @since 1.20.1
345      */
346     DSUNITn(VALUE.STRING, "data subspace unit"),
347 
348     /**
349      * Data Subspace filter list for column <i>n</i>.
350      * 
351      * @since 1.20.1
352      */
353     DSVALn(VALUE.STRING, HDU.TABLE, "data subspace filter list"),
354 
355     /**
356      * Data Subspace filter list for component <i>i</i> (leading index) and column <i>n</i> (trailing index).
357      * 
358      * @since 1.20.1
359      * 
360      * @see   #DSVALn
361      */
362     nDSVALn(VALUE.STRING, HDU.TABLE, "data subspace filter list for component"),
363 
364     /**
365      * Data Subspace table pointer for column <i>n</i>.
366      * 
367      * @since 1.20.1
368      */
369     DSREFn(VALUE.STRING, HDU.TABLE, "data subspace table pointer"),
370 
371     /**
372      * Data Subspace table pointer for component <i>i</i> (leading index) and column <i>n</i> (trailing index).
373      * 
374      * @since 1.20.1
375      * 
376      * @see   #DSVALn
377      */
378     nDSREFn(VALUE.STRING, HDU.TABLE, "data subspace table pointer for component"),
379 
380     /**
381      * Name for composite long-named keyword (f. CFITSIO HIERARCH) for column <i>n</i>. Also used to de ne array
382      * keywords.
383      * 
384      * @since 1.20.1
385      */
386     DTYPEn(VALUE.STRING, "composite keyword name"),
387 
388     /**
389      * Unit for composite long-named keyword for column <i>n</i>.
390      * 
391      * @since 1.20.1
392      */
393     DUNITn(VALUE.STRING, "composite keyword unit"),
394 
395     /**
396      * Value for composite long-named keyword for column <i>n</i>.
397      * 
398      * @since 1.20.1
399      */
400     DVALn(VALUE.ANY, HDU.TABLE, "composite keyword value"),
401 
402     /**
403      * Gives a name to an HDU. If not present, you should use EXTNAME/EXTVER.
404      * 
405      * @since 1.20.1
406      */
407     HDUNAME(VALUE.STRING, "HDU name"),
408 
409     /**
410      * Type of composite column (not yet supported)
411      * 
412      * @since 1.20.1
413      */
414     METYPn(VALUE.STRING, HDU.TABLE, "composite column type"),
415 
416     /**
417      * Comma-separated list of column names making up composite col (with {@link #MTYPEn}).
418      * 
419      * @since 1.20.1
420      */
421     MFORMn(VALUE.STRING, HDU.TABLE, "column names for composite column"),
422 
423     /**
424      * Composite column name (paired with {@link #MFORMn}).
425      * 
426      * @since 1.20.1
427      */
428     MTYPEn(VALUE.STRING, HDU.TABLE, "composite column name"),
429 
430     /**
431      * Override {@link nom.tam.fits.header.WCS#TCTYPn} table oordinate axis name.
432      * 
433      * @since 1.20.1
434      */
435     TCNAMn(VALUE.STRING, HDU.TABLE, "column coordinate axis name"),
436 
437     /**
438      * Default binning factor for table column
439      * 
440      * @since 1.20.1
441      */
442     TDBINn(VALUE.REAL, HDU.TABLE, "Default binning factor for table column"),
443 
444     /**
445      * Floating point <code>null</code> value other than NaN
446      * 
447      * @since 1.20.1
448      */
449     TDNULLn(VALUE.REAL, HDU.TABLE, "designated null value");
450 
451     /**
452      * Standard {@link #DATACLAS} value 'observed'.
453      * 
454      * @since 1.20.1
455      */
456     public static final String DATACLAS_OBSERVED = "observed";
457 
458     /**
459      * Standard {@link #DATACLAS} value 'simulated'.
460      * 
461      * @since 1.20.1
462      */
463     public static final String DATACLAS_SIMULATED = "simulated";
464 
465     /**
466      * Standard {@link InstrumentDescription#OBS_MODE} value for pointing observations.
467      * 
468      * @since 1.20.1
469      */
470     public static final String OBS_MODE_POINTING = "pointing";
471 
472     /**
473      * Standard {@link InstrumentDescription#OBS_MODE} value while slewing.
474      * 
475      * @since 1.20.1
476      */
477     public static final String OBS_MODE_SLEWING = "slewing";
478 
479     /**
480      * Standard {@link InstrumentDescription#OBS_MODE} value for ground cal observations.
481      * 
482      * @since 1.20.1
483      */
484     public static final String OBS_MODE_GROUND_CAL = "ground cal";
485 
486     /**
487      * Same as {@link STScIExt#TIMEREF_GEOCENTRIC}.
488      * 
489      * @since 1.20.1
490      */
491     public static final String TIMEREF_GEOCENTRIC = STScIExt.TIMEREF_GEOCENTRIC;
492 
493     /**
494      * Same as {@link STScIExt#TIMEREF_HELIOCENTRIC}.
495      * 
496      * @since 1.20.1
497      */
498     public static final String TIMEREF_HELIOCENTRIC = STScIExt.TIMEREF_HELIOCENTRIC;
499 
500     /**
501      * Same as {@link STScIExt#TIMEREF_SOLARSYSTEM}.
502      * 
503      * @since 1.20.1
504      */
505     public static final String TIMEREF_SOLARSYSTEM = STScIExt.TIMEREF_SOLARSYSTEM;
506 
507     /**
508      * Same as {@link STScIExt#TIMEREF_LOCAL}.
509      * 
510      * @since 1.20.1
511      */
512     public static final String TIMEREF_LOCAL = STScIExt.TIMEREF_LOCAL;
513 
514     private final FitsKey key;
515 
516     CXCExt(IFitsHeader key) {
517         this.key = key.impl();
518     }
519 
520     CXCExt(VALUE valueType, String comment) {
521         this(valueType, HDU.ANY, comment);
522     }
523 
524     CXCExt(VALUE valueType, HDU hduType, String comment) {
525         key = new FitsKey(name(), IFitsHeader.SOURCE.CXC, hduType, valueType, comment);
526     }
527 
528     @Override
529     public final FitsKey impl() {
530         return key;
531     }
532 
533 }