...
 
Commits (2)
module load idl
rm -f plots.pro
echo e.g. setenv GALPLOT_RESULTS_TXT results_54_melissa2_l_0.50_179.50_180.50_359.50_b_-80.50_-0.50_0.50_80.50_unconv_2019_10yr_P8_3FGL_8yrsensmap_3FGLmodel.txt
echo e.g. setenv GALPLOT_RESULTS_TXT results_54_dev_l_0.50_179.50_180.50_359.50_b_-80.50_-0.50_0.50_80.50_unconv_4FGL_cat_3FGL_model.txt
echo ....
echo getting idl from $GALPLOT_RESULTS_TXT
grep -h idl $GALPLOT_RESULTS_TXT > plots.pro
echo exit >> plots.pro
idl plots.pro
echo old: gv sourcepop_NS.ps &
rm -f viewtheplot
grep -h "gv sourcepop" $GALPLOT_RESULTS_TXT
grep -h "gv sourcepop" $GALPLOT_RESULTS_TXT > viewtheplot
source viewtheplot
......@@ -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
{
......@@ -135,6 +138,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;
......
......@@ -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 ];
......