Class containing basic functions required for astronomy.
More...
#include <astro.hpp>
|
int | find_bin (double, double, double) |
| This method finds a bin corresponding to the input value given the minimum value in range and the bin size. More...
|
|
int | num_bins (double, double, double) |
| This method finds the number of bins in a given range for a given bin size. More...
|
|
bool | within (double, double, double) |
| This method deterimines whether or not a value is within the limits provided. More...
|
|
double | deg2rad (double) |
| This method converts the input angle from degrees to radians. More...
|
|
double | rad2deg (double) |
| This method converts the input angle from radians to degrees. More...
|
|
double | angsep (double, double, double, double) |
| This method calculates the angular separation in radians between two points. More...
|
|
double | angsep (const Point &, const Point &) |
| This method calculates the angular separation in radians between two points. More...
|
|
double | mean (const std::vector< double > &) |
| This method calculates the mean value of a vector of doubles. More...
|
|
double | median (std::vector< double >) |
| This method calculates the median value of a vector of doubles. More...
|
|
double | variance (const std::vector< double > &) |
| This method calculates the variance of a vector of doubles. More...
|
|
double | stdev (const std::vector< double > &) |
| This method calculates the standard deviation of a vector of doubles. More...
|
|
double | stderr_mean (const std::vector< double > &) |
| This method calculates the standard error on the mean of a vector
of doubles. More...
|
|
double | stderr_median (const std::vector< double > &) |
| This method calculates the standard error on the median of a
vector of doubles. More...
|
|
double | min (const std::vector< double > &) |
| This method calculates the minimum value of a vector of doubles. More...
|
|
double | max (const std::vector< double > &) |
| This method calculates the maximum value of a vector of doubles. More...
|
|
Class containing basic functions required for astronomy.
This class encompasses a selection of functions that perform some basic calculations that often required for astronomy or cosmology.
◆ angsep() [1/2]
double Astro::angsep |
( |
const Point & |
P1, |
|
|
const Point & |
P2 |
|
) |
| |
This method calculates the angular separation in radians between two points.
- Parameters
-
[in] | P1 | Right ascension and Declination of first point. |
[in] | P2 | Right ascension and Declination of second point. |
- Returns
- Anugular separation in radians.
Function that returns the angular separation (in radians) between two points.
◆ angsep() [2/2]
double Astro::angsep |
( |
double |
ra1, |
|
|
double |
dec1, |
|
|
double |
ra2, |
|
|
double |
dec2 |
|
) |
| |
This method calculates the angular separation in radians between two points.
- Parameters
-
[in] | ra1 | Right ascension of first point. |
[in] | dec1 | Declination of first point. |
[in] | ra2 | Right ascension of second point. |
[in] | dec2 | Declination of second point. |
- Returns
- Anugular separation in radians.
◆ deg2rad()
double Astro::deg2rad |
( |
double |
angle | ) |
|
This method converts the input angle from degrees to radians.
- Parameters
-
[in] | angle | Input angle in degrees. |
- Returns
- Angle in radians.
◆ find_bin()
int Astro::find_bin |
( |
double |
value, |
|
|
double |
min_value, |
|
|
double |
bin_size |
|
) |
| |
This method finds a bin corresponding to the input value given the minimum value in range and the bin size.
- Parameters
-
[in] | value | Input value. |
[in] | min_value | Minimum value in the range. |
[in] | bin_size | Bin size. |
- Returns
- Bin number corresponding to the input value.
◆ max()
double Astro::max |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the maximum value of a vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Maximum value.
◆ mean()
double Astro::mean |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the mean value of a vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Mean value.
◆ median()
double Astro::median |
( |
std::vector< double > |
elements | ) |
|
This method calculates the median value of a vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Median value.
◆ min()
double Astro::min |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the minimum value of a vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Minimum value.
◆ num_bins()
int Astro::num_bins |
( |
double |
min_value, |
|
|
double |
max_value, |
|
|
double |
bin_size |
|
) |
| |
This method finds the number of bins in a given range for a given bin size.
- Parameters
-
[in] | min_value | Maximum value in the range. |
[in] | max_value | Minimum value in the range. |
[in] | bin_size | Bin size. |
- Returns
- Number of bins in the relevant range.
◆ rad2deg()
double Astro::rad2deg |
( |
double |
angle | ) |
|
This method converts the input angle from radians to degrees.
- Parameters
-
[in] | angle | Input angle in radians. |
- Returns
- Angle in degrees.
◆ stderr_mean()
double Astro::stderr_mean |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the standard error on the mean of a vector
of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Standard error on the mean.
◆ stderr_median()
double Astro::stderr_median |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the standard error on the median of a
vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Standard error on the median.
◆ stdev()
double Astro::stdev |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the standard deviation of a vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Standard deviation.
◆ variance()
double Astro::variance |
( |
const std::vector< double > & |
elements | ) |
|
This method calculates the variance of a vector of doubles.
- Parameters
-
[in] | elements | Vector of double floating point values. |
- Returns
- Variance.
◆ within()
bool Astro::within |
( |
double |
value, |
|
|
double |
min_value, |
|
|
double |
max_value |
|
) |
| |
This method deterimines whether or not a value is within the limits provided.
- Parameters
-
[in] | value | Input value. |
[in] | min_value | Maximum value in the range. |
[in] | max_value | Minimum value in the range. |
The documentation for this class was generated from the following files:
- /Users/sfarrens/Documents/Codes/github/sfof/sfof/src/astro.hpp
- /Users/sfarrens/Documents/Codes/github/sfof/sfof/src/astro.cpp