assoc.h 1.89 KB
Newer Older
1
2
/*
*				assoc.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
3
*
4
* Include file for assoc.c.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
5
*
6
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Emmanuel Bertin's avatar
Emmanuel Bertin committed
7
*
8
*	This file part of:	SExtractor
Emmanuel Bertin's avatar
Emmanuel Bertin committed
9
*
10
*	Copyright:		(C) 1997-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
11
12
13
14
15
16
17
18
19
20
21
22
23
24
*
*	License:		GNU General Public License
*
*	SExtractor is free software: you can redistribute it and/or modify
*	it under the terms of the GNU General Public License as published by
*	the Free Software Foundation, either version 3 of the License, or
*	(at your option) any later version.
*	SExtractor is distributed in the hope that it will be useful,
*	but WITHOUT ANY WARRANTY; without even the implied warranty of
*	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*	GNU General Public License for more details.
*	You should have received a copy of the GNU General Public License
*	along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
*
25
*	Last modified:		12/01/2011
26
27
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
Emmanuel Bertin's avatar
Emmanuel Bertin committed
28

29
30
31
32
#ifndef _FITSWCS_H_
#include        "fitswcs.h"
#endif

Emmanuel Bertin's avatar
Emmanuel Bertin committed
33
#define		ASSOC_BUFINC	131072	/* Assoc buffer increment (bytes) */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
34
35
36
37
38

/*--------------------------------- typedefs --------------------------------*/

typedef struct structassoc
  {
39
  double	*list;			/* Pointer to the list of data */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
40
41
42
43
  int		nobj;			/* Number of data rows */
  int		ncol;			/* Total number of columns per row */
  int		ndata;			/* Number of retained cols per row */
  int		*hash;			/* Pointer to the hash table */
44
45
  double	*data;			/* Copy of current parameters */
  double	radius;			/* Radius of search for association */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
46
47
48
49
  }             assocstruct;

/*------------------------------ Prototypes ---------------------------------*/

50
assocstruct	*load_assoc(char *filename, wcsstruct *wcs);
Emmanuel Bertin's avatar
Emmanuel Bertin committed
51

52
int		do_assoc(picstruct *field, double x, double y);
Emmanuel Bertin's avatar
Emmanuel Bertin committed
53
54
55
56

void		init_assoc(picstruct *field),
		end_assoc(picstruct *field),
		sort_assoc(picstruct *field, assocstruct *assoc);