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

Yuhsuan/895 hypercube types #942

Merged
merged 9 commits into from
Nov 11, 2021
Merged

Yuhsuan/895 hypercube types #942

merged 9 commits into from
Nov 11, 2021

Conversation

YuHsuan-Hwang
Copy link
Contributor

@YuHsuan-Hwang YuHsuan-Hwang commented Oct 18, 2021

This PR is for the second part of #895:

  1. Extended the types of hypercube:
    apply a general check of the FITS stokes axis;
    convert CARTA::PolarizationType to casacore::Stokes;
    apply error handling for stokesCoordinate().
  2. Fixed issues when reading stokes info from the header:
    allow CTYPE to be "Stokes" or "stokes" for CASA and FITS images;
    get stokes indices using CRPIX, CRVAL, and CDELT to correctly read headers with CRPIX != 1;
    convert FITS index to CARTA::PolarizationType.

requires frontend branch: yuhsuan/1606_hypercube_types

Copy link
Collaborator

@confluence confluence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to avoid putting anything in Util unnecessarily -- it should only be required if a function is used in multiple files which do not and should not depend on each other.

GetCasaStokesType is only used by StokesFilesConnector, so I think that it should be defined in that header (and if we do decide to put it in Util, for consistency it should go in Util/Casacore).

ConvertFitsStokesValue could be defined in the FileLoader header, since StokesFilesConnector imports it.

Apart from that, I think this all looks good.

@YuHsuan-Hwang
Copy link
Contributor Author

@confluence I moved the functions to StokesFilesConnector.h and FileLoader.h. Please check, thanks!

Copy link
Contributor

@kswang1029 kswang1029 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works well 👍

@veggiesaurus veggiesaurus merged commit 8d9aa32 into dev Nov 11, 2021
@veggiesaurus veggiesaurus deleted the yuhsuan/895_hypercube_types branch November 11, 2021 09:33
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

Successfully merging this pull request may close these issues.

5 participants