https://github.com/anowacki/quakeml.jl
Read and write QuakeML in Julia
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
Keywords from Contributors
Repository
Read and write QuakeML in Julia
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 3
Topics
Metadata Files
README.md
QuakeML
Build 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 prefixQuakeML.)QuakeML.readstring: Read a QuakeML document from a string. (This function is not exported.)write: Write a set ofEventParametersas a QuakeML XML document.preferred_focal_mechanism: Get the preferred focal mechanism for an eventpreferred_magnitude: Get the preferred magnitude for an eventpreferred_origin: Get the preferred origin for an eventhas_focal_mechanism: Check to see if an event contains any focal mechanismshas_magnitude: Check to see if an event contains any magnitudehas_origin: Check to see if an event contains any originsquakeml: Create an XML document from a set of events which can be written withprint(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
- Website: http://homepages.see.leeds.ac.uk/~earanow/
- Repositories: 57
- Profile: https://github.com/anowacki
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
Top Committers
| Name | 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
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
- Documentation: https://docs.juliahub.com/General/QuakeML/stable/
- License: MIT
-
Latest release: 0.1.2
published almost 3 years ago
Rankings
Dependencies
- 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
- JuliaRegistries/TagBot v1 composite