SAC_PZ files for Shakes and Booms

Hi,

I am working on correcting Shake and Boom data for instrument response, following the recently published Seismological Research Letters paper:

“Instrument Response Removal and the 2020 MLg 3.1 Marlboro, New Jersey, Earthquake”, by Alexander Burky, Jessica Irving, and Frederik Simons

The method requires downloading a “SAC_PZ” file for the specific instrument, containing information to correct for the instrument response using poles and zeros.

There must be some straightforward way to find those files because I already did it :slight_smile: for one RS instrument (see below), and with it I got the method to work in Matlab :slight_smile: but I can’t remember how I got that file :slight_smile:

Does anybody here know how to get those SAC_PZ files for Shakes and Booms?

==========================
Example SAC_PZ file for RCABD


  • NETWORK : AM
  • STATION : RCABD
  • LOCATION : 00
  • CHANNEL : EHZ
  • CREATED : 2021-05-29T05:22:04.965997Z
  • START : 2020-07-06T19:25:06.642000Z
  • END : None
  • DESCRIPTION : Raspberry Shake Citizen Science Station
  • LATITUDE : 42.3848
  • LONGITUDE : -71.3218
  • ELEVATION : 60.0
  • DEPTH : 0.0
  • DIP (SEED) : -90.0
  • AZIMUTH : 0.0
  • SAMPLE RATE : 100.0
  • INPUT UNIT : M
  • OUTPUT UNIT : COUNTS
  • INSTTYPE : Raspberry Shake
  • INSTGAIN : 381407000.0 (M/S)
  • SENSITIVITY : 381407000.0 (M/S)
  • A0 : 65354.1

ZEROS 5
-4.511870e+00 +3.080220e+02
-4.511870e+00 -3.080220e+02
+0.000000e+00 +0.000000e+00
+0.000000e+00 +0.000000e+00
+0.000000e+00 +0.000000e+00
POLES 6
-4.882550e+01 +3.063450e+02
-4.882550e+01 -3.063450e+02
-2.223510e+02 +1.180670e+02
-2.223510e+02 -1.180670e+02
-3.328820e+00 +1.984020e+00
-3.328820e+00 -1.984020e+00
CONSTANT 2.492651e+13

Hello Alan, great to hear from you again!

Let’s see, I have not found a previous topic in our community regarding this, but I have found something that matches the output you have on file on the IRIS website, here: TRANSFER more or less halfway down the page.

It looks like what you are aiming for. The output has been written with a program called RDSEED, which you can download from here (instructions on how to use it are there too): GitHub - iris-edu-legacy/rdseed: rdseed – Read an FDSN SEED format volume

But if anyone else has better info or a more direct approach, feel free to add your experience, as usual!

Thanks for that suggestion.

To do it that way requires installing and running SAC, right?

But, I was able to do it without getting involved with SAC.

Just can’t remember HOW I did it :slight_smile:

Update:

Good news is that I remembered how I did it :slight_smile:
In ObsPy, I could get the SAC_PZ file with this:

%matplotlib inline
from obspy import read_inventory, UTCDateTime
from datetime import timedelta
sta = 'RCABD'
now = UTCDateTime.now() - timedelta(days=1)
inv = read_inventory('https://fdsnws.raspberryshakedata.com/fdsnws/station/1/query?network=AM&station=%s&level=resp&format=xml&nodata=404&starttime=%s' % (sta, str(now)))
inv.write("./RCABD_pz.txt", "SACPZ")

Next challenge is: That worked for RACBD, which is an RS-1D, but when I tried it for RAF39, which is a Shake&Boom, it seems that it got confused RE which channel (EHZ or HDF), and:

  1. Gave me this error message:

//anaconda2/lib/python2.7/site-packages/obspy/io/sac/sacpz.py:78: UserWarning: AM.RAF39.00.HDF 2018-09-28T04:50:31.001000Z has unrecognized input units in response: PA. Skipping
warnings.warn(msg)

  1. Produced a SAC_PZ file which looked to me like it might have been for HDF, when I thought I was asking for EHZ.

Confused, but still workin’ on it… :slight_smile:

1 Like

Our software team has come to help!

Here’s the procedure they suggest to eliminate the problem of having to generate a file from response data with HDF and EHZ channels:

  1. The basic point is that Obspy does not understand non-seismic data.
  2. Thus, it’s better if you can download the response file manually…
  3. …and then remove the HDF channel definition by hand.
  4. When you will use this edited response file as Obspy input, the only defined channel will naturally be only the EHZ.
  5. In this way, the error will disappear, and you will have the SAC_PZ file only for the channel you need.

Thanks.

I was also thinking the issue might be that ObsPy doesn’t recognize the HDF data. That was part of my reason for working with the Matlab version of the code described in the SRL paper by Burky, et al., mentioned above. I am very new to ObsPy, but have been using Matlab for a long time, so:

  1. It’s easier for me to follow what’s happening in Matlab, and
  2. The paper includes a lot of good documentation and background RE what’s happening in their Matlab programs.

Anyway: When you say “download the response file manually”, do you mean downloading from SAC or from ObsPy? If from SAC, I was hoping to not have to get involved with installing SAC on my Mac. (I find that installing large, complex non-Apple programs on Macs usually gets complicated.) But, if that’s necessary, do you perhaps have access to good, clear instructions for installing SAC on a Mac?

To clarify what I am trying to do here: I have an RS1D (RCABD, EHZ), Shake&Boom (RAF39, EHZ and HDF), and a Trillium broadband, all on the Weston Observatory seismic pier, and I want to verify that they are all recording the data consistently. Also, I want to verify that the HDF recordings are well-calibrated.

So, do you perhaps have SAC running? If yes, would you be able to download the SAC_PZ files for RCABD (EHZ), RAF39 (EHZ and HDF), and WES (HHZ), and send them to me, so I can verify that the SAC_PZ files I’m trying to get are correct?

Hello,

Yes, Obspy does not understand non-seismic data, like the sets recorded by the HDF channel in Pascals. If you want to analyze HDF calibration, then Obspy is not the solution that you are looking for, I’m afraid, and you will have to revert to your Matlab approach.

When I said that, I meant going to the response file page on the internet (for example: https://fdsnws.raspberryshakedata.com/fdsnws/station/1/query?network=AM&station=RCABD&level=resp for your RS1D) and then download it by right-clicking on it and select “Save” or doing “Ctrl+s” (or “Command+s” if on Mac, if I remember well).

Once the .xml file is on your computer then you could modify accordingly to what you need for it to be understood by Obspy or by your Matlab code, and then proceed from there by feeding the edited response file from a local source instead of an online one.

I don’t have SAC installed on my pc (I tried installing the repository that I suggested a couple of posts above, but something even in a basic Python environment seems to not work well with it, so I’m still working on it) but I downloaded all the response files from RCABD and RAF39 and I have attached them here: RAF39_resp.xml (9.7 KB) RCABD_resp.xml (10.8 KB)

Unfortunately, I am unable to download the WES response file since it is not connected to StationView. You will have to acquire its response files in another way (unless you already have them available).

Thanks! This is VERY helpful, and it has what I’m looking for.

Having that URL example is most of what I was looking for. And, no problem with me experimenting with modifying it to be understood by ObsPy and/or Matlab. That’s what I’m working on. And, no problem with me getting response information for WES (there are other ways I can get the necessary files for that/only asked in case you had SAC runnning & easily avaialable).

My primary interest here is RE calibartion of RCABD (EHZ) & RAF39 (EHZ and HDF). Here’s some more about what I’m working on with this.

  1. We have some very interesting long-period surface waves from the recent M8.2 Alaska quake, recorded on RAF39 - both EHZ and HDF (see below). And, we see the same kind of surface wave seismic/infrasound at other RS&Boom sites, and at other seismic/infrasound colocated sites. We are studying those seismic/infrasound interactions, and I want to make sure we have correctly calibrated data.

M8.2 Alaska quake:

Surface waves on both seismic and infrasound.

  1. We also have some interesting observations of thunder recorded at Shake&Boom sites, and we are studyng that too and want to make sure we have correctly calibrated data.

Thunder on Shake&Boom (RF082):

Thanks for helping me with this, and for all the other help I am getting from raspberryshake.org, and for all of the great experiences I am having being part of this great Raspberry Shake adventure!

Alan Kafka

Geophysics, Earthquake Science, Environmental Systems,
and Citizen Science for the Public Good

Twitter.com/Weston_Quakes
The COVID-19 Seismic “Hush”, All Over the World…
Seismographs for Citizens of Planet Earth
Cellular Seismology
Why Does the Earth Sometimes Quake in New York City?
Raspberry Shake: R974C

2 Likes

Hello Alan,

Always happy to help, both here and on socials, where I continue to thank you for your so extensive analysis work that you always do.

I also recorded the surface waves from the M8.1 Alaska major earthquake all the way here in Scotland, here’s what my RS3D has recorded on all its channels:

Unfortunately, I got my RSBOOM only after the lone thunderstorms that we had last year for the first time in more than 20 years, so I only got the vibrations produced by close thunder recorded with my old RS1D.

In any case, both projects are extremely interesting and I (we) look forward to their results.

If you need anything else, you know where to find me. And I agree, being part of what RaspberryShake is doing is definitely an inspiring adventure!

1 Like