Removing instrument responses

Dear List,

I am currently trying to remove the instrument response from some
seismic waveforms. Everything works fine, except that the amplitudes are
off by a factor of ~1500 or so and I get a susipicous warning:

WARNING (norm_resp): computed and reported sensitivities differ by more
than 5 percent.
    Execution continuing.

As a test case I am using broadband data, where this operation should be
be equivalent to an integration of the time series and a division by the
gain. The maximum amplitude is ~1.2e-6. The restituted waveform looks
the same, as expected, but the amplitude is ~2e-3. I'm sure that the
gain data I introduced is correct, I tripple-checked it with the
station-xml.

Now I wonder what the warning above means, i.e. what are "reported" and
what "computed" sensistivities? Where does remove_response() get its
sensistivities from?

You can try to reproduce the reults using the script attached, but note
that you will have to fill in your email adress in line 12 to fetch the
data from the server and download the IPOC-station.xml from this source:

http://geofon.gfz-potsdam.de/fdsnws/station/1/query?net=CX&level=channel&u=web

Thank you in advance,
Wasja

remove_respone_example.py (1.87 KB)

In the last line of the script it must be 'DISP' instead of 'VEL'. Also,
I noted that the missing gain of ~1500 is the value of the gain of the
seismometer. So maybe this is not taken into account correctly?

Find the corrected script attached.

Wasja

remove_respone_example.py (1.87 KB)

Hi Wasja,

why do you fiddle with creating the PAZ yourself, when you can just download them? Use the level=response modifier in the url:

http://geofon.gfz-potsdam.de/fdsnws/station/1/query?net=CX&level=response

I modified your script to use the obtained XML (IPOC-stations_resp.xml) and it is working as expected.

The warning you report is indicating a not consistent inventory. This means something went wrong, when you created the stages. The computed sensitivity is computed by applying all stages, the reported sensitivity is the overall gain reported at a specific frequency. They should be the same at this frequency.

Best regards,
Tom

remove_response_example.py (1010 Bytes)

Comparing the two responses I think the missing normalization factor for the seismometer might be the problem with the stages you created:

# stages from server

[Response type: PolesZerosResponseStage, Stage Sequence Number: 1
  GFZ:CX1980:STS-2/N/g=1500
  From M/S to V
  Stage gain: 1500.0, defined at 0.02 Hz
  Transfer function type: LAPLACE (RADIANS/SECOND)
  Normalization factor: 6.0077e+07, Normalization frequency: 1.00 Hz
  Poles: (-0.037004+0.037016j), (-0.037004-0.037016j), (-251.33+0j), (-131.04-467.29j), (-131.04+467.29j)
  Zeros: 0j, 0j,
  Response type: CoefficientsTypeResponseStage, Stage Sequence Number: 2
  From V to COUNTS
  Stage gain: 419430.0, defined at 0.00 Hz
  Decimation:
    Input Sample Rate: 100.00 Hz
    Decimation Factor: 1
    Decimation Offset: 0
    Decimation Delay: 0.00
    Decimation Correction: 0.00
  Transfer function type: DIGITAL
  Contains 0 numerators and 0 denominators,
  Response type: FIRResponseStage, Stage Sequence Number: 3
  GFZ:CX1980:Q330_FIR_1
  From COUNTS to COUNTS
  Stage gain: 1.0, defined at 0.00 Hz
  Decimation:
    Input Sample Rate: 100.00 Hz
    Decimation Factor: 1
    Decimation Offset: 0
    Decimation Delay: 0.04
    Decimation Correction: 0.04]

# your stages

[Response type: PolesZerosResponseStage, Stage Sequence Number: 0
  STS-2
  From M/S to V
  Stage gain: 1500.0, defined at 0.02 Hz
  Transfer function type: LAPLACE (RADIANS/SECOND)
  Normalization factor: 1, Normalization frequency: 0.02 Hz
  Poles: (-0.0370237+0.0370244j), (-0.0370237-0.0370244j)
  Zeros: 0j, 0j,
  Response type: ResponseStage, Stage Sequence Number: 1
  Quanterra Q330
  From V to COUNT
  Stage gain: 419430.0, defined at 0.02 Hz]

Best,
Tom

Hi Tom, dear List,

why do you fiddle with creating the PAZ yourself, when you can just download them? Use the level=response modifier in the url:

http://geofon.gfz-potsdam.de/fdsnws/station/1/query?net=CX&level=response

Thank you for pointing this out! I was wondering why there were no PAZ included in my station.xml. Still, this is only a test case and I'll need to implement them myself for some other data.

The warning you report is indicating a not consistent inventory. This means something went wrong, when you created the stages. The computed sensitivity is computed by applying all stages, the reported sensitivity is the overall gain reported at a specific frequency. They should be the same at this frequency.

I have the impression this is an obspy-bug. In my case, the stage_gain keyword of the ResponseStage is treated correctly by remove_response(), but seems to be ignored by the PolesZerosResponseStage. I'll see whether I can track down the problem a bit further and will eventually file a bug report. As a workaround for now, I set the stage_gain of the seismometer to 1 and introduce a further ResponseStage that contains only the stage_gain of the seismometer.

Best,
Wasja