Trouble Adding Traces


I am trying to copy the beginning section of a trace and prepend the beginning of the trace with a reversed copy of that section (really several reversed copies). I am not sure if this is possible using the fill_value option in something like a trace.trim. I have tried using numpy to do this but I am not very familiar with it nor how traces are set up and I end up with an error about the arrays being different shapes. Any advice on how to best do this would be much appreciated.



Hi Mike,

I guess the following untested snippet would work - it will prepend the first 100 samples in reverse order to the trace.

import obspy

import numpy as np

tr =[0]� # Dummy example data = np.concatenate([[:100][::-1],])

tr.stats.starttime -= * 100� # Shift the start time