This follows the steps to build a dateless SEED for a station and then convert to a station XML file. Once you have a station XML file you can use obspy to do the instrument deconvolution.

1) Download the program PDCC from IRIS: http://ds.iris.edu/pub/programs/pdcc/ (If you download the zip file, the manual is there so no need to download the manual as well.)

2) Unzip the file in the directory you want to store it.

unzip pdcc-3.8.zip

3) Run the java program to open the GUI interface to the program.

$ java –Xmx512m –jar run_pdcc.jar

(You can look in the manual to find more about launching the program.) You should see a new open like this.


4) Page 14 in the PDCC manual explains how to create a new dateless SEED volume. Read the first 3 pages in the manual to learn how the GUI is setup.

Click 'create new’ to generate a new dateless SEE volume. A window like this will pop up. Enter the name of your dateless SEED volume and click ‘ok’.


You will see a new dateless SEED volume appear in the left column of the main GUI.


5) Now we need to add stations. Look at page 27 in the manual for the ‘Station Wizard Tool’. We will use this tool to make a station. Under the ‘Tools’ tab press ‘Launch’ after you select ‘Build A Station’ in the bottom drop down menu. This window should pop up.


Enter a station name and network. Then press ‘Next’.


Enter the station description and the network operator. Then press ‘Next’.


Enter the start time of this station/digitizer epoch. Then press ‘Next’. (Here I put “2015,001,00:00:00.0000”.)


Enter the end time of this station/digitizer epoch. Then press ‘Next’. (Here I put “2015,150,00:00:00.0000”.)


Enter the coordinates. Then press ’Next’. (I did not have the elevation for this station, but you must click inside the elevation box one time in order to press ’Next’.)


Now select the instrument at this station. We use the tool NRL (Nominal Response Library), which contains information for many common stations that exist today. Select the NRL tool and press ‘Go’. (If this is the first time, the program will download the NRL data to your current folder. This can take a few minutes deepening on connection speed.) You can find more information about the NRL tool on page 19 in the manual.



This screen will pop up when the library has finished downloading and installing on your computer. Choose the manufacturer of the sensor and press ‘Next’.


Next you choose the sensor type. Press ‘Next’ after you select the sensor.


Select the long period corner of the sensor. Press ‘Next’.


Now you will see the sensor response information. Press ‘Next’ to move the next step. In the next step you will repeat the same steps to build the data logger information.


Choose the manufacturer of the data logger and press ‘Next’.


Choose the type of data logger and press ‘Next’.


Select the input gain and press ‘Next’.


Select if you want the DC filter on or off. Press ‘Next’.


Select the sample rate and press ‘Next’.


Now you will see the data logger part of the response file. Press ‘Finish’.


After pressing ‘Finish’ you should now have the response file created for this station. You will return to the following box. Press ‘Next’.


Next you will need to choose the type of instrument and data you have recorded. For example, you can choose many options.

 

In this example, the Nanometrics Meridian Compact is a high-gain seismometer, so select this instrument can press ‘Next’.


Next you will need select the station alignment (i.e. azimuth and dip). Azimuth is in degrees clockwise from North ([0 - 360 deg]). You can use the dropdown menu to select common orientations. After selecting the orientation, press ‘Next’.

Note: Having east-west orientation means that the Azimuth and Dip of the instrument have particular degree values, as indicated in the FDSN SEED manual.
     Z – Azimuth 0, Dip -90
     N – Azimuth 0, Dip 0
     E – Azimuth 90, Dip 0
We will need to change this when do the other channels.


Again you need to input the sample rate. (Note: I am not sure why you have to do this twice. We did it already when we chose the data logger information.) Press ‘Next’.


Now you have completed a single station. Select the first option and press ‘Finish’.


In the example of the Nanometrics Meridan Compact I received the following error. I do not know why.


I pressed ‘Ok’ because this box says that the errors have been corrected. Then I return to the main screen and I can see that the station has been created. (Field 16 in the above error is the network code field. I did not see a place to set the ’Network’ code in the previous menus. But see below where I set the network code manually.)


5) I had to set the network code manually. To do this, go to the Station tab and edit the network code. Then press ‘Ok’. Below is the example when I set the network code to ‘LL’. (See the bottom of page 40 in the manual for more information about the network code.)


We can also set the network description in the ‘Dictionary’ field. Here I call it the Llaima Volcano Network. (There is more information about this field in the manual on page 42.)


Now that we are looking at the station information we should check to make sure everything is correct. I notice that the ‘longitude’ for station DTH above has not been set correctly. I wonder if this is related to the second error I received, which did not mention a blockette or field number.

Either way, I set the longitude manually now in the bottom of the panel. Next press ‘Ok’. The program will ask if you want to copy the new coordinates to the ‘Channel’ as well. Press ‘Yes’.


6) Since we are ultimately creating three broadband channels for this station, we want to write out one of the channels with as much specific information as we know and then copy the contents of one to the other two. In this way, we do not have to fully edit three empty channels. So make sure that this channel has all of the correct fields; we will then copy and past the channel and update the channel identifier for the N and E components. (Note: Page 49 in the manual has more information about creating the new channels from copy/paste.)

Steps: Select the channel and press ‘Copy’. Then press ‘Paste’ two times. You should see two new channels like below.


Now you need to make 3 changes.

A) Change the ‘Channel Identifier’ for the first new channel. In this example I will change to HHE first.


B) Change the Azimuth (remember from the first channel: E – Azimuth 90, Dip 0 )


C) Change the dip ( remember: E – Azimuth 90, Dip 0 )


Now repeat these 3 steps for the HHN component. (Remember: N – Azimuth 0, Dip 0). It should look like below.


7) Now we can clone the station to make another station with the same response. For this example, we will use all of the Meridian stations (See pg. 51 in the manual for more information on this process.)

Select the station that you want to clone. Then select ‘Clone A Station’ in the dropdown menu in the upper right corner. It should look like below. Then press ‘Launch’.


The pop-up below will appear. We can enter one or more stations. To add more stations, press ‘Add Row’. I will add all of the Meridian stations. If you want, you can add the station serial numbers. I do not do this in this example. After entering the data for all stations, my table looks like this. 


Then press ‘Ok’. You now will see all the Meridian stations. Each has the correct digitizer and sensor information and all 3 channels.


 Now I will save as a ‘Dataless Seed’ volume. You must select the SEED volume. Here is Llaima. Then select ‘dateless SEED file’ from the dropdown menu in the upper left and press ’Save as’. I will call this ‘Meridian.RESP’. You could also call it ‘Meridian.seed' or something like this. The ‘.seed’ extension is usually what people use. 


Press ‘Exit’ in the upper right corner to leave the program.

Now we move to a new piece of software to create a station XML file.

8) You should download the .jar file at https://seiscode.iris.washington.edu/projects/stationxml-converter/files

You can find the wiki help here: https://seiscode.iris.washington.edu/projects/stationxml-converter/wiki

We will use the option --xml to
Convert SEED to FSDN StationXML format

I saved the Meridian.RESP in the PDCC-3.8 folder so my command looks like:

$ java -jar stationxml-converter-1.0.9.jar --xml --source "IRIS DMC" --output Meridian.xml PDCC-3.8/Meridian.RESP

This creates the xml file Meridian.xml from the dateless SEED file PDCC-3.8/Meridian.RESP. Now we can read this xml file into obspy and make the instrument deconvolution.

9) In python we can load the XML file with Obspy

#--------------------------------------------------------------------------------------------------------------------------
from obspy import read, read_inventory

# This script will remove the instrument deconvolution of one station from the 
# Llaima array using the station XML file that we created from PDCC-3.8.

# The response infromation is included in ObsPy as a StationXML file
inv = read_inventory("/Users/dmikesell/DropboxMIT/ewing_share/Make_SEED_RESP_Files/Meridian.xml")

#--------------------------------------------------------------------------------------------------------------------------

looking at the variable ‘inv’ we see this

In [3]: inv
Out[3]: 
Inventory created at 2015-11-16T19:01:30.733000Z
    Created by: fdsn-stationxml-converter/1.0.9
            http://www.iris.edu/fdsnstationconverter
    Sending institution: IRIS DMC
    Contains:
        Networks (1):
            LL
        Stations (7):
            LL.BVL (Best view of Llaima)
            LL.CTF (Cross three fields)
            LL.DTH (Summit of Llaima Volcano)
            LL.HFH (Hard for horses)
            LL.HRD (Hard station)
            LL.HRS (Horse)
            LL.LST (Last station)
        Channels (21):
            LL.BVL..HHE, LL.BVL..HHN, LL.BVL..HHZ, LL.CTF..HHE, LL.CTF..HHN,
            LL.CTF..HHZ, LL.DTH..HHE, LL.DTH..HHN, LL.DTH..HHZ, LL.HFH..HHE,
            LL.HFH..HHN, LL.HFH..HHZ, LL.HRD..HHE, LL.HRD..HHN, LL.HRD..HHZ,
            LL.HRS..HHE, LL.HRS..HHN, LL.HRS..HHZ, LL.LST..HHE, LL.LST..HHN,
            LL.LST..HH


We see that we have all of the channels and all of the stations from the Llaima array. Now we just need to read a piece of data and make the deconvolution. We add a few lines to the python code to read a 30 minute data file and do the deconvolution

#--------------------------------------------------------------------------------------------------------------------------
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 16 12:05:26 2015

@author: dmikesell
"""

from obspy import read, read_inventory

# This script will remove the instrument deconvolution of one station from the 
# Llaima array using the station XML file that we created from PDCC-3.8.

# The response infromation is included in ObsPy as a StationXML file
inv = read_inventory("/Users/dmikesell/Dropbox/ewing_share/Make_SEED_RESP_Files/Meridian.xml")

# simply use the included example waveform
st = read("/Volumes/data/sacData/DTH/LL.DTH.HHE.2015.063.15.47.05.SAC")
# make a copy of original data so we can compare before and after deconvolution
st2 = st.copy()

# the helper routine automatically picks the correct response for each trace
# the routine returns a list of traces for which no matching response could
# be found in the inventory
st.attach_response(inv)

# define a filter band to prevent amplifying noise during the deconvolution
pre_filt = (0.005, 0.006, 30.0, 35.0)

# remove the instrument response
st.remove_response(output='DISP', pre_filt=pre_filt)

st.plot()
st2.plot()
#--------------------------------------------------------------------------------------------------------------------------

Then we get the following plots. Notice that the units are different because we have converted from COUNTS to DISPLACEMENT.

DECONVOLVED

ORIGINAL