get_spec¶
- gdt.missions.fermi.gbm.localization.dol.legacy_functions.get_spec(spec, energies, mid_energies, erange)[source]¶
Get spectral shape in each energy bin
- Parameters:
spec (str) – Spectrum definition string formatted like so: comp function - “comp,index=-1.15,epeak=350.0” band function - “band,alpha=-1.0,beta=-2.3,epeak=230.0” pl function - “pl,index=-2”
energies (np.ndarray(float32, nen + 1)) – End points of energy bins
mid_energies (np.ndarray(float32, nen)) – Energy describing the geometric mean between the ends of an energy bin
erange (list) – A 2 element list containing the first and last indices used for normalizing the spectral shape
- Returns:
spec_cts (np.ndarray(float32)) – Array with normalized photon counts in each energy bin for spec