OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
VcstViirsBandMod.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: ViirsBandMod.h
4  *
5  * DESCRIPTION: Subclass of ViirsBand object class that provides data structures
6  * and processes common to all moderate resolution (MOD) bands required to support
7  * calibration processing. It is the base class for the the ViirsBandModDG and
8  * ViirsBandModSG object classes.
9  *
10  * Created on: Aug 25, 2014
11  * Author: Sam Anderson, VCST
12  *
13  *******************************************************************************/
14 
15 #ifndef VIIRSBANDMOD_H_
16 #define VIIRSBANDMOD_H_
17 
18 #include <VcstViirsBand.h>
19 
20 class ViirsBandMod : public ViirsBand {
21 
22 public:
23  // constants
24 
25  static const int M_BANDS = 16;
26 
27  static const int EV_PIXELS = 3200;
28  static const int DETECTORS = 16;
29  static const int CAL_SAMPLES = 48;
30  static const int MIRROR = 2;
31  static const int GAIN_STATE = 2;
32  static const int C_COEFFS = 4;
33 
34  // dual-gain sample attributes
35 
36  vector<unsigned short> sample_quality_flag_masks_;
37 
41  VIIRS_M_BAND_ENUM mod_band_; // Viirs MOD band index
42  VIIRS_MOD_SG_BAND_ENUM sg_band_; // Viirs SG band type
43  VIIRS_MOD_DG_BAND_ENUM dg_band_; // Viirs SG band type
44  VIIRS_MOD_RSB_BAND_ENUM mrsb_band_; // Viirs M TEB band type
45  VIIRS_MOD_TEB_BAND_ENUM mteb_band_; // Viirs M TEB band type
46 
51  typedef short dn_ev_array[DETECTORS][EV_PIXELS];
52  typedef float flt_pix_array[EV_PIXELS];
53  typedef unsigned short shrt_pix_array[EV_PIXELS];
54  typedef unsigned int int_pix_array[EV_PIXELS];
55  typedef int8_t byte_pix_array[EV_PIXELS];
62 
63  unsigned char badDetector_[DETECTORS];
64 
70 
76 
81  virtual int initialize();
82 
87  int get_l1bdata(float *l1bdata);
88 
89 
94  int initialize_L1A_data();
95 
96 protected:
97 
102  virtual int initialize_L1B_data();
103 
111  bool precheck_scan(int scan);
112 
119  virtual int check_pixel_quality(int band, int scan, int det,
120  short& DN_EV, unsigned short& qual);
121 
128  virtual int calibrate_scan(int scan);
129 
136  virtual int calibrate_pixel(int row, int scan, int det, int& frm, short MS,
137  short DN_EV, float& rad, float& refl_bt, unsigned int& shrt,
138  unsigned short& qual);
139 
146  virtual int getSVFromEV();
147 };
148 
149 
151 
152 public:
153 
159 
165 
166 protected:
167 
174  int calibrate_pixel(int row, int scan, int det, int& frm, short MS,
175  short DN_EV, float& rad, float& refl, unsigned int& shrt,
176  unsigned short& qual);
177 
178 };
179 
180 
182 
183 public:
184 
190 
196 
197 
198 protected:
199 
206  int calibrate_pixel(int row, int scan, int det, int& frm, short MS,
207  short DN_EV, float& rad, float& refl, unsigned int& shrt,
208  unsigned short& qual);
209 
210 };
211 
212 #endif /* VIIRSBANDMOD_H_ */
VIIRS_MOD_TEB_BAND_ENUM
dn_ev_array * DN_EV_
static const int EV_PIXELS
byte_pix_array * unc_idx_
static const int CAL_SAMPLES
static const int M_BANDS
VIIRS_BAND_ENUM
vector< unsigned short > sample_quality_flag_masks_
int16_t * qual
Definition: l2bin.cpp:86
MOD_PR01 Production producing one five minute granule of output data in each run It can be configured to produce as many as three five minute granules per run Each execution with one construction record and one date file for each dataset In normal these are created by which splits them out of the hour datasets For LANCE they are created by which merges all session MODIS L0 datasets overlapping the requested time and extracts from the merged data those packets which fall within that time period Each scan of data is stored in the L1A granule that covers the start time of that scan
Definition: MOD_PR01_pr.txt:19
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second band
virtual int initialize_L1B_data()
static const int GAIN_STATE
unsigned short shrt_pix_array[EV_PIXELS]
int calibrate_pixel(int row, int scan, int det, int &frm, short MS, short DN_EV, float &rad, float &refl, unsigned int &shrt, unsigned short &qual)
VIIRS_M_BAND_ENUM
int_pix_array * long_val_
VIIRS_MOD_DG_BAND_ENUM dg_band_
short dn_ev_array[DETECTORS][EV_PIXELS]
VIIRS_MOD_DG_BAND_ENUM
flt_pix_array * radiance_
unsigned char badDetector_[DETECTORS]
virtual int initialize()
int initialize_L1A_data()
int calibrate_pixel(int row, int scan, int det, int &frm, short MS, short DN_EV, float &rad, float &refl, unsigned int &shrt, unsigned short &qual)
VIIRS_MOD_SG_BAND_ENUM sg_band_
shrt_pix_array * short_val_
float flt_pix_array[EV_PIXELS]
static const int DETECTORS
virtual int calibrate_pixel(int row, int scan, int det, int &frm, short MS, short DN_EV, float &rad, float &refl_bt, unsigned int &shrt, unsigned short &qual)
VIIRS_M_BAND_ENUM mod_band_
ViirsBandModSGTeb(VcstObc *pObc, VIIRS_BAND_ENUM band)
ViirsBandMod(VcstObc *pObc, VIIRS_BAND_ENUM band)
int get_l1bdata(float *l1bdata)
shrt_pix_array * pixelQuality_
virtual int calibrate_scan(int scan)
unsigned int int_pix_array[EV_PIXELS]
ViirsBandModSGRsb(VcstObc *pObc, VIIRS_BAND_ENUM band)
static const int MIRROR
virtual int check_pixel_quality(int band, int scan, int det, short &DN_EV, unsigned short &qual)
VIIRS_MOD_TEB_BAND_ENUM mteb_band_
virtual int getSVFromEV()
int8_t byte_pix_array[EV_PIXELS]
static const int C_COEFFS
int MS[]
Definition: Usds.c:106
VIIRS_MOD_SG_BAND_ENUM
bool precheck_scan(int scan)
VIIRS_MOD_RSB_BAND_ENUM mrsb_band_
VIIRS_MOD_RSB_BAND_ENUM