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

Manual mask not parsing region files #18

Open
AstroRipples opened this issue Oct 13, 2022 · 4 comments
Open

Manual mask not parsing region files #18

AstroRipples opened this issue Oct 13, 2022 · 4 comments

Comments

@AstroRipples
Copy link

Hi all. I've managed to get breizorro working now (thanks for adding the documentation yesterday!) but I'm encountering a new issue.

I'm trying to use the --subtract and --merge options to include very faint (but real) emission while excluding residual artefacts, but I'm encountering problems. Specifically, breizorro is not finding the coordinate frame when reading the DS9 region file:

WARNING: A coordinate frame was not found for region: "circle(15:57:11.3383,+27:22:35.913,206.999")", skipping. [regions.io.ds9.read]
breizorro.breizorro - 2022-10-13 09:25:24,752 INFO - Subtracting 0 regions from exc.reg

It seems odd that regions.io.ds9.read is failing to extract the coordinate frame from a region file I made using DS9 🤔 I've tried both in pixel coordinates (the image frame in DS9) and WCS, but no dice. Is a specific region file/coordinate frame format required by breizorro, or is something else underlying the problem?

@bennahugo
Copy link
Collaborator

I noticed that the latest astropy-provided reader is ultra-flakey compared to what was provided in version regions <0.5. DS9 files that are perfectly valid reading fails to read correctly with the new parsers. Unfortunately this is all I can say on the subject - haven't really used breizorro myself.

@bennahugo
Copy link
Collaborator

See e.g. ratt-ru/CubiCal#465 on how to roll back with the API differences

@AstroRipples
Copy link
Author

Okay, underlying issue found 🥳 The WSclean image FITS header is taking values: -180 < CRVAL1 < 180, whereas it looks like breizorro and MakeMask both expect 0 < CRVAL1 < 360.

In this instance, the value was -120.41416666; changing the value to 360 - (-120.4141666) = 239.5858333... (same as the DDF image FITS header) fixes the problem.

@cyriltasse
Copy link
Collaborator

well done!

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

3 participants