https://github.com/anowacki/quakeml.jl

Read and write QuakeML in Julia

https://github.com/anowacki/quakeml.jl

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

earthquake-data earthquakes quakeml seis-jl seismology

Keywords from Contributors

archival interactive sequences projection generic observability autograding hacking shellcodes modular
Last synced: 10 months ago · JSON representation

Repository

Read and write QuakeML in Julia

Basic Info
  • Host: GitHub
  • Owner: anowacki
  • License: other
  • Language: QML
  • Default Branch: master
  • Homepage:
  • Size: 560 KB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Topics
earthquake-data earthquakes quakeml seis-jl seismology
Created over 6 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

QuakeML

Build status

Build Status Coverage Status

Documentation

What is QuakeML.jl?

QuakeML.jl is a Julia package to read and write information about earthquakes and seismic events in the QuakeML format.

User-facing functions

  • QuakeML.read: Read a QuakeML file. (This function is not exported. and requires the module prefix QuakeML.)
  • QuakeML.readstring: Read a QuakeML document from a string. (This function is not exported.)
  • write: Write a set of EventParameters as a QuakeML XML document.
  • preferred_focal_mechanism: Get the preferred focal mechanism for an event
  • preferred_magnitude: Get the preferred magnitude for an event
  • preferred_origin: Get the preferred origin for an event
  • has_focal_mechanism: Check to see if an event contains any focal mechanisms
  • has_magnitude: Check to see if an event contains any magnitude
  • has_origin: Check to see if an event contains any origins
  • quakeml: Create an XML document from a set of events which can be written with print(io, quakeml(qml))

Examples

Reading

To read a QuakeML document on your computer (e.g., one of the ones supplied with QuakeML.jl), do: ```julia julia> using QuakeML

julia> qmlfile = joinpath(dirname(dirname(pathof(QuakeML))), "test", "data", "nepalmw7.2.qml");

julia> qml = QuakeML.read(qml_file) ```

To read a set of events from a string: julia julia> QuakeML.readstring(String(read(qml_file)))

Writing

To write a set of events to disk: julia julia> write("file/on/disk.xml", qml)

For more control of output, convert your set of EventParameters into an XML document, and write that: ```julia julia> xml = quakeml(qml);

julia> println("/tmp/quakeml_file.qml", quakeml(qml)) ```

Note that here xml is an EzXML.XMLDocument.

Or convert your XML document into a String: julia julia> str = string(xml)

Export of types

By default, QuakeML does not export the types it uses. The user should usually create sets of EventParameters, for example, by calling the type's qualified constructor: julia julia> QuakeML.EventParameters() QuakeML.EventParameters comment: Array{QuakeML.Comment}((0,)) event: Array{QuakeML.Event}((0,)) description: Missing missing creation_info: Missing missing public_id: QuakeML.ResourceIdentifier

To allow less typing, one could create a module alias, such as: julia julia> const QML = QuakeML

QuakeML.Types module

As an experimental feature, the user may use the QuakeML.Types module, which exports all the types which are needed to construct a full set of EventParameters. For example, to specify a catalogue with one event with an unspecified magnitude type with magnitude 1.0:

```julia julia> using QuakeML.Types

julia> event = Event(magnitude=[Magnitude(mag=1.0)]) QuakeML.Event description: Array{QuakeML.EventDescription}((0,)) comment: Array{QuakeML.Comment}((0,)) focalmechanism: Array{QuakeML.FocalMechanism}((0,)) amplitude: Array{QuakeML.Amplitude}((0,)) magnitude: Array{QuakeML.Magnitude}((1,)) stationmagnitude: Array{QuakeML.StationMagnitude}((0,)) origin: Array{QuakeML.Origin}((0,)) pick: Array{QuakeML.Pick}((0,)) preferredoriginid: Missing missing preferredmagnitudeid: Missing missing preferredfocalmechanismid: Missing missing type: Missing missing typecertainty: Missing missing creationinfo: Missing missing publicid: QuakeML.ResourceIdentifier ```

Repo status

QuakeML.jl is beta software. All functionality included is tested and works as advertised, but the public API of the package is still to be decided and may break in v0.2, as per SemVer. So long as any packages you have created declare their compatibility with QuakeML.jl correctly, this will cause no problems.

Activating debugging messages

To turn debugging messages on when running QuakeML, set the environment variable JULIA_DEBUG to QuakeML or "all", which can even be done at run time in the repl like so: julia julia> ENV["JULIA_DEBUG"] = QuakeML

Unsetting this value will turn these debugging messages off.

See the manual section on environment variables and logging messages for more information on setting the debug level for QuakeML or other modules.

Owner

  • Name: Andy Nowacki
  • Login: anowacki
  • Kind: user

Lecturer at the School of Earth and Environment, University of Leeds, studying the Earth's deep interior.

GitHub Events

Total
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 4
  • Pull request event: 4
  • Create event: 2
Last Year
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 4
  • Pull request event: 4
  • Create event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 70
  • Total Committers: 3
  • Avg Commits per committer: 23.333
  • Development Distribution Score (DDS): 0.1
Past Year
  • Commits: 2
  • Committers: 2
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Andy Nowacki a****i@l****k 63
dependabot[bot] 4****] 5
Andy Nowacki a****i@b****k 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 1
  • Total pull requests: 10
  • Average time to close issues: less than a minute
  • Average time to close pull requests: 3 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.2
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • JuliaTagBot (1)
Pull Request Authors
  • dependabot[bot] (10)
  • anowacki (6)
Top Labels
Issue Labels
Pull Request Labels
dependencies (10) github_actions (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 2 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
juliahub.com: QuakeML

Read and write QuakeML in Julia

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2 Total
Rankings
Dependent repos count: 9.9%
Dependent packages count: 38.9%
Average: 41.6%
Forks count: 53.5%
Stargazers count: 64.2%
Last synced: 11 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite