Dear collegs, recently I faced with one problem. I have a lot of event data in specific format, which named ‘ssd’. I need to convert ‘ssd’ files to quake xml with ‘Obspy’, because I should storage my data to seiscomp. I can read this ‘ssd’ format and make some ‘Obspy’ elements, like ‘Event’, ‘Pick’, ‘Magnitude’ and other. But I don’t understand how to parse amplitude information to ‘Amplitude’ class correctly.
In general, ‘ssd’ file consists this information about amplitude:
- Phase: S
- Time: 2021.07.31 00:33:29.8480 [time when I got amplitude value]
- Amplitude: 1.6899 [microns:second]
- Period: 0.208
I don’t understand how to add time to ‘Obspy’ class ‘Amplitude’ correctly.
I have 2 ideas:
- In ‘Amplitude’ class exists ‘pick_id’ field. I can create new ‘Pick’ object for each ‘Amplitude’ object, and add link in ‘Amplitude’ object. But I really don’t want to make confusion with ‘Pick’ s objects, because my collegs could get some problems with understanding this structure, when they will start work with this.
- In ‘Amplitude’ class exists ‘time_window’ field. I can save time data in this field. It looks simple, but maybe it is wrong way to time data storage.
Which way is correct?
If no one way is correct, can you give advice how to do it correctly?
I don’t think you need to create a dedicated extra pick object to accompany the amplitude element (as opposed to an actual pick object with a phase onset time). I would just put it in the
time_window attribute. But it’s hard to tell what you are looking at exactly without an example event in your “ssd” format.
Also, I might not be aware of all SeisComP related aspects, since that seems your main target. Maybe @droessler can say something if there is anything to keep in mind with respect to SeisComP aspects.
Note that Obspy can directly write scml event parameters: obspy.io.seiscomp - SeisComP XML inventory and event file support for ObsPy — ObsPy 1.4.0 documentation
The amplitude class has all the attributes you need. The relationship between amplitude and magnitude is explained in
It is hard (i.e., time-consuming) to code the making of these objects consistently. What is the system that produces these ssd files? Does it have other export formats compatible with Obspy (obspy.core.event.catalog.read_events — ObsPy 1.4.0 documentation) or can the authors be suggested to comply with community standards (quakeml or fdsnws )?
Yes, it is sounds good, but there is ‘pick_id’ field in ‘Amplitude’ class. What I should put in ‘pick_id’ field? Which ‘Pick’ was mattered in documentation about?
You can see example of ‘SSD’ file here GitHub - Berry-More/seiscomp-manager: All scripts and instructions for working with seiscomp data , after header SescompXML.
I read a lot of pages in documentation, but I couldn’t find information about which ‘Pick’ should be linked in ‘Amplitude’ class. May be it should be ‘Pick’ corresponding to time when I measure amplitude of seismic trace. It is first idea which came to my mind.
When I measure amplitude in programm, I choose two points on seismic trace. Between this points located max amplitude value. When I have chosen this points, programs algorithms find max amplitude value and set ‘pick’ on this time.
You can see example here About amplitude picks – Google Drive
A lot of the properties are optional, so probably just not set that pick ID field.