1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#ifndef RENDERER_H_
#define RENDERER_H_
#include <cstring>
#include <aocommon/fits/fitsreader.h>
#include <aocommon/image.h>
#include <aocommon/polarization.h>
#include "../model/model.h"
namespace wsclean::renderer {
/**
* @brief Struct collecting the relevant image coordinate settings for
* rendereing the source components.
*
*/
struct ImageCoordinateSettings {
ImageCoordinateSettings() = default;
/**
* @brief Extract coordinate settings from an aocommon::FitsReader object.
*
* @param fits_reader aocommon::FitsReader object.
*/
ImageCoordinateSettings(const aocommon::FitsReader& fits_reader)
: ra(fits_reader.PhaseCentreRA()),
dec(fits_reader.PhaseCentreDec()),
pixel_scale_l(fits_reader.PixelSizeX()),
pixel_scale_m(fits_reader.PixelSizeY()),
l_shift(fits_reader.LShift()),
m_shift(fits_reader.MShift()) {}
long double ra;
long double dec;
long double pixel_scale_l;
long double pixel_scale_m;
long double l_shift;
long double m_shift;
};
/**
* @brief Restore a model image by convolving it with an elliptical Gaussian.
*
* @param image Image to which restored sources are written.
* @param image_settings Image coordinate settings.
* @param model Modeled source components.
* @param beam_major_axis Major axis of elliptical beam to be applied [rad].
* @param beam_minor_axis Minor axis of elliptical beam to be applied [rad].
* @param beam_position_angle Position angle of beam [rad].
* @param start_frequency Start frequency [Hz].
* @param end_frequency End frequency [Hz].
* @param polarization Polarization enum.
* @param thread_count Numbers of threads to use.
*/
void RestoreWithEllipticalBeam(aocommon::Image& image,
const ImageCoordinateSettings& image_settings,
const Model& model, long double beam_major_axis,
long double beam_minor_axis,
long double beam_position_angle,
long double start_frequency,
long double end_frequency,
aocommon::PolarizationEnum polarization);
} // namespace wsclean::renderer
#endif
|