public software.psfex

[/] [branches/] [rhl/] [src/] [field.h] - Blame information for rev 191

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 157 bertin
/*
2
*                               field.h
3 76 bertin
*
4 157 bertin
* Include file for field.c.
5 76 bertin
*
6 157 bertin
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 76 bertin
*
8 157 bertin
*       This file part of:      PSFEx
9 76 bertin
*
10 176 bertin
*       Copyright:              (C) 2007-2012 Emmanuel Bertin -- IAP/CNRS/UPMC
11 76 bertin
*
12 157 bertin
*       License:                GNU General Public License
13
*
14
*       PSFEx is free software: you can redistribute it and/or modify
15
*       it under the terms of the GNU General Public License as published by
16
*       the Free Software Foundation, either version 3 of the License, or
17
*       (at your option) any later version.
18
*       PSFEx is distributed in the hope that it will be useful,
19
*       but WITHOUT ANY WARRANTY; without even the implied warranty of
20
*       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
*       GNU General Public License for more details.
22
*       You should have received a copy of the GNU General Public License
23
*       along with PSFEx.  If not, see <http://www.gnu.org/licenses/>.
24
*
25 177 bertin
*       Last modified:          25/06/2012
26 157 bertin
*
27
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
28 76 bertin
 
29
#ifndef _CONTEXT_H_
30
#include "context.h"
31
#endif
32
 
33
#ifndef _FITSWCS_H_
34
#include "fitswcs.h"
35
#endif
36
 
37
#ifndef _PSF_H_
38
#include "psf.h"
39
#endif
40
 
41 119 bertin
#ifndef _SAMPLE_H_
42
#include "sample.h"
43
#endif
44
 
45 76 bertin
#ifndef _PSFMEF_H_
46
#define _PSFMEF_H_
47
 
48
/*----------------------------- Internal constants --------------------------*/
49 119 bertin
#define COUNT_LOADED    1               /* Count detections that are loaded */
50
#define COUNT_ACCEPTED  2               /* Count detections that are accepted */
51 76 bertin
 
52
/*------------------------------ Type definitions ---------------------------*/
53
/*--------------------------- structure definitions -------------------------*/
54
 
55
typedef struct field
56
  {
57
  char          catname[MAXCHAR];       /* Input catalog filename */
58
  char          *rcatname;              /* "Reduced" catalog name */
59 112 bertin
  char          rtcatname[MAXCHAR];     /* "Reduced", no trail catalog name */
60 84 bertin
  char          ident[MAXCHAR];         /* Field identifier (read from FITS) */
61 76 bertin
  int           next;                   /* Number of extensions */
62 111 bertin
  int           ndet;                   /* Number of detections (info only) */
63 76 bertin
  psfstruct     **psf;                  /* Array of PSFs */
64
  wcsstruct     **wcs;                  /* Array of WCS structures */
65 80 bertin
  setstruct     *set;                   /* Array of catalogues */
66 87 bertin
  catstruct     **ccat;                 /* Pointers to check-image files */
67 76 bertin
  double        meanwcspos[NAXIS];      /* Mean pixel coordinate */
68
  double        meanwcsscale[NAXIS];    /* Mean pixel scale */
69
  double        maxradius;              /* Maxium radius */
70 119 bertin
  int           **lcount;               /* Count detections that are loaded */
71
  int           **acount;               /* Count detections that are accepted */
72 150 bertin
  int           **count;                /* Count detections in stats */
73
  double        **modchi2;              /* Sum of chi2's per image area */
74
  double        **modresi;              /* Sum of res. indices per image area */
75 76 bertin
  }     fieldstruct;
76
 
77
/*---------------------------------- protos --------------------------------*/
78
extern fieldstruct      *field_init(char *catname);
79
 
80 119 bertin
extern void             field_count(fieldstruct **fields, setstruct *set,
81
                                int counttype),
82
                        field_end(fieldstruct *field),
83 191 rhl
                        field_init_finalize(fieldstruct *field),
84 76 bertin
                        field_locate(fieldstruct *field),
85 150 bertin
                        field_psfsave(fieldstruct *field, char *filename),
86 177 bertin
                        field_stats(fieldstruct **fields, setstruct *set);
87 76 bertin
 
88
void                    context_apply(contextstruct *context, psfstruct *psf,
89 110 bertin
                                fieldstruct **fields, int ext, int catindex,
90
                                int ncat),
91 76 bertin
                        context_end(contextstruct *context);
92
 
93
#endif
94