Alexandria
2.19
Please provide a description of the project.
SourceCatalog
SourceCatalog
SourceAttributes
PhotometryAttributeFromRow.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012-2021 Euclid Science Ground Segment
3
*
4
* This library is free software; you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License as published by the Free
6
* Software Foundation; either version 3.0 of the License, or (at your option)
7
* any later version.
8
*
9
* This library is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this library; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
26
#ifndef PHOTOMETRYATTRIBUTEFROMROW_H_
27
#define PHOTOMETRYATTRIBUTEFROMROW_H_
28
#include <map>
29
#include <memory>
30
#include <vector>
31
#include <string>
32
#include <utility>
33
34
#include "
ElementsKernel/Export.h
"
35
36
#include "
SourceCatalog/AttributeFromRow.h
"
37
#include "
SourceCatalog/Catalog.h
"
38
#include "
Table/Table.h
"
39
40
namespace
Euclid
{
41
namespace
SourceCatalog {
42
50
class
ELEMENTS_API
PhotometryAttributeFromRow
:
public
AttributeFromRow
{
51
public
:
83
PhotometryAttributeFromRow
(
std::shared_ptr<Euclid::Table::ColumnInfo>
column_info_ptr,
84
const
std::vector
<
std::pair
<
std::string
,
std::pair<std::string, std::string>
>>& filter_name_mapping,
85
const
bool
missing_photometry_enabled,
const
double
missing_photometry_flag,
86
const
bool
upper_limit_enabled,
87
const
std::vector
<
std::pair<std::string, float>
> n_map,
88
const
double
n_upper_limit_flag,
89
const
std::vector
<
std::pair<std::string, bool>
> convert_from_mag = {});
90
91
virtual
~
PhotometryAttributeFromRow
();
92
99
std::unique_ptr<Attribute>
createAttribute(
const
Euclid::Table::Row
& row)
override
;
100
101
std::pair<double, double>
convertFromMag(
const
double
mag,
const
double
mag_err)
const
;
102
103
private
:
104
/*
105
* Map the correspondence between the filterName and the indexes used in the Table columns
106
*/
107
std::vector<std::pair<size_t, size_t>
>
m_table_index_vector
;
108
109
/*
110
* Pointer to the shared filter name vector
111
*/
112
std::shared_ptr<std::vector<std::string>
>
m_filter_name_vector_ptr
;
113
114
bool
m_missing_photometry_enabled
;
115
116
/*
117
* Flag value for missing photometry data
118
*/
119
double
m_missing_photometry_flag
;
120
121
bool
m_upper_limit_enabled
;
122
123
std::vector<std::pair<std::string, float>
>
m_n_map
;
124
125
double
m_n_upper_limit_flag
;
126
127
std::vector<std::pair<std::string, bool>
>
m_convert_from_mag
;
128
};
129
130
}
// namespace SourceCatalog
131
}
// end of namespace Euclid
132
133
#endif // PHOTOMETRYATTRIBUTEFROMROW_H_
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_n_map
std::vector< std::pair< std::string, float > > m_n_map
Definition:
PhotometryAttributeFromRow.h:123
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_upper_limit_enabled
bool m_upper_limit_enabled
Definition:
PhotometryAttributeFromRow.h:121
std::string
STL class.
std::shared_ptr< Euclid::Table::ColumnInfo >
Export.h
std::pair
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_missing_photometry_enabled
bool m_missing_photometry_enabled
Definition:
PhotometryAttributeFromRow.h:114
std::vector
STL class.
Euclid::SourceCatalog::PhotometryAttributeFromRow
Implementation of the AttributeFromRow for a photometry attribute. This class implements the createAt...
Definition:
PhotometryAttributeFromRow.h:50
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_n_upper_limit_flag
double m_n_upper_limit_flag
Definition:
PhotometryAttributeFromRow.h:125
AttributeFromRow.h
Catalog.h
ELEMENTS_API
#define ELEMENTS_API
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_table_index_vector
std::vector< std::pair< size_t, size_t > > m_table_index_vector
Definition:
PhotometryAttributeFromRow.h:107
Euclid::SourceCatalog::AttributeFromRow
Interface for building a source Attribute from a table Row.
Definition:
AttributeFromRow.h:45
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_missing_photometry_flag
double m_missing_photometry_flag
Definition:
PhotometryAttributeFromRow.h:119
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_filter_name_vector_ptr
std::shared_ptr< std::vector< std::string > > m_filter_name_vector_ptr
Definition:
PhotometryAttributeFromRow.h:112
Euclid::SourceCatalog::PhotometryAttributeFromRow::m_convert_from_mag
std::vector< std::pair< std::string, bool > > m_convert_from_mag
Definition:
PhotometryAttributeFromRow.h:127
Euclid::Table::Row
Represents one row of a Table.
Definition:
Row.h:64
std::unique_ptr
STL class.
Euclid
Definition:
InstOrRefHolder.h:29
Table.h
Generated by
1.8.20