Changeset 41340 for trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c
- Timestamp:
- Apr 16, 2020, 1:54:47 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c
r41322 r41340 11 11 remove_argument (N, &argc, argv); 12 12 if ((mvec = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE); 13 remove_argument (N, &argc, argv);14 }15 16 Vector *WxOutV = NULL; // mask vector17 if ((N = get_argument (argc, argv, "-Wxvec"))) {18 remove_argument (N, &argc, argv);19 if ((WxOutV = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE);20 remove_argument (N, &argc, argv);21 }22 Vector *WyOutV = NULL; // mask vector23 if ((N = get_argument (argc, argv, "-Wyvec"))) {24 remove_argument (N, &argc, argv);25 if ((WyOutV = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE);26 13 remove_argument (N, &argc, argv); 27 14 } … … 114 101 mask = mvec->elements.Int; 115 102 } 116 }117 118 if (WxOutV) {119 ResetVector (WxOutV, OPIHI_FLT, Ntotal);120 for (i = 0; i < Ntotal; i++) { WxOutV->elements.Flt[i] = NAN; }121 }122 if (WyOutV) {123 ResetVector (WyOutV, OPIHI_FLT, Ntotal);124 for (i = 0; i < Ntotal; i++) { WyOutV->elements.Flt[i] = NAN; }125 103 } 126 104 … … 191 169 } 192 170 } 193 }194 }195 if (WxOutV) {196 // save the calculated weights197 for (i = 0; i < fitdata.Npts; i++) {198 // fitdata only includes the previously unmasked points199 int n = fitdata.index[i];200 WxOutV->elements.Flt[n] = fitdata.Wx[i];201 }202 }203 if (WyOutV) {204 // save the calculated weights205 for (i = 0; i < fitdata.Npts; i++) {206 // fitdata only includes the previously unmasked points207 int n = fitdata.index[i];208 WyOutV->elements.Flt[n] = fitdata.Wy[i];209 171 } 210 172 }
Note:
See TracChangeset
for help on using the changeset viewer.
