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

Strange crash in determineAstrometricSolution - negative dimension #447

Open
KathleenLabrie opened this issue Mar 14, 2024 · 1 comment
Open
Labels
bug 🐛 Something should be working but it isn't component - gempy gempy severity-routine Needs to be fixed urgency-medium Somewhat normal urgency

Comments

@KathleenLabrie
Copy link
Contributor

One file from GMOS-S new 2023 CCDs crashes in determineAstrometricSolution. Branch: release/3.2.x commit: 23fb519.

To reproduce:
reduce -r determineAstrometricSolution S20231223S0118_refcatAdded.fits

File in: https://drive.google.com/drive/folders/1dMvTHqCUJmIhv_RgWzzq3VaVZqOmnpxs?usp=drive_link (NOIRLab Staff only)

The trace:

   Aligning S20231223S0118_refcatAdded.fits extension 9 with 1 REFCAT and 10 OBJCAT sources
ERROR - Traceback (most recent call last):
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/reduction/coreReduce.py", line 240, in runr
ERROR -     primitive_as_recipe()
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/utils/decorators.py", line 352, in gn
ERROR -     ret_value = fn(pobj, adinputs=adinputs, **fnargs)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/utils/decorators.py", line 269, in gn
ERROR -     ret_value = fn(pobj, **kwargs)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/geminidr/core/primitives_register.py", line 420, in determineAstrometricSolution
ERROR -     transform = fit_model(m_init,
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/gempy/library/matching.py", line 515, in fit_model
ERROR -     m_init = fit_it(model, xin, xout, scale=scale, sigma=sigma)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/gempy/library/matching.py", line 177, in __call__
ERROR -     landscape = self.mklandscape(ref_coords, sigma*scale, maxsig, landshape)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/gempy/library/matching.py", line 112, in mklandscape
ERROR -     landscape = np.zeros(landshape)
ERROR - ValueError: negative dimensions are not allowed
ERROR - negative dimensions are not allowed
ERROR - reduce caught an unhandled exception.
ERROR - 
ERROR - negative dimensions are not allowed
ERROR - Traceback (most recent call last):
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/scripts/reduce", line 87, in main
ERROR -     r_reduce.runr()
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/reduction/coreReduce.py", line 240, in runr
ERROR -     primitive_as_recipe()
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/utils/decorators.py", line 352, in gn
ERROR -     ret_value = fn(pobj, adinputs=adinputs, **fnargs)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/recipe_system/utils/decorators.py", line 269, in gn
ERROR -     ret_value = fn(pobj, **kwargs)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/geminidr/core/primitives_register.py", line 420, in determineAstrometricSolution
ERROR -     transform = fit_model(m_init,
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/gempy/library/matching.py", line 515, in fit_model
ERROR -     m_init = fit_it(model, xin, xout, scale=scale, sigma=sigma)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/gempy/library/matching.py", line 177, in __call__
ERROR -     landscape = self.mklandscape(ref_coords, sigma*scale, maxsig, landshape)
ERROR -   File "/home/kathleen.labrie/data/GemKLRepo/activedragons/gempy/library/matching.py", line 112, in mklandscape
ERROR -     landscape = np.zeros(landshape)
ERROR - ValueError: negative dimensions are not allowed
@KathleenLabrie KathleenLabrie added bug 🐛 Something should be working but it isn't severity-routine Needs to be fixed urgency-medium Somewhat normal urgency component - gempy gempy labels Mar 14, 2024
@chris-simpson
Copy link
Contributor

I think this needs better logic when there aren't many sources in the reference catalogue. Or perhaps it just needs to create an image which is a few pixels larger than the bounds of the reference catalogue in each dimension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something should be working but it isn't component - gempy gempy severity-routine Needs to be fixed urgency-medium Somewhat normal urgency
Projects
None yet
Development

No branches or pull requests

2 participants