- Timestamp:
- Mar 9, 2012, 7:14:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/relastro/include/relastro.h
r32740 r33448 15 15 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 16 16 17 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE} FitTarget; 17 typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE, TARGET_UPDATE_OBJECTS, TARGET_UPDATE_OFFSETS, TARGET_LOAD_OBJECTS} FitTarget; 18 19 typedef struct { 20 Average *average; // array of (minimal) average data 21 MeasureTiny *measure; // array of (minimal) measure data 22 SecFilt *secfilt; // array of secfilt data (matched to average by Nsecfilt) 23 off_t Naverage; 24 off_t Nmeasure; 25 } BrightCatalog; 26 27 typedef struct { 28 Catalog *catalog; // array of catalogs generated 29 int NCATALOG; // number of catalogs allocated 30 int Ncatalog; // number of catalogs generated 31 int Nsecfilt; // number of catalogs generated 32 off_t *NAVERAGE; // allocated Averages per catalog 33 off_t *NMEASURE; // allocated Measures per catalog 34 int *index; // lookup table catID -> catalog[i] 35 int *catIDs; // lookup table catID <- catalog[i] 36 int maxID; // max catID value to date 37 } CatalogSplitter; 18 38 19 39 typedef struct { … … 86 106 87 107 /* global variables set in parameter file */ 88 char ImageCat[256]; 89 char GSCFILE[256]; 90 char CATDIR[256]; 108 # define MAX_PATH_LENGTH 1024 109 char ImageCat[MAX_PATH_LENGTH]; 110 char GSCFILE[MAX_PATH_LENGTH]; 111 char CATDIR[MAX_PATH_LENGTH]; 91 112 char *HIGH_SPEED_DIR; 92 113 char CATMODE[16]; /* raw, mef, split, mysql */ 93 114 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 94 char SKY_TABLE[ 256];115 char SKY_TABLE[MAX_PATH_LENGTH]; 95 116 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ 117 118 int HOST_ID; 119 char *HOSTDIR; 120 char *BCATALOG; 96 121 97 122 unsigned int OBJ_ID_SRC; … … 109 134 110 135 double RADIUS; // match radius for high-speed objects 136 137 int PARALLEL; 138 int PARALLEL_MANUAL; 139 int PARALLEL_SERIAL; 111 140 112 141 int VERBOSE; … … 129 158 double MaxDensityValue; 130 159 131 int UserCatalog;132 double UserCatalogRA, UserCatalogDEC;133 134 160 char *PHOTCODE_KEEP_LIST, *PHOTCODE_SKIP_LIST; 135 161 int NphotcodesKeep, NphotcodesSkip; … … 142 168 SkyRegionSelection SELECTION; 143 169 144 int AreaSelect; 145 double AreaXmin, AreaXmax, AreaYmin, AreaYmax; 146 147 int ImagSelect, ImagMin, ImagMax; 170 int ImagSelect; 171 double ImagMin, ImagMax; 148 172 149 173 double PlotMmin, PlotMmax, PlotdMmin, PlotdMmax; 150 174 151 int DophotSelect, DophotValue;152 175 int PhotFlagSelect, PhotFlagPoor, PhotFlagBad; 153 176 … … 181 204 char *GetPhotnamebyCode PROTO((PhotCodeData *photcodes, int code)); 182 205 void InterpolateGrid PROTO((float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords)); 183 off_t *SelectRefMosaic PROTO((Mosaic **refmosaic, off_t *Nimage));206 off_t *SelectRefMosaic PROTO((Mosaic **refmosaic, off_t *Nimage)); 184 207 int args PROTO((int argc, char **argv)); 208 int args_client PROTO((int argc, char **argv)); 185 209 int bcatalog PROTO((Catalog *subcatalog, Catalog *catalog)); 186 210 void clean_images PROTO((void)); … … 226 250 void initMrel PROTO((Catalog *catalog, int Ncatalog)); 227 251 void initialize PROTO((int argc, char **argv)); 252 void initialize_client PROTO((int argc, char **argv)); 228 253 void initstats PROTO((char *mode)); 229 254 int liststats PROTO((double *value, double *dvalue, int N, StatType *stats)); 230 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int subselect ));231 SkyList *load_images PROTO((FITS_DB *db, SkyRegion *region));255 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath)); 256 int load_images PROTO((FITS_DB *db, SkyList *skylist)); 232 257 Image *select_images PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage)); 233 258 … … 314 339 void FlagOutliers(Catalog *catalog); 315 340 int MeasFilterTest(Measure *measure, int applySigmaLim); 341 int MeasFilterTestTiny(MeasureTiny *measure, int applySigmaLim); 316 342 317 343 int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon, double *Radius); … … 333 359 Mosaic *getMosaicForImage (off_t im); 334 360 335 double getMeanR (Measure *measure, Average *average, SecFilt *secfilt); 336 double getMeanD (Measure *measure, Average *average, SecFilt *secfilt); 337 int setMeanR (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt); 338 int setMeanD (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt); 361 double getMeanR (MeasureTiny *measure, Average *average, SecFilt *secfilt); 362 double getMeanD (MeasureTiny *measure, Average *average, SecFilt *secfilt); 363 int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt); 364 int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt); 365 int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt); 366 int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt); 339 367 340 368 float GetAstromError (Measure *measure, int mode); 341 int relastro_objects (void); 342 int UpdateObjectOffsets (SkyList *skylist); 369 float GetAstromErrorTiny (MeasureTiny *measure, int mode); 370 int relastro_objects (SkyList *skylist, int hostID, char *hostpath); 371 int relastro_images (SkyList *skylist); 372 int UpdateObjectOffsets (SkyList *skylist, int hostID, char *hostpath); 343 373 344 374 int relastroVisualPlotChipFit(StarData *raw, StarData *ref, double dRmax, int numObj); … … 361 391 void resetImageRaw (Catalog *catalog, int Ncatalog, off_t im); 362 392 363 int high_speed_catalogs ( );393 int high_speed_catalogs (SkyTable *sky, SkyList *skylist, int hostID, char *hostpath); 364 394 int high_speed_objects (SkyRegion *region, Catalog *catalog); 365 395 int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset); … … 369 399 int createStarMapPoints(); 370 400 int checkStarMap(int N); 401 int createStarMap (Catalog *catalog, int Ncatalog); 371 402 372 403 int GetScatterRawRef(float *dLsig, float *dMsig, float *dRsig, int *nKeep, StarData *raw, StarData *ref, int Nstars, float SigmaLimit); … … 378 409 void setupAreaSelection(SkyRegion *region); 379 410 380 int relastro_merge_source ( );411 int relastro_merge_source (SkyTable *sky); 381 412 void resort_catalog (Catalog *catalog); 413 414 BrightCatalog *BrightCatalogLoad(char *filename); 415 int BrightCatalogSave(char *filename, BrightCatalog *catalog); 416 BrightCatalog *BrightCatalogMerge (Catalog *catalog, int Ncatalog); 417 CatalogSplitter *BrightCatalogSplitInit (int Nsecfilt); 418 int BrightCatalogSplit (CatalogSplitter *catalogs, BrightCatalog *bcatalog); 419 int BrightCatalogSplitFree (CatalogSplitter *catalogs);
Note:
See TracChangeset
for help on using the changeset viewer.
