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

Cannot properly set vopt values of markups #118

Open
chukus opened this issue Jun 2, 2024 · 2 comments
Open

Cannot properly set vopt values of markups #118

chukus opened this issue Jun 2, 2024 · 2 comments

Comments

@chukus
Copy link

chukus commented Jun 2, 2024

Hello. Beautiful module. I am slowly learning but I really admire this work.

I have a CO JCMT datacube for a molecular cloud, as well as a list of sources with RA, DEC and radial velocity values.
I used the example listed as a python script (the sofia catalog markup example) and I succesfully loaded the image and the markups, which are correctly displayed in RA, DEC but not in vopt.
I tried to modify the restfreq value in the header from 1.42 GHz (HI) to 115.2 GHz (CO) but then I get the following error...

vtkFITSReader::AllocateWCS: WCSlib failed to create WCSstruct.
World coordinates will not be displayed.

@Punzo
Copy link
Owner

Punzo commented Jun 3, 2024

Hello. Beautiful module. I am slowly learning but I really admire this work.

thanks!

I have a CO JCMT datacube for a molecular cloud, as well as a list of sources with RA, DEC and radial velocity values. I used the example listed as a python script (the sofia catalog markup example) and I succesfully loaded the image and the markups, which are correctly displayed in RA, DEC but not in vopt. I tried to modify the restfreq value in the header from 1.42 GHz (HI) to 115.2 GHz (CO) but then I get the following error...

vtkFITSReader::AllocateWCS: WCSlib failed to create WCSstruct. World coordinates will not be displayed.

uhm if I remember well, in default for SlicerAstro I set to use radio velocities.

Have you tried to switch to optical velocity in the WCS for the volume? i.e. these methods:
https://github.com/Punzo/SlicerAstro/blob/master/AstroVolume/MRML/vtkMRMLAstroVolumeDisplayNode.cxx#L262-L365

from the UI:

image

If instead you have already set the optical velocity, then it would be a bug either in SlicerAstro or in the data.
For the coordinate transformation, SlicerAstro uses WCSLIB version 7.1 https://github.com/Punzo/wcslib. The latest is 8.3 (https://www.atnf.csiro.au/people/mcalabre/WCS/). You may try the latest version with a Python script and see if you can still reproduce the issue with your data.

@Punzo
Copy link
Owner

Punzo commented Jun 3, 2024

btw: if the WCSlib fails, there should be more logging printed by https://github.com/Punzo/SlicerAstro/blob/master/vtkFits/vtkFITSReader.cxx#L2017-L2800

looking at those would help.

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