Changeset 41670
- Timestamp:
- Jun 29, 2021, 9:59:28 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/relphot/src/liststats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/src/liststats.c
r41555 r41670 278 278 279 279 // make the initial guess based on the median (not weighted mean) 280 // ALLOCATE_PTR (values, double, Npoints);281 280 for (int i = 0; i < Npoints; i++) { 282 281 dataset->values[i] = dataset->flxlist[i]; … … 288 287 // if (!fit_least_squares (&value, dataset->flxlist, dataset->errlist, dataset->wgtlist, NULL, Npoints)) return FALSE; 289 288 290 // XXX add to dataset elements?291 // ALLOCATE_PTR (wtvals, double, Npoints);292 // ALLOCATE_PTR (wtlist, double, Npoints);293 294 289 int converged = FALSE; 295 290 for (int iterations = 0; !converged && (iterations < MAX_ITERATIONS); iterations++) { … … 325 320 // double WtThreshold = WEIGHT_THRESHOLD * Sum_W / (1.0 * Npoints); 326 321 double WtThreshold = WEIGHT_THRESHOLD * WtMedian; 327 328 // generate the unmasked subset329 // XXX add these to the dataset elements?330 // ALLOCATE_PTR ( ykeep, double, Npoints);331 // ALLOCATE_PTR (dykeep, double, Npoints);332 // ALLOCATE_PTR (wtkeep, double, Npoints);333 322 334 323 // save unmasked points … … 343 332 continue; 344 333 } 345 dataset->ykeep[Nkeep] = dataset->flxlist[i];334 dataset-> ykeep[Nkeep] = dataset->flxlist[i]; 346 335 dataset->dykeep[Nkeep] = dataset->errlist[i]; 347 336 dataset->wtkeep[Nkeep] = dataset->wgtlist[i]; // externally-supplied weight … … 359 348 stats->sigma = sqrt (dSig / (Nkeep - 1)); 360 349 361 // bootstrap resampling to generate the errorbars362 // XXX add these to the dataset elements?363 // ALLOCATE_PTR (ysample, double, Nkeep);364 // ALLOCATE_PTR (dysample, double, Nkeep);365 // ALLOCATE_PTR (wtsample, double, Nkeep);366 // ALLOCATE_PTR (bvalue, double, NBOOTSTRAP); // vector to save the bootstrap values367 368 350 int Nboot = 0; 369 351 for (int iboot = 0; iboot < NBOOTSTRAP; iboot++) {
Note:
See TracChangeset
for help on using the changeset viewer.
