NASA Logo
Ocean Color Science Software

ocssw V2022
l1c_bin.h
Go to the documentation of this file.
1 // l1c_bin.h
2 // Created by Martin Montes on 1/30/2023
3 //
4 
5 #ifndef L1C_BIN_H
6 #define L1C_BIN_H
7 
8 #include "l1c_filehandle.h"
9 #include <stdbool.h>
10 #include <stdint.h>
11 #include "l1c_input.h"
12 #include <filehandle.h>
13 
14 namespace l1c {
15 
16 class bin_L1C {
17  protected:
18  public:
19  // methods
20  bin_L1C();
21  virtual ~bin_L1C();
22 
23  // Open, read, close
24  virtual int32_t open_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile);
25  virtual int32_t read_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile, int32_t recnum);
26  virtual int32_t close_binvars_l1c(bin_L1C *binstr, l1c_filehandle *l1cfile);
27 
28  // global attributes
29  int16_t num_gridlines;
30  int16_t nbinx;
31  size_t **nrec_2D; // row/col
32  size_t ***nrec_3D; // row/col/view
33 
34  // OCIS binned
35  float **diff_h2; // row/col
36  float ***sca_3D; // row/col/view
37  float ****QC_bitwise_4D; // row/col/view/bands
38  float ***QC_3D; // row/col/view
39  float ****I_4D; // row/col/view/bands
40  float ****I_noise_4D; // #pixels
41 
42  // OCIS line by line
43  short *obs_per_view;
44  float *QC_bitwise;
45  float *QC;
46  float *I;
47  float *I_noise;
48 
49  filehandle *l1file;
50 };
51 
52 // prototypes------
53 // Open, read, close
54 int32_t open_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile);
55 int32_t read_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile, int32_t recnum);
56 int32_t close_binvars_l1c(bin_L1C *binstr, l1c_filehandle *l1cfile);
57 
58 } // namespace l1c
59 
60 #endif /* L1C_BIN_H */
float ** diff_h2
Definition: l1c_bin.h:35
short * obs_per_view
Definition: l1c_bin.h:43
float * QC_bitwise
Definition: l1c_bin.h:44
float **** I_noise_4D
Definition: l1c_bin.h:40
float * I_noise
Definition: l1c_bin.h:47
int32_t close_binvars_l1c(bin_L1C *binstr, l1c_filehandle *l1cfile)
float *** sca_3D
Definition: l1c_bin.h:36
int32_t open_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile)
int16_t num_gridlines
Definition: l1c_bin.h:29
virtual ~bin_L1C()
Definition: l1c_bin.cpp:80
virtual int32_t open_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile)
Definition: l1c_bin.cpp:83
float *** QC_3D
Definition: l1c_bin.h:38
read recnum
filehandle * l1file
Definition: l1c_bin.h:49
Definition: l1c.cpp:71
float * QC
Definition: l1c_bin.h:45
virtual int32_t read_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile, int32_t recnum)
Definition: l1c_bin.cpp:87
size_t ** nrec_2D
Definition: l1c_bin.h:31
float **** QC_bitwise_4D
Definition: l1c_bin.h:37
float * I
Definition: l1c_bin.h:46
virtual int32_t close_binvars_l1c(bin_L1C *binstr, l1c_filehandle *l1cfile)
Definition: l1c_bin.cpp:91
size_t *** nrec_3D
Definition: l1c_bin.h:32
int16_t nbinx
Definition: l1c_bin.h:30
float **** I_4D
Definition: l1c_bin.h:39
int32_t read_binvars(bin_L1C *binstr, l1c_filehandle *l1cfile, int32_t recnum)