find_best_location¶
- gdt.missions.fermi.gbm.localization.dol.legacy_functions.find_best_location(ndet, vpoints, udet, usedet, loctable_entries, sduration, c_mrates, c_brates, visible, verbose=False)[source]¶
Calculate chi2 for each visible location and find minimum. Algorithm for normalization from MSB memo of Jul 27 2005
- Parameters:
ndet (int) – Number of detectors
vpoints (int32) – Number of points in the sky grid
udet (int32) – Length os usedet arg
usedet (np.array()) – A boolean array containing True (1) if the detector is to be included or False (0) if a detector is not to be included. If not set, then all detectors (including BGOs) are used
loctable_entries (np.ndarray((ndet, npoints), int32)) – Table with detector response for each sky location.
sduration (float32) – Timescale of measured detector counts
c_mrates (np.ndarray(ndet, int32)) – Measured detector counts summed over chosen energy channels
c_brates (np.ndarray(ndet, int32)) – Estimated background counts summed over chosen energy channels
visible (np.ndarray((2, npoints), int32)) – Array with visibility status for each location (1 == visible, 0 == occulted)
verbose (bool) – Print things to screen when True
- Returns:
gindex (int32) – Index of best localization position in the sky
chi2 (np.ndarray(vpoints, np.float32)) – Array of chi-square values computed by taking the difference between the observed and expected excesses for each point on the sky
nchi2 – Array of chi-square values computed by taking the difference between the observed and expected excesses for each point on the sky using an alternative normalization method for the expected excess
rchi2 (float32) – Value of chi2 array for best location on the sky
az (float32) – Azimuth of rchi2 in degrees
zen (float32) – Zenith of rchi2 in degrees
loc_err (float32) – Localization error in degrees
loc_reliable (bool) – Status of best localization error. True=GOOD, False=BAD, cannot be localized