keflavich / cube-line-extractor

4 stars 1 forks source link

Feature Request: Use "Brightest Line" Cube Which Does Not Share Image Cube Parameters of Target Cube #6

Closed jmangum closed 2 years ago

jmangum commented 7 years ago

It is often the case that the "brightest line" for the CubeLineMoment calculations is not usually from the same spw as the target lines to be extracted from the cube. This means that the brightest line is not necessarily sampled on the same spatial grid (i.e. might not have the same beam characteristics) as the target lines). It would make more sense to be able to use a "brightest line" cube from any instrument with sufficient spatial and spectral resolution (so as to be sampling the same structure as the target line measurements). Using our Band 6 and 7 ALMA data as an example, it would be convenient to be able to use the C18O 2-1 transition as the brightest line for all Band 6 and 7 measurements processed. Note that this will (often) require interpolation of brightest line cube to the same grid, beam, and velocity scaling as the target line cube.

keflavich commented 7 years ago

This is possible and probably straightforward. I don't think we should automate it too much, at least at first.

jmangum commented 7 years ago

Agreed.

jmangum commented 2 years ago

I am working on implementing this feature and finding myself getting confused by some of the naming used for the different cubes and maps used. Apparently noisecube is the noise cube used to define the noisemapbright, which is also the cutoutcube, PPV range used for PPV masking. On the other hand, noisemap is used to mask the spectral line moments calculated from cube. I am not sure it makes sense to refactor variable names in the script, so will try to insert some clarifying comments (for the next time that I trip-over these naming ambiguities).

keflavich commented 2 years ago

if there are better names to use, please go ahead and substitute them in - good variable names are better than comments, since comments can grow stale as code changes. I'll review changes if you put them in a PR

jmangum commented 2 years ago

ok. I am reluctant to try to make wholesale variable name changes as I have run myself in circles trying to do that in the past with other scripts. Perhaps in this case replace 'noisecubewith 'noisecubebright?