usgs / swarm

a Java application designed to display and analyze seismic waveforms in real-time.
http://volcanoes.usgs.gov/software/swarm
Other
36 stars 16 forks source link

QuakeML import #255

Closed alebrovelli closed 5 years ago

alebrovelli commented 5 years ago

Dear Diana, we met in Washington last Dec at ISTI class. I am writing as I believe we found an issue in the QuakeML event handling. If after picking and localization you save the event and import it back, picks are correcly placed on the waveforms (at least with ver 2.8.8). If the event is saved again, however, the pick time is truncated to the 1/10 of a sec. For example, after the first "export" the quakeml contains:

2014-05-05T22:13:34.992Z
                <uncertainty>0.01</uncertainty>
            </time>
            <waveformID channelCode="EHZ" networkCode="IV" stationCode="APPI"/>

Same event loaded back in swarm, and saved again with a different name

2014-05-05T22:13:34.900Z
                <uncertainty>0.01</uncertainty>
            </time>
            <waveformID channelCode="EHZ" networkCode="IV" stationCode="APPI"/>

This is very annoying as everytime you basically have to re-do the picking of all traces.

A general comment: the entire QuakeML import process seems a bit slow and sometimes fails for no clear reason. Maybe having a bit more feedback would improve the user experience.

Let me know if I should provide a more detailed test case. I can also help debugging.

Thank you for the great job you are doing. Kind regards, Alessandro

alebrovelli commented 5 years ago

Ok, I've spent some more time on this, and I need to correct myself. Also the time used to display the picks on the waveforms is incorrect, as it is truncated to the 10th of a second before. By looking into the code, it seems to me the method (or whathever it is called in java) that reads the pick time from the quakeml has someting incorrect. In particular, the time is rounded to the earliest 10th of second because of the call to QuakeMlUtils.parseDate() in TimeQuantity (from QuakeML). Regards, Alessandro

dlnorgaard commented 5 years ago

Thanks for the thorough troubleshooting, Alessandro. I believe the following commit will fix this issue: https://github.com/usgs/volcano-core/pull/84/commits/eb58a3075860c3f1ca91c9cc5704e4876e66b8fb

I'll have to release volcano-core, and then update Swarm with this release. I should be able to do it this week sometime.

alebrovelli commented 5 years ago

Thanks Diana! That would be great. Alessandro

dlnorgaard commented 5 years ago

2.8.9 released with this fix. Let me know if it doesn't fix your problem.

alebrovelli commented 5 years ago

Thanks! I tried getting the latest release from https://volcanoes.usgs.gov/software/swarm/, but apparently the zip is broken - it's 3.5Mb, while previous releases were 20+Mb.

dlnorgaard commented 5 years ago

Hi. Sorry about that. Please try again. I uploaded it again and this time confirmed that the downloaded file can unzip.