NASA Logo
Ocean Color Science Software

ocssw V2022
scale_sds.c File Reference
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <dfutils.h>
#include <genutils.h>
#include <productInfo.h>
#include <hdf.h>
#include <mfhdf.h>
Include dependency graph for scale_sds.c:

Go to the source code of this file.

Functions

int16_t getDataTypeInt (productInfo_t *p_info)
 
int16_t * float2int16 (float32 fbuf[], int32_t spix, int32_t npix, int incr, float slope, float offset)
 
uint16_t * float2uint16 (float32 fbuf[], int32_t spix, int32_t npix, int incr, float slope, float offset)
 
uint8_t * float2uint8 (float32 fbuf[], int32_t spix, int32_t npix, int incr, float slope, float offset)
 
int8_t * float2int8 (float32 fbuf[], int32_t spix, int32_t npix, int incr, float slope, float offset)
 
void * scale_sds (float *data, productInfo_t *p, int npix)
 
float * unscale_sds (void *data, productInfo_t *p, int32_t spix, int32_t npix, int incr)
 

Function Documentation

◆ float2int16()

int16_t* float2int16 ( float32  fbuf[],
int32_t  spix,
int32_t  npix,
int  incr,
float  slope,
float  offset 
)

Definition at line 45 of file scale_sds.c.

◆ float2int8()

int8_t* float2int8 ( float32  fbuf[],
int32_t  spix,
int32_t  npix,
int  incr,
float  slope,
float  offset 
)

Definition at line 169 of file scale_sds.c.

◆ float2uint16()

uint16_t* float2uint16 ( float32  fbuf[],
int32_t  spix,
int32_t  npix,
int  incr,
float  slope,
float  offset 
)

Definition at line 90 of file scale_sds.c.

◆ float2uint8()

uint8_t* float2uint8 ( float32  fbuf[],
int32_t  spix,
int32_t  npix,
int  incr,
float  slope,
float  offset 
)

Definition at line 129 of file scale_sds.c.

◆ getDataTypeInt()

int16_t getDataTypeInt ( productInfo_t *  p_info)

getDataTypeInt - returns the HDF definitions for the productInfo dataype

Parameters
p_info
Returns

Definition at line 16 of file scale_sds.c.

◆ scale_sds()

void* scale_sds ( float *  data,
productInfo_t *  p,
int  npix 
)

Definition at line 210 of file scale_sds.c.

◆ unscale_sds()

float* unscale_sds ( void *  data,
productInfo_t *  p,
int32_t  spix,
int32_t  npix,
int  incr 
)

Definition at line 245 of file scale_sds.c.