Changeset 3361 for trunk/Ohana/src/addstar/include/addstar.h
- Timestamp:
- Mar 2, 2005, 7:54:17 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/addstar/include/addstar.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/include/addstar.h
r3347 r3361 2 2 # include <loneos.h> 3 3 # include <signal.h> 4 # include <sys/time.h> 5 # include <time.h> 6 7 /* used in find_matches, find_matches_refstars */ 8 # define IN_CATALOG(R,D) ( \ 9 ((D) >= region[0].DEC[0]) && ((D) < region[0].DEC[1]) && \ 10 ((R) >= region[0].RA[0]) && ((R) < region[0].RA[1])) 11 12 /* grab named photcode */ 13 # define NAMED_PHOTCODE(CODE,NAME) \ 14 CODE = GetPhotcodebyName (NAME); \ 15 if (!CODE) { \ 16 fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", NAME); \ 17 exit (0); } 4 18 5 19 typedef struct { … … 14 28 double Mgal, Map; 15 29 int found; 30 short int code; 31 e_time t; 16 32 } Stars; 33 34 /* structure for data on a catalog region */ 35 typedef struct { 36 char filename[256]; 37 double RA[2]; 38 int Nrec; 39 } TM_Region; 17 40 18 41 enum {M_IMAGE, M_REFLIST, M_REFCAT}; … … 34 57 35 58 PhotCode *thiscode; 59 GSCRegion patch; 36 60 37 61 char DateKeyword[64]; … … 57 81 int ONLY_MATCH; 58 82 83 int MODE; 84 59 85 time_t TIMEREF; 60 86 … … 70 96 void gregion_star (Stars *star, GSCRegion *region); 71 97 GSCRegion *gregion_image (Image *image, int *Nregions); 72 Image *gimages (FILE *f, Image *image, int *Npimage);73 98 int edge_check (double *x1, double *y1, double *x2, double *y2); 74 99 double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3); 75 void wimage (FILE *f, int dbstate, Image *image, int Nstars);76 100 Stars *gstars (char *file, int *NSTARS, Image *image); 77 void find_matches_refstars (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog);78 void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *pimage, int Nimage);79 101 int in_image (double r, double d, Image *image); 80 102 void wcatalog (Catalog *catalog); 81 103 void ConfigInit (int *argc, char **argv); 82 104 void aregion (GSCRegion *region, FILE *f, double ra, double dec); 83 void wimage (FILE *f, int dbstate, Image *image, int Nstars); 84 double airmass (double ra, double dec, double st, double latitude); 105 short airmass (short secz_image, double ra, double dec, double st, double latitude); 85 106 void InitCalibration (); 86 void SaveCalibration (float M, float dM, float Mr, float dMr, float Mc, float A, int N, float ra, float dec, float x, float y);87 107 void FindCalibration (Image *image); 88 108 double get_subpix (double x, double y); … … 91 111 void mkcatalog (GSCRegion *region, Catalog *catalog); 92 112 Stars *grefstars (char *file, int *Nstars); 93 Stars * find_subset (GSCRegion *region, Stars *stars, int Nstars, int *NSTARS);113 Stars **find_subset (GSCRegion *region, Stars *stars, int Nstars, int *NSTARS); 94 114 int match_refstars (Stars *stars, int Nstars); 95 115 int parse_time (Header *header); … … 113 133 time_t jd_to_sec (double jd); 114 134 time_t date_to_sec (char *date); 135 time_t short_date_to_sec (char *date); 136 115 137 116 138 /** … … 122 144 e_time pointer from one of these functions) 123 145 **/ 146 147 Stars *get2mass (GSCRegion *patch, int *NSTARS); 148 TM_Region *get2mass_acc (GSCRegion *patch, int *nfiles); 149 Stars *get2mass_data (char *filename, GSCRegion *patch, int *nstars); 150 GSCRegion *gregion_stars (Stars *stars, int Nstars, int *Nregion); 151 Stars *grefstars (char *file, int *Nstars); 152 GSCRegion *LoadRegions (int *nregions); 153 int FindRegionByPoint (GSCRegion *regions, double ra, double dec, GSCRegion *gsc, int Ngsc); 154 int FindRegionDecBandStart (GSCRegion *region, int Nregion, double dec); 155 int FindRegionDecBandStop (GSCRegion *region, int Nregion, double dec); 156 int hms_to_deg (double *h0, double *h1, double *d0, double *d1, char *string); 157 void find_matches_refstars (GSCRegion *region, Stars **stars, int Nstars, Catalog *catalog); 158 Stars *gstars (char *file, int *NSTARS, Image *image); 159 void find_matches (GSCRegion *region, Stars *stars, int Nstars, Catalog *catalog, Image *image, Image *overlap, int Noverlap); 160 Stars *getusno (GSCRegion *catstats, int *Nstars); 161 Stars *rd_gsc (char *filename, int *nstars); 162 Stars *getgsc (GSCRegion *patch, int *NSTARS); 163 Stars *grefcat (char *Refcat, GSCRegion *catstats, int *nstars); 164 void load_subpix (); 165 double get_subpix (double x, double y); 166 double scat_subpix (double x, double y); 167 void help (); 168 int args (int argc, char **argv); 169 void InitCalibration (); 170 void SaveCalibration (float M, float dM, float Mr, float dMr, float Mc, float A, int N); 171 void AddToCalibration (Average *average, Measure *measure, Measure *new, int Nstar); 172 void FindCalibration (Image *image); 173 int load_pt_catalog (Catalog *catalog, GSCRegion *region); /*** choose new name ***/ 174 void save_pt_catalog (Catalog *catalog); /*** choose new name ***/ 175 void wcatalog (Catalog *catalog); 176 GSCRegion *gregions (Image *image, int *Nregions); 177 int gcatalog (Catalog *catalog); 178 GSCRegion *gregion_image (Image *image, int *Nregions); 179 void update_coords (Average *average, Measure *measure, int *next); 180 int replace_match (Average *average, Measure *measure, Stars *star); 181 FILE *GetDB (int *state); 182 int Shutdown (); 183 void lock_image_db (); 184 void unlock_image_db (Image *image); 185 void wimage (Image *image); 186 Image *gimages (Image *image, int *Npimage); 187 double opening_angle (double x1, double y1, double x2, double y2, double x3, double y3); 188 int edge_check (double *x1, double *y1, double *x2, double *y2); 189 GSCRegion *gregion_match (GSCRegion *regions, int *nregions); 190 GSCRegion *gregion_patch (GSCRegion *patch, int *nregions);
Note:
See TracChangeset
for help on using the changeset viewer.
