OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1bgen_oci.h File Reference
#include <stdint.h>
#include <fstream>
#include <timeutils.h>
#include <netcdf>
#include <vector>
Include dependency graph for l1bgen_oci.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  geo_struct
 
struct  cal_lut_struct
 
struct  gains_struct
 
class  l1bFile
 

Macros

#define NBWAVE   512
 
#define NRWAVE   512
 
#define NIWAVE   9
 
#define NTIMES   2
 
#define NTEMPS   30
 
#define SWAP_2(x)   ( (((x) & 0xff) << 8) | ((unsigned short)(x) >> 8) )
 
#define SWAP_4(x)
 

Functions

int read_mce_tlm (netCDF::NcFile *l1afile, netCDF::NcGroup egid, uint32_t nscan, uint32_t nenc, int32_t &ppr_off, double &revpsec, double &secpline, int32_t *mspin, int32_t *ot_10us, uint8_t *enc_count, float **hamenc, float **rtaenc)
 
int get_ev (double secpline, int16_t *dtype, int16_t *lines, int16_t *iagg, uint16_t &pcdim, uint16_t &psdim, double &ev_toff, float *clines, float *slines, double *deltc, double *delts, int16_t &iret)
 
int get_agg_mat (size_t *ia, int16_t iagg, int16_t jagg[16], uint16_t nib, uint32_t &nbb, uint32_t ntb[16], float **amat, float **gmat)
 
int read_oci_cal_lut (netCDF::NcFile *calLUTfile, std::string tag, netCDF::NcGroup gidLUT, uint32_t &banddim, cal_lut_struct &cal_lut)
 
int make_oci_gains (uint32_t nib, uint32_t banddim, uint16_t iyr, uint16_t idom, double stime, double K2t[NTIMES], cal_lut_struct &cal_lut, float **gmat, gains_struct &gains)
 
int createField (netCDF::NcGroup &ncGrp, const char *sname, const char *lname, const char *standard_name, const char *units, void *fill_value, const char *flag_values, const char *flag_meanings, double low, double high, int nt, std::vector< netCDF::NcDim > &varVec)
 
int get_oci_vecs (uint32_t nscan, uint16_t pdim, geo_struct &geoLUT, double ev_toff, int32_t spin, float *slines, double *delt, double revpsec, int32_t ppr_off, int32_t *mspin, int32_t *ot_10us, uint8_t *enc_count, float **hamenc, float **rtaenc, float **pview, double *theta, int16_t &iret)
 
template<typename T >
int get_oci_dark (size_t iscn, uint32_t nscan, uint8_t *hside, uint16_t ndsc, uint16_t nskp, int16_t iags, int16_t iagd, uint32_t ntaps, int16_t *jagg, uint32_t dfill, int16_t ndc, T ***dark, uint32_t nib, float *dc, int16_t &iret)
 
int get_oci_temp_corr (uint32_t nib, gains_struct gains, float K3T[NTEMPS], float *caltemps, uint32_t nscan, float *k3)
 
int get_oci_rvs_corr (uint32_t nib, uint16_t pdim, uint8_t hside, gains_struct gains, double *theta, float **k4)
 
int get_oci_lin_corr (uint32_t nib, uint16_t pdim, gains_struct gains, float K3T[NTEMPS], float *caltemps, float **dn, float **k5)
 
template<typename T >
T *** make3dT (size_t dims[3])
 
int expandEnvVar (std::string *sValue)
 

Macro Definition Documentation

◆ NBWAVE

#define NBWAVE   512

Definition at line 7 of file l1bgen_oci.h.

◆ NIWAVE

#define NIWAVE   9

Definition at line 9 of file l1bgen_oci.h.

◆ NRWAVE

#define NRWAVE   512

Definition at line 8 of file l1bgen_oci.h.

◆ NTEMPS

#define NTEMPS   30

Definition at line 11 of file l1bgen_oci.h.

◆ NTIMES

#define NTIMES   2

Definition at line 10 of file l1bgen_oci.h.

◆ SWAP_2

#define SWAP_2 (   x)    ( (((x) & 0xff) << 8) | ((unsigned short)(x) >> 8) )

Definition at line 50 of file l1bgen_oci.h.

◆ SWAP_4

#define SWAP_4 (   x)
Value:
( ((x) << 24) | \
(((x) << 8) & 0x00ff0000) | \
(((x) >> 8) & 0x0000ff00) | \
((x) >> 24) )

Definition at line 52 of file l1bgen_oci.h.

Function Documentation

◆ createField()

int createField ( netCDF::NcGroup &  ncGrp,
const char *  sname,
const char *  lname,
const char *  standard_name,
const char *  units,
void *  fill_value,
const char *  flag_values,
const char *  flag_meanings,
double  low,
double  high,
int  nt,
std::vector< netCDF::NcDim > &  varVec 
)

◆ expandEnvVar()

int expandEnvVar ( std::string sValue)
inline

Definition at line 156 of file l1bgen_oci.h.

◆ get_agg_mat()

int get_agg_mat ( size_t *  ia,
int16_t  iagg,
int16_t  jagg[16],
uint16_t  nib,
uint32_t &  nbb,
uint32_t  ntb[16],
float **  amat,
float **  gmat 
)

Definition at line 1312 of file l1bgen_oci.cpp.

◆ get_ev()

int get_ev ( double  secpline,
int16_t *  dtype,
int16_t *  lines,
int16_t *  iagg,
uint16_t &  pcdim,
uint16_t &  psdim,
double &  ev_toff,
float *  clines,
float *  slines,
double *  deltc,
double *  delts,
int16_t &  iret 
)

Definition at line 7 of file common.cpp.

◆ get_oci_dark()

int get_oci_dark ( size_t  iscn,
uint32_t  nscan,
uint8_t *  hside,
uint16_t  ndsc,
uint16_t  nskp,
int16_t  iags,
int16_t  iagd,
uint32_t  ntaps,
int16_t *  jagg,
uint32_t  dfill,
int16_t  ndc,
T ***  dark,
uint32_t  nib,
float *  dc,
int16_t &  iret 
)

Definition at line 1661 of file l1bgen_oci.cpp.

◆ get_oci_lin_corr()

int get_oci_lin_corr ( uint32_t  nib,
uint16_t  pdim,
gains_struct  gains,
float  K3T[NTEMPS],
float *  caltemps,
float **  dn,
float **  k5 
)

Definition at line 1817 of file l1bgen_oci.cpp.

◆ get_oci_rvs_corr()

int get_oci_rvs_corr ( uint32_t  nib,
uint16_t  pdim,
uint8_t  hside,
gains_struct  gains,
double *  theta,
float **  k4 
)

Definition at line 1798 of file l1bgen_oci.cpp.

◆ get_oci_temp_corr()

int get_oci_temp_corr ( uint32_t  nib,
gains_struct  gains,
float  K3T[NTEMPS],
float *  caltemps,
uint32_t  nscan,
float *  k3 
)

Definition at line 1778 of file l1bgen_oci.cpp.

◆ get_oci_vecs()

int get_oci_vecs ( uint32_t  nscan,
uint16_t  pdim,
geo_struct geoLUT,
double  ev_toff,
int32_t  spin,
float *  slines,
double *  delt,
double  revpsec,
int32_t  ppr_off,
int32_t *  mspin,
int32_t *  ot_10us,
uint8_t *  enc_count,
float **  hamenc,
float **  rtaenc,
float **  pview,
double *  theta,
int16_t &  iret 
)

Definition at line 56 of file common.cpp.

◆ make3dT()

T*** make3dT ( size_t  dims[3])

Definition at line 2652 of file l1bgen_oci.cpp.

◆ make_oci_gains()

int make_oci_gains ( uint32_t  nib,
uint32_t  banddim,
uint16_t  iyr,
uint16_t  idom,
double  stime,
double  K2t[NTIMES],
cal_lut_struct cal_lut,
float **  gmat,
gains_struct gains 
)

Definition at line 1478 of file l1bgen_oci.cpp.

◆ read_mce_tlm()

int read_mce_tlm ( netCDF::NcFile *  l1afile,
netCDF::NcGroup  egid,
uint32_t  nscan,
uint32_t  nenc,
int32_t &  ppr_off,
double &  revpsec,
double &  secpline,
int32_t *  mspin,
int32_t *  ot_10us,
uint8_t *  enc_count,
float **  hamenc,
float **  rtaenc 
)

◆ read_oci_cal_lut()

int read_oci_cal_lut ( netCDF::NcFile *  calLUTfile,
std::string  tag,
netCDF::NcGroup  gidLUT,
uint32_t &  banddim,
cal_lut_struct cal_lut 
)