radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
98 stars 65 forks source link

Stokes Type attribute #764

Closed preshanth closed 2 years ago

preshanth commented 3 years ago

I have added a type attribute to the stokes spectral cube to return a string type descriptor of the type of stokes. As there are multiple different types supported by the VALID_STOKES which is based on the CASA supported stokes types. I have introduced four other subsets of VALID_STOKES.

STOKES_SKY = ['I','Q','U','V']
STOKES_FEED_LINEAR = ['XX', 'XY', 'YX', 'YY']
STOKES_FEED_CIRCULAR = ['RR', 'RL', 'LR', 'LL']
STOKES_FEED_GENERIC = ['PP', 'PQ', 'QP', 'QQ']

These are the types are that now stores in stokes_type attribute of the class. The goal here is to be able to use the types for conversion from one stokes type to the other where possible.

keflavich commented 3 years ago

Sounds great. Is this supposed to be a PR though?