IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2015, 4:49:06 PM (11 years ago)
Author:
eugene
Message:

extensive work on relphot, relastro, uniphot, dvomerge aiming to the construction and calibration of PV3

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/relastro/include/relastro.h

    r38441 r38986  
    2828
    2929typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS} FitTarget;
     30
     31typedef enum {
     32  FIT_RESULT_RA,
     33  FIT_RESULT_DEC,
     34  FIT_RESULT_uR,
     35  FIT_RESULT_uD,
     36  FIT_RESULT_PLX,
     37} FitAstromResultMode;
    3038
    3139typedef enum {
     
    115123  double Ro, dRo;
    116124  double Do, dDo;
    117 
    118125  double uR, duR;
    119126  double uD, duD;
    120 
    121   double p, dp;
     127  double  p, dp;
    122128
    123129  double chisq;
    124130  int Nfit;
    125 } PMFit;
     131} FitAstromResult;
     132
     133typedef struct {
     134  double **A;
     135  double **B;
     136  int Nterms;
     137} FitAstromData;
     138
     139typedef struct {
     140  double X, dX;
     141  double Y, dY;
     142  double R, dR;
     143  double D, dD;
     144  double T, dT;
     145  double pR;
     146  double pD;
     147  double C_blue;
     148  double C_red;
     149  int measure;
     150} FitAstromPoint;
     151
     152typedef struct {
     153  off_t Nave;
     154  off_t Npm;
     155  off_t Npar;
     156  off_t Nskip;
     157  off_t Noffset;
     158
     159  double *values;
     160  FitAstromResult *fit; // use bootstrap resampling to generate Nfit fits to measure the stats
     161  int Nfit;
     162  int NfitAlloc;
     163
     164  FitAstromPoint *points;
     165  FitAstromPoint *sample;
     166  int Npoints;
     167  int NpointsAlloc;
     168
     169  FitAstromData *fitdataPos;
     170  FitAstromData *fitdataPM;
     171  FitAstromData *fitdataPar;
     172
     173  Coords coords;
     174  time_t T2000;
     175} FitStats;
    126176
    127177typedef struct {
     
    150200
    151201typedef struct {
    152   off_t Nave;
    153   off_t Npm;
    154   off_t Npar;
    155   off_t Nskip;
    156   off_t Noffset;
    157 } FitStats;
    158 
    159 typedef struct {
    160202  double scale;
    161203  double **Roff;
     
    180222  int Nicrfobj;
    181223} ICRFobj;
     224
     225# define ID_MEAS_OBJECT_HAS_2MASS ID_MEAS_POOR_PHOTOM
    182226
    183227/* global variables set in parameter file */
     
    224268int    PARALLEL_OUTPUT;
    225269
     270int    VERBOSE_IMAGE;
     271
    226272int    VERBOSE;
    227273int    VERBOSE2;
     
    234280int    USE_ICRF_SHFIT;
    235281int    USE_ICRF_POLE;
     282
     283int    USE_ALL_IMAGES;
    236284
    237285int    RESET;
     
    252300int    CHIPORDER;
    253301int    CHIPMAP;
     302
     303int    N_BOOTSTRAP_SAMPLES;
    254304
    255305int MaxDensityUse;
     
    369419int           liststats_pos       PROTO((double *value, double *dvalue, int N, StatType *stats, int XVERB));
    370420Catalog      *load_catalogs       PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile));
    371 int           load_images         PROTO((FITS_DB *db, SkyList *skylist, int UseFullOverlap));
     421int           load_images         PROTO((FITS_DB *db, SkyList *skylist, int UseFullOverlap, int UseAllImages));
    372422Image        *select_images       PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage, int UseFullOverlap));
    373423
     
    448498int UpdateObjects (Catalog *catalog, int Ncatalog, int Nloop);
    449499int UpdateSimple (Catalog *catalog, int Ncatalog);
    450 int UpdateChips (Catalog *catalog, int Ncatalog);
     500int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop);
    451501int UpdateMosaic (Catalog *catalog, int Ncatalog);
    452502int UpdateMeasures (Catalog *catalog, int Ncatalog);
     
    457507
    458508int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon, double *Radius);
    459 int ParFactor (double *pR, double *pD, double RA, double Dec, double Time, double Tmean);
    460 int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int XVERB);
    461 int FitPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *pR, double *pD, int Npts);
    462 int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts, int XVERB);
     509int ParFactor (double *pR, double *pD, double RA, double Dec, double Time);
     510int FitPM (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints);
     511int FitPMandPar (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints);
     512int FitPosPMfixed (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints);
    463513
    464514Mosaic *getMosaicForImage (off_t N);
     
    661711int client_logger_init (char *dirname);
    662712int client_logger_message (char *format,...);
     713
     714int FitAstromSetChisq (FitAstromResult *fit, FitAstromPoint *points, int Npoints, FitMode mode);
     715double VectorFractionInterpolate (double *values, float fraction, int Npts);
     716int BootstrapRobustStats (FitAstromResult *result, FitAstromResult *fit, int Nfit, int mode);
     717int BootstrapResample (FitAstromPoint *sample, FitAstromPoint *points, int Npoints);
     718int CatalogMaxNmeasure (Catalog *catalog, int Ncatalog);
     719int FitAstromPoints_Project (FitStats *fitStats, double *Tmean, double *Trange, double *parRange);
     720int UpdateObjects_SelectMeasures (FitStats *fit, Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int isStack);
     721int UpdateObjects_Stack (Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int Nsecfilt, FitStats *fitStats);
     722int UpdateObjects_Chips (Average *average, SecFilt *secfilt, MeasureTiny *measure, Measure *measureBig, int Nsecfilt, FitStats *fitStats, int cat, off_t measOff);
     723
     724void FitAstromResultInit (FitAstromResult *fit);
     725void FitAstromPointInit (FitAstromPoint *object);
     726void FitAstromDataFree (FitAstromData *fit);
     727FitAstromData *FitAstromDataInit (int Nterms);
     728void FitStatsFree (FitStats *fitStats);
     729void FitStatsSum (FitStats *src, FitStats *tgt);
     730void FitStatsReset (FitStats *tgt);
     731FitStats *FitStatsInit (int Nmax, int Nboot);
     732int FitAstromResultSetPM (FitAstromResult *fit, int Nfit, Average *average);
     733void AstromErrorSetLoop (int Nloop, int isImageMode);
Note: See TracChangeset for help on using the changeset viewer.