Thank you Felix for the comprehensive answer. Very useful.

Yes, the MBRY station is a seismometer and the ILI resampled the data at the 
observatory at a weird rate of 75.19 Hz. I'll draft a script to automate this 
after hand testing some examples. The LOC and CHAN codes are odd for this 
dataset. I have a Python code to fix those.

Cheers,

Glenn

From: [email protected] <[email protected]> On Behalf Of Felix 
Halpaap
Sent: Friday, July 9, 2021 1:49 PM
To: [email protected]
Subject: Re: [seisan] [EXTERNAL] Seisan FAP file format to StationXML?


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://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Firis-edu%2Fstationxml-seed-converter&data=04%7C01%7Cthompsong%40usf.edu%7C0f8927d3935743d51ef608d94301dbd6%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637614498264037983%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lmBcL1Jim1Wu9f5HaaxSGClkFxYv9oUUGhEfiHNBmzM%3D&reserved=0>
 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 <[email protected]><mailto:[email protected]>
Date: Friday, July 9, 2021 at 10:14 AM
To: Glenn Thompson <[email protected]><mailto:[email protected]>, 
[email protected]<mailto:[email protected]> 
<[email protected]><mailto:[email protected]>
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: [email protected]<mailto:[email protected]> 
<[email protected]><mailto:[email protected]> on behalf of 
Glenn Thompson <[email protected]><mailto:[email protected]>
Sent: Friday, July 9, 2021 6:48 AM
To: [email protected]<mailto:[email protected]> 
<[email protected]><mailto:[email protected]>
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

[email protected]<mailto:[email protected]>

https://mailman.uib.no/listinfo/seisan<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.uib.no%2Flistinfo%2Fseisan&data=04%7C01%7Cthompsong%40usf.edu%7C0f8927d3935743d51ef608d94301dbd6%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637614498264047976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ykf%2FqFYGvT6ORZFsG%2FdTdH3Dat0FG4Qj8Ionipva5J0%3D&reserved=0>

--

Felix Halpaap| Postdoctoral Research Fellow | Dep. of Earth Science | 
University of Bergen

Allégaten 41, 5007 Bergen, Norway |  Office 2B18  | 
[email protected]<mailto:[email protected]> | +47 55 58 34 11

[EXTERNAL EMAIL] DO NOT CLICK links or attachments unless you recognize the 
sender and know the content is safe.
_______________________________________________
seisan mailing list
[email protected]
https://mailman.uib.no/listinfo/seisan

Reply via email to