Closed real-Xuan closed 1 year ago
Sorry for the delay. We need to think a bit about how we want to handle this--it is going to be radar-system dependent and I want to figure out what is best here. I actually think it may be best to coerce back to int32 (or really whatever the input was). Any thoughts @benhills?
I think I agree that it should be whatever the input data type was.
Something like:
H,V = np.meshgrid(h,v).astype(dat.data.dtype)
dat.data *= H*V
I also think we should incorporate these into #39 since that is always confusing people who use the kirchoff migration in the tutorial.
I haven't gotten around to addressing all the dependency failures (see #37) although I was planning to do that at one point. I think if we could deal with those and then merge all this together it would be a very useful PR.
I put a fix on this in @benhills PR #39, which I have now merged. I think that fix is more generic and will still handle this issue. @real-Xuan , if there is still a problem feel free to re-open this, but first check if version 1.1.7 (available on github or pypi) fixes the error.
In the code, presently, when the "migrate" function is called, it generates an error as shown below:
The reason for this problem is that the current code will save the result in
dat.data
, however, when the result's data type isfloat64
, which cannot be stored inint32
.This pull request fixed the bug mentioned in "impdar/lib/migrationlib/mig_python.py."