Separating Line from Continuum in CASA data

I'm continuing to try to separate the line forest from the continuum data in my W51 cube. Some approaches 'kinda work', some don't.

The iterative approach suggested in the previous post works reasonably well, but results in oversubtraction of the continuum, even with a few iterations. Note that this approach requires copying columns between ms files using the table toolkit.

Oversubtracted spectrum

Another approach I wanted to try was to image the whole cube, take the minimum value along the spectral axis, and subtract that. This would avoid the oversubtraction issue by force. However, this leads to failures in the ft task:

CASA <85>: ft(vis='w51_test_small_imcont.ms', model='test_continuum_min.image', usescratch=True, nterms=1)
2015-11-04 15:01:29 WARN    ft::FTMachine::initMaps No overlap in frequency between image channels and selected data found for this FTMachine
2015-11-04 15:01:29 WARN    ft::FTMachine::initMaps+         Check your data selection and image parameters if you end up with a blank image

which I don't understand. I had to hack the header just to get ft to load the file at all, and apparently my hack wasn't good enough. It's really unclear to me now how to load a model from a FITS file.

The next approach is to load the whole continuum-subtracted cube into a model, subtract THAT, then make a continuum image, then subtract that, then maybe we have line and continuum? Maybe? I suspect this approach will require some sort of cube masking.

Unfortunately, ft is again the problem:

2015-11-04 15:09:08 SEVERE  ft::imager::ft() (file /Users/rpmbuild/gradle/workdir/casaautobuild/release-4_5/code/synthesis/MeasurementEquations/Imager.cc, line 4488)       Exception: (/Users/rpmbuild/gradle/workdir/casaautobuild/release-4_5/darwin/include/casacore/lattices/Lattices/Lattice.tcc : 299) Failed AlwaysAssert shapeIn.isEqual (shapeOut)

Followup in early 2017: a cube-based approach is generally more successful. See Sanchez-Monge in prep and the related statcont software package.

Comments