File: fiinfo.h

package info (click to toggle)
fitsh 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,768 kB
  • ctags: 4,050
  • sloc: ansic: 53,352; makefile: 1,120; sh: 25
file content (74 lines) | stat: -rw-r--r-- 2,359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*****************************************************************************/
/* fiinfo.h								     */
/*****************************************************************************/

#ifndef	__FIINFO_H_INCLUDED
#define	__FIINFO_H_INCLUDED	1

#include <fits/fits.h>

#include "math/point.h"

/*****************************************************************************/

typedef struct
 {	int	r,g,b;
 } color;

typedef struct
 {	color	beg,end;
 } gradient;

typedef struct
 {	int		is_color,is_invert,is_16bit;
	int		minmaxmethod,scalemethod;
	int		mmin_set,mmax_set;
	double		manmin,manmax;
	double		zcontrast,percentage;
	double		contrast,brightness;
	gradient	*palette;	
	int		ncol;
	int		is_flip,is_mirror;
 } pnmparam;

/* fiinfo-pnm.c */ /**********************************************************/

#define	MM_MINMAX	0	/* automatic min, automatic max	*/
#define	MM_ZSCALE	1	/* zscale			*/
#define	MM_ZMIN		2	/* zmin				*/
#define	MM_ZMAX		3	/* zmax				*/
#define	MM_PERCENTAGE	4	/* percentage (see also DS9)	*/
#define	MM_MANUAL	5	/* manual min, manual max	*/

#define	SCALE_LINEAR	0
#define	SCALE_HISTEQU	1
#define	SCALE_LOG	2
#define	SCALE_SQRT	3
#define	SCALE_SQUARED	4

int	fitsimage_dump_pnm(fitsimage *img,char **mask,FILE *fw,pnmparam *pp);
int	parse_palette(char *pstr,gradient **rpal,int *rncol);

/* fiinfo-image.c */ /********************************************************/

int	create_link_background(fitsimage *img,char **mask,fitsimage *bgi,int nx,int ny);
int	fits_stat_basic(fitsimage *img,char **mask,double *rmin,double *rmax,double *rmean,double *rstdd);

double	estimate_skysigma_naive(double *rawdata,int k,double sky,double smm,double spp);
int	fits_stat_raw_sky_skysigma(double *data,int ndat,double stddev,double *rsky,double *rskysigma);

int	fits_stat_sky(fitsimage *img,double stddev,double *rsky,double *rskysigma);
double	fits_stat_median(fitsimage *img);

int	fits_stat_background(fitsimage *img,int nbx,int nby,point **pdsky,point **pdsigma,double stddev);

int	fits_stat_sky_like_isis(fitsimage *img,double stddev,double *rsky,double *rskysigma);
int	fits_stat_sky_biquad(fitsimage *img,double stddev,double *rsky,double *rskysigma);


/*****************************************************************************/

#endif

/*****************************************************************************/