ilex.widths
- find_optimal_fluence_width(tI, yfrac=0.95, mode='median')[source]
Find optimal width/bounds of frb by finding the 95% cutoff on either side of the effective centroid.
- Parameters:
tI (np.ndarray or array-like) – Stokes I time series profile
yfrac (float) – fraction of total fluence on either side of FRB effective centroid to take as FRB bounds
mode (str) –
type of algorithm to use when finding optimal fluence width
[median] -> find burst width by estimating centroid of burst and fluence threshold on either side
[min] -> find minimum burst width that captures the desired fluence threshold (moving window algorithm)
- Returns:
centroid (int) – index of effective centroid of tI
lw (int) – effective yfrac width on the LHS of centroid
rw (int) – effective yfrac width on the RHS of centroid
- find_optimal_sigma_dt(tI, sigma: float = 15.0, rms_offset: float = 0.33, rms_width: float = 0.0667)[source]
- Parameters:
tI (np.ndarray or array-like) – time series
sigma (int, optional) – minimum peak Signal-to-noise, by default 15
- Returns:
tN – averaging factor needed to reach desired peak Signal-to-noise threshold
- Return type:
int
- find_optimal_sigma_width(tI, sigma: int = 5, rms_guard: float = 0.033, rms_width: float = 0.0667, rms_offset: float = 0.33)[source]
This function searches the stokes I dynamic spectrum for the most likely location of the frb. It’s important to note that this function will look through the entire dataset regardless of crop parameters. It will first scrunch, so if memory is an issue first set ‘tN’.
- Parameters:
sigma (int) – S/N threshold
rms_guard (float) – gap between estiamted pulse region and off-pulse region for rms and baseband estimation, in [phase units]
rms_width (float) – width of off-pulse region on either side of pulse region in [phase units]
rms_offset (float) – rough offset from peak on initial S/N threshold in [phase units]
**kwargs – FRB parameters + FRB meta-parameters
- Returns:
peak (int) – index of peak value in burst
lw (int) – lower bound width from peak
hw (int) – upper bound width from peak