Changeset 41453 for trunk/Ohana/src/relphot/include/relphot.h
- Timestamp:
- Dec 7, 2020, 12:27:41 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/relphot/include/relphot.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/include/relphot.h
r41428 r41453 91 91 92 92 typedef struct { 93 unsigned int start;94 unsigned int stop;95 93 short photcode; 96 94 float McalPSF; … … 110 108 off_t NMEASURE; 111 109 off_t *measure; 112 113 off_t Ncatalog; // XX not needed114 off_t NCATALOG; // XX not needed115 110 off_t *catalog; 111 112 void *parent; 116 113 } TGroup; 114 115 // we have an array of TGroup times, each pointing to N sets of data values 116 typedef struct { 117 unsigned int start; 118 unsigned int stop; 119 TGroup *byCode; // each of these contains the collection of images for the time and photcode 120 int nCode; 121 } TGTimes; 117 122 118 123 typedef enum { … … 163 168 164 169 } StatDataSet; 170 171 typedef struct { 172 double *xVector; // complete list of values in independent variable (optional) 173 double *yVector; // complete list of values available 174 double *dyVector; // complete list of errors available 175 } FitDataType; 176 177 // this structure carries the data and pre-allocated arrays for 178 // 1D fitting with arbitrary order for data with external weights, 179 // optional priors, irls iterations, and bootstrap resampling 180 typedef struct { 181 int order; // order of fit (e.g., y = C0 + C1*x has order = 1) 182 int nterm; // number of fitted parameters (order + 1) 183 int mterm; // number of summations needed for OLS (2*order + 1) 184 185 int Nlist; // total number of measurements in list (may be more than the number to use) 186 int Nbootstrap; // number of bootstrap iterations 187 188 // input data & parameters: 189 FitDataType *alldata; // full data set 190 191 double *bPriorValue; // prior value 192 double *bPriorSigma; // prior sigma 193 194 // internal / temporary arrays: 195 FitDataType *keepdata; // unclipped data for bootstrap analysis 196 FitDataType *sample; // sample for a bootstrap iteration 197 198 double *yOffVector; // difference between yFit and yObs 199 200 double *tmpVector; // internal copy of values to use in, e.g., calculation of median 201 double *wtIRLS; // IRLS weights (distance from model value weighted by standard error) 202 203 double **cArray; 204 double *sumVector; // pre-allocated to mterm (2*order + 1) 205 206 double **bArray; 207 double **bSaveArray; 208 double **bBootArray; // values generated by the bootstrap resampling 209 210 // output results: 211 double *bSigma; // 1 sigma range of parameters 212 213 double min; // min of bSigma[0] values 214 double max; // max of bSigma[0] values 215 double sigma; // (sample) standard deviation of bSigma[0] values 216 double chisq; // chisq of fit (unmasked values only) 217 int Nmeas; // number of unmasked values used in fit 218 } FitDataSet; 165 219 166 220 typedef struct { … … 311 365 double IMAGE_SCATTER; 312 366 double IMAGE_OFFSET; 367 double NIGHT_SCATTER; 368 double NIGHT_OFFSET; 313 369 double STAR_SCATTER; 314 370 double STAR_CHISQ; … … 497 553 int liststats_irls PROTO((StatDataSet *dataset, int Npoints, StatType *stats)); 498 554 int liststats_fit1d PROTO((double *value, double *err, double *x, int Npts, StatType *stats, double *dk)); 555 double weight_cauchy PROTO((double x)); 556 double VectorFractionInterpolate PROTO((double *values, float fraction, int Npoints)); 557 558 // fit1d_irls: 559 int fit1d_irls PROTO((FitDataSet *dataset, int Npoints)); 560 void FitDataSetFree PROTO((FitDataSet *dataset)); 561 void FitDataSetAlloc PROTO((FitDataSet *dataset, int Nmax, int order, int Nbootstrap)); 562 void FitDataSetAddPriors PROTO((FitDataSet *dataset)); 499 563 500 564 unsigned int *ReadTGroupFile PROTO((FILE *f, int *nelem)); … … 502 566 void initTGroupsMcal PROTO((void)); 503 567 TGroup *getTGroupForImage PROTO((off_t im)); 504 off_tfindTGroup PROTO((unsigned int start, int photcode));568 TGroup *findTGroup PROTO((unsigned int start, int photcode)); 505 569 506 570 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int hostID, char *hostpath, char *syncfile)); … … 527 591 void plot_star_coords PROTO((Catalog *catalog, int Ncatalog)); 528 592 void plot_stars PROTO((Catalog *catalog, int Ncatalog)); 593 void plot_setMcal PROTO((double *list, int Npts)); 529 594 530 595 void plot_list_add PROTO((Graphdata *graphdata, double *xlist, double *ylist, int N));
Note:
See TracChangeset
for help on using the changeset viewer.
