Conversation
There was a problem hiding this comment.
"correlation" sounds a bit too vague, can we use a more precise name? is this approach equivalent to "TREC"?
There was a problem hiding this comment.
TREC stands for tracking radar echo by cross-correlation (TREC). So I would say it is quite equivalent. I will change the name accordingly
|
|
||
| return IS_tmp, JS_tmp | ||
|
|
||
| else: |
There was a problem hiding this comment.
don't need this since the function won't be executed without numba
| With *T* > 2, all the resulting obtained vectors are pooled together for | ||
| the final interpolation on a regular grid. | ||
|
|
||
| settings: dict, optional |
There was a problem hiding this comment.
where are these settings documented? can't we convert this dictionary into optional arguments?
| Optional dictionary containing keyword arguments for the correlation | ||
| based algorithm. | ||
|
|
||
| interp_method: {"idwinterp2d", "rbfinterp2d"}, optional |
There was a problem hiding this comment.
out of curiosity, what approach uses INCA to densify the motion field?
There was a problem hiding this comment.
I does a cubic interpolation. I can also implemented if you want ... but again, It is done with numba :(
There was a problem hiding this comment.
do you think it could be added as an additional interpolator in the pysteps/utils/interpolate.py module? (I wouldn't mind the numba optional requirement)
| if NUMBA_IMPORTED: | ||
|
|
||
| @jit(nopython=True) | ||
| def compute_motion_numba(image1, image2, NI, NJ, nthin, IS_tmp, JS_tmp): |
There was a problem hiding this comment.
can't we simply have a non accelerated version in case numba is not installed instead of throwing an error?
| nr_fields = input_images.shape[0] | ||
| domain_size = (input_images.shape[1], input_images.shape[2]) | ||
|
|
||
| PMIN = settings.get("PMIN", 0.05) |
There was a problem hiding this comment.
we usually use ALL_CAPS names for global constants only.
There was a problem hiding this comment.
Thanks ... I did some changes on these and other variables
There was a problem hiding this comment.
need to add numba to the test requirements
Co-authored-by: Daniele Nerini <daniele.nerini@gmail.com>
Co-authored-by: Daniele Nerini <daniele.nerini@gmail.com>
Introduction of the correlation based motion vector computation as is currently computed in INCA. The error motion computation, and the NWP vector wind correction has not been included. However, this correlation based computation is similar to the original TREC computation adding a new OF method. The original idea is coming from #376