OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
VcstViirsCal.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: VcstViirsCal.h
4  *
5  * DESCRIPTION: Object class that provides application programming interfaces
6  * for initialization, calibration, and L1B creation.
7  *
8  * Created on: February 25, 2015
9  * Author: Sam Anderson, VCST
10  *
11  *******************************************************************************/
12 
13 #ifndef VcstViirsCal_h
14 #define VcstViirsCal_h
15 
16 #include <VcstObc.h>
17 #include <VcstParamsReader.h>
18 
19 class VcstViirsCal {
20 public:
21 
22  bool bRad_;
23  bool bCdg_;
24  bool processModByScan_;
25  string history_;
26  string source_files_;
27 
28  static char const* DISABLE_SERVO_CONTROL;
29 
30  static const char VIIRS_NIGHT = 0;
31  static const char VIIRS_DAY = 1;
32  static const char VIIRS_MIXED = 2;
33 
39 
44  virtual ~VcstViirsCal();
45 
52  int initialize(bool bRad, bool bFilt, bool bCDG, bool bLunar);
53 
61 
66  inline const bool doCdg() {
67  return bCdg_;
68  };
69 
70  inline const void setCdg(const bool bCdg) {
71  bCdg_ = bCdg;
72  };
73 
81  history_ = history;
82  }
83 
84  inline std::string getHistory() {
85  return history_;
86  }
87 
88  inline void setSource(std::string source) {
89  source_files_ = source;
90  }
91 
92  inline std::string getSource() {
93  return source_files_;
94  }
95 
96  int calibrateMOD(int iScan, float **l1bptrs);
97 
98 private:
99 
104  VcstObc* pObc_;
105 
110  std::vector<VIIRS_BAND_ENUM> imgBands_;
111  std::vector<VIIRS_BAND_ENUM> modBands_;
112  std::vector<VIIRS_BAND_ENUM> dnbBands_;
113 
120  int create_band_lists(VIIRS_CATEGORY_ENUM bands);
121 
129  int calibrate_img_bands();
130 
138  int calibrate_mod_bands();
139 
147  int calibrate_dnb_bands();
148 
153  int write_global_attributes(NcFile* nc_output, string type);
154 
160  const NcFile* write_img();
161 
167  const NcFile* write_mod();
168 
174  const NcFile* write_cdg();
175 
181  const NcFile* write_dnb();
182 
183  // scan line attributes
184  double scan_time_fill_value_;
185  double scan_time_valid_min_;
186  double scan_time_valid_max_;
187 
188  // scan state flag attributes
189  static const short NUM_SCAN_STATE_FLAGS = 3;
190  unsigned char scan_state_fill_value_;
191  vector<unsigned char> scan_state_flag_masks_;
192 
193  // scan quality flag attributes
194  static const short NUM_SCAN_QUALITY_FLAGS = 7;
195  unsigned char scan_quality_fill_value_;
196  vector<unsigned char> scan_quality_flag_masks_;
197 
198 };
199 
200 #endif
201 
const bool doCdg()
Definition: VcstViirsCal.h:76
std::string getSource()
Definition: VcstViirsCal.h:102
int calibrateMOD(int iScan, float **l1bptrs)
void setSource(std::string source)
Definition: VcstViirsCal.h:98
VIIRS_CATEGORY_ENUM
@ string
static const char VIIRS_NIGHT
Definition: VcstViirsCal.h:40
void setHistory(std::string history)
Definition: VcstViirsCal.h:90
static char const * DISABLE_SERVO_CONTROL
Definition: VcstViirsCal.h:38
virtual ~VcstViirsCal()
const void setCdg(const bool bCdg)
Definition: VcstViirsCal.h:80
string history
Definition: ncattredit.py:30
bool processModByScan_
Definition: VcstViirsCal.h:34
string history_
Definition: VcstViirsCal.h:35
string source_files_
Definition: VcstViirsCal.h:36
std::string getHistory()
Definition: VcstViirsCal.h:94
static const char VIIRS_MIXED
Definition: VcstViirsCal.h:42
static const char VIIRS_DAY
Definition: VcstViirsCal.h:41
int calibrate(VIIRS_CATEGORY_ENUM bands)
int initialize(bool bRad, bool bFilt, bool bCDG, bool bLunar)