Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: index can't contain negative values #3

Open
setnes opened this issue Oct 19, 2023 · 3 comments
Open

ValueError: index can't contain negative values #3

setnes opened this issue Oct 19, 2023 · 3 comments

Comments

@setnes
Copy link

setnes commented Oct 19, 2023

This looks like a pretty neat program, but I can't seem to get it to work.

Traceback (most recent call last):
  File "/home/setnes/git/solar-eclipse-timelapse-aligner/eclipse-aligner.py", line 564, in <module>
    output_image(jpg_path, circles_data[jpg_path.name])
  File "/home/setnes/git/solar-eclipse-timelapse-aligner/eclipse-aligner.py", line 141, in output_image
    padded = np.pad(img, ((pad_y, pad_y), (pad_x, pad_x), (0, 0)))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/numpy/lib/arraypad.py", line 748, in pad
    pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/numpy/lib/arraypad.py", line 518, in _as_pairs
    raise ValueError("index can't contain negative values")
ValueError: index can't contain negative values

I also tried running the windows version in Wine and got the same negative values error.

@dmcrlsn
Copy link

dmcrlsn commented Oct 19, 2023

See this post for how I was able to work around this problem:

cloudynights.com/topic/895254-imppg-align-annular-eclipse/?p=13012539

@setnes
Copy link
Author

setnes commented Oct 20, 2023

@dmcrlsn This worked for me as well. Thanks a bunch! I still needed to manually adjust the circles JSON file to align some of my images. I also found a way to use PIPP instead of this tool, but this tool did a better job in one shot where PIPP needs to be used in two passes for the eclipse.

@setnes
Copy link
Author

setnes commented Oct 25, 2023

For what it's worth, I found if you enable the moon angle logic using --fix_angle that the original version works, and the patched version doesn't work with the moon. I think most people would want to use this without moon angle detection though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants