diff --git a/source/SourcePopulation.cc b/source/SourcePopulation.cc index 4944ca069df49d0b7d2395a74bac550cb20891b2..7e003cc4704a1040119a176e0158e662e833f75e 100644 --- a/source/SourcePopulation.cc +++ b/source/SourcePopulation.cc @@ -45,6 +45,9 @@ int SourcePopulation::init() IDL_plot_control = 1; //AWS20200623 IDL_psym = -6; //AWS20200623 + strcpy(galdef_ID, "sourcepop_needs_galdef_ID" ); //AWS20200701 + strcpy(psfile_tag,"sourcepop_needs_psfile_tag"); //AWS20200701 + //AWS20170112 read and test sensitivity map { @@ -134,6 +137,11 @@ int SourcePopulation::print(int options) // default options=1 in header *txt_stream<<"IDL_plot_control="<<IDL_plot_control<<endl; //AWS20200623 *txt_stream<<"IDL_psym=" <<IDL_psym<<endl; //AWS20200623 + + *txt_stream<<"galdef_ID=" <<galdef_ID<<endl; //AWS20200701 + *txt_stream<<"psfile_tag="<<psfile_tag<<endl; //AWS20200701 + + } @@ -1577,13 +1585,14 @@ int SourcePopulation::analyse_sample() if(IDL_plot_control==1) // start plot { *txt_stream<<"set_plot,'ps' ;idl"<<endl; - *txt_stream<<"device,file='"<<"sourcepop_NS"<<".ps' ;idl"<<endl; + *txt_stream<<"device,file='"<<"sourcepop_NS"<<"_"<<galdef_ID<<"_"<<psfile_tag<<".ps' ;idl" <<endl; + *txt_stream<< "gv sourcepop_NS"<<"_"<<galdef_ID<<"_"<<psfile_tag<<".ps & " <<endl; *txt_stream<<"!p.font=0 ;idl"<<endl; } if(IDL_plot_control==1) // start plot - *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=1.5,title='"<<title<<"',/nodata ; idl"<<endl; + *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=1.0,title='"<<galdef_ID<<"_"<<psfile_tag<<"',/nodata ; idl"<<endl; diff --git a/source/gen_source_population.cc b/source/gen_source_population.cc index 13b3cb0dbbb96344b001d4cc57710a0d17ca4d62..e4e1cdc9781b2d1ac03dc5b16a0100785ac063ee 100644 --- a/source/gen_source_population.cc +++ b/source/gen_source_population.cc @@ -41,6 +41,10 @@ int Galplot::gen_source_population() strcat(sourcepop1.title,"_"); strcat(sourcepop1.title,galplotdef.galdef_ID); //AWS20140202 strcat(sourcepop1.title,"_"); strcat(sourcepop1.title,galplotdef.psfile_tag); //AWS20140201 + strcpy(sourcepop1.galdef_ID, galplotdef.galdef_ID); //AWS20200107 + strcpy(sourcepop1.psfile_tag,galplotdef.psfile_tag); //AWS20200107 + + sourcepop1.txt_stream=&txt_stream; //NB can only copy as pointer // these parameters not from galplotdef file @@ -188,6 +192,10 @@ int Galplot::gen_source_population() strcat(sourcepop4.title,"_"); strcat(sourcepop4.title,galplotdef.galdef_ID); //AWS20140202 strcat(sourcepop4.title,"_"); strcat(sourcepop4.title,galplotdef.psfile_tag); //AWS20140201 + strcpy(sourcepop4.galdef_ID, galplotdef.galdef_ID); //AWS20200107 + strcpy(sourcepop4.psfile_tag,galplotdef.psfile_tag); //AWS20200107 + + sourcepop4.n_E_bin = data.GLAST_counts_healpix .getEMin().size(); //AWS20090105 sourcepop4.E_bin_low = new double[ sourcepop4.n_E_bin ]; //AWS20090105 sourcepop4.E_bin_high = new double[ sourcepop4.n_E_bin ]; //AWS20090105 @@ -239,6 +247,9 @@ int Galplot::gen_source_population() strcat(sourcepop6.title,"_"); strcat(sourcepop6.title,galplotdef.galdef_ID); //AWS20140202 strcat(sourcepop6.title,"_"); strcat(sourcepop6.title,galplotdef.psfile_tag); //AWS20140201 + strcpy(sourcepop6.galdef_ID, galplotdef.galdef_ID); //AWS20200107 + strcpy(sourcepop6.psfile_tag,galplotdef.psfile_tag); //AWS20200107 + sourcepop6.n_E_bin = data.GLAST_counts_healpix .getEMin().size(); sourcepop6.E_bin_low = new double[ sourcepop6.n_E_bin ]; sourcepop6.E_bin_high = new double[ sourcepop6.n_E_bin ]; @@ -290,6 +301,9 @@ int Galplot::gen_source_population() strcat(sourcepop7.title,"_"); strcat(sourcepop7.title,galplotdef.galdef_ID); //AWS20140202 strcat(sourcepop7.title,"_"); strcat(sourcepop7.title,galplotdef.psfile_tag); //AWS20140201 + strcpy(sourcepop7.galdef_ID, galplotdef.galdef_ID); //AWS20200107 + strcpy(sourcepop7.psfile_tag,galplotdef.psfile_tag); //AWS20200107 + sourcepop7.n_E_bin = data.GLAST_counts_healpix .getEMin().size(); sourcepop7.E_bin_low = new double[ sourcepop7.n_E_bin ]; sourcepop7.E_bin_high = new double[ sourcepop7.n_E_bin ]; @@ -342,6 +356,9 @@ int Galplot::gen_source_population() strcat(sourcepop5.title,"_"); strcat(sourcepop5.title,galplotdef.galdef_ID); //AWS20140202 strcat(sourcepop5.title,"_"); strcat(sourcepop5.title,galplotdef.psfile_tag); //AWS20140201 + strcpy(sourcepop5.galdef_ID, galplotdef.galdef_ID); //AWS20200107 + strcpy(sourcepop5.psfile_tag,galplotdef.psfile_tag); //AWS20200107 + sourcepop5.n_E_bin = data.GLAST_counts_healpix .getEMin().size(); sourcepop5.E_bin_low = new double[ sourcepop5.n_E_bin ]; sourcepop5.E_bin_high = new double[ sourcepop5.n_E_bin ];