SourceXtractorPlusPlus  0.10
Please provide a description of the project.
ObjectInfo.cpp
Go to the documentation of this file.
1 
17 /*
18  * @file ObjectInfo.cpp
19  * @author Nikolaos Apostolakos <nikoapos@gmail.com>
20  */
21 
26 
27 namespace SourceXtractor {
28 
29 ObjectInfo::ObjectInfo(const SourceInterface& source) : m_source(source) { }
30 
32  // On the Python side we use FITS coordinates, starting at 1
33  return m_source.get().getProperty<PixelCentroid>().getCentroidX() + 1.0;
34 }
35 
37  // On the Python side we use FITS coordinates, starting at 1
38  return m_source.get().getProperty<PixelCentroid>().getCentroidY() + 1.0;
39 }
40 
42  return std::max<double>(m_source.get().getProperty<IsophotalFlux>().getFlux(), 0.0001);
43 }
44 
46  return std::max<double>(m_source.get().getProperty<ShapeParameters>().getEllipseA() / 2.0, 0.01);
47 }
48 
50  return m_source.get().getProperty<ShapeParameters>().getEllipseTheta();
51 }
52 
54  auto& shape_parameters = m_source.get().getProperty<ShapeParameters>();
55  double aspect_guess = std::max<double>(shape_parameters.getEllipseB() / shape_parameters.getEllipseA(), 0.01);
56 
57  return aspect_guess;
58 }
59 
60 }
ObjectInfo(const SourceInterface &source)
Definition: ObjectInfo.cpp:29
SeFloat getCentroidX() const
Definition: ObjectInfo.cpp:31
Computes the isophotal flux and magnitude.
Definition: IsophotalFlux.h:36
SeFloat getIsoFlux() const
Definition: ObjectInfo.cpp:41
SeFloat32 SeFloat
Definition: Types.h:32
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values.
Definition: PixelCentroid.h:37
SeFloat getRadius() const
Definition: ObjectInfo.cpp:45
SeFloat getCentroidY() const
Definition: ObjectInfo.cpp:36
SeFloat getAngle() const
Definition: ObjectInfo.cpp:49
SeFloat getAspectRatio() const
Definition: ObjectInfo.cpp:53
The SourceInterface is an abstract "source" that has properties attached to it.
std::reference_wrapper< const SourceInterface > m_source
Definition: ObjectInfo.h:53