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

Error when making an rgb fits image. #493

Open
maitraiyeetiwari opened this issue Jan 16, 2024 · 5 comments
Open

Error when making an rgb fits image. #493

maitraiyeetiwari opened this issue Jan 16, 2024 · 5 comments

Comments

@maitraiyeetiwari
Copy link

I am trying to make an rgb cube using:

import aplpy
aplpy.make_rgb_cube(['oi_63_mom0_0_8.fits','oi_63_mom0_8_20.fits','oi_63_mom0_8_20.fits'],'m8-oi-rgb.fits')

but get an error:
TypeError: concatenate() got an unexpected keyword argument 'dtype'.

I was able to do this earlier without any problems and now it doesn't work.

@coude
Copy link

coude commented Jan 22, 2024

Did you update any of the packages in your working python environment since the last time this worked?

@maitraiyeetiwari
Copy link
Author

Yes, I did upgrade numpy and numdifftools to the latest versions: 1.26.3 and 0.9.41, respectively.

@coude
Copy link

coude commented Jan 23, 2024

Assuming there is nothing wrong with the input FITS files, a compatibility issue between packages would be a plausible explanation. I would suggest creating a new Python environment from scratch and then only installing aplpy (either with conda or pip), which should take care of all the dependencies you need to test make_rgb_cube.

Out of curiosity, I successfully ran the same function using a bunch of (now published) HAWC+ image fits files for NGC 2024. It's essentially the same function you used, but this could serve as a check that it works on your side. Here is the Github link.

Hopefully this helps a bit!

@maitraiyeetiwari
Copy link
Author

Thanks Simon! But I do not want to change the python environment as the current upgrades are needed for another tool (PDR Toolbox) to function. However, I tried to install aplpy on google colab and there this works just fine. So, the issue is resolved for now.

@coude
Copy link

coude commented Jan 24, 2024

Happy to help, I'm glad you found a workaround!

If you have time at some point, it might be a good idea to recreate your python environment from scratch (or a new virtual environment), just in case it would be enough to fix those potential compatibility issues in the future.

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