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

spectral matching with different conventions in the headers #1283

Closed
kswang1029 opened this issue Dec 23, 2020 · 6 comments · Fixed by #1326
Closed

spectral matching with different conventions in the headers #1283

kswang1029 opened this issue Dec 23, 2020 · 6 comments · Fixed by #1326
Assignees
Labels
bug Something isn't working

Comments

@kswang1029
Copy link
Collaborator

When exporting an image to a FITS file in CASA, there is an option to set the spectral convention as velocity in the header. So in principle we should see the original image and the exported image are perfectly matched with each others. However, we see an offset in the matched channel index.
Screen Shot 2020-12-23 at 1 44 32 PM

test image

@kswang1029 kswang1029 added the bug Something isn't working label Dec 23, 2020
@veggiesaurus
Copy link
Collaborator

off by one channel?

@kswang1029
Copy link
Collaborator Author

By a lot. The two red lines in the screenshot should be at the same channel (the profiles are identical).

@veggiesaurus
Copy link
Collaborator

veggiesaurus commented Feb 22, 2021

the spectral matching is done by AST based on the headers. Is it possible that the backend is passing incorrect headers for the CASA image?

edit, no wait. I just re-read the issue. It's just the channel matching that seems to be the issue

@veggiesaurus
Copy link
Collaborator

The issue is in getTransformedChannel (and I assume will be the same in getTransformedChannelList). When we set the FREQ based image to use the same matching type as the other image (VRAD), AST needs to choose a new unit as well. Since we normally display things as km/s, that's what it picks. But the VRAD image has its units in m/s, so the spectral matching is off by a factor of 1000.

The solution is to also set the correct units between both images

@kswang1029
Copy link
Collaborator Author

The issue is in getTransformedChannel (and I assume will be the same in getTransformedChannelList). When we set the FREQ based image to use the same matching type as the other image (VRAD), AST needs to choose a new unit as well. Since we normally display things as km/s, that's what it picks. But the VRAD image has its units in m/s, so the spectral matching is off by a factor of 1000.

The solution is to also set the correct units between both images

So I guess if the header is defined in wavelength we need to provide a correct unit too.

@veggiesaurus
Copy link
Collaborator

The issue is in getTransformedChannel (and I assume will be the same in getTransformedChannelList). When we set the FREQ based image to use the same matching type as the other image (VRAD), AST needs to choose a new unit as well. Since we normally display things as km/s, that's what it picks. But the VRAD image has its units in m/s, so the spectral matching is off by a factor of 1000.
The solution is to also set the correct units between both images

So I guess if the header is defined in wavelength we need to provide a correct unit too.

Luckily we have a map for default units already thanks to @duidae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants