-
Notifications
You must be signed in to change notification settings - Fork 167
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
Opencv dependency in stcal being optional causes uncaught error in jump step #7409
Opencv dependency in stcal being optional causes uncaught error in jump step #7409
Comments
I made |
spacetelescope/stcal#136 adds better / more descriptive warnings to this situation. I am currently working on porting analogous functionality to |
This is still broken on the latest release. My workflow on MacOS 10.15 Catalina:
And now run the pipeline, turning on the code that needs
So the message is not very useful. If I actually try doing what
I get a useful message, but again, not one that is immediately clear how to solve. |
It looks like it is looking for some library in a later version of MacOS which mine does not have. If I install a slightly older version of
|
Do you think this merits pinning |
I don't know if early versions of But perhaps https://astropy-regions.readthedocs.io/ https://astropy-regions.readthedocs.io/en/stable/masks.html I would expect it to be a drop-in replacement for all the Perhaps going too far, a much simpler approach would be to not fit circles and ellipses at all (which can lead to fitting errors and masking half the image), but to use |
That is good to know; I experimented with using analogous
Binary operations make a lot more sense as it's a pixel image. I apologize, I don't have a lot of context on how this fits into the greater pipeline as a whole so I was focusing on recreating the ellipses; I'll look into the feasibility of using the |
This is being fixed by restoring "opencv" to the list of hard dependencies for the jwst package (see #7499 ) |
After a clean install of the newest version (1.8.5), running the Detector1 pipeline now crashes if parameter
jump.use_ellipses = True
. This is becausestcal
requires opencv-python to work, which is now an optional requirement and not automatically installed. I'm not sure why this packages was made optional, but since it was, I think there should either be a fallback that does not require opencv, or proper error handling that tells JWST pipeline users why the pipeline is failing if functions are used that require opencv. Right now it simply fails throwing a generic NameError on the line the function is called. (Or maybe it should just be added in again as a requirement, but I am not privy to the reasons it was removed in the first place.)There is a warning that is raised when opencv cannot be imported in stcal, but it doesn't actually cause an Exceptions when an opencv function is called and opencv is not installed.
The text was updated successfully, but these errors were encountered: