Hi,

I think there's no fully automatic tool to convert from Seisan FAP to any other format yet, unfortunately. Here's the general workflow that I used for converting from Seisan responses to stationXML is as follows:

1. For Seisan FAP files: use program RESP and manually enter the parameters of the seismometer described in the Seisan file to create a GSE2-file. (For Seisan PAZ files, use program GSERESP to convert from Seisan to GSE).

For your example in MBRY_A_JN.1996-10-01-0000, the commands would be:

 * RESP
 * 4 (GSE2 PAZ)
 * 3 (Accelerometer)
 * *** see below: step not applicable here, only needed if above choice
   is "2" - seismometer -- see *** below
 * 500 (loaded generator constant, 3rd value in 3rd line)
 * LA10 (seismometer type,  from 2nd line)
 * 1000000 (recording media gain, 5th value in 3rd line)
 * 50 (sampling rate - this is a guess, it's not in Seisan resp-file
   and needs to be checked from waveform database)
 * 2430ILI (digitizer model, from 2nd line)
 * 1.0 (or ENTER; amplifier gain 4th value from 3rd line if value is
   not Zero)
 * 1 (number of filters: count number of non-zero value pairs in
   3rd+4th line that come after the first 6 values, i.e.,
   ...1.000  -2.000   0.000   0.000
       0.000   0.000   0.000   0.000   0.000   0.000   0.000 0.000  
   0.000   0.000 means 1 filter
 * 1 -2 (poles and zeros)
 * ENTER (no file given for Poles and Zeros)
 * ENTER (no FIR filters)
 * ENTER (no file for measured values)
 * ENTER
 * Y (GSE response file)
 * MBRY (station code)
 * A  N (component code; check if you'd like to adjust this to
   modernized FDSN-compliant values)
 * 19961001 (start date, from file name)
 * ENTER


*** if instrument is seismometer and not accelerometer, these 2 steps are required as 3rd + 4th answer in list above:

 * 1.0 (seismometer natural period, 1st value in 3rd line of file
   MBRY_A_JN.1996-10-01-0000)
 * 0.7 (damping ratio, 2nd value in 3rd line)

2. Check the plot that now opens, and compare it to a plot of the response for the Seisan FAP-file (use PRESP to plot, with input file MBRY_A_JN.1996-10-01-0000). They should look exactly the same.

3. Manually enter response end time (e.g. 1997-10-01) into the newly created GSE file (MBRY_A__N.1996-10-01-0000_GSE), so that it looks like: CAL2 MBRY  A N      LA10     0.70E+00       1.   50.00000 1996/10/01 00:00 1997/10/01 00:00

3. Once you have converted all Seisan files for a station, use program GSERESP2SEED to convert from GSE2 to dataless SEED. It will do some checks and enter some metadata from Seisan's STATION0.HYP file (e.g., latitude, longitude, elevation).

4. Read SEED file straight into Obspy and write to stationXML, or use IRIS's stationXML-seed-converter <https://github.com/iris-edu/stationxml-seed-converter> as a standalone tool to convert to stationXML.


The steps under 1) can probably be scripted in a shell to read the values from FAP file and send as inputs to the program. But if you want to include the correct information on the sampling rate you may have to query the waveform database, and for the correct seismometer and digitizer models you need to check that all comment lines are written in the same format (has free formatting in Seisan FAP files). So depending on the number of files that you want to convert doing it manually gives you some extra QC.

Cheers,
Felix


On 09/07/2021 16.25, Glenn Thompson wrote:

Hi Andy,

I have many of these FAP files from the Montserrat analog and digital networks from 1996-2004. An example of each attached.

Glenn

*From: *Lockhart, Andrew B <abl...@usgs.gov>
*Date: *Friday, July 9, 2021 at 10:14 AM
*To: *Glenn Thompson <thomps...@usf.edu>, seisan@geo.uib.no <seisan@geo.uib.no>
*Subject: *Re: [EXTERNAL] [seisan] Seisan FAP file format to StationXML?

Hello Glenn -

I'm struggling with getting analog responses into StationXML right now (like, today). Can you send me a file or two to look at? When do these date from?

-Andy

------------------------------------------------------------------------

*From:*seisan-boun...@geo.uib.no <seisan-boun...@geo.uib.no> on behalf of Glenn Thompson <thomps...@usf.edu>
*Sent:* Friday, July 9, 2021 6:48 AM
*To:* seisan@geo.uib.no <seisan@geo.uib.no>
*Subject:* [EXTERNAL] [seisan] Seisan FAP file format to StationXML?

* This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding. *

Hi Seisan community,

I have many Seisan CAL files in what I believe is Seisan FAP format, which is described in Appendix C of the Seisan manual.

What is the best way to convert these Seisan FAP files into StationXML? I want to construct an ObsPy workflow to correct Seisan WAV files from counts to m/s using the full instrument response from these Seisan FAP files.

For comparison, I do also have many RESP files in my Seisan CAL directory for later years. I can process these to StationXML like this:

from obspy.io.xseed.core import _read_resp

this_inv = _read_resp(respfile)

this_inv.write(xmlfile , format="STATIONXML")

but I have not find a way to read the Seisan FAP files with ObsPy. I would guess people have solved this problem before though.

Cheers,

Glenn

*[EXTERNAL EMAIL]*DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.


_______________________________________________
seisan mailing list
seisan@geo.uib.no
https://mailman.uib.no/listinfo/seisan

--
Felix Halpaap| Postdoctoral Research Fellow | Dep. of Earth Science | 
University of Bergen
Allégaten 41, 5007 Bergen, Norway |  Office 2B18  | felix.halp...@uib.no | +47 
55 58 34 11

_______________________________________________
seisan mailing list
seisan@geo.uib.no
https://mailman.uib.no/listinfo/seisan

Reply via email to