Runtime error in shiftnd
See original GitHub issueHere is my code:
from image_registration import chi2_shift
from image_registration.fft_tools import shift
# -- Looping over subimages --
image_data1 = fits.getdata(sys.argv[1], ext=x)
image_data2 = fits.getdata(sys.argv[2], ext=x)
noise = np.zeros_like(image_data1,dtype=np.float)
xoff, yoff, exoff, eyoff = chi2_shift(image_data1, image_data2, noise, return_error=True, upsample_factor='auto')
shifted_image_data2 = shift.shiftnd(image_data2, -yoff, -xoff)
and here is the runtime error:
File "./subtractor_registration.py", line 128, in <module>
shifted_image_data2 = shift.shiftnd(image_data2, -yoff, -xoff)
File "/home/blah/site-packages/image_registration/fft_tools/shift.py", line 103, in shiftnd
for dim,(off,nx) in enumerate(zip(offset,data.shape))],
TypeError: zip argument #1 must support iteration
It runs without error for shift.shift2d but produces a very shifted image for two almost aligned images.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
why this code has runtime error: shift exponent 32 is too large ...
The problem is that your algorithm gets into an infinite loop with an ever-increasing value for depth . When one of the break...
Read more >Runtime Error: What It Is and How to Fix It - Lifewire
Runtime errors prevent a program from working properly. Here's how to fix runtime errors caused my memory issues, unpatched bugs, and more.
Read more >C++: the evil runtime error: left shift of negative value, reason ...
Someone may encounter an error: left shift of negative value, when you (me too!) wrote the code as follows: class Solution { public:...
Read more >fix runtime errors in Internet Explorer - Microsoft Support
A runtime error is a software or hardware problem that prevents Internet Explorer from working correctly. Runtime errors can be caused when ...
Read more >What are Runtime Errors? Their causes and How to fix them?
A Runtime Error is an error that occurs at the time of running or executing a program. When this error occurs, the program...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the infrastructure is out of date. Thanks for pointing this out @cosmicoder ; it’s going to take a bit of work to refactor this.
yes, it looks like readthedocs is not building any more