OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
VcstViirsBandImg.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: ViirsBandImg.h
4  *
5  * DESCRIPTION: Subclass of ViirsBand object class that provides data structures
6  * and processes common to all imagery (IMG) bands required to support calibration
7  * processing. It is the base class for the the ViirsBandImgRsb and ViirsBandImgTeb
8  * object classes.
9  *
10  * Created on: Aug 25, 2014
11  * Author: Sam Anderson, VCST
12  *
13  *******************************************************************************/
14 
15 #ifndef VIIRSBANDIMG_H_
16 #define VIIRSBANDIMG_H_
17 
18 #include <VcstViirsCal.h>
19 #include <VcstViirsBand.h>
20 
21 class ViirsBandImg : public ViirsBand {
22 
23 public:
29 
34  ~ViirsBandImg();
35 
40  virtual int initialize();
41 
46  int initialize_L1A_data();
47 
48  // Get L1b data to pass to l2gen
49 
50  virtual int get_l1bdata(float *l1bdata) {
51  return 0;
52  }
53 
54  // constants
55  static const int I_BANDS = 5;
56  static const int DETECTORS = 32;
57  static const int C_COEFFS = 4;
58  static const int CAL_SAMPLES = 96;
59  static const int EV_PIXELS = 6400;
60  static const int MIRROR = 2;
61  static const int AGG_ZONES = 3;
62  static const int PARITY = 2;
63 
64  static const int MIN_1_1_AGG_AREA_375M = 1280;
65  static const int MAX_1_1_AGG_AREA_375M = 5119;
66  static const int MIN_1_2_1_AGG_AREA_375M = 1280;
67  static const int MAX_1_2_1_AGG_AREA_375M = 2016;
68  static const int MIN_1_2_2_AGG_AREA_375M = 4384;
69  static const int MAX_1_2_2_AGG_AREA_375M = 5120;
70  static const int MIN_1_3_AGG_AREA_375M = 2016;
71  static const int MAX_1_3_AGG_AREA_375M = 4384;
72 
74 
75  // Output arrays
80 
81  unsigned char badDetector_[DETECTORS];
82 
83  // Band identifiers
84  VIIRS_I_BAND_ENUM img_band_; // Viirs IMG band index
85  VIIRS_IMG_TEB_BAND_ENUM iteb_band_; // Viirs IMG TEB band type
86 
87 protected:
88 
93  virtual int initialize_L1B_data();
94 
102  bool precheck_scan(int scan);
103 
110  int check_pixel_quality(int band, int scan, int det,
111  short& DN_EV, unsigned short& qual);
112 
119  int calibrate_scan(int scan);
120 
127  virtual int calibrate_pixel(int row, int scan, int det, int& frm, short MS,
128  short DN_EV, float& rad, float& refl_bt, unsigned short& shrt,
129  unsigned short& qual);
130 
131 
132 };
133 
134 
136 public:
137 
143 
149 
156  int calibrate_pixel(int row, int scan, int det, int& frm, short MS,
157  short DN_EV, float& rad, float& refl, unsigned short& shrt,
158  unsigned short& qual);
159 
160 };
161 
163 public:
169 
175 
182  int calibrate_pixel(int row, int scan, int det, int& frm, short MS,
183  short DN_EV, float& rad, float& bt, unsigned short& shrt,
184  unsigned short& qual);
185 
186 };
187 
188 #endif /* VIIRSBANDIMG_H_ */
VIIRS_I_BAND_ENUM
float radiance_[VIIRS_SCANS *DETECTORS][EV_PIXELS]
int calibrate_pixel(int row, int scan, int det, int &frm, short MS, short DN_EV, float &rad, float &bt, unsigned short &shrt, unsigned short &qual)
VIIRS_BAND_ENUM
static const int MAX_1_3_AGG_AREA_375M
static const int DETECTORS
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
VIIRS_IMG_TEB_BAND_ENUM
ViirsBandImgTeb(VcstObc *pObc, VIIRS_BAND_ENUM band)
static const int MAX_1_1_AGG_AREA_375M
static const int MAX_1_2_1_AGG_AREA_375M
ViirsBandImgRsb(VcstObc *pObc, VIIRS_BAND_ENUM band)
VIIRS_I_BAND_ENUM img_band_
int initialize_L1A_data()
ViirsBandImg(VcstObc *pObc, VIIRS_BAND_ENUM band)
static const int MAX_1_2_2_AGG_AREA_375M
virtual int initialize()
int calibrate_scan(int scan)
static const int C_COEFFS
static const int AGG_ZONES
static const int MIN_1_1_AGG_AREA_375M
static const int EV_PIXELS
static const int PARITY
static const int CAL_SAMPLES
unsigned short pixelQuality_[VIIRS_SCANS *DETECTORS][EV_PIXELS]
static const int MIN_1_2_2_AGG_AREA_375M
int8_t unc_idx_[VIIRS_SCANS *DETECTORS][EV_PIXELS]
VIIRS_IMG_TEB_BAND_ENUM iteb_band_
static const int MIN_1_3_AGG_AREA_375M
unsigned char badDetector_[DETECTORS]
int check_pixel_quality(int band, int scan, int det, short &DN_EV, unsigned short &qual)
static const int I_BANDS
unsigned short short_val_[VIIRS_SCANS *DETECTORS][EV_PIXELS]
virtual int get_l1bdata(float *l1bdata)
short DN_EV_[VIIRS_SCANS][DETECTORS][EV_PIXELS]
static const int MIN_1_2_1_AGG_AREA_375M
const int VIIRS_SCANS
Definition: VcstCmnConsts.h:58
int calibrate_pixel(int row, int scan, int det, int &frm, short MS, short DN_EV, float &rad, float &refl, unsigned short &shrt, unsigned short &qual)
bool precheck_scan(int scan)
int MS[]
Definition: Usds.c:106
virtual int calibrate_pixel(int row, int scan, int det, int &frm, short MS, short DN_EV, float &rad, float &refl_bt, unsigned short &shrt, unsigned short &qual)
static const int MIRROR
virtual int initialize_L1B_data()