Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
andreatramacere committed Dec 17, 2024
1 parent 96674f4 commit a7b167c
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions jetset/sed_shaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self,name=None,data_type=None,val=None,err=None,idx_range=[]):
if name in index_names:
self.name=name
else:
raise RuntimeError("index name=%s not allowed, allowed names=%"%(name,index_names))
raise RuntimeError("index name=%s not allowed, allowed names=s%"%(name,index_names))

if data_type in data_type_allowed:
self.data_type=data_type
Expand All @@ -89,8 +89,10 @@ def __init__(self,name=None,data_type=None,val=None,err=None,idx_range=[]):
self.err=None

if idx_range!=[]:
#print("===>",idx_range)
self.idx_range=tuple(idx_range)
else:
#print("===>",spectral_index_range(name))
self.idx_range=spectral_index_range(name)


Expand Down Expand Up @@ -173,25 +175,25 @@ def show_pars(self):
#----------------------------------------------------
def spectral_index_range(name):
spectral_range_dic={}
spectral_range_dic['radio']=[6,10]
spectral_range_dic['radio_mm']=[10,11]
spectral_range_dic['mm_IR']=[11,13]
spectral_range_dic['IR_Opt']=[13,14]
spectral_range_dic['Opt_UV']=[14,16]
spectral_range_dic['UV_X']=[15,17.5]
spectral_range_dic['BBB']=[15,16]
spectral_range_dic['X']=[16,19]
spectral_range_dic['radio']=[6.,10.]
spectral_range_dic['radio_mm']=[10.,11.]
spectral_range_dic['mm_IR']=[11.,13.]
spectral_range_dic['IR_Opt']=[13.,14.]
spectral_range_dic['Opt_UV']=[14.,16.]
spectral_range_dic['UV_X']=[15.,17.5]
spectral_range_dic['BBB']=[15.,16.]
spectral_range_dic['X']=[16.,19.]
spectral_range_dic['Fermi']=[22.38,25.38]
spectral_range_dic['TeV'] = [25.00, 28.38]
return spectral_range_dic[name]


def sync_fit_range(name,indices):
spectral_range_dic={}
spectral_range_dic['blind']=[9,19]
spectral_range_dic['ISP']=[10,17]
spectral_range_dic['LSP']=[10,17]
spectral_range_dic['HSP']=[11,20]
spectral_range_dic['blind']=[9.,19.]
spectral_range_dic['ISP']=[10.,17.]
spectral_range_dic['LSP']=[10.,17.]
spectral_range_dic['HSP']=[11.,20.]

if name=='ISP' and indices.get_by_name('X').val is not None :
if indices.get_by_name('X').val.sed<0:
Expand Down

0 comments on commit a7b167c

Please sign in to comment.