SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
AperturePhotometryConfig.cpp
Go to the documentation of this file.
1
17/*
18 * @file AperturePhotometryConfig.cpp
19 * @author Alejandro Alvarez Ayllon
20 */
21
24
25namespace SourceXtractor {
26
30
32 auto& py = getDependency<PythonConfig>().getInterpreter();
33
34 // Used to get the image corresponding to a given aperture ID
36
37 // These are the apertures we need to compute for each image
38 auto apertures = py.getApertures();
39 for (auto& a : apertures) {
40 m_apertures.emplace(a.first, a.second.apertures);
41 ap_id_to_img.emplace(a.second.id, a.first);
42 }
43
44 // And these are the output columns. If several apertures are defined together, they go out together
45 auto output_columns = py.getApertureOutputColumns();
46 for (auto& oc : output_columns) {
47 auto col_name = oc.first;
48 for (auto& ap_id : oc.second) {
49 auto img_id_iter = ap_id_to_img.find(ap_id);
50 if (img_id_iter != ap_id_to_img.end()) {
51 auto img_id = img_id_iter->second;
52 // Which images ID correspond to an output column
54 }
55 }
56 }
57}
58
60 auto i = m_apertures.find(image_id);
61 if (i == m_apertures.end()) {
62 return {};
63 }
64 return i->second;
65}
66
70
71} // end SourceXtractor
const std::map< unsigned, std::vector< float > > & getApertures() const
std::map< unsigned, std::vector< float > > m_apertures
std::vector< float > getAperturesForImage(unsigned image_id) const
std::map< std::string, std::vector< unsigned > > m_output_images
void initialize(const UserValues &args) override
T emplace(T... args)
T end(T... args)
T find(T... args)