File: apphot.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 (81 lines) | stat: -rw-r--r-- 2,589 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
75
76
77
78
79
80
81
/*****************************************************************************/
/* apphot.h								     */
/*****************************************************************************/

#ifndef __FITSH_APPHOT_H_INCLUDED
#define	__FITSH_APPHOT_H_INCLUDED	1

typedef struct
 {	double	area;
	double	flux;
 } fracpixel;

#define		BGTYPE_MEAN		1
#define		BGTYPE_MEDIAN		2
#define		BGTYPE_MODE		3

typedef struct
 {	int	type;
	int	rejniter;
	double	rejlower,rejupper;
 } bgmode;

typedef struct
 {	double	r0,ra,da;
	double	gain;
	bgmode	bgm;
	double	*r0_poly,*ra_poly,*da_poly;
	int	nr0,nra,nda;
 } apphotpar;

typedef struct
 {	double	fw;			/* zeroth order moment: flux 	     */
	double	fwx,fwy;		/* first order moments: centroid     */
	double	fwxx,fwxy,fwyy;		/* second order moments		     */
 } apphot_out;

int	fracpixel_order(fracpixel *fp,int n);
double	fracpixel_median(fracpixel *fp,int n);
int	fracpixel_stat(fracpixel *fp,int n,double *rs,double *rmean,double *rsigma);
int	fracpixel_reject(fracpixel *fp,int n,double lower,double higher);

int	aperture_photometry_back_int(double **data,char **mask,
		int sx,int sy,double cx,double cy,apphotpar *par,
		double *rbgarea,double *rbgflux,double *rbgavg,double *rbgsigma);

int	aperture_photometry_back_ring(double **data,char **mask,
		int sx,int sy,double cx,double cy,apphotpar *par,
		double *rbgarea,double *rbgflux,double *rbgavg,double *rbgsigma,
		int *ratot,int *rabad,char **ringmask);

int	aperture_photometry_back_polygons(double **data,char **mask,
		int sx,int sy,double cx,double cy,apphotpar *par,
		double *rbgarea,double *rbgflux,double *rbgavg,double *rbgsigma,
		int *ratot,int *rabad,char **ringmask);

int	aperture_photometry_flux_circle(double **data,char **mask,int sx,int sy,
		double cx,double cy,double r0,
		double *rarea,double *rflux,
		apphot_out *out,double background,
		int *rrtot,int *rrbad,int *rrign,
		int maskignore,double **subpixeldata,int subg,char **xmask);

int	aperture_photometry_flux_polygon(double **data,char **mask,int sx,int sy,
	        double cx,double cy,double *poly,int nppoly,
		double *rarea,double *rflux,
        	apphot_out *out,double background,
	        int *rrtot,int *rrbad,int *rrign,
	        int maskignore,char **xmask);


int	aperture_photometry(fitsimage *img,char **mask,
		double cx,double cy,
		apphotpar *par,double *rflux,double *rfluxerr);

int	aperture_photometry_flux_biquad(double **c,char **mask,int sx,int sy,
		double cx,double cy,double r0,
		double *rarea,double *rflux,
		int *rrtot,int *rrbad,int *rrign,
		int maskingonre,char **xmask);

#endif