casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
casa::SpecFitSettingsWidgetRadio Class Reference

#include <SpecFitSettingsWidgetRadio.qo.h>

Inheritance diagram for casa::SpecFitSettingsWidgetRadio:
casa::ProfileTaskFacilitator

Signals

void gaussEstimateCountChanged (int count)
 

Public Member Functions

 SpecFitSettingsWidgetRadio (QWidget *parent=0)
 
 ~SpecFitSettingsWidgetRadio ()
 
void setUnits (QString units)
 
void setDisplayYUnits (const QString &units)
 
void setImageYUnits (const QString &units)
 
void setCurveName (const QString &curveName)
 
void addCurveName (const QString &curveName)
 
void setRange (double start, double end)
 
void reset ()
 
void pixelsChanged (int pixX, int pixY)
 
- Public Member Functions inherited from casa::ProfileTaskFacilitator
 ProfileTaskFacilitator ()
 
virtual ~ProfileTaskFacilitator ()
 
virtual void setTaskMonitor (ProfileTaskMonitor *monitor)
 
virtual void setLogger (casacore::LogIO *log)
 
virtual void plotMainCurve ()
 
virtual QString getFileName ()
 
virtual void logWarning (casacore::String msg, bool opticalSource=false)
 
virtual void postStatus (casacore::String status, bool opticalSource=false)
 
virtual casacore::Vector
< casacore::Float
getXValues () const
 
virtual casacore::Vector
< casacore::Float
getYValues () const
 
virtual casacore::Vector
< casacore::Float
getZValues () const
 
virtual casacore::Vector
< casacore::Double
getRegionXValues () const
 
virtual casacore::Vector
< casacore::Double
getRegionYValues () const
 
virtual QString getYUnit () const
 
virtual QString getYUnitPrefix () const
 
virtual casacore::String getXAxisUnit () const
 
virtual const std::shared_ptr
< const
casacore::ImageInterface
< casacore::Float > > 
getImage (const QString &name="") const
 
virtual const casacore::String getPixelBox () const
 
virtual const casacore::String getRegionShape () const
 
bool isOptical ()
 
void setOptical (bool optical)
 
void setCollapseVals (const casacore::Vector< casacore::Float > &spcVals)
 

Private Types

enum  TableHeaders {
  PEAK,
  CENTER,
  FWHM,
  FIXED,
  END_COLUMN
}
 

Private Slots

void polyFitChanged (int state)
 
void gaussCountChanged (int count)
 
void fitRatioChanged (int count)
 
void clean ()
 
void specLineFit ()
 
void setOutputLogFile ()
 
void viewOutputLogFile ()
 
void saveOutputChanged (int state)
 
void specFitEstimateSpecified (double xValue, double yValue, bool centerPeak)
 
void fitDone (bool newData=true)
 
void cancelFit ()
 
void specifyGaussianEstimates ()
 
void gaussianEstimatesChanged ()
 

Private Member Functions

bool _constructFitter (std::shared_ptr< const casacore::ImageInterface< float > > &image, const casacore::String &region, const casacore::Record *const &regionPtr, const casacore::String &box, const casacore::String &chans, const casacore::String &stokes, const casacore::String &mask, const int axis, const casacore::uInt ngauss, const SpectralList &spectralList)
 
void setEstimateValue (int row, int col, double val)
 Places the passed in Gaussian estimate val into the indicated row and column of the initial Gaussian estimate table. More...
 
bool isValidEstimate (QString &peakStr, QString &centerStr, QString &fwhmStr, QString &fixedStr, int rowIndex)
 
SpectralList buildSpectralList (int nGauss, bool &validList)
 
bool isValidFitSpecification (int gaussCount, bool polyFit)
 
void setCanvas (QtCanvas *canvas)
 
void doFit (float startVal, float endVal, uint gaussCount, bool fitPoly, int polyN)
 
casacore::String getChannels (float startVal, float endVal, const casacore::Vector< float > &specValues) const
 
void getFitBounds (float &startVal, float &endVal) const
 
int getFitCount (int &startChannelIndex, int &endChannelIndex)
 
void setFitEstimate (int row, double xValue, double yValue, bool centerPeak)
 
void clearEstimates ()
 
void clear ()
 
void emptyCurveList ()
 
void resolveOutputLogFile ()
 
void getConversion (const casacore::String &unitStr, bool &velocity, bool &wavelength) const
 Decides if the units represent velocity, wavelength, or frequency. More...
 
bool processFitResults (casacore::Vector< float > &xValues, casacore::Vector< float > &xValuesPix, const casacore::String &yUnit)
 
void getEstimateStrings (int index, QString &peakStr, QString &centerStr, QString &fwhmStr) const
 
bool processFitResultGaussian (const SpectralElement *solution, int index, QList< SpecFit * > &curves, const casacore::String &yUnit)
 
bool processFitResultPolynomial (const SpectralElement *solution, QList< SpecFit * > &curves)
 
bool isInRange (double xValue) const
 
QString settingsToString () const
 
double toPixels (double val, casacore::String units, casacore::SpectralCoordinate &coord) const
 
void drawCurves (int pixelX, int pixelY)
 

Private Attributes

Ui::SpecFitSettingsWidgetRadio ui
 
ImageProfileFitterfitter
 
SpecFitThread * specFitThread
 
QProgressDialog progressDialog
 
GaussianEstimateDialog gaussEstimateDialog
 
casacore::Record regionRecord
 
QString outputLogPath
 
QString displayYUnits
 
QString imageYUnits
 
QList< QList< SpecFit * > > curveList
 
int SUM_FIT_INDEX
 
bool viewerSettingsWritten
 
volatile bool fitCancelled
 

Additional Inherited Members

- Protected Member Functions inherited from casa::ProfileTaskFacilitator
bool isValidChannelRangeValue (QString str, const QString &endStr)
 
void findChannelRange (float startVal, float endVal, const casacore::Vector< casacore::Float > &specValues, casacore::Int &channelStartIndex, casacore::Int &channelEndIndex)
 
- Protected Attributes inherited from casa::ProfileTaskFacilitator
QtCanvaspixelCanvas
 
ProfileTaskMonitortaskMonitor
 
casacore::LogIOlogger
 

Detailed Description

Definition at line 44 of file SpecFitSettingsWidgetRadio.qo.h.

Member Enumeration Documentation

Enumerator
PEAK 
CENTER 
FWHM 
FIXED 
END_COLUMN 

Definition at line 117 of file SpecFitSettingsWidgetRadio.qo.h.

Constructor & Destructor Documentation

casa::SpecFitSettingsWidgetRadio::SpecFitSettingsWidgetRadio ( QWidget *  parent = 0)
casa::SpecFitSettingsWidgetRadio::~SpecFitSettingsWidgetRadio ( )

Member Function Documentation

bool casa::SpecFitSettingsWidgetRadio::_constructFitter ( std::shared_ptr< const casacore::ImageInterface< float > > &  image,
const casacore::String region,
const casacore::Record *const &  regionPtr,
const casacore::String box,
const casacore::String chans,
const casacore::String stokes,
const casacore::String mask,
const int  axis,
const casacore::uInt  ngauss,
const SpectralList spectralList 
)
private
void casa::SpecFitSettingsWidgetRadio::addCurveName ( const QString &  curveName)
virtual

Reimplemented from casa::ProfileTaskFacilitator.

SpectralList casa::SpecFitSettingsWidgetRadio::buildSpectralList ( int  nGauss,
bool &  validList 
)
private
void casa::SpecFitSettingsWidgetRadio::cancelFit ( )
privateslot
void casa::SpecFitSettingsWidgetRadio::clean ( )
privateslot
void casa::SpecFitSettingsWidgetRadio::clear ( )
privatevirtual

Reimplemented from casa::ProfileTaskFacilitator.

void casa::SpecFitSettingsWidgetRadio::clearEstimates ( )
private
void casa::SpecFitSettingsWidgetRadio::doFit ( float  startVal,
float  endVal,
uint  gaussCount,
bool  fitPoly,
int  polyN 
)
private
void casa::SpecFitSettingsWidgetRadio::drawCurves ( int  pixelX,
int  pixelY 
)
private
void casa::SpecFitSettingsWidgetRadio::emptyCurveList ( )
private
void casa::SpecFitSettingsWidgetRadio::fitDone ( bool  newData = true)
privateslot
void casa::SpecFitSettingsWidgetRadio::fitRatioChanged ( int  count)
privateslot
void casa::SpecFitSettingsWidgetRadio::gaussCountChanged ( int  count)
privateslot
void casa::SpecFitSettingsWidgetRadio::gaussEstimateCountChanged ( int  count)
signal
void casa::SpecFitSettingsWidgetRadio::gaussianEstimatesChanged ( )
privateslot
casacore::String casa::SpecFitSettingsWidgetRadio::getChannels ( float  startVal,
float  endVal,
const casacore::Vector< float > &  specValues 
) const
private
void casa::SpecFitSettingsWidgetRadio::getConversion ( const casacore::String unitStr,
bool &  velocity,
bool &  wavelength 
) const
private

Decides if the units represent velocity, wavelength, or frequency.

void casa::SpecFitSettingsWidgetRadio::getEstimateStrings ( int  index,
QString &  peakStr,
QString &  centerStr,
QString &  fwhmStr 
) const
private
void casa::SpecFitSettingsWidgetRadio::getFitBounds ( float &  startVal,
float &  endVal 
) const
private
int casa::SpecFitSettingsWidgetRadio::getFitCount ( int &  startChannelIndex,
int &  endChannelIndex 
)
private
bool casa::SpecFitSettingsWidgetRadio::isInRange ( double  xValue) const
private
bool casa::SpecFitSettingsWidgetRadio::isValidEstimate ( QString &  peakStr,
QString &  centerStr,
QString &  fwhmStr,
QString &  fixedStr,
int  rowIndex 
)
private
bool casa::SpecFitSettingsWidgetRadio::isValidFitSpecification ( int  gaussCount,
bool  polyFit 
)
private
void casa::SpecFitSettingsWidgetRadio::pixelsChanged ( int  pixX,
int  pixY 
)
virtual

Reimplemented from casa::ProfileTaskFacilitator.

void casa::SpecFitSettingsWidgetRadio::polyFitChanged ( int  state)
privateslot
bool casa::SpecFitSettingsWidgetRadio::processFitResultGaussian ( const SpectralElement solution,
int  index,
QList< SpecFit * > &  curves,
const casacore::String yUnit 
)
private
bool casa::SpecFitSettingsWidgetRadio::processFitResultPolynomial ( const SpectralElement solution,
QList< SpecFit * > &  curves 
)
private
bool casa::SpecFitSettingsWidgetRadio::processFitResults ( casacore::Vector< float > &  xValues,
casacore::Vector< float > &  xValuesPix,
const casacore::String yUnit 
)
private
void casa::SpecFitSettingsWidgetRadio::reset ( )
virtual
void casa::SpecFitSettingsWidgetRadio::resolveOutputLogFile ( )
private
void casa::SpecFitSettingsWidgetRadio::saveOutputChanged ( int  state)
privateslot
void casa::SpecFitSettingsWidgetRadio::setCanvas ( QtCanvas canvas)
privatevirtual

Reimplemented from casa::ProfileTaskFacilitator.

void casa::SpecFitSettingsWidgetRadio::setCurveName ( const QString &  curveName)
virtual

Reimplemented from casa::ProfileTaskFacilitator.

void casa::SpecFitSettingsWidgetRadio::setDisplayYUnits ( const QString &  units)
virtual

Reimplemented from casa::ProfileTaskFacilitator.

void casa::SpecFitSettingsWidgetRadio::setEstimateValue ( int  row,
int  col,
double  val 
)
private

Places the passed in Gaussian estimate val into the indicated row and column of the initial Gaussian estimate table.

void casa::SpecFitSettingsWidgetRadio::setFitEstimate ( int  row,
double  xValue,
double  yValue,
bool  centerPeak 
)
private
void casa::SpecFitSettingsWidgetRadio::setImageYUnits ( const QString &  units)
virtual

Reimplemented from casa::ProfileTaskFacilitator.

void casa::SpecFitSettingsWidgetRadio::setOutputLogFile ( )
privateslot
void casa::SpecFitSettingsWidgetRadio::setRange ( double  start,
double  end 
)
virtual
QString casa::SpecFitSettingsWidgetRadio::settingsToString ( ) const
private
void casa::SpecFitSettingsWidgetRadio::setUnits ( QString  units)
virtual
void casa::SpecFitSettingsWidgetRadio::specFitEstimateSpecified ( double  xValue,
double  yValue,
bool  centerPeak 
)
privateslot
void casa::SpecFitSettingsWidgetRadio::specifyGaussianEstimates ( )
privateslot
void casa::SpecFitSettingsWidgetRadio::specLineFit ( )
privateslot
double casa::SpecFitSettingsWidgetRadio::toPixels ( double  val,
casacore::String  units,
casacore::SpectralCoordinate coord 
) const
private
void casa::SpecFitSettingsWidgetRadio::viewOutputLogFile ( )
privateslot

Member Data Documentation

QList<QList<SpecFit*> > casa::SpecFitSettingsWidgetRadio::curveList
private

Definition at line 129 of file SpecFitSettingsWidgetRadio.qo.h.

QString casa::SpecFitSettingsWidgetRadio::displayYUnits
private

Definition at line 127 of file SpecFitSettingsWidgetRadio.qo.h.

volatile bool casa::SpecFitSettingsWidgetRadio::fitCancelled
private

Definition at line 132 of file SpecFitSettingsWidgetRadio.qo.h.

ImageProfileFitter* casa::SpecFitSettingsWidgetRadio::fitter
private

Definition at line 119 of file SpecFitSettingsWidgetRadio.qo.h.

GaussianEstimateDialog casa::SpecFitSettingsWidgetRadio::gaussEstimateDialog
private

Definition at line 122 of file SpecFitSettingsWidgetRadio.qo.h.

QString casa::SpecFitSettingsWidgetRadio::imageYUnits
private

Definition at line 128 of file SpecFitSettingsWidgetRadio.qo.h.

QString casa::SpecFitSettingsWidgetRadio::outputLogPath
private

Definition at line 126 of file SpecFitSettingsWidgetRadio.qo.h.

QProgressDialog casa::SpecFitSettingsWidgetRadio::progressDialog
private

Definition at line 121 of file SpecFitSettingsWidgetRadio.qo.h.

casacore::Record casa::SpecFitSettingsWidgetRadio::regionRecord
private

Definition at line 123 of file SpecFitSettingsWidgetRadio.qo.h.

SpecFitThread* casa::SpecFitSettingsWidgetRadio::specFitThread
private

Definition at line 120 of file SpecFitSettingsWidgetRadio.qo.h.

int casa::SpecFitSettingsWidgetRadio::SUM_FIT_INDEX
private

Definition at line 130 of file SpecFitSettingsWidgetRadio.qo.h.

Ui::SpecFitSettingsWidgetRadio casa::SpecFitSettingsWidgetRadio::ui
private

Definition at line 118 of file SpecFitSettingsWidgetRadio.qo.h.

bool casa::SpecFitSettingsWidgetRadio::viewerSettingsWritten
private

Definition at line 131 of file SpecFitSettingsWidgetRadio.qo.h.


The documentation for this class was generated from the following file: