Commit 46993239 authored by Andrew Strong's avatar Andrew Strong

Sources.cc: 4FGL but spectra, profiles seem problem: source spectra parameters interpretation?

parent 58371361
......@@ -692,24 +692,29 @@ void Sources::readFromFile(const std::string & fileName){
table.column("SPECTRAL_INDEX").read(index,1,nRows);
//Set the pivot point to 100 MeV
pivot = 100;
}catch (CCfits::Table::NoSuchColumn){
}catch (CCfits::Table::NoSuchColumn){
try {
std::cout<<" trying xNickName"<<std::endl; // NickName is in 3FGL, so avoid this test, want next block
std::cout<<" trying Source_Name for 4FGL"<<std::endl; // 4FGL AWS20200113
//Read in source names
table.column("xNickName").read(names, 1, nRows);
table.column("Source_Name").read(names, 1, nRows);
//And then longitude and latitude
table.column("GLON").read(l,1,nRows);
table.column("GLAT").read(b,1,nRows);
//flux > 100 MeV, prefactor and spectral index next
table.column("Flux100").read(flux100,1,nRows); //AWS20140109 NB not in final 2FGL. Set later from energy ranges.
// table.column("Flux100").read(flux100,1,nRows); //AWS20140109 NB not in final 2FGL. Set later from energy ranges.
table.column("Flux1000").read(flux1000,1,nRows);//AWS20110806 2FGL
std::cout<<"read flux1000: first entry="<<flux1000[1]<<std::endl;
table.column("Flux_Density").read(prefactor,1,nRows);
table.column("Spectral_Index").read(index,1,nRows);
table.column("Pivot_Energy").read(pivot,1,nRows);
table.column("PL_Flux_Density").read(prefactor,1,nRows); //4FGL
table.column("PL_Index").read(index,1,nRows); //4FGL
table.column("Pivot_Energy").read(pivot,1,nRows); //4FGL
// table.column("Flux_Density").read(prefactor,1,nRows); //3FGL
// table.column("Spectral_Index").read(index,1,nRows);
// table.column("Pivot_Energy").read(pivot,1,nRows);
}catch (CCfits::Table::NoSuchColumn){
try {
std::cout<<" trying Source_Name"<<std::endl; // final official FSSC 2FGL
std::cout<<" trying Source_Name for 3FGL"<<std::endl; // final official FSSC 2,3,4FGL
//Read in source names
table.column("Source_Name").read(names, 1, nRows);
//And then longitude and latitude
......
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