Base class of all spectral sources.
More...
#include <source.h>
Base class of all spectral sources.
This class is the base class of all spectral sources. Its purpose is to provide a common interface for all sources. For implementing a new spectral source, inherit from this class and implement the Source::get_spectral_density function.
std::vector< double > Source::get_spectral_density |
( |
std::vector< double > |
wavelength | ) |
|
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the spectral density of the Source at the given wavelength vector.
- Parameters
-
wavelength | wavelength vector |
- Returns
- spectral density at given wavelength
double Source::get_spectral_density |
( |
double |
wavelength | ) |
|
|
virtual |
std::vector< double > Source::get_spectrum |
( |
std::vector< double > |
wavelength | ) |
|
|
virtual |
Returns spectrum at given wavelength
This function returns the integrated spectral density for a given wavelength vector.
- Parameters
-
wavelength | wavelength vector |
- Returns
- spectrum at given wavelength
Reimplemented in LineList.
double Source::integral_s |
( |
double |
a, |
|
|
double |
b, |
|
|
int |
n |
|
) |
| |
|
private |
Integrates the
- See also
- {Source::spectral_density()} function between limits a and b.
This is a simple integrator, which integrates the
- See also
- {Source::spectral_density} function between a and b. It uses a simple aproximation by deviding the interval [a,b] in n parts and sum
- Parameters
-
a | lower wavelength limit |
b | upper wavelength limit |
n | number of subintervalls |
- Returns
- integrated spectrum within [a, b]
- Todo:
- This integrator should be replaved with a more accurate one. For highly unresolved spectra this integrator might not be very precise.
void Source::set_doppler_shift |
( |
double |
shift | ) |
|
Applies a spectral shift on the spectrum to simulate radial velocity shifts.
- Parameters
-
shift | doppler shift in [m/s] |
void Source::set_integration_steps |
( |
int |
n | ) |
|
Sets the number of sub steps of the integrator.
- Parameters
-
int Source::integration_steps |
|
private |
number of steps for the integrator
The documentation for this class was generated from the following files:
- /home/stuermer/Repos/cpp/EchelleSimulator/include/source.h
- /home/stuermer/Repos/cpp/EchelleSimulator/src/source.cpp