Commit 33dd92d9 authored by Andrew Strong's avatar Andrew Strong

Isotropic.cc Galplot.cc plot_spectrum.cc plot_convolved_GLAST_profile_healpix.cc: working

parent b7a53eab
......@@ -2,6 +2,7 @@
#include"Galplot.h"
#include"Isotropic.h" //AWS20191231
#include"galprop_classes.h"
#include"galprop.h"
......@@ -56,6 +57,16 @@ int Galplot::run(int argc, char*argv[])
cout<<"Only gen_source_population"<<endl;gen_source_population(); plot_source_population_NS();
cout<<"Finished gen_source_population"<<endl;exit(0);
}//AWS20110829
if(galplotdef.verbose==-5000 ) //AWS20191231
{
cout<<"read_isotropic at start"<<endl;
Isotropic isotropic;
isotropic.read(configure.fits_directory,galplotdef.isotropic_bgd_file);
cout<<"Finished read_isotropic"<<endl;
cout<<"continuing..."<<endl;
//exit(0);
}
......@@ -144,7 +155,7 @@ int Galplot::run(int argc, char*argv[])
if(galplotdef.sourcepop_total!=0)//AWS20191231
{
gen_source_population();
plot_source_population_NS();
......
......@@ -65,27 +65,37 @@ using namespace std;
energy =new double[n_rows];
spectrum =new double[n_rows];
// fixup since this caused crash; string literal problem?
/*
fits_get_colnum(fptr,CASEINSEN,"energy",&colnum,&status);
cout<<"energy column ="<< colnum<<endl;
*/
colnum=1; //AWS20191231
cout<<"set energy column ="<< colnum<<endl;
cout<<"skipping read for test"<<endl;
/*
for (i=0;i<n_rows;i++)
fits_read_col(fptr, TDOUBLE, colnum,i+ 1,1,1,&nulval,&energy[i], &anynul,&status);
*/
// fixup since this caused crash; string literal problem?
/*
fits_get_colnum(fptr,CASEINSEN,"intensity",&colnum,&status);
cout<<"intensity column ="<< colnum<<endl;
*/
colnum=2; //AWS20191231
n_energy=n_rows;
cout<<"skipping read for test"<<endl;
/*
for (i=0;i<n_rows;i++)
fits_read_col(fptr, TDOUBLE, colnum,i+ 1,1,1,&nulval,&spectrum[i],&anynul,&status);
*/
for (i=0;i<n_rows;i++){cout<<" energy="<<energy[i]<<" spectrum = "<< spectrum[i]<<endl;}
cout<<"<<< Isotropic.read"<<endl;
return 0;
}
......
......@@ -169,6 +169,7 @@ double *profile_ic, *profile_ic_aniso, *profile_bremss, *profile_pi0_decay, *pro
double isotropic_intensity; //AWS20080630
if(0) //AWS20200108 to avoid crash, needs isotropic_type=1
isotropic.read(configure.fits_directory,galplotdef.isotropic_bgd_file); //AWS20081202
......
......@@ -168,6 +168,8 @@ int Galplot::plot_spectrum(int ic,int bremss,int pi0,int total) {
galaxy.n_E_gammagrid,log10(galaxy.E_gamma_min), log10(galaxy.E_gamma_max));
// if(galplotdef.isotropic_type>0 && galplotdef.isotropic_use>0) //AWS20200102 for isotropic test
if(0) //AWS20200104 no read to avoid crash, needs isotropic_type==1 in galplotdef
isotropic.read(configure.fits_directory,galplotdef.isotropic_bgd_file);//AWS20081223
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment