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.WCS;
39  
40  /**
41   * <p>
42   * This keyword dictionary gathered form STScI.
43   * </p>
44   * <p>
45   * See <a href=
46   * "http://tucana.noao.edu/ADASS/adass_proc/adass_95/zaraten/zaraten.html">http://tucana.noao.edu/ADASS/adass_proc/adass_95/zaraten/zaraten.html</a>.
47   * Additional keywords added in 1.20.1 based on the
48   * <a href="https://outerspace.stsci.edu/display/MASTDOCS/Required+Metadata">HLSP Contributor Guide</a>
49   * </p>
50   *
51   * @author Attila Kovacs and Richard van Nieuwenhoven
52   */
53  public enum STScIExt implements IFitsHeader {
54  
55      /**
56       * Type approach vectors. E.g. 'COMBINED'
57       */
58      APPVEC(VALUE.STRING, "type of approach vectors"),
59  
60      /**
61       * Telemetry data rate (baud).
62       */
63      BIT_RATE(VALUE.REAL, "[bit/s] telemetry rate"),
64  
65      /**
66       * Whether clock correction applied (boolean).
67       * <p>
68       * T
69       * </p>
70       */
71      CLOCKAPP(VALUE.LOGICAL, "is clock correction applied?"),
72  
73      /**
74       * date of initial data represented (yy/mm/dd)
75       * 
76       * @see nom.tam.fits.header.DateTime#DATE_BEG
77       */
78      DATE_BEG("DATE-BEG", VALUE.STRING, HDU.ANY, "date of initial data represented."),
79  
80      /**
81       * Date of original file creation (yy/mm/dd)
82       */
83      DATE_MAP("DATE-MAP", VALUE.STRING, HDU.ANY, "date of original file creation"),
84  
85      /**
86       * Pointing error in declination (degrees; 1-sigma)
87       */
88      DEC_PNTE(VALUE.REAL, "[deg] declination pointing error "),
89  
90      /**
91       * Detector X field of view (mm)
92       */
93      FOV_X_MM(VALUE.REAL, "[mm] detector X field of view"),
94  
95      /**
96       * Detector X field of view (mm)
97       */
98      FOV_Y_MM(VALUE.REAL, "[mm] detector Y field of view"),
99  
100     /**
101      * BITS/PIXEL OF IPPS RASTER.
102      * 
103      * @deprecated In truth this is an illegal FITS keyword, as the character '/' is not allowed in standard FITS
104      *                 keywords. If possible, avoid using it since it may result in FITS that is not readable by some
105      *                 software.
106      */
107     @Deprecated
108     IPPS_B_P("IPPS-B/P", VALUE.INTEGER, HDU.ANY, "[bits/pixel] of IPPS raster."),
109 
110     /**
111      * IPPS identification, such as target name, possibly including IPPS configuration
112      */
113     IPPS_ID("IPPS-ID", VALUE.STRING, HDU.ANY, "IPPS ID"),
114 
115     /**
116      * Maximum value in raster
117      */
118     IPPS_MAX("IPPS-MAX", VALUE.REAL, HDU.ANY, "maximum value in raster"),
119 
120     /**
121      * Minimum value in raster
122      */
123     IPPS_MIN("IPPS-MIN", VALUE.REAL, HDU.ANY, "minimum value in raster"),
124 
125     /**
126      * Raster LFN / raster ordinal
127      */
128     IPPS_RF("IPPS-RF", VALUE.STRING, HDU.ANY, "raster LFN / raster ordinal"),
129 
130     /**
131      * ?
132      */
133     JOBNAME(VALUE.STRING, ""),
134 
135     /**
136      * @deprecated Use the standard {@link DateTime#MJD_OBS} instead.
137      */
138     @Deprecated
139     MJD_OBS(DateTime.MJD_OBS),
140 
141     /**
142      * @deprecated Use the standard {@link DateTime#MJDREF} instead.
143      */
144     @Deprecated
145     MJDREF(DateTime.MJDREF),
146 
147     /**
148      * Fractional portion of ephemeris MJD
149      */
150     MJDREFF(VALUE.REAL, "[day] fractional portion of ephemeris MJD"),
151 
152     /**
153      * Integer portion of ephemeris MJD
154      */
155     MJDREFI(VALUE.INTEGER, "[day] integer portion of ephemeris MJD"),
156 
157     /**
158      * Modal Configuration ID
159      */
160     MODAL_ID(VALUE.STRING, "modal Configuration ID"),
161 
162     /**
163      * Optical axis position in both linearized detector coordinates and sky coordinates.
164      */
165     OPTICn(VALUE.REAL, "optical axis position along coordinate"),
166 
167     /**
168      * beginning orbit number
169      */
170     ORBITBEG(VALUE.INTEGER, "beginning orbit number"),
171 
172     /**
173      * ending orbit number
174      */
175     ORBITEND(VALUE.INTEGER, "ending orbit number"),
176 
177     /**
178      * Pointing error in position angle (degrees; 1-sigma)
179      */
180     PA_PNTE(VALUE.REAL, "[deg] position angle error"),
181 
182     /**
183      * Quad tree pixel resolution
184      */
185     PIXRESOL(VALUE.REAL, "quad tree pixel resolution"),
186 
187     /**
188      * Processing script version
189      */
190     PROCVER(VALUE.STRING, "processing script version"),
191 
192     /**
193      * Data product description?
194      */
195     PRODUCT(VALUE.STRING, ""),
196 
197     /**
198      * Pointing error in right ascension (degrees, 1-sigma)
199      */
200     RA_PNTE(VALUE.REAL, "R.A. pointing error"),
201 
202     /**
203      * Sequential number from ODB
204      */
205     SEQNUM(VALUE.INTEGER, "sequential number from ODB"),
206 
207     /**
208      * Number of times sequence processed
209      */
210     SEQPNUM(VALUE.INTEGER, "number of times sequence processed"),
211 
212     /**
213      * solar elongations included. E.g. 'ALL'
214      */
215     SOLELONG(VALUE.STRING, "selection of solar elongations"),
216 
217     /**
218      * @deprecated Use the standard {@link WCS#TCDLTn} instead.
219      */
220     @Deprecated
221     TCDLTn(WCS.TCDLTn),
222 
223     /**
224      * @deprecated Use the standard {@link WCS#TCRPXn} instead.
225      */
226     @Deprecated
227     TCRPXn(WCS.TCRPXn),
228 
229     /**
230      * @deprecated Use the standard {@link WCS#TCRVLn} instead.
231      */
232     @Deprecated
233     TCRVLn(WCS.TCRVLn),
234 
235     /**
236      * @deprecated Use the standard {@link WCS#TCTYPn} instead
237      */
238     @Deprecated
239     TCTYPn(WCS.TCTYPn),
240 
241     /**
242      * <p>
243      * Specifies where the time assignment of the data is done. for example, for EXOSAT time assignment was made at the
244      * Madrid tracking station, so TASSIGN ='Madrid'. Since the document goes on to state that this information is
245      * relevant for barycentric corrections, one assumes that this means what is of interest is not the location of the
246      * computer where time tags where inserted into the telemetry stream, but whether those time tags refer to the
247      * actual photon arrival time or to the time at which the telemetry reached the ground station, etc.
248      * </p>
249      * <p>
250      * For example, for Einstein the time assignment was performed at the ground station but corrected to allow for the
251      * transmission time between satellite and ground, so I presume in this case TASSIGN='SATELLITE'. I believe that for
252      * AXAF, TASSIGN = 'SATELLITE'. OGIP/93-003 also speci es the location for the case of a ground station should be
253      * recorded the keywords GEOLAT, GEOLONG, and ALTITUDE. This is rather unfortunate since it would be nice to reserve
254      * these keywords for the satellite ephemeris position. However, since no ground station is de ned for AXAF, we feel
255      * that we can use GEOLONG, GEOLAT, and ALTITUDE for these purposes, especially since such usage is consistent with
256      * their usage for ground-based observations. TASSIGN has obviously no meaning when TIMESYS = 'TDB'.
257      * </p>
258      */
259     TASSIGN(VALUE.STRING, "location where time was assigned"),
260 
261     /**
262      * Time reference frame.
263      * 
264      * @see #TIMEREF_LOCAL
265      * @see #TIMEREF_GEOCENTRIC
266      * @see #TIMEREF_HELIOCENTRIC
267      * @see #TIMEREF_SOLARSYSTEM
268      */
269     TIMEREF(VALUE.STRING, "time reference frame"),
270 
271     /**
272      * Units of time, for example 's' for seconds. If absent, assume seconds.
273      */
274     TIMEUNIT(VALUE.STRING, "units of time"),
275 
276     /**
277      * Version of time specification convention.
278      */
279     TIMVERSN(VALUE.STRING, "version of time convention"),
280 
281     /**
282      * Clock correction (if not zero), in {@link #TIMEUNIT}.
283      */
284     TIMEZERO(VALUE.REAL, "clock offset"),
285 
286     /**
287      * The value field of this keyword shall contain the value of the start time of data acquisition in units of
288      * TIMEUNIT, relative to MJDREF, JDREF, or DATEREF and TIMEOFFS, in the time system specified by the TIMESYS
289      * keyword. Similar to {@link DateTime#TSTART} except that it strictly uses decimal values.
290      */
291     TSTART(VALUE.REAL, "start time of observartion"),
292 
293     /**
294      * The value field of this keyword shall contain the value of the stop time of data acquisition in units of
295      * TIMEUNIT, relative to MJDREF, JDREF, or DATEREF and TIMEOFFS, in the time system specified by the TIMESYS
296      * keyword. Similar to {@link DateTime#TSTOP} except that it strictly uses decimal values.
297      */
298     TSTOP(VALUE.REAL, "stop time of observation"),
299 
300     /**
301      * Version of Data Reduction Software
302      */
303     VERSION(VALUE.STRING, "data reduction software version"),
304 
305     /**
306      * nominal wavelength of band <i>n</i>, value + unit. For example '140. microns'.
307      */
308     WAVEn(VALUE.STRING, "band wavelength and unit"),
309 
310     /**
311      * Whether map was corrected for zodiacal light
312      */
313     ZLREMOV(VALUE.LOGICAL, "whether zodiacal light was removed"),
314 
315     // ------------------------------------------------------------->
316     // from https://outerspace.stsci.edu/display/MASTDOCS/Common+Metadata
317 
318     /**
319      * Digital Object Identifier for the HLSP data collection
320      * 
321      * @since 1.20.1
322      */
323     DOI(VALUE.STRING, HDU.PRIMARY, "DOI of HLSP data collection"),
324 
325     /**
326      * The identifier (acronym) for this HLSP collection.
327      * 
328      * @since 1.20.1
329      */
330     HLSPID(VALUE.STRING, HDU.PRIMARY, "HLSP collection ID"),
331 
332     /**
333      * Full name of HLSP project lead
334      * 
335      * @since 1.20.1
336      */
337     HLSPLEAD(VALUE.STRING, HDU.PRIMARY, "HLSP project lead"),
338 
339     /**
340      * Title for HLSP project, long form
341      * 
342      * @since 1.20.1
343      */
344     HLSPNAME(VALUE.STRING, HDU.PRIMARY, "HLSP project title"),
345 
346     /**
347      * Designation of the target(s) or field(s) for this HLSP
348      * 
349      * @since 1.20.1
350      */
351     HLSPTARG(VALUE.STRING, HDU.PRIMARY, "HLSP target fields"),
352 
353     /**
354      * Version identifier for this HLSP product
355      * 
356      * @since 1.20.1
357      */
358     HLSPVER(VALUE.STRING, HDU.PRIMARY, "HLSP product version"),
359 
360     /**
361      * License for use of these data, with the value 'CC BY 4.0'
362      * 
363      * @see   #LICENURL
364      * 
365      * @since 1.20.1
366      */
367     LICENSE(VALUE.STRING, HDU.PRIMARY, "data license"),
368 
369     /**
370      * Data license URL, with the value 'https://creativecommons.org/licenses/by/4.0/'
371      * 
372      * @see   #LICENSE
373      * 
374      * @since 1.20.1
375      */
376     LICENURL(VALUE.STRING, HDU.PRIMARY, "data license URL"),
377 
378     /**
379      * Observatory program/proposal identifier, if applicable
380      * 
381      * @since 1.20.1
382      */
383     PROPOSID(VALUE.STRING, HDU.PRIMARY, "program/proposal ID"),
384 
385     /**
386      * Duration of exposure, exclusive of dead time, in seconds.
387      */
388     XPOSURE(VALUE.REAL, "[s] exposure time excl. dead time"),
389 
390     // ------------------------------------------------------------->
391     // https://outerspace.stsci.edu/display/MASTDOCS/Image+Metadata
392 
393     /**
394      * ID of detector used for exposure
395      * 
396      * @since 1.20.1
397      */
398     DETECTOR(VALUE.STRING, "ID of detector used for exposure"),
399 
400     /**
401      * Name(s) of filter(s) used to define the passband, if more than one was used, with nn incrementing from 1 (and
402      * zero-pad if nn >9). As such for a passband index of 4, you might use <code>FILTERnn.n(0).n(4)</code> to construct
403      * 'FILTER04'. It is similar to the more standard {@link nom.tam.fits.header.InstrumentDescription#FILTERn} keyword
404      * except for the 2-digit, zero-padded, indexing for bands 1--9.
405      * 
406      * @since 1.20.1
407      */
408     FILTERnn(VALUE.STRING, "filter of passband n"),
409 
410     /**
411      * Declination coordinate of the target or field, in degrees
412      * 
413      * @since 1.20.1
414      */
415     DEC_TARG(VALUE.REAL, "[deg] target/field declination"),
416 
417     /**
418      * Typical spatial extent of the point-spread function, in pix
419      * 
420      * @since 1.20.1
421      */
422     PSFSIZE(VALUE.REAL, "[pix] Width of point-spread function"),
423 
424     /**
425      * Right Ascension coordinate of the target or field, in degrees
426      * 
427      * @since 1.20.1
428      */
429     RA_TARG(VALUE.REAL, "[deg] target/field right ascension"),
430 
431     // ------------------------------------------------------------->
432     // https://outerspace.stsci.edu/display/MASTDOCS/Spectral+Metadata
433 
434     /**
435      * Name of dispersive element used, or 'MULTI' if more than one defined the passband.
436      * 
437      * @see   #DISPRSR_MULTI
438      * 
439      * @since 1.20.1
440      */
441     DISPRSR(VALUE.STRING, "dispersive element used"),
442 
443     /**
444      * Name(s) of dispersive element(s) used for exposure if more than one was used, with nn (zero-padded) incrementing
445      * from 1. Note that this information can alternatively be represented in a PROVENANCE extension. See Provenance
446      * Metadata for details. As such for a passband index of 4, you might use <code>DISPRnn.n(0).n(4)</code> to
447      * construct 'DISPR04'.
448      * 
449      * @since 1.20.1
450      */
451     DISPRnn(VALUE.STRING, "dispersive element n"),
452 
453     // ------------------------------------------------------------->
454     // https://outerspace.stsci.edu/display/MASTDOCS/Provenance+Metadata
455 
456     /**
457      * File name or observatory-unique identifier of the contributing observation. For products from MAST missions,
458      * provide the Observation ID so that the contributing data may be linked within MAST.
459      * 
460      * @since 1.20.1
461      */
462     FILE_ID(VALUE.STRING, "File name or obervation UID");
463 
464     /**
465      * Time is reported when detected wavefront passed the center of Earth, a standard value for {@link #TIMEREF}.
466      * 
467      * @since 1.20.1
468      */
469     public static final String TIMEREF_GEOCENTRIC = "GEOCENTRIC";
470 
471     /**
472      * Time is reported when detected wavefront passed the center of the Sun, a standard value for {@link #TIMEREF}.
473      * 
474      * @since 1.20.1
475      */
476     public static final String TIMEREF_HELIOCENTRIC = "HELIOCENTRIC";
477 
478     /**
479      * Time is reported when detected wavefront passed the Solar System barycenter, a standard value for
480      * {@link #TIMEREF}.
481      * 
482      * @since 1.20.1
483      */
484     public static final String TIMEREF_SOLARSYSTEM = "SOLARSYSTEM";
485 
486     /**
487      * Time reported is actual time of detection, a standard value for {@link #TIMEREF}.
488      * 
489      * @since 1.20.1
490      */
491     public static final String TIMEREF_LOCAL = "LOCAL";
492 
493     /**
494      * Standard {@link nom.tam.fits.header.InstrumentDescription#FILTER} value if multiple passbands are used.
495      */
496     public static final String FILTER_MULTI = "MULTI";
497 
498     /**
499      * Standard {@link #DISPRSR} value if multiple passbands are used.
500      */
501     public static final String DISPRSR_MULTI = "MULTI";
502 
503     /**
504      * Data quality (binary) flags, with zero indicating no anthologies
505      */
506     public static final String COLNAME_FLAGS = "FLAGS";
507 
508     /**
509      * Could also be called "FLUX_DENSITY" or something similar, depending upon the quantity stored. Flux(es) for the
510      * associated wavelength(s), in units of the value of the TUNIT keyword for this column.
511      */
512     public static final String COLNAME_FLUX = "FLUX";
513 
514     /**
515      * Variance in the flux(es) at the associated wavelength(s)
516      */
517     public static final String COLNAME_VARIANCE = "VARIANCE";
518 
519     /**
520      * Wavelength(s) for the associated flux(es), in units of the TUNIT keyword for this column.
521      */
522     public static final String COLNAME_WAVELENGTH = "WAVELENGTH";
523 
524     private final FitsKey key;
525 
526     STScIExt(IFitsHeader key) {
527         this.key = key.impl();
528     }
529 
530     STScIExt(VALUE valueType, String comment) {
531         this(null, valueType, HDU.ANY, comment);
532     }
533 
534     STScIExt(VALUE valueType, HDU hduType, String comment) {
535         this(null, valueType, hduType, comment);
536     }
537 
538     STScIExt(String key, VALUE valueType, HDU hduType, String comment) {
539         this.key = new FitsKey(key == null ? name() : key, IFitsHeader.SOURCE.STScI, hduType, valueType, comment);
540     }
541 
542     @Override
543     public final FitsKey impl() {
544         return key;
545     }
546 
547 }