Commit d518851
committed
FIX: Mask fieldmap before fitting spline field
Previously, we fit a spline field to the within-mask portion of a
fieldmap, which could lead to large peaks outside the mask. Applying the
mask to the reconstructed field can produce discontinuities in
resampling. Instead of attempting to attenuate the peaks outside the
mask in a smooth way, we set the fit values outside the mask to zero,
and let the spline fit find a smooth field.
In practice, we've found that even fields with large peaks on the edge
of the mask are well fit by this method.1 parent 71a9ae3 commit d518851
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | | - | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
0 commit comments