Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • RD/radler
1 result
Show changes
Commits on Source (2)
......@@ -5,6 +5,8 @@
#define RADLER_DECONVOLUTION_SETTINGS_H_
#include <set>
#include <string>
#include <vector>
#include <aocommon/polarization.h>
#include <aocommon/system.h>
......@@ -21,20 +23,18 @@ namespace radler {
enum class LocalRmsMethod { kNone, kRmsWindow, kRmsAndMinimumWindow };
struct DeconvolutionSettings {
DeconvolutionSettings();
/**
* @{
* Settings that are duplicates from top level settings, and also used outside
* deconvolution.
*/
size_t trimmedImageWidth;
size_t trimmedImageHeight;
size_t channelsOut;
double pixelScaleX;
double pixelScaleY;
size_t threadCount;
std::string prefixName;
size_t trimmedImageWidth = 0;
size_t trimmedImageHeight = 0;
size_t channelsOut = 1;
double pixelScaleX = 0.0;
double pixelScaleY = 0.0;
size_t threadCount = aocommon::system::ProcessorCount();
std::string prefixName = "wsclean";
/** @} */
/**
......@@ -42,49 +42,51 @@ struct DeconvolutionSettings {
* These settings strictly pertain to deconvolution only.
*/
std::set<aocommon::PolarizationEnum> linkedPolarizations;
size_t parallelDeconvolutionMaxSize;
size_t parallelDeconvolutionMaxThreads;
double deconvolutionThreshold;
double deconvolutionGain;
double deconvolutionMGain;
bool autoDeconvolutionThreshold;
bool autoMask;
double autoDeconvolutionThresholdSigma;
double autoMaskSigma;
LocalRmsMethod localRMSMethod;
double localRMSWindow;
size_t parallelDeconvolutionMaxSize = 0;
size_t parallelDeconvolutionMaxThreads = 0;
double deconvolutionThreshold = 0.0;
double deconvolutionGain = 0.1;
double deconvolutionMGain = 1.0;
bool autoDeconvolutionThreshold = false;
bool autoMask = false;
double autoDeconvolutionThresholdSigma = 0.0;
double autoMaskSigma = 0.0;
LocalRmsMethod localRMSMethod = LocalRmsMethod::kNone;
double localRMSWindow = 25.0;
std::string localRMSImage;
bool saveSourceList;
size_t deconvolutionIterationCount;
size_t majorIterationCount;
bool allowNegativeComponents;
bool stopOnNegativeComponents;
bool useMultiscale;
bool useSubMinorOptimization;
bool squaredJoins;
double spectralCorrectionFrequency;
bool saveSourceList = false;
size_t deconvolutionIterationCount = 0;
size_t majorIterationCount = 20;
bool allowNegativeComponents = true;
bool stopOnNegativeComponents = false;
bool useMultiscale = false;
bool useSubMinorOptimization = true;
bool squaredJoins = false;
double spectralCorrectionFrequency = 0.0;
std::vector<float> spectralCorrection;
bool multiscaleFastSubMinorLoop;
double multiscaleGain;
double multiscaleDeconvolutionScaleBias;
size_t multiscaleMaxScales;
double multiscaleConvolutionPadding;
bool multiscaleFastSubMinorLoop = true;
double multiscaleGain = 0.2;
double multiscaleDeconvolutionScaleBias = 0.6;
size_t multiscaleMaxScales = 0;
double multiscaleConvolutionPadding = 1.1;
std::vector<double> multiscaleScaleList;
algorithms::multiscale::Shape multiscaleShapeFunction;
double deconvolutionBorderRatio;
algorithms::multiscale::Shape multiscaleShapeFunction =
algorithms::multiscale::Shape::TaperedQuadraticShape;
double deconvolutionBorderRatio = 0.0;
std::string fitsDeconvolutionMask;
std::string casaDeconvolutionMask;
bool horizonMask;
double horizonMaskDistance;
bool horizonMask = false;
double horizonMaskDistance = 0.0;
std::string pythonDeconvolutionFilename;
bool useMoreSaneDeconvolution;
bool useIUWTDeconvolution;
bool iuwtSNRTest;
bool useMoreSaneDeconvolution = false;
bool useIUWTDeconvolution = false;
bool iuwtSNRTest = false;
std::string moreSaneLocation;
std::string moreSaneArgs;
std::vector<double> moreSaneSigmaLevels;
schaapcommon::fitters::SpectralFittingMode spectralFittingMode;
size_t spectralFittingTerms;
schaapcommon::fitters::SpectralFittingMode spectralFittingMode =
schaapcommon::fitters::SpectralFittingMode::NoFitting;
size_t spectralFittingTerms = 0;
std::string forcedSpectrumFilename;
/**
* The number of channels used during deconvolution. This can be used to
......@@ -92,64 +94,8 @@ struct DeconvolutionSettings {
* channels are averaged, and after deconvolution they are interpolated.
* If it is 0, all channels should be used.
*/
size_t deconvolutionChannelCount;
size_t deconvolutionChannelCount = 0;
/** @} */
};
inline DeconvolutionSettings::DeconvolutionSettings()
: trimmedImageWidth(0),
trimmedImageHeight(0),
channelsOut(1),
pixelScaleX(0.0),
pixelScaleY(0.0),
threadCount(aocommon::system::ProcessorCount()),
prefixName("wsclean"),
linkedPolarizations(),
parallelDeconvolutionMaxSize(0),
parallelDeconvolutionMaxThreads(0),
deconvolutionThreshold(0.0),
deconvolutionGain(0.1),
deconvolutionMGain(1.0),
autoDeconvolutionThreshold(false),
autoMask(false),
autoDeconvolutionThresholdSigma(0.0),
autoMaskSigma(0.0),
localRMSMethod(LocalRmsMethod::kNone),
localRMSWindow(25.0),
localRMSImage(),
saveSourceList(false),
deconvolutionIterationCount(0),
majorIterationCount(20),
allowNegativeComponents(true),
stopOnNegativeComponents(false),
useMultiscale(false),
useSubMinorOptimization(true),
squaredJoins(false),
spectralCorrectionFrequency(0.0),
spectralCorrection(),
multiscaleFastSubMinorLoop(true),
multiscaleGain(0.2),
multiscaleDeconvolutionScaleBias(0.6),
multiscaleMaxScales(0),
multiscaleConvolutionPadding(1.1),
multiscaleScaleList(),
multiscaleShapeFunction(
algorithms::multiscale::Shape::TaperedQuadraticShape),
deconvolutionBorderRatio(0.0),
fitsDeconvolutionMask(),
casaDeconvolutionMask(),
horizonMask(false),
horizonMaskDistance(0.0),
pythonDeconvolutionFilename(),
useMoreSaneDeconvolution(false),
useIUWTDeconvolution(false),
iuwtSNRTest(false),
moreSaneLocation(),
moreSaneArgs(),
spectralFittingMode(
schaapcommon::fitters::SpectralFittingMode::NoFitting),
spectralFittingTerms(0),
forcedSpectrumFilename(),
deconvolutionChannelCount(0) {}
} // namespace radler
#endif
#endif
\ No newline at end of file