Closed calum-chamberlain closed 5 years ago
Without delving into the code, I suspect the pick attached is what kicked off the requirement for an amplitude, rather than anything related to the actual amplitude.
The automatic (or otherwise) system has made a P pick. It then requires an amplitude to go with it (for magnitude say) which is then used to define the "window" in which a peak amplitude is chosen.
This may help, I'm not 100% sure why (or where) the time of the actual peak is stored if at all.
This may help ... https://quake.ethz.ch/quakeml/QuakeML2.0/BasicEventDescription
I thought that might be the case. Unfortunately the QuakeML descriptions do not seem to be very prescriptive on what the associated pick should be (the discussion of individual attributes is here). The part on amplitude pick-ids reads:
Refers to the publicID of an associated Pick object.
However, this does seem to be the only place that the measurement time can be placed. In Seisan for example, a discrete Pick is made for every amplitude, which has timing information associated with it. When converting that to QuakeML every Amplitude has its own Pick.
So, while associating the amplitude with the pick that triggered the measurement likely falls with the scope of QuakeML, it doesn't seem like the best use of that slot. I think the amplitude measurements need to have an observation time associated with them - should this be something that should be taken up with the code developers?
I just has a quick check of how the NCEDC does it though, and for the first example I found with amplitude picks, their amplitude measurements are not associated with a pick and have no timing information.
from obspy.clients.fdsn import Client
client = Client("NCEDC")
ev = client.get_events(eventid="73129211", includearrivals=True)[0]
[amp for amp in ev.amplitudes if amp.magnitude_hint != "MD"][0]
Amplitude
resource_id: ResourceIdentifier(id="quakeml:nc.anss.org/Amp/NC/172413399")
generic_amplitude: 0.0014211
type: 'AML'
category: 'point'
unit: 'm'
waveform_id: WaveformStreamID(network_code='BK', station_code='DANT', channel_code='HHE', location_code='00')
magnitude_hint: 'ML'
evaluation_mode: 'manual'
evaluation_status: 'reviewed'
Hi @CallumNZ having had a quick look at the xml files the amplitudes are associated to a pick (or not) and yeap the amplitudes are measured from a reference time over a time window:
`
@salichon @calum-chamberlain 👍
@salichon thanks for that - just to check: For manually corrected amplitudes the reference time is the maximum amplitude, but for automatic ones it isn't? And the associated pick is never the time of the maximum amplitude?
@calum-chamberlain I haven t check the automatic solutions
the associated pick is never the time of the maximum amplitude ?
unless it has the largest amplitude - So yes i deem to consider associated pick time =/= max amplitude time
Cheers PS sorry @CallumNZ ! Jerome
Thanks for all the helpful info guys - I remain somewhat befuddled by the QML standard in certain places and have sent them an email to seek clarification on where stuff like this should be, mostly for some conversion things for obspy.
Happy to close this and thanks again!
For amplitude measurements made at a distinct time (generic amplitudes, ML amplitudes etc.) the QuakeMLs do not obviously link to the time that the measurement is taken at. QuakeML amplitudes do not include a
time
slot, but as far as I know this is usually handled by associating theAmplitude
with aPick
with the appropriate timing information. The only time information inAmplitude
appears to be intimeWindow
, which is documented as being:and contains a
begin
,end
andreferenceTime
attribute, which is not explicitly the time that the measurement was taken.For example (obspy for simplicity):
This contains a
time_window
attribute which I assume is the window that the automatic amplitude pick was made, and reference to a pick. Extracting the referenced pick returns a P pick, which does not correspond to the maximum amplitude:It doesn't look like Picks are being correctly associated with amplitudes. Thoughts? Should I be looking elsewhere for amplitude timing information?