mirror of
https://asciireactor.com/otho/cloudy-agn.git
synced 2024-12-05 02:35:08 +00:00
almost working
This commit is contained in:
parent
45bc4d7030
commit
a97f59b206
28
src/sed.hpp
28
src/sed.hpp
@ -50,6 +50,7 @@ public:
|
||||
_power(slope),
|
||||
_normal((log(x0.second)-(_power*log(x0.first))))
|
||||
{}
|
||||
double eval(double hnu) { return 0; }
|
||||
};
|
||||
|
||||
class sed {
|
||||
@ -165,6 +166,7 @@ agn::sed_powerlaw_spline::sed_powerlaw_spline(
|
||||
std::vector<double> x1;
|
||||
|
||||
// powerlaws are evaluated across four regions of the sed, first
|
||||
// we construct the powerlaws, here, and locate them
|
||||
iterator1d table_it = powerlaw_coords.table.begin();
|
||||
double ir_power = 3;
|
||||
coord2d ir_high_point = *table_it; table_it++;
|
||||
@ -179,10 +181,30 @@ agn::sed_powerlaw_spline::sed_powerlaw_spline(
|
||||
_xray_powerlaw = powerlaw(xray_low_point,xray_high_point);
|
||||
_gamma_powerlaw = powerlaw(gamma_low_point,gamma_power);
|
||||
|
||||
ir_bounds=
|
||||
double ir_lowerbound = agn::CLOUDY_MIN_EV;
|
||||
double ir_upperbound = ir_high_point.first;
|
||||
double uv_lowerbound = uv_low_point.first;
|
||||
double uv_upperbound = uv_high_point.first;
|
||||
double xray_lowerbound = xray_low_point.first;
|
||||
double xray_upperbound = xray_high_point.first;
|
||||
double gamma_lowerbound = gamma_low_point.first;
|
||||
double gamma_upperbound = agn::CLOUDY_MAX_EV;
|
||||
|
||||
for (int i=0; i<10; i++) {
|
||||
_ir_powerlaw.eval()
|
||||
// here we inject the powerlaws into the samples
|
||||
int segments=10;
|
||||
for (int i=0; i<=segments; i++) {
|
||||
double hnu =
|
||||
ir_lowerbound +
|
||||
(i/segments)*(ir_upperbound-ir_lowerbound);
|
||||
double value = _ir_powerlaw.eval(hnu);
|
||||
coord2d point = coord2d(hnu,value);
|
||||
samples.table.insert(point);
|
||||
}
|
||||
|
||||
if(agn::debug) {
|
||||
std::cout
|
||||
<< "[Constructor] Samples after evaluating powerlaws: \n";
|
||||
std::cout << agn::format_sed_table(samples);
|
||||
}
|
||||
|
||||
// load all samples into coordinate vectors
|
||||
|
Loading…
Reference in New Issue
Block a user