OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
extract_sub.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "hdf.h"
#include "mfhdf.h"
#include "regen.h"
#include "regen_attr.h"
#include "regen_proto.h"
#include "navigation.h"
#include <timeutils.h>
Include dependency graph for extract_sub.c:

Go to the source code of this file.

Macros

#define CHUNK_SZ   500
 
#define L1ADATA   "l1a_data"
 

Functions

int32 regen (char *infile, int32 *ssamp, int32 *esamp, int32 *srec, int32 *erec, int32 px_sub, int32 sc_sub, char *parm_list, char *outfile)
 
void set_subsc_params (int32 nsamp, int32 nrec, int32 xsub, int32 ysub, int32 *ssamp, int32 *esamp, int32 *srec, int32 *erec, int32 *subsc_samps, int32 *subsc_recs, int32 *max_samp_used, int32 *max_rec_used)
 
int32 getset_gattrs (int32 isdfid, int32 osdfid)
 
int32 dupHDF (int32 ifid, int32 ofid, int32 isdfid, int32 osdfid, int32 *ssamp, int32 *esamp, int32 *srec, int32 *erec, int32 xsub, int32 ysub, int32 subsc_samps, int32 subsc_recs, int32 nvgps, char *parm_list)
 
int32 set_sds (int32 isdfid, int32 osdfid, char *vgname, int32 ovid, int32 tag, int32 ref, int32 subsc_samps, int32 subsc_recs, char *parm_list, int32 *in_sdsid, int32 *out_sdsid)
 
int32 write_data (int32 isdfid, int32 osdfid, int32 isdsid, int32 osdsid, int32 ssamp, int32 srec, int32 esamp, int32 erec, int32 xsub, int32 ysub)
 
int32 subsample (int32 rank, int32 *idims, int32 *odims, int32 num_type, int32 srec, int32 erec, int32 ssamp, int32 esamp, int32 xsub, int32 ysub, void *ibuf, void *obuf)
 
int32 rdattr (int32 sdfid, char *attr_name, void *buf)
 
int32 rdslice (int32 sdfid, char *name, int32 *start, int32 *edge, void *buf)
 
int32 update_sds (int32 sdfid, char *name, int32 *start, int32 *edge, void *buf)
 
int32 alloc_geonav_buffs (int32 nrec, GeoType *geo_rec)
 
void free_geonav_buffs (GeoType *geo_rec)
 
int32 get_geodata (int32 pix_start, int32 pix_sub, int32 srec, int32 ssamp, int32 max_rec_used, int32 subsc_samps, int32 ysub, int32 xsub, char *dtype, NavType *nav_rec, GeoType *geo_rec)
 
int32 write_coords (int32 sdfid, int32 nrec, GeoType *geo_rec)
 
int32 get_tiltdata (int32 sdfid, tilt_Type *tiltrec)
 
int32 set_tiltdata (int32 sdfid, int32 srec, int32 erec, int32 ysub, float32 *slatrec, float32 *slonrec, float32 *elatrec, float32 *elonrec, tilt_Type *old_tiltrec, tilt_Type *new_tiltrec)
 
int32 set_flags (int32 sdfid, int32 nrec, int32 nsamp, int32 *flags)
 
int32 alloc_nav_buffs (int32 nrec, NavType *nav_rec)
 
int32 get_navdata (int32 sdfid, int32 nrec, NavType *nav_rec)
 
void free_nav_buffs (NavType *nav_rec)
 
int32 subsamp_rec (int32 srec, int32 maxrec, int32 rank, int32 *dims, int32 ysub, int32 nt, void *obuf, void *nbuf)
 
void subsamp_2D (int32 spix, int32 sscan, int32 epix, int32 escan, int32 xdim, int32 xsub, int32 ysub, int32 nt, void *inbuf, void *outbuf)
 
int32 set_l1adata (int32 isdfid, int32 osdfid, int32 num_recs, int32 num_samps, int32 subsc_recs, int32 subsc_samps, int32 srec, int32 ssamp, int32 erec, int32 esamp, int32 xsub, int32 ysub, FilemetricsType *fm_rec)
 
int32 subsamp_l1adata (int32 srec, int32 erec, int32 ssamp, int32 esamp, int32 xsub, int32 ysub, int32 nsamp, int16 *gain, int16 *dark_rest, FilemetricsType *fm_rec, int16 *inbuf, int16 *outbuf, int16 *s_satp, int16 *s_zerop, int32 *new_buf_recs)
 
int32 set_globalattrs (char *outfile, int32 sdfid, int32 l1aflag, int32 nrec, int32 nsamp, int32 ssamp, int32 xsub, int32 *flags, GeoType *geo_rec, FilemetricsType *fm_rec)
 

Variables

char ERR_MSG [255]
 

Macro Definition Documentation

◆ CHUNK_SZ

#define CHUNK_SZ   500

Definition at line 116 of file extract_sub.c.

◆ L1ADATA

#define L1ADATA   "l1a_data"

Definition at line 117 of file extract_sub.c.

Function Documentation

◆ alloc_geonav_buffs()

int32 alloc_geonav_buffs ( int32  nrec,
GeoType *  geo_rec 
)

Definition at line 1236 of file extract_sub.c.

◆ alloc_nav_buffs()

int32 alloc_nav_buffs ( int32  nrec,
NavType *  nav_rec 
)

Definition at line 1691 of file extract_sub.c.

◆ dupHDF()

int32 dupHDF ( int32  ifid,
int32  ofid,
int32  isdfid,
int32  osdfid,
int32 *  ssamp,
int32 *  esamp,
int32 *  srec,
int32 *  erec,
int32  xsub,
int32  ysub,
int32  subsc_samps,
int32  subsc_recs,
int32  nvgps,
char *  parm_list 
)

Definition at line 569 of file extract_sub.c.

◆ free_geonav_buffs()

void free_geonav_buffs ( GeoType *  geo_rec)

Definition at line 1282 of file extract_sub.c.

◆ free_nav_buffs()

void free_nav_buffs ( NavType *  nav_rec)

Definition at line 1813 of file extract_sub.c.

◆ get_geodata()

int32 get_geodata ( int32  pix_start,
int32  pix_sub,
int32  srec,
int32  ssamp,
int32  max_rec_used,
int32  subsc_samps,
int32  ysub,
int32  xsub,
char *  dtype,
NavType *  nav_rec,
GeoType *  geo_rec 
)

Definition at line 1326 of file extract_sub.c.

◆ get_navdata()

int32 get_navdata ( int32  sdfid,
int32  nrec,
NavType *  nav_rec 
)

Definition at line 1741 of file extract_sub.c.

◆ get_tiltdata()

int32 get_tiltdata ( int32  sdfid,
tilt_Type *  tiltrec 
)

Definition at line 1446 of file extract_sub.c.

◆ getset_gattrs()

int32 getset_gattrs ( int32  isdfid,
int32  osdfid 
)

Definition at line 390 of file extract_sub.c.

◆ rdattr()

int32 rdattr ( int32  sdfid,
char *  attr_name,
void *  buf 
)

Definition at line 1087 of file extract_sub.c.

◆ rdslice()

int32 rdslice ( int32  sdfid,
char *  name,
int32 *  start,
int32 *  edge,
void *  buf 
)

Definition at line 1126 of file extract_sub.c.

◆ regen()

int32 regen ( char *  infile,
int32 *  ssamp,
int32 *  esamp,
int32 *  srec,
int32 *  erec,
int32  px_sub,
int32  sc_sub,
char *  parm_list,
char *  outfile 
)

Definition at line 152 of file extract_sub.c.

◆ set_flags()

int32 set_flags ( int32  sdfid,
int32  nrec,
int32  nsamp,
int32 *  flags 
)

Definition at line 1645 of file extract_sub.c.

◆ set_globalattrs()

int32 set_globalattrs ( char *  outfile,
int32  sdfid,
int32  l1aflag,
int32  nrec,
int32  nsamp,
int32  ssamp,
int32  xsub,
int32 *  flags,
GeoType *  geo_rec,
FilemetricsType *  fm_rec 
)

Definition at line 2296 of file extract_sub.c.

◆ set_l1adata()

int32 set_l1adata ( int32  isdfid,
int32  osdfid,
int32  num_recs,
int32  num_samps,
int32  subsc_recs,
int32  subsc_samps,
int32  srec,
int32  ssamp,
int32  erec,
int32  esamp,
int32  xsub,
int32  ysub,
FilemetricsType *  fm_rec 
)

Definition at line 2039 of file extract_sub.c.

◆ set_sds()

int32 set_sds ( int32  isdfid,
int32  osdfid,
char *  vgname,
int32  ovid,
int32  tag,
int32  ref,
int32  subsc_samps,
int32  subsc_recs,
char *  parm_list,
int32 *  in_sdsid,
int32 *  out_sdsid 
)

Definition at line 661 of file extract_sub.c.

◆ set_subsc_params()

void set_subsc_params ( int32  nsamp,
int32  nrec,
int32  xsub,
int32  ysub,
int32 *  ssamp,
int32 *  esamp,
int32 *  srec,
int32 *  erec,
int32 *  subsc_samps,
int32 *  subsc_recs,
int32 *  max_samp_used,
int32 *  max_rec_used 
)

Definition at line 318 of file extract_sub.c.

◆ set_tiltdata()

int32 set_tiltdata ( int32  sdfid,
int32  srec,
int32  erec,
int32  ysub,
float32 *  slatrec,
float32 *  slonrec,
float32 *  elatrec,
float32 *  elonrec,
tilt_Type *  old_tiltrec,
tilt_Type *  new_tiltrec 
)

Definition at line 1503 of file extract_sub.c.

◆ subsamp_2D()

void subsamp_2D ( int32  spix,
int32  sscan,
int32  epix,
int32  escan,
int32  xdim,
int32  xsub,
int32  ysub,
int32  nt,
void *  inbuf,
void *  outbuf 
)

Definition at line 1929 of file extract_sub.c.

◆ subsamp_l1adata()

int32 subsamp_l1adata ( int32  srec,
int32  erec,
int32  ssamp,
int32  esamp,
int32  xsub,
int32  ysub,
int32  nsamp,
int16 *  gain,
int16 *  dark_rest,
FilemetricsType *  fm_rec,
int16 *  inbuf,
int16 *  outbuf,
int16 *  s_satp,
int16 *  s_zerop,
int32 *  new_buf_recs 
)

Definition at line 2187 of file extract_sub.c.

◆ subsamp_rec()

int32 subsamp_rec ( int32  srec,
int32  maxrec,
int32  rank,
int32 *  dims,
int32  ysub,
int32  nt,
void *  obuf,
void *  nbuf 
)

Definition at line 1856 of file extract_sub.c.

◆ subsample()

int32 subsample ( int32  rank,
int32 *  idims,
int32 *  odims,
int32  num_type,
int32  srec,
int32  erec,
int32  ssamp,
int32  esamp,
int32  xsub,
int32  ysub,
void *  ibuf,
void *  obuf 
)

Definition at line 1039 of file extract_sub.c.

◆ update_sds()

int32 update_sds ( int32  sdfid,
char *  name,
int32 *  start,
int32 *  edge,
void *  buf 
)

Definition at line 1188 of file extract_sub.c.

◆ write_coords()

int32 write_coords ( int32  sdfid,
int32  nrec,
GeoType *  geo_rec 
)

Definition at line 1398 of file extract_sub.c.

◆ write_data()

int32 write_data ( int32  isdfid,
int32  osdfid,
int32  isdsid,
int32  osdsid,
int32  ssamp,
int32  srec,
int32  esamp,
int32  erec,
int32  xsub,
int32  ysub 
)

Definition at line 788 of file extract_sub.c.

Variable Documentation

◆ ERR_MSG

char ERR_MSG[255]

Definition at line 119 of file extract_sub.c.