Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Runtime error in shiftnd

See original GitHub issue

Here 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 "./", line 128, in <module>
    shifted_image_data2 = shift.shiftnd(image_data2, -yoff, -xoff)
  File "/home/blah/site-packages/image_registration/fft_tools/", 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:open
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

keflavichcommented, Sep 1, 2020

the infrastructure is out of date. Thanks for pointing this out @cosmicoder ; it’s going to take a bit of work to refactor this.

keflavichcommented, Sep 1, 2020

yes, it looks like readthedocs is not building any more

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found