Open astrofrog opened 10 years ago
Hmm I'm tempted to punt this from v0.1 to v0.2, since we haven't fully fleshed out what this means yet. Any objections @astrofrog @keflavich?
No objections. Punt this.
Ok, milestone changed.
Just to hash out what this should involve, I think we discussed:
QUV->LL,RR
, etc)We still need to decide on how to handle the various array methods like argmax, moment, etc. A few options:
stokes
kwarg, indicating what channel to usewith_stokes
method along the lines of with_mask
, that returns a single-channel SpectralCube that contains only one stokes channelI think I like the first option the best. Am I missing any other approaches?
I rather prefer creating a separate StokesSpectralCube
class that has cubes as its properties and therefore has no cubelike methods on top of it. i.e., you'd have stokes.qcube.argmax
, never stokes.argmax
.
Ah, that makes sense
Yes, the StokesSpectralCube
class can actually be very simple. We should just decide whether the attributes for this class are all properties which either work or raise an exception if they cannot be computed, or whether we only create the properties that can be created given the input file.
Sorry; wrong button. I wanted to :+1: @keflavich proposal of requiring a call into the specific cube in a polarization set. If you called a method for a cube that didn't exist (i.e., the PI cube when only Q,U are defined), this could trigger a generation on the fly.
Sounds good. I don't have a preference, but do other people care whether the properties are called Q
or qcube
or q
or Qcube
?
Maybe single caps for consistency with the polarization convention:
I
,P
,Q
,U
,V
,RR
,RL
etc.
:+1: to capital letters as properties. Those are less likely to get in the way of tab-completion than lower-case letters, and the qcube
/Qcube
version is ugly
:+1: to capital letters
WIP: https://github.com/keflavich/spectral-cube/tree/stokes Not ready to upgrade this to a PR yet though.
I.e. test everything with a cube that has the four stokes elements.