SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TestImage Class Reference
Inheritance diagram for TestImage:
Inheritance graph
[legend]
Collaboration diagram for TestImage:
Collaboration graph
[legend]

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 m_rng, x, and y.

Referenced by mainMethod().

◆ 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, x, and y.

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, x, and y.

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 x, and y.

◆ addPoissonNoise()

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

Definition at line 277 of file TestImage.cpp.

References m_rng, x, and y.

Referenced by mainMethod().

◆ addSource()

void TestImage::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 )
inline

Definition at line 206 of file TestImage.cpp.

References std::exp(), std::make_shared(), std::move(), and std::pow().

Referenced by mainMethod().

Here is the call graph for this function:

◆ 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, and m_rng.

Referenced by mainMethod().

◆ loadSourcesFromCatalog()

std::vector< TestImageSource > TestImage::loadSourcesFromCatalog ( const std::string & filename)
inline

Definition at line 422 of file TestImage.cpp.

References std::getline(), std::ifstream::good(), m_exp_time, m_zero_point, std::move(), std::ifstream::open(), and std::pow().

Referenced by mainMethod().

Here is the call graph for this function:

◆ loadSourcesFromFile()

std::vector< TestImageSource > TestImage::loadSourcesFromFile ( const std::string & filename)
inline

Definition at line 361 of file TestImage.cpp.

References std::getline(), std::ifstream::good(), std::move(), and std::ifstream::open().

Referenced by mainMethod().

Here is the call graph for this function:

◆ mainMethod()

Elements::ExitCode TestImage::mainMethod ( std::map< std::string, po::variable_value > & args)
inlineoverride

◆ saturate()

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

Definition at line 292 of file TestImage.cpp.

References std::min(), x, and y.

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(), std::sin(), x, and y.

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: