SourceXtractorPlusPlus
0.10
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
PythonConfig
ObjectInfo.cpp
Go to the documentation of this file.
1
17
/*
18
* @file ObjectInfo.cpp
19
* @author Nikolaos Apostolakos <nikoapos@gmail.com>
20
*/
21
22
#include <
SEImplementation/PythonConfig/ObjectInfo.h
>
23
#include <
SEImplementation/Plugin/PixelCentroid/PixelCentroid.h
>
24
#include <
SEImplementation/Plugin/IsophotalFlux/IsophotalFlux.h
>
25
#include <
SEImplementation/Plugin/ShapeParameters/ShapeParameters.h
>
26
27
namespace
SourceXtractor {
28
29
ObjectInfo::ObjectInfo
(
const
SourceInterface
& source) : m_source(source) { }
30
31
SeFloat
ObjectInfo::getCentroidX
()
const
{
32
// On the Python side we use FITS coordinates, starting at 1
33
return
m_source
.get().getProperty<
PixelCentroid
>().
getCentroidX
() + 1.0;
34
}
35
36
SeFloat
ObjectInfo::getCentroidY
()
const
{
37
// On the Python side we use FITS coordinates, starting at 1
38
return
m_source
.get().getProperty<
PixelCentroid
>().
getCentroidY
() + 1.0;
39
}
40
41
SeFloat
ObjectInfo::getIsoFlux
()
const
{
42
return
std::max<double>(
m_source
.get().getProperty<
IsophotalFlux
>().getFlux(), 0.0001);
43
}
44
45
SeFloat
ObjectInfo::getRadius
()
const
{
46
return
std::max<double>(
m_source
.get().getProperty<
ShapeParameters
>().getEllipseA() / 2.0, 0.01);
47
}
48
49
SeFloat
ObjectInfo::getAngle
()
const
{
50
return
m_source
.get().getProperty<
ShapeParameters
>().getEllipseTheta();
51
}
52
53
SeFloat
ObjectInfo::getAspectRatio
()
const
{
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
}
SourceXtractor::ObjectInfo::ObjectInfo
ObjectInfo(const SourceInterface &source)
Definition:
ObjectInfo.cpp:29
SourceXtractor::IsophotalFlux
Computes the isophotal flux and magnitude.
Definition:
IsophotalFlux.h:36
ShapeParameters.h
SourceXtractor::ObjectInfo::getIsoFlux
SeFloat getIsoFlux() const
Definition:
ObjectInfo.cpp:41
ObjectInfo.h
SourceXtractor::ObjectInfo::getCentroidY
SeFloat getCentroidY() const
Definition:
ObjectInfo.cpp:36
SourceXtractor::SeFloat
SeFloat32 SeFloat
Definition:
Types.h:32
SourceXtractor::PixelCentroid
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values...
Definition:
PixelCentroid.h:37
PixelCentroid.h
SourceXtractor::ObjectInfo::getAngle
SeFloat getAngle() const
Definition:
ObjectInfo.cpp:49
SourceXtractor::ObjectInfo::getRadius
SeFloat getRadius() const
Definition:
ObjectInfo.cpp:45
SourceXtractor::ObjectInfo::getCentroidX
SeFloat getCentroidX() const
Definition:
ObjectInfo.cpp:31
SourceXtractor::ShapeParameters
Definition:
ShapeParameters.h:32
SourceXtractor::ObjectInfo::getAspectRatio
SeFloat getAspectRatio() const
Definition:
ObjectInfo.cpp:53
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
IsophotalFlux.h
SourceXtractor::ObjectInfo::m_source
std::reference_wrapper< const SourceInterface > m_source
Definition:
ObjectInfo.h:53
Generated by
1.8.5