Changeset 41341 for trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c
- Timestamp:
- Apr 16, 2020, 2:04:27 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
r41340 r41341 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 vector 17 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 vector 23 if ((N = get_argument (argc, argv, "-Wyvec"))) { 24 remove_argument (N, &argc, argv); 25 if ((WyOutV = SelectVector (argv[N], ANYVECTOR, TRUE)) == NULL) return (FALSE); 13 26 remove_argument (N, &argc, argv); 14 27 } … … 101 114 mask = mvec->elements.Int; 102 115 } 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; } 103 125 } 104 126 … … 169 191 } 170 192 } 193 } 194 } 195 if (WxOutV) { 196 // save the calculated weights 197 for (i = 0; i < fitdata.Npts; i++) { 198 // fitdata only includes the previously unmasked points 199 int n = fitdata.index[i]; 200 WxOutV->elements.Flt[n] = fitdata.Wx[i]; 201 } 202 } 203 if (WyOutV) { 204 // save the calculated weights 205 for (i = 0; i < fitdata.Npts; i++) { 206 // fitdata only includes the previously unmasked points 207 int n = fitdata.index[i]; 208 WyOutV->elements.Flt[n] = fitdata.Wy[i]; 171 209 } 172 210 }
Note:
See TracChangeset
for help on using the changeset viewer.
