Changeset 39610 for trunk/Ohana/src/opihi/cmd.astro/fitplx.c
- Timestamp:
- Jun 24, 2016, 5:07:24 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/fitplx.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/fitplx.c
r39234 r39610 597 597 dsort (values, Npts); 598 598 599 if (Npts % 2) { 600 int Ncenter = Npts / 2; 601 *median = values[Ncenter]; 602 } else { 603 int Ncenter = Npts / 2 - 1; 604 *median = 0.5*(values[Ncenter] + values[Ncenter + 1]); 605 } 606 607 double Slo = VectorFractionInterpolate (values, 0.158655, Npts); 608 double Shi = VectorFractionInterpolate (values, 0.841345, Npts); 609 610 *sigma = (Shi - Slo) / 2.0; 611 599 if (median) { 600 if (Npts % 2) { 601 int Ncenter = Npts / 2; 602 *median = values[Ncenter]; 603 } else { 604 int Ncenter = Npts / 2 - 1; 605 *median = 0.5*(values[Ncenter] + values[Ncenter + 1]); 606 } 607 } 608 609 if (sigma) { 610 double Slo = VectorFractionInterpolate (values, 0.158655, Npts); 611 double Shi = VectorFractionInterpolate (values, 0.841345, Npts); 612 *sigma = (Shi - Slo) / 2.0; 613 } 614 612 615 return TRUE; 613 616 }
Note:
See TracChangeset
for help on using the changeset viewer.
