Skip to content
Snippets Groups Projects
Commit afa10aa6 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Format

parent c16e4e9d
No related branches found
No related tags found
1 merge request!50Draft: Add sphinx documentation
...@@ -38,17 +38,23 @@ void init_settings(py::module& m) { ...@@ -38,17 +38,23 @@ void init_settings(py::module& m) {
.value("python", radler::AlgorithmType::kPython, .value("python", radler::AlgorithmType::kPython,
DOC(radler_AlgorithmType_kPython)); DOC(radler_AlgorithmType_kPython));
py::enum_<radler::LocalRmsMethod>( py::enum_<radler::LocalRmsMethod>(m, "LocalRmsMethod",
m, "LocalRmsMethod", DOC(radler_LocalRmsMethod)) DOC(radler_LocalRmsMethod))
.value("none", radler::LocalRmsMethod::kNone, DOC(radler_LocalRmsMethod_kNone)) .value("none", radler::LocalRmsMethod::kNone,
.value("rms_window", radler::LocalRmsMethod::kRmsWindow, DOC(radler_LocalRmsMethod_kRmsWindow)) DOC(radler_LocalRmsMethod_kNone))
.value("rms_and_minimum_window", radler::LocalRmsMethod::kRmsAndMinimumWindow, DOC(radler_LocalRmsMethod_kRmsAndMinimumWindow)); .value("rms_window", radler::LocalRmsMethod::kRmsWindow,
DOC(radler_LocalRmsMethod_kRmsWindow))
.value("rms_and_minimum_window",
radler::LocalRmsMethod::kRmsAndMinimumWindow,
DOC(radler_LocalRmsMethod_kRmsAndMinimumWindow));
py::enum_<radler::MultiscaleShape>( py::enum_<radler::MultiscaleShape>(m, "MultiscaleShape",
m, "MultiscaleShape", DOC(radler_MultiscaleShape)) DOC(radler_MultiscaleShape))
.value("tapered_quadratic", .value("tapered_quadratic",
radler::MultiscaleShape::kTaperedQuadraticShape, DOC(radler_MultiscaleShape_kTaperedQuadraticShape)) radler::MultiscaleShape::kTaperedQuadraticShape,
.value("gaussian", radler::MultiscaleShape::kGaussianShape, DOC(radler_MultiscaleShape_kGaussianShape)); DOC(radler_MultiscaleShape_kTaperedQuadraticShape))
.value("gaussian", radler::MultiscaleShape::kGaussianShape,
DOC(radler_MultiscaleShape_kGaussianShape));
py::class_<radler::Settings> settings( py::class_<radler::Settings> settings(
m, "Settings", m, "Settings",
......
...@@ -13,17 +13,20 @@ ...@@ -13,17 +13,20 @@
#define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3 #define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3
#define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4 #define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4
#define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5 #define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5
#define __DOC6(n1, n2, n3, n4, n5, n6) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6 #define __DOC6(n1, n2, n3, n4, n5, n6) \
#define __DOC7(n1, n2, n3, n4, n5, n6, n7) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7 __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6
#define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__)) #define __DOC7(n1, n2, n3, n4, n5, n6, n7) \
__doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7
#define DOC(...) \
__EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__))
#if defined(__GNUG__) #if defined(__GNUG__)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wunused-variable"
#endif #endif
static const char* __doc_radler_AlgorithmType =
static const char *__doc_radler_AlgorithmType = R"doc(The deconvolution algorithm type.)doc"; R"doc(The deconvolution algorithm type.)doc";
static const char* __doc_radler_AlgorithmType_kGenericClean = static const char* __doc_radler_AlgorithmType_kGenericClean =
R"doc(A "Högbom" CLEAN algorithm, extended with multi frequency/polarization R"doc(A "Högbom" CLEAN algorithm, extended with multi frequency/polarization
...@@ -68,9 +71,11 @@ static const char *__doc_radler_LocalRmsMethod_kRmsAndMinimumWindow = ...@@ -68,9 +71,11 @@ static const char *__doc_radler_LocalRmsMethod_kRmsAndMinimumWindow =
R"doc(Spatially varying RMS image with min. Computed as max(window RMS, 0.3 R"doc(Spatially varying RMS image with min. Computed as max(window RMS, 0.3
x window min))doc"; x window min))doc";
static const char *__doc_radler_LocalRmsMethod_kRmsWindow = R"doc(Spatially varying RMS image)doc"; static const char* __doc_radler_LocalRmsMethod_kRmsWindow =
R"doc(Spatially varying RMS image)doc";
static const char *__doc_radler_MultiscaleShape = R"doc(Shape used in multi-scale deconvolution.)doc"; static const char* __doc_radler_MultiscaleShape =
R"doc(Shape used in multi-scale deconvolution.)doc";
static const char* __doc_radler_MultiscaleShape_kGaussianShape = static const char* __doc_radler_MultiscaleShape_kGaussianShape =
R"doc(A simple Gaussian shape. The Gaussian is by default cut off at 12 R"doc(A simple Gaussian shape. The Gaussian is by default cut off at 12
...@@ -89,9 +94,11 @@ static const char *__doc_radler_Settings = R"doc()doc"; ...@@ -89,9 +94,11 @@ static const char *__doc_radler_Settings = R"doc()doc";
static const char* __doc_radler_Settings_Generic = R"doc()doc"; static const char* __doc_radler_Settings_Generic = R"doc()doc";
static const char *__doc_radler_Settings_Generic_use_sub_minor_optimization = R"doc(Corresponds to Multiscale::fast_sub_minor_loop.)doc"; static const char* __doc_radler_Settings_Generic_use_sub_minor_optimization =
R"doc(Corresponds to Multiscale::fast_sub_minor_loop.)doc";
static const char *__doc_radler_Settings_LocalRms = R"doc(Settings related to cleaning relative to a local RMS value.)doc"; static const char* __doc_radler_Settings_LocalRms =
R"doc(Settings related to cleaning relative to a local RMS value.)doc";
static const char* __doc_radler_Settings_LocalRms_image = static const char* __doc_radler_Settings_LocalRms_image =
R"doc(If specified, use a manual FITS image instead of a dynamically R"doc(If specified, use a manual FITS image instead of a dynamically
...@@ -101,13 +108,16 @@ static const char *__doc_radler_Settings_LocalRms_method = ...@@ -101,13 +108,16 @@ static const char *__doc_radler_Settings_LocalRms_method =
R"doc(The method, or LocalRmsMethod::kNone to disable local RMS R"doc(The method, or LocalRmsMethod::kNone to disable local RMS
thresholding.)doc"; thresholding.)doc";
static const char *__doc_radler_Settings_LocalRms_window = R"doc(Size of the sliding window to calculate the "local" RMS over.)doc"; static const char* __doc_radler_Settings_LocalRms_window =
R"doc(Size of the sliding window to calculate the "local" RMS over.)doc";
static const char* __doc_radler_Settings_MoreSane = R"doc()doc"; static const char* __doc_radler_Settings_MoreSane = R"doc()doc";
static const char *__doc_radler_Settings_MoreSane_arguments = R"doc(Extra command-line arguments provided to MORESANE. */)doc"; static const char* __doc_radler_Settings_MoreSane_arguments =
R"doc(Extra command-line arguments provided to MORESANE. */)doc";
static const char *__doc_radler_Settings_MoreSane_location = R"doc(Path of the MORESANE executable. */)doc"; static const char* __doc_radler_Settings_MoreSane_location =
R"doc(Path of the MORESANE executable. */)doc";
static const char* __doc_radler_Settings_MoreSane_sigma_levels = static const char* __doc_radler_Settings_MoreSane_sigma_levels =
R"doc(Set of threshold levels provided to MORESANE. The first value is used R"doc(Set of threshold levels provided to MORESANE. The first value is used
...@@ -187,7 +197,8 @@ static const char *__doc_radler_Settings_Python_filename = ...@@ -187,7 +197,8 @@ static const char *__doc_radler_Settings_Python_filename =
R"doc(Path to a python file containing the deconvolution algorithm to be R"doc(Path to a python file containing the deconvolution algorithm to be
used.)doc"; used.)doc";
static const char *__doc_radler_Settings_SpectralFitting = R"doc(Settings related to how components are fitted over frequency channels.)doc"; static const char* __doc_radler_Settings_SpectralFitting =
R"doc(Settings related to how components are fitted over frequency channels.)doc";
static const char* __doc_radler_Settings_SpectralFitting_forced_filename = static const char* __doc_radler_Settings_SpectralFitting_forced_filename =
R"doc(File path to a FITS file that contains spectral index values to force R"doc(File path to a FITS file that contains spectral index values to force
...@@ -307,7 +318,8 @@ has passed the requested iteration count. It is generally not ...@@ -307,7 +318,8 @@ has passed the requested iteration count. It is generally not
advisable to stop deconvolution based on iteration count, except to advisable to stop deconvolution based on iteration count, except to
prevent deconvolution going out of hand.)doc"; prevent deconvolution going out of hand.)doc";
static const char *__doc_radler_Settings_minor_loop_gain = R"doc(Gain value for minor loop iterations.)doc"; static const char* __doc_radler_Settings_minor_loop_gain =
R"doc(Gain value for minor loop iterations.)doc";
static const char* __doc_radler_Settings_more_sane = R"doc()doc"; static const char* __doc_radler_Settings_more_sane = R"doc()doc";
...@@ -375,4 +387,3 @@ outside deconvolution.)doc"; ...@@ -375,4 +387,3 @@ outside deconvolution.)doc";
#if defined(__GNUG__) #if defined(__GNUG__)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment