View Javadoc
1   package nom.tam.fits.header.extra;
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  import nom.tam.fits.header.FitsKey;
35  import nom.tam.fits.header.IFitsHeader;
36  
37  /**
38   * <p>
39   * A Set of commonly used keywords in the amateur astronomy community.
40   * </p>
41   *
42   * @author John Murphy and Attila Kovacs
43   * 
44   * @since  1.20.1
45   */
46  public enum CommonExt implements IFitsHeader {
47  
48      /** Ambient air temperature in degrees Celsius */
49      AMBTEMP(VALUE.REAL, "[C] ambient air temperature"),
50  
51      /** Synonym of {@link #OBJCTROT}. */
52      ANGLE(VALUE.REAL, HDU.IMAGE, "[deg] image rotation angle"),
53  
54      /** X axis binning factor. Synonym for {@link SBFitsExt#XBINNING} */
55      CCDXBIN(VALUE.INTEGER, "X axis binning factor"),
56  
57      /** Y axis binning factor. Synonym for {@link SBFitsExt#YBINNING} */
58      CCDYBIN(VALUE.INTEGER, "Y axis binning factor"),
59  
60      /** Cloud cover as percentage */
61      CLOUDCVR(VALUE.REAL, "[%] cloud cover"),
62  
63      /** Local time of observation (ISO timestamp), e.g. "2017-01-03T02:41:24" or "2024-02-24T22:23:33.054" */
64      DATE_LOC("DATE-LOC", VALUE.STRING, "Local time of observation"),
65  
66      /** Dew point in degrees Celsius. */
67      DEWPOINT(VALUE.REAL, "[C] dew point"),
68  
69      /** Whether or not the image is flipped */
70      FLIPPED(VALUE.LOGICAL, HDU.IMAGE, "is image flipped"),
71  
72      /** Name of focuser. Synonym of {@link #FOCUSER} */
73      FOCNAME(VALUE.STRING, "focuser name"),
74  
75      /** Focuser position in steps. Usually an integer, but not always. Synonymous to {@link MaxImDLExt#FOCUSPOS} */
76      FOCPOS(VALUE.REAL, "[ct] focuser position in steps"),
77  
78      /** Focal ratio */
79      FOCRATIO(VALUE.REAL, "focal ratio"),
80  
81      /** Name of focuser */
82      FOCUSER(VALUE.STRING, "focuser name"),
83  
84      /** Focus temperature in degrees Celsius. Synonymous to {@link MaxImDLExt#FOCUSTEM}. */
85      FOCTEMP(VALUE.REAL, "[C] focuser temperature readout"),
86  
87      /** Filter wheel name */
88      FWHEEL(VALUE.STRING, "filter wheel name"),
89  
90      /**
91       * Camera gain / amplification. Often used the same as {@link #GAINRAW}. There may be many different conventions on
92       * using this keyword. For example it may represent a multiplicative gain factor or gain defined as decibels, or
93       * strings such as 'HI'/'LO', or even as a boolean T/F. Therefore, this definition does not restrict the type of
94       * value this keyword can be used with. It is up to the user to ensure they follow the convention that makes most
95       * sense to their application, and for the tools they intend to use.
96       */
97      GAIN(VALUE.ANY, "camera gain"),
98  
99      /** Synonym of {@link MaxImDLExt#EGAIN} */
100     GAINADU(VALUE.REAL, "[ct/adu] amplifier gain electrons / ADU"),
101 
102     /** Amplifier gain. Synonym of {@link MaxImDLExt#ISOSPEED} */
103     GAINRAW(VALUE.REAL, "gain factor"),
104 
105     /** Relative humidity as percentage */
106     HUMIDITY(VALUE.REAL, "[%] relative humidity"),
107 
108     /** Image rotation angle in degrees. **/
109     OBJCTROT(VALUE.REAL, HDU.IMAGE, "[deg] image rotation angle"),
110 
111     /** Camera offset setting. Very common since CMOS cameras became popular */
112     OFFSET(VALUE.INTEGER, "camera offset setting"),
113 
114     /**
115      * Image scale in arcsec/pixel. Redundant with {@link nom.tam.fits.header.Standard#CDELTn}.
116      */
117     PIXSCALE(VALUE.REAL, HDU.IMAGE, "[arcsec/pixel] image scale"),
118 
119     /** Air pressure in hPa. */
120     PRESSURE(VALUE.REAL, "[hPa] air pressure"),
121 
122     /**
123      * Image scale in arcsec / pixel. Synonym of {@link #PIXSCALE}, and redundant with
124      * {@link nom.tam.fits.header.Standard#CDELTn}.
125      */
126     SCALE(VALUE.REAL, HDU.IMAGE, "[arcsec/pixel] image scale"),
127 
128     /** Elevation of observing site above sea level in meters */
129     SITEELEV(VALUE.REAL, "[m] elevation at observing site"),
130 
131     /** Observatory site, e.g. "Maunakea" */
132     SITENAME(VALUE.STRING, "observatory site"),
133 
134     /** Wind direction clockwise from North [0:360] */
135     WINDDIR(VALUE.REAL, "[deg] wind direction: 0=N, 90=E, 180=S, 270=W"),
136 
137     /** Average wind speed in km/h */
138     WINDSPD(VALUE.REAL, "[km/h] wind speed");
139 
140     private final FitsKey key;
141 
142     CommonExt(VALUE valueType, String comment) {
143         this(null, valueType, comment);
144     }
145 
146     CommonExt(VALUE valueType, HDU hduType, String comment) {
147         this(null, valueType, hduType, comment);
148     }
149 
150     CommonExt(String key, VALUE valueType, String comment) {
151         this(key, valueType, HDU.ANY, comment);
152     }
153 
154     CommonExt(String key, VALUE valueType, HDU hduType, String comment) {
155         this.key = new FitsKey(key == null ? name() : key, SOURCE.UNKNOWN, hduType, valueType, comment);
156     }
157 
158     @Override
159     public final FitsKey impl() {
160         return key;
161     }
162 
163 }