MSContinuumSubtractor.h

Classes

MSContinuumSubtractor -- Fits and subtracts or models the continuum in spectra (full description)

class MSContinuumSubtractor

Interface

Public Members
MSContinuumSubtractor (MeasurementSet& ms)
MSContinuumSubtractor& operator=(MSContinuumSubtractor& other)
~MSContinuumSubtractor()
void setDataDescriptionIds(const Vector<Int>& ddIds)
void setFields(const Vector<Int>& fieldIds)
void setChannels(const Vector<Int>& channels)
void setSolutionInterval(Float solInt)
void setOrder(Int order)
void setMode(const String& mode)
void subtract()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class's main aim is to subtract the continuum from spectral line data.

Synopsis

Spectral line observations often contain continuum emission which is present in all channels (often with small slope across band). This class fits this continuum and subtracts it, replacing either the corrected data or the model data column.

Example

     MS inMS(fileName);
     MSContinuumSubtractor mssub(inMS);
     mssub.setDataDescriptionIds(ddIds);
     mssub.setFields(fieldIds);
     mssub.setSolutionInterval(10.0);
     mssub.setMode("subtract");
     mssub.subtract();
A MSContinuumSubtractor object is constructed and the continuum is subtracted with a 10.0s averaging time for the fit.

Motivation

This class replaces existing functionality at the glish level, in an attempt to speed up the continuum subtraction process.

To Do

Member Description

MSContinuumSubtractor (MeasurementSet& ms)

Constructor

MSContinuumSubtractor& operator=(MSContinuumSubtractor& other)

Assignment (only copies reference to MS, need to reset selection etc)

~MSContinuumSubtractor()

Destructor

void setDataDescriptionIds(const Vector<Int>& ddIds)

Set the required data desc Ids

void setFields(const Vector<Int>& fieldIds)

Set the required field Ids

void setChannels(const Vector<Int>& channels)

Set the channels to use in the fit

void setSolutionInterval(Float solInt)

Set the solution interval in seconds, the value zero implies scan averaging

void setOrder(Int order)

Set the order of the fit (1=linear)

void setMode(const String& mode)

Set the processing mode: subtract, model or replace

void subtract()

Do the subtraction (or save the model)