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
95 stars 61 forks source link

Implement and test support for full Stokes dimension #14

Open astrofrog opened 10 years ago

astrofrog commented 10 years ago

I.e. test everything with a cube that has the four stokes elements.

ChrisBeaumont commented 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?

keflavich commented 10 years ago

No objections. Punt this.

ChrisBeaumont commented 10 years ago

Ok, milestone changed.

Just to hash out what this should involve, I think we discussed:

We still need to decide on how to handle the various array methods like argmax, moment, etc. A few options:

I think I like the first option the best. Am I missing any other approaches?

keflavich commented 10 years ago

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.

ChrisBeaumont commented 10 years ago

Ah, that makes sense

astrofrog commented 10 years ago

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.

low-sky commented 10 years ago

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.

ChrisBeaumont commented 10 years ago

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?

low-sky commented 10 years ago

Maybe single caps for consistency with the polarization convention: I,P,Q,U,V,RR,RL etc.

keflavich commented 10 years ago

:+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

astrofrog commented 10 years ago

:+1: to capital letters

keflavich commented 8 years ago

WIP: https://github.com/keflavich/spectral-cube/tree/stokes Not ready to upgrade this to a PR yet though.