cfitsio  3390
Macros | Functions
quantize.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include "fitsio2.h"
Include dependency graph for quantize.c:

Macros

#define NINT(x)   ((x >= 0.) ? (int) (x + 0.5) : (int) (x - 0.5))
 
#define NULL_VALUE   -2147483647 /* value used to represent undefined pixels */
 
#define ZERO_VALUE   -2147483646 /* value used to represent zero-valued pixels */
 
#define N_RESERVED_VALUES   10 /* number of reserved values, starting with */
 
#define SIGMA_CLIP   5.
 
#define NITER   3 /* number of sigma-clipping iterations */
 
#define ELEM_SWAP(a, b)   { register float t=(a);(a)=(b);(b)=t; }
 
#define ELEM_SWAP(a, b)   { register short t=(a);(a)=(b);(b)=t; }
 
#define ELEM_SWAP(a, b)   { register int t=(a);(a)=(b);(b)=t; }
 
#define ELEM_SWAP(a, b)   { register LONGLONG t=(a);(a)=(b);(b)=t; }
 
#define ELEM_SWAP(a, b)   { register double t=(a);(a)=(b);(b)=t; }
 

Functions

int fits_quantize_float (long row, float fdata[], long nxpix, long nypix, int nullcheck, float in_null_value, float qlevel, int dither_method, int idata[], double *bscale, double *bzero, int *iminval, int *imaxval)
 
int fits_quantize_double (long row, double fdata[], long nxpix, long nypix, int nullcheck, double in_null_value, float qlevel, int dither_method, int idata[], double *bscale, double *bzero, int *iminval, int *imaxval)
 
int fits_img_stats_short (short *array, long nx, long ny, int nullcheck, short nullvalue, long *ngoodpix, short *minvalue, short *maxvalue, double *mean, double *sigma, double *noise1, double *noise2, double *noise3, double *noise5, int *status)
 
int fits_img_stats_int (int *array, long nx, long ny, int nullcheck, int nullvalue, long *ngoodpix, int *minvalue, int *maxvalue, double *mean, double *sigma, double *noise1, double *noise2, double *noise3, double *noise5, int *status)
 
int fits_img_stats_float (float *array, long nx, long ny, int nullcheck, float nullvalue, long *ngoodpix, float *minvalue, float *maxvalue, double *mean, double *sigma, double *noise1, double *noise2, double *noise3, double *noise5, int *status)
 

Macro Definition Documentation

#define ELEM_SWAP (   a,
 
)    { register float t=(a);(a)=(b);(b)=t; }
#define ELEM_SWAP (   a,
 
)    { register short t=(a);(a)=(b);(b)=t; }
#define ELEM_SWAP (   a,
 
)    { register int t=(a);(a)=(b);(b)=t; }
#define ELEM_SWAP (   a,
 
)    { register LONGLONG t=(a);(a)=(b);(b)=t; }
#define ELEM_SWAP (   a,
 
)    { register double t=(a);(a)=(b);(b)=t; }
#define N_RESERVED_VALUES   10 /* number of reserved values, starting with */
#define NINT (   x)    ((x >= 0.) ? (int) (x + 0.5) : (int) (x - 0.5))
#define NITER   3 /* number of sigma-clipping iterations */
#define NULL_VALUE   -2147483647 /* value used to represent undefined pixels */
#define SIGMA_CLIP   5.
#define ZERO_VALUE   -2147483646 /* value used to represent zero-valued pixels */

Function Documentation

int fits_img_stats_float ( float *  array,
long  nx,
long  ny,
int  nullcheck,
float  nullvalue,
long *  ngoodpix,
float *  minvalue,
float *  maxvalue,
double *  mean,
double *  sigma,
double *  noise1,
double *  noise2,
double *  noise3,
double *  noise5,
int *  status 
)

Here is the caller graph for this function:

int fits_img_stats_int ( int *  array,
long  nx,
long  ny,
int  nullcheck,
int  nullvalue,
long *  ngoodpix,
int *  minvalue,
int *  maxvalue,
double *  mean,
double *  sigma,
double *  noise1,
double *  noise2,
double *  noise3,
double *  noise5,
int *  status 
)

Here is the caller graph for this function:

int fits_img_stats_short ( short *  array,
long  nx,
long  ny,
int  nullcheck,
short  nullvalue,
long *  ngoodpix,
short *  minvalue,
short *  maxvalue,
double *  mean,
double *  sigma,
double *  noise1,
double *  noise2,
double *  noise3,
double *  noise5,
int *  status 
)

Here is the caller graph for this function:

int fits_quantize_double ( long  row,
double  fdata[],
long  nxpix,
long  nypix,
int  nullcheck,
double  in_null_value,
float  qlevel,
int  dither_method,
int  idata[],
double *  bscale,
double *  bzero,
int *  iminval,
int *  imaxval 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int fits_quantize_float ( long  row,
float  fdata[],
long  nxpix,
long  nypix,
int  nullcheck,
float  in_null_value,
float  qlevel,
int  dither_method,
int  idata[],
double *  bscale,
double *  bzero,
int *  iminval,
int *  imaxval 
)

Here is the call graph for this function:

Here is the caller graph for this function: