-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi Lion,
I am revisiting the pyflex code and found that in the calculate_preliminiaries
, you have such checks:
if self.ttimes:
offset = self.event.origin_time - self.observed.stats.starttime
min_time = self.ttimes[0]["time"] - \
self.config.max_time_before_first_arrival + offset
min_idx = int(min_time / self.observed.stats.delta)
dist_in_km = geodetics.calcVincentyInverse(
self.station.latitude, self.station.longitude,
self.event.latitude, self.event.longitude)[0] / 1000.0
max_time = dist_in_km / self.config.min_surface_wave_velocity + \
offset + self.config.max_period
max_idx = int(max_time / self.observed.stats.delta)
# Reject all peaks and troughs before the minimal allowed start
# time and after the maximum allowed end time.
first_trough, last_trough = self.troughs[0], self.troughs[-1]
self.troughs = self.troughs[(self.troughs >= min_idx) &
(self.troughs <= max_idx)]
Which I think for current design of pyflex, this part shouldn't be here, because it works the same as function reject_on_traveltimes
. It is also very limited since it reject all the windows after surface waves.
Metadata
Metadata
Assignees
Labels
No labels