- Timestamp:
- Jun 19, 2012, 5:24:19 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Ohana/src/relastro/include/relastro.h (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/Ohana/src/relastro/include/relastro.h
r33415 r34041 4 4 # include <signal.h> 5 5 # include <assert.h> 6 # include <pthread.h> 7 8 // choose off_t or int depending on full-scale relphot analysis resources 9 // # define IDX_T off_t 10 # define IDX_T int 6 11 7 12 typedef enum { … … 15 20 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 16 21 17 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE} FitTarget; 22 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; 23 24 typedef enum { 25 MARK_MEAS_DEFAULT = 0x0000, 26 MARK_TOO_FEW_MEAS = 0x0001, 27 MARK_NAN_POS_ERROR = 0x0002, 28 MARK_NAN_MAG_ERROR = 0x0004, 29 MARK_BIG_MAG_ERROR = 0x0008, 30 MARK_BIG_OFFSET = 0x0010, 31 } MeasurementMask; 32 33 typedef struct { 34 Average *average; // array of (minimal) average data 35 MeasureTiny *measure; // array of (minimal) measure data 36 SecFilt *secfilt; // array of secfilt data (matched to average by Nsecfilt) 37 off_t Naverage; 38 off_t Nmeasure; 39 } BrightCatalog; 40 41 typedef struct { 42 Catalog *catalog; // array of catalogs generated 43 int NCATALOG; // number of catalogs allocated 44 int Ncatalog; // number of catalogs generated 45 int Nsecfilt; // number of catalogs generated 46 off_t *NAVERAGE; // allocated Averages per catalog 47 off_t *NMEASURE; // allocated Measures per catalog 48 int *index; // lookup table catID -> catalog[i] 49 int *catIDs; // lookup table catID <- catalog[i] 50 int maxID; // max catID value to date 51 } CatalogSplitter; 18 52 19 53 typedef struct { … … 86 120 87 121 /* global variables set in parameter file */ 88 char ImageCat[256]; 89 char GSCFILE[256]; 90 char CATDIR[256]; 122 # define DVO_MAX_PATH 1024 123 char ImageCat[DVO_MAX_PATH]; 124 char GSCFILE[DVO_MAX_PATH]; 125 char CATDIR[DVO_MAX_PATH]; 91 126 char *HIGH_SPEED_DIR; 92 127 char CATMODE[16]; /* raw, mef, split, mysql */ 93 128 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 94 char SKY_TABLE[ 256];129 char SKY_TABLE[DVO_MAX_PATH]; 95 130 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ 131 132 int HOST_ID; 133 char *HOSTDIR; 134 char *BCATALOG; 96 135 97 136 unsigned int OBJ_ID_SRC; … … 110 149 double RADIUS; // match radius for high-speed objects 111 150 151 int PARALLEL; 152 int PARALLEL_MANUAL; 153 int PARALLEL_SERIAL; 154 155 int PARALLEL_OUTPUT; 156 112 157 int VERBOSE; 113 158 int VERBOSE2; … … 115 160 int RESET; 116 161 int NLOOP; 162 int NTHREADS; 117 163 int UPDATE; 118 164 int PLOTSTUFF; … … 123 169 int PM_TOOFEW; 124 170 double PM_DT_MIN; 171 double PAR_FACTOR_MIN; 125 172 int PLOTDELAY; 126 173 int CHIPORDER; … … 128 175 int MaxDensityUse; 129 176 double MaxDensityValue; 130 131 int UserCatalog;132 double UserCatalogRA, UserCatalogDEC;133 177 134 178 char *PHOTCODE_KEEP_LIST, *PHOTCODE_SKIP_LIST; … … 142 186 SkyRegionSelection SELECTION; 143 187 144 int AreaSelect; 145 double AreaXmin, AreaXmax, AreaYmin, AreaYmax; 146 147 int ImagSelect, ImagMin, ImagMax; 188 int ImagSelect; 189 double ImagMin, ImagMax; 148 190 149 191 double PlotMmin, PlotMmax, PlotdMmin, PlotdMmax; 150 192 151 int DophotSelect, DophotValue;152 193 int PhotFlagSelect, PhotFlagPoor, PhotFlagBad; 153 194 … … 181 222 char *GetPhotnamebyCode PROTO((PhotCodeData *photcodes, int code)); 182 223 void InterpolateGrid PROTO((float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords)); 183 off_t *SelectRefMosaic PROTO((Mosaic **refmosaic, off_t *Nimage));224 off_t *SelectRefMosaic PROTO((Mosaic **refmosaic, off_t *Nimage)); 184 225 int args PROTO((int argc, char **argv)); 226 int args_client PROTO((int argc, char **argv)); 185 227 int bcatalog PROTO((Catalog *subcatalog, Catalog *catalog)); 186 228 void clean_images PROTO((void)); … … 226 268 void initMrel PROTO((Catalog *catalog, int Ncatalog)); 227 269 void initialize PROTO((int argc, char **argv)); 270 void initialize_client PROTO((int argc, char **argv)); 228 271 void initstats PROTO((char *mode)); 229 272 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));273 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath)); 274 int load_images PROTO((FITS_DB *db, SkyList *skylist)); 232 275 Image *select_images PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage)); 233 276 … … 314 357 void FlagOutliers(Catalog *catalog); 315 358 int MeasFilterTest(Measure *measure, int applySigmaLim); 359 int MeasFilterTestTiny(MeasureTiny *measure, int applySigmaLim); 316 360 317 361 int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon, double *Radius); … … 333 377 Mosaic *getMosaicForImage (off_t im); 334 378 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); 379 double getMeanR (MeasureTiny *measure, Average *average, SecFilt *secfilt); 380 double getMeanD (MeasureTiny *measure, Average *average, SecFilt *secfilt); 381 int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt); 382 int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt); 383 int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt); 384 int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt); 339 385 340 386 float GetAstromError (Measure *measure, int mode); 341 int relastro_objects (void); 342 int UpdateObjectOffsets (SkyList *skylist); 387 float GetAstromErrorTiny (MeasureTiny *measure, int mode); 388 int relastro_objects (SkyList *skylist, int hostID, char *hostpath); 389 int relastro_images (SkyList *skylist); 390 int UpdateObjectOffsets (SkyList *skylist, int hostID, char *hostpath); 343 391 344 392 int relastroVisualPlotChipFit(StarData *raw, StarData *ref, double dRmax, int numObj); … … 361 409 void resetImageRaw (Catalog *catalog, int Ncatalog, off_t im); 362 410 363 int high_speed_catalogs ( );411 int high_speed_catalogs (SkyTable *sky, SkyList *skylist, int hostID, char *hostpath); 364 412 int high_speed_objects (SkyRegion *region, Catalog *catalog); 365 413 int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset); … … 369 417 int createStarMapPoints(); 370 418 int checkStarMap(int N); 419 int createStarMap (Catalog *catalog, int Ncatalog); 371 420 372 421 int GetScatterRawRef(float *dLsig, float *dMsig, float *dRsig, int *nKeep, StarData *raw, StarData *ref, int Nstars, float SigmaLimit); 373 int LimitDensityCatalog (Catalog *subcatalog, Catalog *catalog); 422 int LimitDensityCatalog_ByNmeasure (Catalog *subcatalog, Catalog *catalog); 423 int LimitDensityCatalog_RandomSample (Catalog *subcatalog, Catalog *catalog); 374 424 375 425 int initializeConstraints(); … … 378 428 void setupAreaSelection(SkyRegion *region); 379 429 380 int relastro_merge_source ( );430 int relastro_merge_source (SkyTable *sky); 381 431 void resort_catalog (Catalog *catalog); 432 433 BrightCatalog *BrightCatalogLoad(char *filename); 434 int BrightCatalogSave(char *filename, BrightCatalog *catalog); 435 BrightCatalog *BrightCatalogMerge (Catalog *catalog, int Ncatalog); 436 CatalogSplitter *BrightCatalogSplitInit (int Nsecfilt); 437 int BrightCatalogSplit (CatalogSplitter *catalogs, BrightCatalog *bcatalog); 438 int BrightCatalogSplitFree (CatalogSplitter *catalogs); 439 440 PhotCode **ParsePhotcodeList (char *rawlist, int *nphotcodes, int needAve);
Note:
See TracChangeset
for help on using the changeset viewer.
