Open vsilwal opened 6 years ago
Good point!
Are you talking about something like this
I think I originally may think out that, but I realized there are 4 cases that I have to handle, which might lead me to give up code it up. 1) cut start time < trace start time 2) cut start time >= trace start time 3) cut end time < trace end time 4) cut end time >= trace end time
Great to see its already there.
Wouldn't trace.trim(cut_starttime, cut_endtime, pad=True, fill_value=0)
take care of this?
For (1. start time < trace start time) and (4. end time >= trace end time) that would pad zero, and for (2. start time >= trace start time) and (3. end time < trace end time) it would cut.
Thanks,
https://github.com/computational-seismology/pytomo3d/blob/77efedfe3863213ae348385fdd8a8552c2d8db13/pytomo3d/signal/process.py#L56
It might be good to have the option of padding zeroes here. One example were this would be beneficial would be when filtering specfem synthetics (that start from time=0) for near-field stations.