SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::AssocModeConfig Class Reference

#include <AssocModeConfig.h>

Inheritance diagram for SourceXtractor::AssocModeConfig:
Inheritance graph
[legend]
Collaboration diagram for SourceXtractor::AssocModeConfig:
Collaboration graph
[legend]

Classes

struct  CatalogEntry
 

Public Types

enum class  AssocMode {
  UNKNOWN , FIRST , NEAREST , MIN ,
  MAX , MEAN , MAG_MEAN , SUM ,
  MAG_SUM
}
 
enum class  AssocFilter { ALL , MATCHED , UNMATCHED }
 
enum class  AssocCoordType { PIXEL , WORLD }
 
- Public Types inherited from Euclid::Configuration::Configuration
enum  State
 
typedef std::vector< boost::program_options::option_description > OptionDescriptionList
 
typedef std::map< std::string, boost::program_options::variable_value > UserValues
 

Public Member Functions

 AssocModeConfig (long manager_id)
 
virtual ~AssocModeConfig ()=default
 
std::map< std::string, OptionDescriptionListgetProgramOptions () override
 
void initialize (const UserValues &args) override
 
AssocMode getAssocMode () const
 
double getAssocRadius () const
 
const std::vector< std::vector< CatalogEntry > > & getCatalogs () const
 
const std::vector< int > & getColumnsIdx () const
 
std::vector< std::stringgetColumnsNames () const
 
- Public Member Functions inherited from Euclid::Configuration::Configuration
 Configuration (long manager_id)
 
virtual ~Configuration ()=default
 
virtual void preInitialize (const UserValues &args)
 
virtual void postInitialize (const UserValues &args)
 
const std::set< std::type_index > & getDependencies ()
 
StategetCurrentState ()
 
State getCurrentState () const
 

Private Member Functions

void readCommonConfig (const UserValues &args)
 
void readConfigFromParams (const UserValues &args)
 
void readConfigFromFile (const std::string &filename)
 
std::map< std::string, unsigned intparseConfigFile (const std::string &filename)
 
void checkConfig ()
 
void printConfig ()
 
void readCatalogs (const std::string &filename, const std::vector< int > &columns, AssocCoordType assoc_coord_type)
 
AssocCoordType getCoordinateType (const UserValues &args) const
 
std::vector< CatalogEntryreadTable (const Euclid::Table::Table &table, const std::vector< int > &columns, const std::vector< int > &copy_columns, bool use_world, std::shared_ptr< CoordinateSystem > coordinate_system=nullptr)
 

Private Attributes

AssocMode m_assoc_mode
 
double m_assoc_radius
 
double m_default_pixel_size
 
int m_pixel_size_column
 
int m_group_id_column
 
std::vector< std::vector< CatalogEntry > > m_catalogs
 
std::vector< intm_columns
 
std::vector< intm_columns_idx
 
std::vector< std::stringm_custom_column_names
 
std::map< std::string, unsigned intm_assoc_columns
 
std::string m_filename
 
AssocCoordType m_assoc_coord_type
 

Additional Inherited Members

- Protected Member Functions inherited from Euclid::Configuration::Configuration
void declareDependency ()
 
T & getDependency ()
 
const T & getDependency () const
 

Detailed Description

Definition at line 31 of file AssocModeConfig.h.

Member Enumeration Documentation

◆ AssocCoordType

Enumerator
PIXEL 
WORLD 

Definition at line 53 of file AssocModeConfig.h.

◆ AssocFilter

Enumerator
ALL 
MATCHED 
UNMATCHED 

Definition at line 47 of file AssocModeConfig.h.

◆ AssocMode

Enumerator
UNKNOWN 
FIRST 
NEAREST 
MIN 
MAX 
MEAN 
MAG_MEAN 
SUM 
MAG_SUM 

Definition at line 35 of file AssocModeConfig.h.

Constructor & Destructor Documentation

◆ AssocModeConfig()

SourceXtractor::AssocModeConfig::AssocModeConfig ( long manager_id)
explicit

Definition at line 105 of file AssocModeConfig.cpp.

References AssocModeConfig(), Euclid::Configuration::ConfigManager::getInstance(), and Euclid::Configuration::ConfigManager::registerDependency().

Referenced by AssocModeConfig().

Here is the call graph for this function:

◆ ~AssocModeConfig()

virtual SourceXtractor::AssocModeConfig::~AssocModeConfig ( )
virtualdefault

Member Function Documentation

◆ checkConfig()

void SourceXtractor::AssocModeConfig::checkConfig ( )
private

Definition at line 269 of file AssocModeConfig.cpp.

References Euclid::Configuration::logger, m_assoc_coord_type, m_columns, PIXEL, std::vector< T >::size(), and Elements::Logging::warn().

Referenced by initialize().

Here is the call graph for this function:

◆ getAssocMode()

AssocMode SourceXtractor::AssocModeConfig::getAssocMode ( ) const
inline

Definition at line 73 of file AssocModeConfig.h.

References m_assoc_mode.

◆ getAssocRadius()

double SourceXtractor::AssocModeConfig::getAssocRadius ( ) const
inline

Definition at line 77 of file AssocModeConfig.h.

References m_assoc_radius.

◆ getCatalogs()

const std::vector< std::vector< CatalogEntry > > & SourceXtractor::AssocModeConfig::getCatalogs ( ) const
inline

Definition at line 81 of file AssocModeConfig.h.

References m_catalogs.

◆ getColumnsIdx()

const std::vector< int > & SourceXtractor::AssocModeConfig::getColumnsIdx ( ) const
inline

Definition at line 85 of file AssocModeConfig.h.

References m_columns_idx.

◆ getColumnsNames()

std::vector< std::string > SourceXtractor::AssocModeConfig::getColumnsNames ( ) const
inline

◆ getCoordinateType()

AssocModeConfig::AssocCoordType SourceXtractor::AssocModeConfig::getCoordinateType ( const UserValues & args) const
private

Definition at line 288 of file AssocModeConfig.cpp.

References SourceXtractor::ASSOC_COORD_TYPE, and PIXEL.

Referenced by readConfigFromParams().

◆ getProgramOptions()

std::map< std::string, Configuration::OptionDescriptionList > SourceXtractor::AssocModeConfig::getProgramOptions ( )
overridevirtual

◆ initialize()

void SourceXtractor::AssocModeConfig::initialize ( const UserValues & args)
overridevirtual

◆ parseConfigFile()

std::map< std::string, unsigned int > SourceXtractor::AssocModeConfig::parseConfigFile ( const std::string & filename)
private

Definition at line 396 of file AssocModeConfig.cpp.

References std::find(), and std::getline().

Referenced by readConfigFromFile().

Here is the call graph for this function:

◆ printConfig()

void SourceXtractor::AssocModeConfig::printConfig ( )
private

Definition at line 447 of file AssocModeConfig.cpp.

References std::endl(), m_assoc_coord_type, m_catalogs, m_columns, m_custom_column_names, m_group_id_column, m_pixel_size_column, PIXEL, and std::vector< T >::size().

Referenced by initialize().

Here is the call graph for this function:

◆ readCatalogs()

void SourceXtractor::AssocModeConfig::readCatalogs ( const std::string & filename,
const std::vector< int > & columns,
AssocCoordType assoc_coord_type )
private

Definition at line 301 of file AssocModeConfig.cpp.

References m_catalogs, m_columns_idx, readTable(), and WORLD.

Referenced by initialize().

Here is the call graph for this function:

◆ readCommonConfig()

void SourceXtractor::AssocModeConfig::readCommonConfig ( const UserValues & args)
private

◆ readConfigFromFile()

void SourceXtractor::AssocModeConfig::readConfigFromFile ( const std::string & filename)
private

◆ readConfigFromParams()

void SourceXtractor::AssocModeConfig::readConfigFromParams ( const UserValues & args)
private

◆ readTable()

std::vector< AssocModeConfig::CatalogEntry > SourceXtractor::AssocModeConfig::readTable ( const Euclid::Table::Table & table,
const std::vector< int > & columns,
const std::vector< int > & copy_columns,
bool use_world,
std::shared_ptr< CoordinateSystem > coordinate_system = nullptr )
private

Definition at line 334 of file AssocModeConfig.cpp.

References m_default_pixel_size, m_group_id_column, and m_pixel_size_column.

Referenced by readCatalogs().

Member Data Documentation

◆ m_assoc_columns

std::map<std::string, unsigned int> SourceXtractor::AssocModeConfig::m_assoc_columns
private

Definition at line 118 of file AssocModeConfig.h.

Referenced by readConfigFromFile().

◆ m_assoc_coord_type

AssocCoordType SourceXtractor::AssocModeConfig::m_assoc_coord_type
private

◆ m_assoc_mode

AssocMode SourceXtractor::AssocModeConfig::m_assoc_mode
private

Definition at line 107 of file AssocModeConfig.h.

Referenced by getAssocMode(), and readCommonConfig().

◆ m_assoc_radius

double SourceXtractor::AssocModeConfig::m_assoc_radius
private

Definition at line 108 of file AssocModeConfig.h.

Referenced by getAssocRadius(), and readCommonConfig().

◆ m_catalogs

std::vector<std::vector<CatalogEntry> > SourceXtractor::AssocModeConfig::m_catalogs
private

Definition at line 113 of file AssocModeConfig.h.

Referenced by getCatalogs(), printConfig(), and readCatalogs().

◆ m_columns

std::vector<int> SourceXtractor::AssocModeConfig::m_columns
private

◆ m_columns_idx

std::vector<int> SourceXtractor::AssocModeConfig::m_columns_idx
private

◆ m_custom_column_names

std::vector<std::string> SourceXtractor::AssocModeConfig::m_custom_column_names
private

Definition at line 116 of file AssocModeConfig.h.

Referenced by getColumnsNames(), printConfig(), and readConfigFromFile().

◆ m_default_pixel_size

double SourceXtractor::AssocModeConfig::m_default_pixel_size
private

Definition at line 109 of file AssocModeConfig.h.

Referenced by readCommonConfig(), and readTable().

◆ m_filename

std::string SourceXtractor::AssocModeConfig::m_filename
private

Definition at line 119 of file AssocModeConfig.h.

Referenced by initialize(), and readCommonConfig().

◆ m_group_id_column

int SourceXtractor::AssocModeConfig::m_group_id_column
private

◆ m_pixel_size_column

int SourceXtractor::AssocModeConfig::m_pixel_size_column
private

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