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