27 #ifndef PARALLEL_IMAGER_MIXIN_H_
28 #define PARALLEL_IMAGER_MIXIN_H_
124 , calculate_psf(calculate_psf)
125 , calculate_residual(calculate_residual)
126 , save_model(save_model)
127 , worker_comm(worker_comm)
128 , imaging_comm(imaging_comm)
129 , deconvolution_comm(deconvolution_comm)
130 , normalization_comm(normalization_comm)
131 , iteration_comm(iteration_comm) {
143 std::vector<SynthesisParamsSelect> selection_params =
144 transformed_by_field<SynthesisParamsSelect>(
145 my_params.
selection, to_synthesis_params_select,
"ms");
152 std::vector<SynthesisParamsImage> image_params =
153 transformed_by_field<SynthesisParamsImage>(
154 my_params.
image, to_synthesis_params_image);
161 std::vector<SynthesisParamsGrid> grid_params =
162 transformed_by_field<SynthesisParamsGrid>(
163 my_params.
grid, to_synthesis_params_grid);
170 std::vector<SynthesisParamsDeconv> deconvolution_params =
171 transformed_by_field<SynthesisParamsDeconv>(
178 std::vector<casacore::Record> normalization_params =
179 transformed_by_field<casacore::Record>(my_params.
normalization, to_vector_params);
182 T::setup_imager(imaging_comm, selection_params, image_params,
183 grid_params, my_params.
weight);
184 T::setup_normalizer(normalization_comm, normalization_params);
185 T::setup_deconvolver(deconvolution_comm, deconvolution_params);
191 T::setup_iteration_controller(iteration_comm, my_params.
iteration);
195 T::teardown_imager();
196 T::teardown_normalizer();
197 T::teardown_deconvolver();
198 T::teardown_iteration_controller();
199 auto free_comm = [](
MPI_Comm *comm) {
224 T::normalize_model();
232 T::concat_images(
"virtualnomove");
241 T::normalize_model();
242 T::execute_major_cycle();
243 T::normalize_residual();
244 T::denormalize_model();
248 T::initialize_minor_cycle();
249 bool result = !T::is_clean_complete();
250 if (result) T::execute_minor_cycle();
276 const string &prefix =
"") {
277 std::vector<T1> result;
279 result.push_back(fn(rec));
289 typedef ParallelImagerMixin<
290 ContinuumPartitionMixin<
291 SynthesisImagerMixin<
292 SynthesisNormalizerMixin<
293 SynthesisDeconvolverMixin<
294 IterationControl> > > > >
319 #endif // PARALLEL_IMAGER_H_
void fromRecord(const casacore::Record &inrec)
static std::vector< T1 > transformed_by_field(casacore::Record &rec, T1(*fn)(const casacore::Record &), const string &prefix="")
Convenience function for transforming input parameter casacore::Record fields.
void fromRecord(const casacore::Record &inrec)
casacore::Record deconvolution
casacore::Record selection
casacore::Record normalization
Simple mixin class to put SynthesisDeconvolver into ParallelImagerMixin framework.
Collection of parameters for parallel imaging, categorized roughly by imaging component.
Simple mixin class to put SynthesisImager into ParallelImagerMixin framework.
static ParamFieldIterator end(casacore::Record *rec, const string &prefix="")
ParallelImagerMixin< ContinuumPartitionMixin< SynthesisImagerMixin< SynthesisNormalizerMixin< SynthesisDeconvolverMixin< IterationControl > > > > > ContinuumParallelImagerImpl
Parallel continuum imager class.
static ParamFieldIterator begin(casacore::Record *rec, const string &prefix="")
A hierarchical collection of named fields of various types.
void fromRecord(const casacore::Record &inrec)
void fromRecord(const casacore::Record &inrec)
ParallelImagerMixin< CubePartitionMixin< SynthesisImagerMixin< SynthesisNormalizerMixin< SynthesisDeconvolverMixin< IterationControl > > > > > CubeParallelImagerImpl
Parallel cube imager class.
Simple mixin class to put SynthesisNormalizer into ParallelImagerMixin framework. ...
ParallelImagerMixin< SerialPartitionMixin< SynthesisImagerMixin< SynthesisNormalizerMixin< SynthesisDeconvolverMixin< IterationControl > > > > > SerialParallelImagerImpl
Serial (non-MPI) imager class – allows ParallelImagerMixin type to be used regardless of serial vs pa...
casacore::Record iteration
Parameter and input data partitioning for serial imaging (in ParallelImagerMixin).
ParallelImagerMixin(MPI_Comm worker_comm, MPI_Comm imaging_comm, MPI_Comm normalization_comm, MPI_Comm deconvolution_comm, MPI_Comm iteration_comm, int niter, bool calculate_psf, bool calculate_residual, string save_model, ParallelImagerParams ¶ms)
ParallelImagerMixin constructor.
Parameter and input data partitioning for parallel cube imaging (in ParallelImagerMixin).
MPI_Comm deconvolution_comm
casacore::Record clean()
Top level imaging method.
MPI_Comm normalization_comm