python - ndimage map_coordinates with masked arrays -
i using ndimage interpolate follows:
ndimage.map_coordinates(input_data, coords, output, 2, prefilter=false) now, problem not have valid measurements on whole input data. so, have masked array tells me info points valid. so, when doing interpolation, utilize pixels valid , adjust weightings accordingly (to ensure weights sum 1).
however, see there no easy way this. wondering if knows of way or can point me library or code can use. coming c++ background, still finding way around python.
it sounds need focus on interpolation of info , extract values desired coordinates. 1d splrep , 2d bisplrep interpolation functions need check out (a overview). both of these functions can weighted , provide fine tune command on spline function interpolate with.
once have filtered info desired weights can determine value @ specified coordinates using.
ndimage.map_coordinates(input_data, coords, output, prefilter=true) note prefilter key word argument not needed default value
python scipy ndimage
No comments:
Post a Comment