Changeset 36630 for trunk/Ohana/src/relastro/include/relastro.h
- Timestamp:
- Apr 1, 2014, 12:03:17 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Ohana/src/relastro/include/relastro.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/Ohana/src/relastro/include/relastro.h
r35763 r36630 6 6 # include <pthread.h> 7 7 8 # define MARKTIME(MSG,...) { \ 9 gettimeofday (&stopTimer, (void *) NULL); \ 10 float dtime = DTIME (stopTimer, startTimer); \ 11 fprintf (stderr, MSG, __VA_ARGS__); } 12 13 # define INITTIME \ 14 struct timeval startTimer, stopTimer; \ 15 gettimeofday (&startTimer, (void *) NULL); 16 8 17 // choose off_t or int depending on full-scale relphot analysis resources 9 18 // # define IDX_T off_t … … 20 29 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 21 30 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, TARGET_HPM} FitTarget; 31 typedef enum {OP_NONE, OP_IMAGES, OP_HIGH_SPEED, OP_MERGE_SOURCE, OP_UPDATE_OBJECTS, OP_UPDATE_OFFSETS, OP_LOAD_OBJECTS, OP_HPM, OP_PARALLEL_REGIONS, OP_PARALLEL_IMAGES} RelastroOp; 32 33 typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS} FitTarget; 23 34 24 35 typedef enum { … … 30 41 MARK_BIG_OFFSET = 0x0010, 31 42 } MeasurementMask; 43 44 typedef struct { 45 float R; 46 float D; 47 unsigned int objID; 48 unsigned int catID; 49 } MeanPos; 50 51 typedef struct { 52 Coords coords; 53 float dXpixSys; 54 float dYpixSys; 55 unsigned int imageID; 56 int nFitAstrom; 57 int flags; 58 } ImagePos; 32 59 33 60 typedef struct { … … 93 120 unsigned int start; 94 121 unsigned int stop; 122 off_t myImage; 95 123 float Mcal; 96 124 float dMcal; … … 113 141 } StatType; 114 142 115 # define MARKTIME(MSG,...) { \116 float dtime; \117 gettimeofday (&stop, (void *) NULL); \118 dtime = DTIME (stop, start); \119 fprintf (stderr, MSG, __VA_ARGS__); }120 121 143 /* global variables set in parameter file */ 122 144 # define DVO_MAX_PATH 1024 … … 129 151 char SKY_TABLE[DVO_MAX_PATH]; 130 152 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ 153 154 // globals for parallel region operations 155 char *REGION_FILE; 156 char *IMAGE_TABLE; 157 int REGION_HOST_ID; 158 int PARALLEL_REGIONS_MANUAL; 131 159 132 160 int HOST_ID; … … 208 236 FitMode FIT_MODE; 209 237 238 RelastroOp RELASTRO_OP; 210 239 FitTarget FIT_TARGET; 211 240 … … 450 479 int hpm_catalogs_parallel (SkyList *skylist); 451 480 int hpm_objects (SkyRegion *region, Catalog *catalog); 481 482 int strextend (char *input, char *format,...); 483 int launch_region_hosts (RegionHostTable *regionHosts); 484 485 int assign_images (FITS_DB *db, RegionHostTable *regionHosts); 486 int select_images_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage); 487 int calculate_image_bounds (Image *image, double *rmin, double *rmax, double *dmin, double *dmax, double Rmid); 488 int calculate_host_image_bounds (RegionHostTable *regionHosts); 489 int find_host_for_coords (RegionHostTable *regionHosts, double Rc, double Dc); 490 491 int relastro_parallel_regions (); 492 int relastro_parallel_images (); 493 494 char *make_filename (char *dirname, char *hostname, int hostID, char *tailname); 495 int check_sync_file (char *filename, int nloop); 496 int clear_sync_file (char *filename); 497 int update_sync_file (char *filename, int nloop); 498 499 int share_mean_pos (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop); 500 int slurp_mean_pos (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop); 501 int set_mean_pos (MeanPos *meanpos, Average *average); 502 MeanPos *merge_mean_pos (MeanPos *target, int *ntarget, MeanPos *source, int Nsource); 503 504 int MeanPosSave(char *filename, MeanPos *meanpos, off_t Nmeanpos); 505 MeanPos *MeanPosLoad(char *filename, off_t *nmeanpos); 506 507 int indexCatalogs (Catalog *catalog, int Ncatalog); 508 int catID_and_objID_to_seq (int catID, int objID, int *catSeq, off_t *objSeq); 509 510 int markObjects (Catalog *catalog, int Ncatalog); 511 512 int ImagePosSave(char *filename, ImagePos *image_pos, off_t Nimage_pos); 513 ImagePos *ImagePosLoad(char *filename, off_t *nimage_pos); 514 515 int share_image_pos (RegionHostTable *regionHosts, int nloop); 516 int slurp_image_pos (RegionHostTable *regionHosts, int nloop); 517 ImagePos *merge_image_pos (ImagePos *target, int *ntarget, ImagePos *source, int Nsource); 518 int set_image_pos (ImagePos *image_pos, Image *image); 519 520 Image *ImageTableLoad(char *filename, off_t *nimage); 521 int ImageTableSave (char *filename, Image *images, off_t Nimages); 522 int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage);
Note:
See TracChangeset
for help on using the changeset viewer.
