Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
Euclid::SourceCatalog::Photometry Class Reference

#include <Photometry.h>

Inheritance diagram for Euclid::SourceCatalog::Photometry:
Inheritance graph
[legend]
Collaboration diagram for Euclid::SourceCatalog::Photometry:
Collaboration graph
[legend]

Classes

class  PhotometryIterator
 

Public Types

typedef PhotometryIterator< trueconst_iterator
 
typedef PhotometryIterator< falseiterator
 

Public Member Functions

 Photometry (std::shared_ptr< std::vector< std::string > > filter_name_vector_ptr, std::vector< FluxErrorPair > value_vector)
 Constructor which should never be called directly. Use the PhotometryAttributeHandler to build Photometry objects.
 
virtual ~Photometry ()=default
 default destructor
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
std::size_t size () const
 Return the size of the photometry map.
 
std::unique_ptr< FluxErrorPairfind (const std::string &filter_name) const
 Return a photometry measurement through the specified filter. The current implementation of this method is relatively slow as it is not expected to be used very intensively.
 
const std::shared_ptr< std::vector< std::string > > & getFilterNames () const
 
- Public Member Functions inherited from Euclid::SourceCatalog::Attribute
virtual ~Attribute ()=default
 

Private Attributes

std::shared_ptr< std::vector< std::string > > m_filter_name_vector_ptr
 Shared pointer to the common list of filter names.
 
std::vector< FluxErrorPairm_value_vector
 The photometry map.
 

Detailed Description

The Photometry class is design to store a set of photometric flux measurements obtained through different filters (filterName). The flux and value and the associated error are stored in a vector of ValuePair, while the list of filter names is kept in a vector that is common to all objects (which only keep a shared_ptr to it). In this way, their is no waste of memory to keep the filter information in each Photometry object and the consistency of the relationship between filter and the corresponding values (flux and error) is ensure through the code.

The user must however provide a ValuePair vector which matches the vector of FilterName. This is why the Photometry constructor should never be called directly. Always use the PhotometryAttributeHandler to build Photometry objects.

Definition at line 74 of file Photometry.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 152 of file Photometry.h.

◆ iterator

Definition at line 153 of file Photometry.h.

Constructor & Destructor Documentation

◆ Photometry()

Euclid::SourceCatalog::Photometry::Photometry ( std::shared_ptr< std::vector< std::string > >  filter_name_vector_ptr,
std::vector< FluxErrorPair value_vector 
)
inline

Constructor which should never be called directly. Use the PhotometryAttributeHandler to build Photometry objects.

Parameters
filter_name_vector_ptra shared pointer to the vector of filter names
value_vectorthe vector of ValuePair, i..e, the flux values with their errors

Definition at line 165 of file Photometry.h.

◆ ~Photometry()

virtual Euclid::SourceCatalog::Photometry::~Photometry ( )
virtualdefault

default destructor

Member Function Documentation

◆ begin() [1/2]

iterator Euclid::SourceCatalog::Photometry::begin ( )
inline

Definition at line 195 of file Photometry.h.

◆ begin() [2/2]

const_iterator Euclid::SourceCatalog::Photometry::begin ( ) const
inline

Definition at line 187 of file Photometry.h.

◆ cbegin()

const_iterator Euclid::SourceCatalog::Photometry::cbegin ( ) const
inline

Definition at line 179 of file Photometry.h.

◆ cend()

const_iterator Euclid::SourceCatalog::Photometry::cend ( ) const
inline

Definition at line 183 of file Photometry.h.

◆ end() [1/2]

iterator Euclid::SourceCatalog::Photometry::end ( )
inline

Definition at line 199 of file Photometry.h.

◆ end() [2/2]

const_iterator Euclid::SourceCatalog::Photometry::end ( ) const
inline

Definition at line 191 of file Photometry.h.

◆ find()

std::unique_ptr< FluxErrorPair > Euclid::SourceCatalog::Photometry::find ( const std::string filter_name) const

Return a photometry measurement through the specified filter. The current implementation of this method is relatively slow as it is not expected to be used very intensively.

Parameters
filter_nameThe filter name
Returns
A pair containing a value and the corresponding error

Definition at line 34 of file Photometry.cpp.

References std::vector< T >::begin(), std::vector< T >::end(), m_filter_name_vector_ptr, and m_value_vector.

Here is the call graph for this function:

◆ getFilterNames()

const std::shared_ptr< std::vector< std::string > > & Euclid::SourceCatalog::Photometry::getFilterNames ( ) const

Definition at line 52 of file Photometry.cpp.

References m_filter_name_vector_ptr.

◆ size()

std::size_t Euclid::SourceCatalog::Photometry::size ( ) const
inline

Return the size of the photometry map.

Definition at line 207 of file Photometry.h.

Member Data Documentation

◆ m_filter_name_vector_ptr

std::shared_ptr<std::vector<std::string> > Euclid::SourceCatalog::Photometry::m_filter_name_vector_ptr
private

Shared pointer to the common list of filter names.

Definition at line 226 of file Photometry.h.

Referenced by find(), and getFilterNames().

◆ m_value_vector

std::vector<FluxErrorPair> Euclid::SourceCatalog::Photometry::m_value_vector
private

The photometry map.

Definition at line 229 of file Photometry.h.

Referenced by find().


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