SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
TestImage Class Reference
Inheritance diagram for TestImage:
Collaboration diagram for TestImage:

Public Member Functions

po::options_description defineSpecificProgramOptions () override
void addSource (std::vector< PointModel > &point_models, std::vector< std::shared_ptr< ModelFitting::ExtendedModel< WriteableInterfaceTypePtr > > > &extended_models, double size, const TestImageSource &source, std::tuple< double, double, double, double > jacobian)
void addPointSource (std::vector< PointModel > &point_models, double x, double y, double flux)
void addBackgroundNoise (std::shared_ptr< WriteableImage< SeFloat > > image, double background_level, double background_sigma)
void addPoissonNoise (std::shared_ptr< WriteableImage< SeFloat > > image, double gain)
void saturate (std::shared_ptr< WriteableImage< SeFloat > > image, double saturation_level)
void addBadPixels (std::shared_ptr< WriteableImage< SeFloat > > weight_map, double probability)
void addBadColumns (std::shared_ptr< WriteableImage< SeFloat > > weight_map, double probability)
std::vector< TestImageSourcegenerateRandomSources (int number_of_sources, double x_min, double y_min, double x_max, double y_max)
std::vector< TestImageSourceloadSourcesFromFile (const std::string &filename)
void saveSources (const std::vector< TestImageSource > &sources, const std::string &filename)
void transformSources (std::vector< TestImageSource > &sources, int image_size, double rot_angle, double scale, double shift_x, double shift_y)
std::vector< TestImageSourceloadSourcesFromCatalog (const std::string &filename)
Elements::ExitCode mainMethod (std::map< std::string, po::variable_value > &args) override
Public Member Functions inherited from Elements::Program
 Program ()=default
virtual ~Program ()
virtual std::pair< OptionsDescription, PositionalOptionsDescriptiondefineProgramArguments ()
virtual ExitCode mainMethod (std::map< std::string, VariableValue > &args)=0

Private Attributes

boost::random::mt19937 m_rng { (unsigned int) time(NULL) }
double m_zero_point = 0.0
double m_exp_time = 300.

Additional Inherited Members

Public Types inherited from Elements::Program
typedef boost::program_options::options_description options_description
typedef boost::program_options::positional_options_description positional_options_description
typedef boost::program_options::variable_value variable_value
typedef boost::program_options::variables_map variables_map
typedef options_description OptionsDescription
typedef positional_options_description PositionalOptionsDescription
typedef variable_value VariableValue
typedef variables_map VariablesMap
typedef Elements::ExitCode ExitCode
typedef Elements::Logging Logging

Detailed Description

Definition at line 164 of file TestImage.cpp.

Member Function Documentation

◆ addBackgroundNoise()

void TestImage::addBackgroundNoise ( std::shared_ptr< WriteableImage< SeFloat > > image,
double background_level,
double background_sigma )
inline

Definition at line 265 of file TestImage.cpp.

References SourceXtractor::ImageAccessor< T >::getValue(), and m_rng.

Referenced by mainMethod().

Here is the call graph for this function:

◆ addBadColumns()

void TestImage::addBadColumns ( std::shared_ptr< WriteableImage< SeFloat > > weight_map,
double probability )
inline

Definition at line 315 of file TestImage.cpp.

References m_rng.

Referenced by mainMethod().

◆ addBadPixels()

void TestImage::addBadPixels ( std::shared_ptr< WriteableImage< SeFloat > > weight_map,
double probability )
inline

Definition at line 303 of file TestImage.cpp.

References m_rng.

Referenced by mainMethod().

◆ addPointSource()

void TestImage::addPointSource ( std::vector< PointModel > & point_models,
double x,
double y,
double flux )
inline

Definition at line 257 of file TestImage.cpp.

References std::vector< T >::emplace_back(), and std::make_shared().

Here is the call graph for this function:

◆ addPoissonNoise()

void TestImage::addPoissonNoise ( std::shared_ptr< WriteableImage< SeFloat > > image,
double gain )
inline

Definition at line 277 of file TestImage.cpp.

References SourceXtractor::ImageAccessor< T >::getValue(), and m_rng.

Referenced by mainMethod().

Here is the call graph for this function:

◆ addSource()

◆ defineSpecificProgramOptions()

po::options_description TestImage::defineSpecificProgramOptions ( )
inlineoverridevirtual

Reimplemented from Elements::Program.

Definition at line 168 of file TestImage.cpp.

◆ generateRandomSources()

std::vector< TestImageSource > TestImage::generateRandomSources ( int number_of_sources,
double x_min,
double y_min,
double x_max,
double y_max )
inline

Definition at line 327 of file TestImage.cpp.

References gal_dev_max_i0, gal_dev_min_i0, gal_exp_max_i0, gal_exp_min_i0, m_rng, and std::vector< T >::push_back().

Referenced by mainMethod().

Here is the call graph for this function:

◆ loadSourcesFromCatalog()

◆ loadSourcesFromFile()

◆ mainMethod()

◆ saturate()

void TestImage::saturate ( std::shared_ptr< WriteableImage< SeFloat > > image,
double saturation_level )
inline

Definition at line 292 of file TestImage.cpp.

References SourceXtractor::ImageAccessor< T >::getValue(), and std::min().

Referenced by mainMethod().

Here is the call graph for this function:

◆ saveSources()

void TestImage::saveSources ( const std::vector< TestImageSource > & sources,
const std::string & filename )
inline

Definition at line 393 of file TestImage.cpp.

References std::ofstream::open().

Referenced by mainMethod().

Here is the call graph for this function:

◆ transformSources()

void TestImage::transformSources ( std::vector< TestImageSource > & sources,
int image_size,
double rot_angle,
double scale,
double shift_x,
double shift_y )
inline

Definition at line 405 of file TestImage.cpp.

References std::cos(), and std::sin().

Referenced by mainMethod().

Here is the call graph for this function:

Member Data Documentation

◆ m_exp_time

double TestImage::m_exp_time = 300.
private

Definition at line 663 of file TestImage.cpp.

Referenced by loadSourcesFromCatalog(), and mainMethod().

◆ m_rng

boost::random::mt19937 TestImage::m_rng { (unsigned int) time(NULL) }
private

◆ m_zero_point

double TestImage::m_zero_point = 0.0
private

Definition at line 663 of file TestImage.cpp.

Referenced by loadSourcesFromCatalog(), and mainMethod().


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