IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2012, 7:14:51 AM (14 years ago)
Author:
eugene
Message:

clean top-level function to move the former default mode into relastro_images; adapt to -parallel mode, including the use of MeasureTiny in relastro_images; add relastro_client, etc; make sure high-speed mode also gets a copy of the photcode table, skytable, and images; for high-speed, make an empty WHERE the default (and print the WHERE actually used); move star maps to a block in relastro_images, not load_catalog; drop the UserCatalog global (-catalog RA DEC now just defines a UserPatch value); dropped unused -dophot and -area options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/include/relastro.h

    r32740 r33448  
    1515typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode;
    1616
    17 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE} FitTarget;
     17typedef 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
     19typedef 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
     27typedef 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;
    1838
    1939typedef struct {
     
    86106
    87107/* global variables set in parameter file */
    88 char   ImageCat[256];
    89 char   GSCFILE[256];
    90 char   CATDIR[256];
     108# define MAX_PATH_LENGTH 1024
     109char   ImageCat[MAX_PATH_LENGTH];
     110char   GSCFILE[MAX_PATH_LENGTH];
     111char   CATDIR[MAX_PATH_LENGTH];
    91112char   *HIGH_SPEED_DIR;
    92113char   CATMODE[16];    /* raw, mef, split, mysql */
    93114char   CATFORMAT[16];  /* internal, elixir, loneos, panstarrs */
    94 char   SKY_TABLE[256];
     115char   SKY_TABLE[MAX_PATH_LENGTH];
    95116int    SKY_DEPTH;  /** XXX EAM : depth of catalog tables, fix usage */
     117
     118int          HOST_ID;
     119char        *HOSTDIR;
     120char        *BCATALOG;
    96121
    97122unsigned int OBJ_ID_SRC;
     
    109134
    110135double RADIUS; // match radius for high-speed objects
     136
     137int    PARALLEL;
     138int    PARALLEL_MANUAL;
     139int    PARALLEL_SERIAL;
    111140
    112141int    VERBOSE;
     
    129158double MaxDensityValue;
    130159
    131 int UserCatalog;
    132 double UserCatalogRA, UserCatalogDEC;
    133 
    134160char          *PHOTCODE_KEEP_LIST, *PHOTCODE_SKIP_LIST;
    135161int           NphotcodesKeep,      NphotcodesSkip;
     
    142168SkyRegionSelection SELECTION;
    143169
    144 int AreaSelect;
    145 double AreaXmin, AreaXmax, AreaYmin, AreaYmax;
    146 
    147 int ImagSelect, ImagMin, ImagMax;
     170int ImagSelect;
     171double ImagMin, ImagMax;
    148172
    149173double  PlotMmin, PlotMmax, PlotdMmin, PlotdMmax;
    150174
    151 int DophotSelect, DophotValue;
    152175int PhotFlagSelect, PhotFlagPoor, PhotFlagBad;
    153176
     
    181204char         *GetPhotnamebyCode   PROTO((PhotCodeData *photcodes, int code));
    182205void          InterpolateGrid     PROTO((float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords));
    183 off_t          *SelectRefMosaic     PROTO((Mosaic **refmosaic, off_t *Nimage));
     206off_t        *SelectRefMosaic     PROTO((Mosaic **refmosaic, off_t *Nimage));
    184207int           args                PROTO((int argc, char **argv));
     208int           args_client         PROTO((int argc, char **argv));
    185209int           bcatalog            PROTO((Catalog *subcatalog, Catalog *catalog));
    186210void          clean_images        PROTO((void));
     
    226250void          initMrel            PROTO((Catalog *catalog, int Ncatalog));
    227251void          initialize          PROTO((int argc, char **argv));
     252void          initialize_client   PROTO((int argc, char **argv));
    228253void          initstats           PROTO((char *mode));
    229254int           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));
     255Catalog      *load_catalogs       PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath));
     256int           load_images         PROTO((FITS_DB *db, SkyList *skylist));
    232257Image        *select_images       PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage));
    233258
     
    314339void FlagOutliers(Catalog *catalog);
    315340int MeasFilterTest(Measure *measure, int applySigmaLim);
     341int MeasFilterTestTiny(MeasureTiny *measure, int applySigmaLim);
    316342
    317343int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon, double *Radius);
     
    333359Mosaic *getMosaicForImage (off_t im);
    334360
    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);
     361double getMeanR (MeasureTiny *measure, Average *average, SecFilt *secfilt);
     362double getMeanD (MeasureTiny *measure, Average *average, SecFilt *secfilt);
     363int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt);
     364int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt);
     365int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt);
     366int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt);
    339367
    340368float GetAstromError (Measure *measure, int mode);
    341 int relastro_objects (void);
    342 int UpdateObjectOffsets (SkyList *skylist);
     369float GetAstromErrorTiny (MeasureTiny *measure, int mode);
     370int relastro_objects (SkyList *skylist, int hostID, char *hostpath);
     371int relastro_images (SkyList *skylist);
     372int UpdateObjectOffsets (SkyList *skylist, int hostID, char *hostpath);
    343373
    344374int relastroVisualPlotChipFit(StarData *raw, StarData *ref, double dRmax, int numObj);
     
    361391void resetImageRaw (Catalog *catalog, int Ncatalog, off_t im);
    362392
    363 int high_speed_catalogs ();
     393int high_speed_catalogs (SkyTable *sky, SkyList *skylist, int hostID, char *hostpath);
    364394int high_speed_objects (SkyRegion *region, Catalog *catalog);
    365395int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset);
     
    369399int createStarMapPoints();
    370400int checkStarMap(int N);
     401int createStarMap (Catalog *catalog, int Ncatalog);
    371402
    372403int GetScatterRawRef(float *dLsig, float *dMsig, float *dRsig, int *nKeep, StarData *raw, StarData *ref, int Nstars, float SigmaLimit);
     
    378409void setupAreaSelection(SkyRegion *region);
    379410
    380 int relastro_merge_source ();
     411int relastro_merge_source (SkyTable *sky);
    381412void resort_catalog (Catalog *catalog);
     413
     414BrightCatalog *BrightCatalogLoad(char *filename);
     415int BrightCatalogSave(char *filename, BrightCatalog *catalog);
     416BrightCatalog *BrightCatalogMerge (Catalog *catalog, int Ncatalog);
     417CatalogSplitter *BrightCatalogSplitInit (int Nsecfilt);
     418int BrightCatalogSplit (CatalogSplitter *catalogs, BrightCatalog *bcatalog);
     419int BrightCatalogSplitFree (CatalogSplitter *catalogs);
Note: See TracChangeset for help on using the changeset viewer.