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

Beam position angle incorrectly reported and rendered as degrees instead of radians for CASA image #1025

Closed
nbrunett opened this issue Feb 17, 2022 · 5 comments · Fixed by #1027
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nbrunett
Copy link

Describe the bug
For a CASA image created in CASA with tclean, the "file information" in the "file browser" dialog of CARTA reports the restoring beam position angle to be -1.44 deg while the "header" tab shows BPA = -8.235030409149E+01. Also, the beam ellipse when the image is loaded is using the position angle reported under "file information".

imhead in CASA shows that the position angle is -1.44 radians, so it looks like CARTA is assuming it is in degrees in some places.

To Reproduce

  1. Click File -> Open image.
  2. Click on the image.
  3. Note the restoring beam position angle under "file information".
  4. Click the "header" tab and note the different value.
  5. Click Load and the beam ellipse is drawn with the "file information" position angle.

Expected behavior
The "file information" should report the correct position angle value with the appropriate units (either report radians like imhead does or convert value to degrees). The beam ellipse should be drawn based on the value and units of the position angle being consistent.

Platform info (please complete the following information):

  • OS: MacOS 10.15.7
  • Browser: N/A (just running CARTA app directly in it's own window)
  • Version: 3.0.0-beta.2b

Additional context
One of my cubes where I am seeing this issue is fairly small (6 MB) and I can provide it if that would help.

Thanks.

@kswang1029
Copy link
Contributor

@nbrunett thanks for reporting this issue. It would be very helpful if you can share with us your test images for debugging.

@nbrunett
Copy link
Author

Here you go. The radians file has the beam position angle in radians, and degrees has it in degrees.

Let me know if you have any issues with the files or need anything else.

radians.tar.gz
degrees.tar.gz

@kswang1029 kswang1029 transferred this issue from CARTAvis/carta Feb 21, 2022
@kswang1029
Copy link
Contributor

Here is the header obtained with casa-imhead. "radians.image" has the beam position angle defined in 'rad' in the casa image header format.
Screen Shot 2022-02-21 at 15 19 08
In CARTA, the BPA header (as -8.235030409149E+01) in FITS format is displayed correctly in the header tab. In the file information tab, the displayed beam position angle, as -1.43728 deg, is incorrect. This "-1.43728" is actually the value in rad defined in the casa image header. So the issue here is we will need to consider the unit of the positionangle header in casa images when deriving the file information data.

@veggiesaurus veggiesaurus added the bug Something isn't working label Feb 21, 2022
@veggiesaurus veggiesaurus added this to the v3.0b-3 milestone Feb 21, 2022
@kswang1029
Copy link
Contributor

@nbrunett Do you have any idea why the beam position angle is defined in rad not in degree? Are these test images generated with tclean directly without any other steps? We would like to get some ideas on how many casa images use rad to define the position angle of the beam element (knowing this would help us on scheduling of this bug fix). Thanks.

@nbrunett
Copy link
Author

I don't have any ideas why the units are different sometimes, sorry. I should say that these cubes were made in an older version of CASA (5.6.1) for other compatibility reasons. I did try the tclean step in 6.2.1 (the newest I have access to for a quick test) with the same result.

These are cubes that I was making for science, not just for testing CARTA. This means there's a series of steps that prepare the measurement sets to be cleaned which should be nearly identical except for the frequency range (the two cubes are centered on two different CN spectral lines with rest frequencies of 113.14415730 GHz and 113.49097020 GHz). The tclean calls are identical except for the input measurement sets, pixel sizes, x/y dimensions, and rest frequencies. It's not obvious to me why any of those would cause the beam position angle units to be different.

Sorry this doesn't help with your question of how often the units are radians. I think it's worth noting that a lack of people reporting this issue up to this point may not mean it is rare. If the beam ellipse is small and round enough it would be difficult to notice this problem. The large and fairly elliptical beams in my cubes (that should have nearly identical beams) helped make it stand out when the beam ellipse rotated by almost 90 degrees when switching between cubes.

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.

4 participants