radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
95 stars 61 forks source link

Missing attribute? #889

Open slnickerson opened 9 months ago

slnickerson commented 9 months ago

I was using "cube.subcube_from_crtfregion" to extract a carta subregion. And received the error below. Perhaps the region package changed the names of its attributes? Thanks!

line 2020, in subcube_from_crtfregion region_list = regions.CRTFParser(crtf_region).shapes.to_regions() AttributeError: module 'regions' has no attribute 'CRTFParser'

slnickerson commented 9 months ago

Looks like there is a similar issue with ds9 regions. The error reads:

line 1999, in subcube_from_ds9region region_list = regions.DS9Parser(ds9_region).shapes.to_regions() AttributeError: module 'regions' has no attribute 'DS9Parser'

keflavich commented 9 months ago

The error including DS9Parser was addressed in a previous commit. The CRTFParser issue is a real one

slnickerson commented 9 months ago

Great to know thanks! I found a way around this just by using cube.subcube_from_regions