- Timestamp:
- May 27, 2019, 8:42:23 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20190329/src/opihi/mana/deimos_fitprofile.c
r40754 r40755 78 78 79 79 float Sky_V = 0.0, BckL_V = 0.0, BckR_V = 0.0; 80 int Sky_N = 0, BckL_N = 0, BckR_N =0;80 float Sky_N = 0.0, BckL_N = 0.0, BckR_N = 0.0; 81 81 for (int i = 0; i < xprofile->Nelements; i++) { 82 if (!isfinite(wprofile->elements.Flt[i])) continue; 83 if (!isfinite(fprofile->elements.Flt[i])) continue; 84 float wt = 1 / SQ(wprofile->elements.Flt[i]); 82 85 if (xprofile->elements.Flt[i] < Xs) { 83 BckL_V += fprofile->elements.Flt[i] ;84 BckL_N + +;86 BckL_V += fprofile->elements.Flt[i]*wt; 87 BckL_N += wt; 85 88 continue; 86 89 } 87 90 if (xprofile->elements.Flt[i] > Xe) { 88 BckR_V += fprofile->elements.Flt[i] ;89 BckR_N + +;91 BckR_V += fprofile->elements.Flt[i]*wt; 92 BckR_N += wt; 90 93 continue; 91 94 } 92 Sky_V += fprofile->elements.Flt[i] ;93 Sky_N + +;95 Sky_V += fprofile->elements.Flt[i]*wt; 96 Sky_N += wt; 94 97 } 95 98 float Sky = Sky_V / Sky_N; … … 211 214 int Npts = 0; 212 215 for (int i = 0; i < NptsAll; i++) { 216 if (!isfinite(wprofile[i])) continue; 217 if (!isfinite(fprofile[i])) continue; 213 218 int keep = (mode == MODE_UPPER) ^ (xprofile[i] < limit); 214 219 if (keep) {
Note:
See TracChangeset
for help on using the changeset viewer.
