Kariba
|
Class inverse Compton, inherited from Radiation.hpp. More...
#include <Compton.hpp>
Public Member Functions | |
~Compton () | |
Compton (size_t size, size_t seed_size) | |
double | comintegral (size_t it, double blim, double ulim, double nu, double numin, double numax, gsl_spline *eldis, gsl_interp_accel *acc_eldis) |
void | compton_spectrum (double gmin, double gmax, gsl_spline *eldis, gsl_interp_accel *acc_eldis) |
void | cyclosyn_seed (const std::vector< double > &seed_arr, const std::vector< double > &seed_lum) |
void | bb_seed_k (const std::vector< double > &seed_arr, double Urad, double Tbb) |
void | bb_seed_kev (const std::vector< double > &seed_energ, double Urad, double Tbb) |
void | shsdisk_seed (const std::vector< double > &seed_arr, double tin, double rin, double rout, double h, double z) |
void | set_frequency (double numin, double numax) |
Method to set up the frequency array over desired range. | |
void | set_tau (double n, double gam) |
void | set_tau (double _tau) |
void | set_escape (double escape) |
void | set_niter (double nu0, double Te) |
void | set_niter (size_t n) |
void | seed_freq_array (const std::vector< double > &seed_energ) |
Method to set up seed frequency array. | |
double | get_tau () const |
double | get_ypar () const |
void | reset () |
void | urad_test () |
void | test () |
![]() | |
Radiation (size_t size) | |
const std::vector< double > & | get_energy () const |
const std::vector< double > & | get_nphot () const |
const std::vector< double > & | get_energy_obs () const |
const std::vector< double > & | get_nphot_obs () const |
size_t | get_size () const |
double | get_volume () const |
double | integrated_luminosity (double numin, double numax) |
void | set_beaming (double theta, double speed, double doppler) |
Methods to set viewing angle, beaming and geometry of emission region. | |
void | set_inclination (double theta) |
void | set_geometry (const std::string &geom, double l1, double l2) |
void | set_geometry (const std::string &geom, double l1) |
void | set_counterjet (bool flag) |
Method to include a counterjet in cyclosycnchrotron/Compton classes. | |
void | test_arrays () |
Simple method to check arrays; only meant for debugging. | |
Protected Attributes | |
size_t | Niter |
number of IC iterations | |
double | tau |
double | ypar |
optical depth/comtpon Y of emitting region | |
double | rphot |
photospheric radius when tau > 1, used to renormalize volume | |
double | escape_corr |
escape term, used to renormalize our spectra to CompPS | |
std::vector< double > | seed_energ |
array of seed frequencies in Hz | |
std::vector< double > | seed_urad |
array of seed photon number density in log10(#/erg/cm^3) | |
std::vector< double > | iter_urad |
array of iterated photon number density in log10(#/erg/cm^3) | |
gsl_spline * | seed_ph |
interpolation of photon field array seed_urad | |
gsl_interp_accel * | acc_seed |
accelerator for above spline | |
gsl_spline * | iter_ph |
interpolation of photon field for multiple scatters | |
gsl_interp_accel * | acc_iter |
accelerator of above spline | |
gsl_spline2d * | esc_p_sph |
radiative transfer | |
gsl_spline2d * | esc_p_cyl |
radiative transfer | |
gsl_interp_accel * | acc_tau |
accelerator of above spline over tau | |
gsl_interp_accel * | acc_Te |
accelerator of above spline over Te | |
![]() | |
std::vector< double > | en_phot |
array of photon energies | |
std::vector< double > | num_phot |
array of number of photons in units of erg/s/Hz | |
std::vector< double > | en_phot_obs |
same as above but in observer frame | |
std::vector< double > | num_phot_obs |
same as above but in observer frame | |
double | r |
double | z |
Dimensions of emitting region. | |
double | vol |
Volume of emitting region. | |
double | beta |
speed of the emitting region | |
double | dopfac |
double | angle |
Viewing angle/Doppler factor of emitting region. | |
double | dopnum |
Doppler boosting exponent, depends on geometry. | |
bool | counterjet |
boolean switch if user wants to include counterjet emission | |
std::string | geometry |
string to track geometry of emitting region | |
Friends | |
double | comfnc (double ein, void *p) |
double | comint (double gam, void *p) |
double | disk_integral (double alfa, void *p) |
Class inverse Compton, inherited from Radiation.hpp.
kariba::Compton::~Compton | ( | ) |
kariba::Compton::Compton | ( | size_t | size, |
size_t | seed_size | ||
) |
void kariba::Compton::bb_seed_k | ( | const std::vector< double > & | seed_arr, |
double | Urad, | ||
double | Tbb | ||
) |
Method to include black body to seed field for IC; Note: Urad and Tbb need to be passed in the co-moving frame, the function does NOT account for beaming
void kariba::Compton::bb_seed_kev | ( | const std::vector< double > & | seed_energ, |
double | Urad, | ||
double | Tbb | ||
) |
double kariba::Compton::comintegral | ( | size_t | it, |
double | blim, | ||
double | ulim, | ||
double | enphot, | ||
double | enphmin, | ||
double | enphmax, | ||
gsl_spline * | eldis, | ||
gsl_interp_accel * | acc_eldis | ||
) |
This integrates the individual electron spectrum from comint over the total electron distribution
void kariba::Compton::compton_spectrum | ( | double | gmin, |
double | gmax, | ||
gsl_spline * | eldis, | ||
gsl_interp_accel * | acc_eldis | ||
) |
This calculates the final spectrum in all frequency bins, including multiple scatters. Note: the reason the Doppler boosting is a factor of 2 instead of 3 is because the calculations are done for a conical jet in the Lind&BLanford 1985 prescription
void kariba::Compton::cyclosyn_seed | ( | const std::vector< double > & | seed_arr, |
const std::vector< double > & | seed_lum | ||
) |
Method to include cyclosynchrotron array from Cyclosyn.hh to the seed field. The two input arrays should be get_energ() and get_nphot() methods from Cyclosyn.hh. If the seed_urad array wasn't empty, the contribution is automatically added to the existing one. note: the second condition has a <= sign to dodge numerical errors when the seed field energy density is extremely low, which can result in negative values/nan for the seed_urad
|
inline |
|
inline |
void kariba::Compton::reset | ( | ) |
This resets the energy density in case different photon fields want to be calculated separately to see the contribution of each
void kariba::Compton::seed_freq_array | ( | const std::vector< double > & | seed_energ | ) |
Method to set up seed frequency array.
void kariba::Compton::set_escape | ( | double | escape | ) |
This method is to hard-code an escape term, e.g. to implement a different geometry
void kariba::Compton::set_frequency | ( | double | numin, |
double | numax | ||
) |
Method to set up the frequency array over desired range.
void kariba::Compton::set_niter | ( | double | nu0, |
double | Te | ||
) |
Method to estimate the number of scatterings the electrons go through; scatters are repeated until the photons reach the same typical energy as the electrons Input parameters are initial scale frequency of photons in Hz and temperature of scattering electrons in erg note: this assumes that a) the final energy of the photons is set only by the electrons and b) that the photons have one scale energy only; it could be incorrect if scattering multiple photon fields (e.g. disk and cyclosynchrotron)
void kariba::Compton::set_niter | ( | size_t | n | ) |
void kariba::Compton::set_tau | ( | double | _tau | ) |
void kariba::Compton::set_tau | ( | double | n, |
double | Te | ||
) |
Sets optical depth for given number density of emitting region (assuming radius is set correctly), and compton-Y for a given electron average Lorentz factor. In some cases not covered by the radiative transfer tables, escape_corr reverts to the constructor default value of 1.
void kariba::Compton::shsdisk_seed | ( | const std::vector< double > & | seed_arr, |
double | tin, | ||
double | rin, | ||
double | rout, | ||
double | h, | ||
double | z | ||
) |
void kariba::Compton::test | ( | ) |
void kariba::Compton::urad_test | ( | ) |
|
friend |
This function is the kernel of eq 2.48 in Blumenthal & Gould(1970), represents the scattered photon spectrum for a given electron and includes the Klein-Nishina cross section.
|
friend |
This function is the integral of comfnc above over the total seed photon distribution
|
friend |
Calculates incident photon field for a Shakura-Sunyaev disk with aspect ratio H, inner temperature Tin, inner radius Rin, at a distance z from the disk, taking beaming into account
|
protected |
accelerator of above spline
|
protected |
accelerator for above spline
|
protected |
accelerator of above spline over tau
|
protected |
accelerator of above spline over Te
|
protected |
radiative transfer
interpolation for escape calculation to mimic
|
protected |
radiative transfer
interpolation for escape calculation to mimic
|
protected |
escape term, used to renormalize our spectra to CompPS
|
protected |
interpolation of photon field for multiple scatters
|
protected |
array of iterated photon number density in log10(#/erg/cm^3)
|
protected |
number of IC iterations
|
protected |
photospheric radius when tau > 1, used to renormalize volume
|
protected |
array of seed frequencies in Hz
|
protected |
interpolation of photon field array seed_urad
|
protected |
array of seed photon number density in log10(#/erg/cm^3)
|
protected |
|
protected |
optical depth/comtpon Y of emitting region