xumi1993 / seispy

Python module of seismology and receiver functions

Home Page:https://seispy.xumijian.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azimuth Correction

snoltcaraway opened this issue · comments

I am using the RF package, and the data I am loading in from IRIS has EHZ,EH1,EH2 channels. The EH1 and EH2 channel azimuths need to be corrected by anywhere from -6 to +6 degrees, and EHZ dip needs to be changed from 90 to -90, depending on the station. It does not appear this package automatically corrects the azimuth. I see there is a baz_shift variable in rotate in RF and also seispy.eq.rotate_ZNE in the the seispy package.

Is the baz_shift what I need or do I need to use seispy.eq.rotate_ZNE? If I need to use seispy.eq.rotate_ZNE, how do I implement this in the RF package and data I am loading in through query.

Here is a snippet of the code I am using with rf.rotate(baz_shift=6)
rf.load_stainfo()
rf.search_eq(catalog='NEIC PDE')
print(rf.eq_lst) ##The matched event lists are listed.

rf.match_eq()

rf.detrend()
rf.filter()
rf.cal_phase()
rf.rotate(baz_shift=6) #Like this?
rf.drop_eq_snr()
rf.save_raw_data()
rf.trim()
rf.deconv()

or perhaps its rf.baz_correct()

I am just not sure what internal variables I need to change because when I plot them, the P arrival is still inverted, the dip needs to be changed to -90.

It would be really helpful to have a rotateZNE() for the rf module like seispy.eq.rotateZNE().

Obspy also has a function like this.

Hi,

  • Please try rf.baz_correct(correct_angle=-6) after rf.cal_phase() to correct azimuth of components.
  • If the amplitude of R or T RFs are inverse, please try to set up inverted E or N component (rf.para.reverseE=True , rf.para.reverseN=True) or switch them (rf.para.switchEN=True) then executing rf.channel_correct() after rf.match_eq().