mirror of
https://asciireactor.com/otho/cloudy-agn.git
synced 2024-12-05 02:05:07 +00:00
spline program running
This commit is contained in:
parent
4450f6d9f8
commit
a530c8054f
@ -1,9 +0,0 @@
|
||||
0.0003 0.002
|
||||
0.001 0.0072
|
||||
0.008 0.04
|
||||
0.012 0.044
|
||||
0.03 0.05
|
||||
0.44 0.04
|
||||
2.1 0.012
|
||||
60.0 0.029
|
||||
410.0 0.0003
|
@ -17,7 +17,7 @@
|
||||
|
||||
namespace agn {
|
||||
|
||||
const bool debug = false;
|
||||
const bool debug = true;
|
||||
const bool line_debug = false;
|
||||
const bool verbose=true;
|
||||
|
||||
|
@ -37,12 +37,15 @@ int main(int argc, char const *argv[])
|
||||
|
||||
// Read in sampling table and construct a spline model.
|
||||
samples = agn::read_sed_table(sample_table);
|
||||
agn::sed_spline agnsource(samples);
|
||||
|
||||
|
||||
if(agn::debug) debug_file
|
||||
<< "Read samples:\n"
|
||||
<< format_sed_table(samples);
|
||||
|
||||
agn::sed_spline agnsource(samples);
|
||||
|
||||
|
||||
|
||||
|
||||
if(agn::verbose) std::cout
|
||||
<< "Evaluating relative spectral intensity for "
|
||||
|
@ -153,6 +153,7 @@ agn::sed_spline::sed_spline(agn::sed_table& samples) {
|
||||
while(table_it != samples.value.end()) {
|
||||
x.push_back(table_it->first);
|
||||
y.push_back(table_it->second);
|
||||
table_it++;
|
||||
}
|
||||
Spline<double,double> newspline(x,y);
|
||||
_spline = newspline;
|
||||
@ -266,6 +267,7 @@ agn::sed_table agn::read_sed_table(std::ifstream& table_file) {
|
||||
table_file >> hnu;
|
||||
table_file >> resultant.value[hnu];
|
||||
}
|
||||
return resultant;
|
||||
}
|
||||
|
||||
|
||||
@ -298,6 +300,7 @@ std::string agn::format_sed_table(agn::sed_table table) {
|
||||
while(table_iterator != table.value.end()) {
|
||||
output
|
||||
<< std::fixed
|
||||
<< std::scientific
|
||||
<< table_iterator->first
|
||||
<< "\t"
|
||||
<< std::scientific
|
||||
|
Loading…
Reference in New Issue
Block a user