Hi everyone,
My script works perfectly, but the output waveform is not properly de-trend and demean after rotation. May someone suggest how I can fix this.
My script is as below:
"
st = client.get_waveforms(net, sta, loc, chan, starttime, endtime, attach_response= True);
st_rem=st.copy()
st_tr=st_rem.remove_response(output = ‘VEL’,plot=False);
dist_in_m, az, baz = gps2dist_azimuth(event_latitude, event_longitude, station_latitude, station_longitude)
st_filt=st_tr.filter('bandpass', freqmin =0.001, freqmax=0.1)
st_f=st_filt.detrend('demean').detrend('linear').taper(0.05)
st_TRV=st_f.rotate('NE->RT', back_azimuth=baz)
st_TRV.plot(equal_scale=False, automerge=False);
"