Commit dd32bdab authored by Andrew Strong's avatar Andrew Strong

SourcePopulation.h add IDL_plot_control, IDL_psym. SourcePopulation.cc use...

SourcePopulation.h add IDL_plot_control, IDL_psym. SourcePopulation.cc use these in plotting. gen_source_population.cc: apply these in plots
parent 195d33e1
......@@ -42,6 +42,9 @@ int SourcePopulation::init()
strcpy(title,"no title");
IDL_plot_control = 1; //AWS20200623
IDL_psym = -6; //AWS20200623
//AWS20170112 read and test sensitivity map
{
......@@ -128,7 +131,11 @@ int SourcePopulation::print(int options) // default options=1 in header
*txt_stream<<"healpix skymap order="<<healpix_skymap_order<<endl;
*txt_stream<<"Fermi sensitivity file="<< Fermi_sensitivity_file<<endl; //AWS201701113
}
*txt_stream<<"IDL_plot_control="<<IDL_plot_control<<endl; //AWS20200623
*txt_stream<<"IDL_psym=" <<IDL_psym<<endl; //AWS20200623
}
......@@ -1567,13 +1574,19 @@ int SourcePopulation::analyse_sample()
*txt_stream<<"device,file='"<<title<<".ps';idl"<<endl;
*txt_stream<<"!p.font=0 ;idl"<<endl;
*txt_stream<<"start_plot =1 ; idl"<<endl;
// *txt_stream<<"start_plot =1 ; idl"<<endl;
// psym -6 open squares with line
*txt_stream<<"if(start_plot eq 1) then plot,S,NS,/xlog,/ylog,xrange=[1e-13,1e-5],yrange=[0.1,1e4], xstyle=1,ystyle=1, psym=-6, xtitle='S, cm!e-2!n s!e-1!n',ytitle='N(S)', charsize=0.75,title='"<<title<<"' ; idl"<<endl;
// *txt_stream<<"if(start_plot eq 1) then plot,S,NS,/xlog,/ylog,xrange=[1e-13,1e-5],yrange=[0.1,1e4], xstyle=1,ystyle=1, psym=-6, xtitle='S, cm!e-2!n s!e-1!n',ytitle='N(S)', charsize=0.75,title='"<<title<<"' ; idl"<<endl;
if(IDL_plot_control==1)
*txt_stream<<"plot,S,NS,/xlog,/ylog,xrange=[1e-13,1e-5],yrange=[0.1,1e4], xstyle=1,ystyle=1, psym="<<IDL_psym<<", xtitle='S, cm!e-2!n s!e-1!n',ytitle='N(S)', charsize=0.75,title='"<<title<<"' ; idl"<<endl;
// *txt_stream<<"start_plot =0; idl";
*txt_stream<<"start_plot =0; idl";
if(IDL_plot_control==2)
*txt_stream<<"oplot,S,NS ; idl"<<endl;
......
......@@ -159,6 +159,10 @@ class SourcePopulation
ofstream *txt_stream;
// control idl plotting
int IDL_plot_control; //AWS20200623
int IDL_psym; //AWS20200623
int init();
int print(int options=1);
int gen_sample(unsigned seed);
......
......@@ -215,6 +215,10 @@ int Galplot::gen_source_population()
cout<<"after sourcepop4.gen_sample_Fermi_catalogue"<<endl;
sourcepop4.print();
sourcepop4.IDL_plot_control=1; //AWS20200623 first plot no oplot
sourcepop4.IDL_psym =6; //AWS20200623 open squares no line
sourcepop4.analyse_sample();
//----------------------------------------------------------
......@@ -262,6 +266,10 @@ int Galplot::gen_source_population()
cout<<"after sourcepop6.gen_sample_Fermi_catalogue"<<endl;
sourcepop6.print();
sourcepop6.IDL_plot_control=1; //AWS20200623 first plot no oplot
sourcepop6.IDL_psym =5; //AWS20200623 open triangles no line
sourcepop6.analyse_sample();
......@@ -309,6 +317,10 @@ int Galplot::gen_source_population()
cout<<"after sourcepop7.gen_sample_Fermi_catalogue"<<endl;
sourcepop7.print();
sourcepop7.IDL_plot_control =1; //AWS20200623 first plot no oplot
sourcepop7.IDL_psym =4; //AWS20200623 open diamonds no line
sourcepop7.analyse_sample();
......@@ -318,7 +330,7 @@ int Galplot::gen_source_population()
cout<<"Fermi population synthesis: sourcepop5"<<endl; //AWS20090107
txt_stream<<"Fermi population synthesis: sourcepop5"<<endl; //AWS20090107
// init needs the sensitivity file to read. AWS20170113
// init needs the sensitivity file to read. AWS20170113
// "=" does not copy the char it seems so do it explicitly instead of putting "=" before init AWS20170113
sourcepop5.Fermi_sensitivity_file = new char[200]; //AWS20170113
......@@ -345,6 +357,10 @@ int Galplot::gen_source_population()
cout<<"after sourcepop5.gen_sample_Fermi_catalogue"<<endl;
sourcepop5.print();
sourcepop5.IDL_plot_control=1; //AWS20200623 first plot no oplot
sourcepop5.IDL_psym =0; //AWS2020623 just line
sourcepop5.analyse_sample();
char Fermi_catalogue_from_popsyn_sample_file[500]; //AWS20111011
......
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