IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2012, 5:24:19 PM (14 years ago)
Author:
mhuber
Message:

merging latest r34040 trunk changes to branch

Location:
branches/meh_branches/ppstack_test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/meh_branches/ppstack_test

  • branches/meh_branches/ppstack_test/Ohana/src/relastro/include/relastro.h

    r33415 r34041  
    44# include <signal.h>
    55# 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
    611
    712typedef enum {
     
    1520typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode;
    1621
    17 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE} FitTarget;
     22typedef 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
     24typedef 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
     33typedef 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
     41typedef 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;
    1852
    1953typedef struct {
     
    86120
    87121/* global variables set in parameter file */
    88 char   ImageCat[256];
    89 char   GSCFILE[256];
    90 char   CATDIR[256];
     122# define DVO_MAX_PATH 1024
     123char   ImageCat[DVO_MAX_PATH];
     124char   GSCFILE[DVO_MAX_PATH];
     125char   CATDIR[DVO_MAX_PATH];
    91126char   *HIGH_SPEED_DIR;
    92127char   CATMODE[16];    /* raw, mef, split, mysql */
    93128char   CATFORMAT[16];  /* internal, elixir, loneos, panstarrs */
    94 char   SKY_TABLE[256];
     129char   SKY_TABLE[DVO_MAX_PATH];
    95130int    SKY_DEPTH;  /** XXX EAM : depth of catalog tables, fix usage */
     131
     132int          HOST_ID;
     133char        *HOSTDIR;
     134char        *BCATALOG;
    96135
    97136unsigned int OBJ_ID_SRC;
     
    110149double RADIUS; // match radius for high-speed objects
    111150
     151int    PARALLEL;
     152int    PARALLEL_MANUAL;
     153int    PARALLEL_SERIAL;
     154
     155int    PARALLEL_OUTPUT;
     156
    112157int    VERBOSE;
    113158int    VERBOSE2;
     
    115160int    RESET;
    116161int    NLOOP;
     162int    NTHREADS;
    117163int    UPDATE;
    118164int    PLOTSTUFF;
     
    123169int    PM_TOOFEW;
    124170double PM_DT_MIN;
     171double PAR_FACTOR_MIN;
    125172int    PLOTDELAY;
    126173int    CHIPORDER;
     
    128175int MaxDensityUse;
    129176double MaxDensityValue;
    130 
    131 int UserCatalog;
    132 double UserCatalogRA, UserCatalogDEC;
    133177
    134178char          *PHOTCODE_KEEP_LIST, *PHOTCODE_SKIP_LIST;
     
    142186SkyRegionSelection SELECTION;
    143187
    144 int AreaSelect;
    145 double AreaXmin, AreaXmax, AreaYmin, AreaYmax;
    146 
    147 int ImagSelect, ImagMin, ImagMax;
     188int ImagSelect;
     189double ImagMin, ImagMax;
    148190
    149191double  PlotMmin, PlotMmax, PlotdMmin, PlotdMmax;
    150192
    151 int DophotSelect, DophotValue;
    152193int PhotFlagSelect, PhotFlagPoor, PhotFlagBad;
    153194
     
    181222char         *GetPhotnamebyCode   PROTO((PhotCodeData *photcodes, int code));
    182223void          InterpolateGrid     PROTO((float *buffer, int Nx, int Ny, Coords *ccd, Coords *gcoords));
    183 off_t          *SelectRefMosaic     PROTO((Mosaic **refmosaic, off_t *Nimage));
     224off_t        *SelectRefMosaic     PROTO((Mosaic **refmosaic, off_t *Nimage));
    184225int           args                PROTO((int argc, char **argv));
     226int           args_client         PROTO((int argc, char **argv));
    185227int           bcatalog            PROTO((Catalog *subcatalog, Catalog *catalog));
    186228void          clean_images        PROTO((void));
     
    226268void          initMrel            PROTO((Catalog *catalog, int Ncatalog));
    227269void          initialize          PROTO((int argc, char **argv));
     270void          initialize_client   PROTO((int argc, char **argv));
    228271void          initstats           PROTO((char *mode));
    229272int           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));
     273Catalog      *load_catalogs       PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath));
     274int           load_images         PROTO((FITS_DB *db, SkyList *skylist));
    232275Image        *select_images       PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage));
    233276
     
    314357void FlagOutliers(Catalog *catalog);
    315358int MeasFilterTest(Measure *measure, int applySigmaLim);
     359int MeasFilterTestTiny(MeasureTiny *measure, int applySigmaLim);
    316360
    317361int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon, double *Radius);
     
    333377Mosaic *getMosaicForImage (off_t im);
    334378
    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);
     379double getMeanR (MeasureTiny *measure, Average *average, SecFilt *secfilt);
     380double getMeanD (MeasureTiny *measure, Average *average, SecFilt *secfilt);
     381int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt);
     382int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt);
     383int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt);
     384int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt);
    339385
    340386float GetAstromError (Measure *measure, int mode);
    341 int relastro_objects (void);
    342 int UpdateObjectOffsets (SkyList *skylist);
     387float GetAstromErrorTiny (MeasureTiny *measure, int mode);
     388int relastro_objects (SkyList *skylist, int hostID, char *hostpath);
     389int relastro_images (SkyList *skylist);
     390int UpdateObjectOffsets (SkyList *skylist, int hostID, char *hostpath);
    343391
    344392int relastroVisualPlotChipFit(StarData *raw, StarData *ref, double dRmax, int numObj);
     
    361409void resetImageRaw (Catalog *catalog, int Ncatalog, off_t im);
    362410
    363 int high_speed_catalogs ();
     411int high_speed_catalogs (SkyTable *sky, SkyList *skylist, int hostID, char *hostpath);
    364412int high_speed_objects (SkyRegion *region, Catalog *catalog);
    365413int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset);
     
    369417int createStarMapPoints();
    370418int checkStarMap(int N);
     419int createStarMap (Catalog *catalog, int Ncatalog);
    371420
    372421int GetScatterRawRef(float *dLsig, float *dMsig, float *dRsig, int *nKeep, StarData *raw, StarData *ref, int Nstars, float SigmaLimit);
    373 int LimitDensityCatalog (Catalog *subcatalog, Catalog *catalog);
     422int LimitDensityCatalog_ByNmeasure (Catalog *subcatalog, Catalog *catalog);
     423int LimitDensityCatalog_RandomSample (Catalog *subcatalog, Catalog *catalog);
    374424
    375425int initializeConstraints();
     
    378428void setupAreaSelection(SkyRegion *region);
    379429
    380 int relastro_merge_source ();
     430int relastro_merge_source (SkyTable *sky);
    381431void resort_catalog (Catalog *catalog);
     432
     433BrightCatalog *BrightCatalogLoad(char *filename);
     434int BrightCatalogSave(char *filename, BrightCatalog *catalog);
     435BrightCatalog *BrightCatalogMerge (Catalog *catalog, int Ncatalog);
     436CatalogSplitter *BrightCatalogSplitInit (int Nsecfilt);
     437int BrightCatalogSplit (CatalogSplitter *catalogs, BrightCatalog *bcatalog);
     438int BrightCatalogSplitFree (CatalogSplitter *catalogs);
     439
     440PhotCode **ParsePhotcodeList (char *rawlist, int *nphotcodes, int needAve);
Note: See TracChangeset for help on using the changeset viewer.