OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1a.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <gsl/gsl_sort.h>
#include <gsl/gsl_statistics.h>
#include "hdf.h"
#include "usrmac.h"
#include "ffm.h"
#include "cdl_object.h"
#include "hdf_object.h"
#include "SeaWiFS.h"
#include "navigation.h"
#include "l1a.h"
#include "level_1a_index.h"
#include "datatype.h"
#include "tlm.h"
#include "l1a_proto.h"
#include "WIFSHDF.h"
#include "st_lt.h"
#include "cal_l1a.h"
#include "get_cal.h"
#include "l2_flags_sw.h"
Include dependency graph for l1a.c:

Go to the source code of this file.

Macros

#define FIRST_GET_L1A_OPEN   1
 
#define DEFAULT_BUFFER_BLKSIZE   10
 
#define BLKSIZE_NOT_CHANGED   0
 
#define BLKSIZE_CHANGED   1
 
#define CLEAR   0
 
#define INIT   1
 
#define RECORDS   2
 
#define FIRST_KNEE   1
 
#define STRAY_LIGHT_COMPLETE   0
 
#define STRAY_LIGHT_LATE_START   1
 
#define STRAY_LIGHT_EARLY_STOP   2
 
#define STRAY_LIGHT_RANDOM   4
 
#define PIX_SUB_V   4.0
 
#define GAC_STRAY_LIGHT_COEF(v)   (ceil(roundingup = v/PIX_SUB_V))
 
#define LAC_STRAY_LIGHT_COEF(v)   (v)
 
#define STRAY_LIGHT_COEF(v, dtyp)   (strcmp(dtyp,"GAC")?LAC_STRAY_LIGHT_COEF(v):GAC_STRAY_LIGHT_COEF(v))
 
#define NTRY_WARNING   5
 
#define NTRY_LIMIT   20
 

Functions

int dark_rest_stat (int16 *data, int nrec, float *dark_mean, float *dark_std)
 

Variables

float32 cal_counts [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
float32 cal_rads [BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]
 
short gain8
 

Macro Definition Documentation

◆ BLKSIZE_CHANGED

#define BLKSIZE_CHANGED   1

Definition at line 178 of file l1a.c.

◆ BLKSIZE_NOT_CHANGED

#define BLKSIZE_NOT_CHANGED   0

Definition at line 177 of file l1a.c.

◆ CLEAR

#define CLEAR   0

Definition at line 186 of file l1a.c.

◆ DEFAULT_BUFFER_BLKSIZE

#define DEFAULT_BUFFER_BLKSIZE   10

Definition at line 174 of file l1a.c.

◆ FIRST_GET_L1A_OPEN

#define FIRST_GET_L1A_OPEN   1

Definition at line 171 of file l1a.c.

◆ FIRST_KNEE

#define FIRST_KNEE   1

Definition at line 191 of file l1a.c.

◆ GAC_STRAY_LIGHT_COEF

#define GAC_STRAY_LIGHT_COEF (   v)    (ceil(roundingup = v/PIX_SUB_V))

Definition at line 206 of file l1a.c.

◆ INIT

#define INIT   1

Definition at line 187 of file l1a.c.

◆ LAC_STRAY_LIGHT_COEF

#define LAC_STRAY_LIGHT_COEF (   v)    (v)

Definition at line 207 of file l1a.c.

◆ NTRY_LIMIT

#define NTRY_LIMIT   20

Definition at line 211 of file l1a.c.

◆ NTRY_WARNING

#define NTRY_WARNING   5

Definition at line 210 of file l1a.c.

◆ PIX_SUB_V

#define PIX_SUB_V   4.0

Definition at line 205 of file l1a.c.

◆ RECORDS

#define RECORDS   2

Definition at line 188 of file l1a.c.

◆ STRAY_LIGHT_COEF

#define STRAY_LIGHT_COEF (   v,
  dtyp 
)    (strcmp(dtyp,"GAC")?LAC_STRAY_LIGHT_COEF(v):GAC_STRAY_LIGHT_COEF(v))

Definition at line 208 of file l1a.c.

◆ STRAY_LIGHT_COMPLETE

#define STRAY_LIGHT_COMPLETE   0

Definition at line 201 of file l1a.c.

◆ STRAY_LIGHT_EARLY_STOP

#define STRAY_LIGHT_EARLY_STOP   2

Definition at line 203 of file l1a.c.

◆ STRAY_LIGHT_LATE_START

#define STRAY_LIGHT_LATE_START   1

Definition at line 202 of file l1a.c.

◆ STRAY_LIGHT_RANDOM

#define STRAY_LIGHT_RANDOM   4

Definition at line 204 of file l1a.c.

Function Documentation

◆ dark_rest_stat()

int dark_rest_stat ( int16 *  data,
int  nrec,
float *  dark_mean,
float *  dark_std 
)

Definition at line 261 of file l1a.c.

Variable Documentation

◆ cal_counts

float32 cal_counts[BANDS_DIMS_1A][GAINS_DIMS_1A][KNEES_DIMS_1A]

Definition at line 136 of file calib_calibrate_l1a.c.

◆ cal_rads

Definition at line 137 of file calib_calibrate_l1a.c.

◆ gain8

short gain8

Definition at line 197 of file l1a.c.