Skip to content

savage13/miniseed-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniseed

MiniSEED Library for rust

This is a interface library over the libmseed C library that can be found at https://github.com/iris-edu/libmseed

For information about the data formats, see:

Usage

Add this to your Cargo.toml:

[dependencies]
miniseed = "^1"

and this to your crate root:

extern crate miniseed;

Examples

Read a single record from a file and display its metadata:

extern crate miniseed;

use miniseed::ms_record;

fn main() {
    let file = "tests/sample.miniseed";
    let m = ms_record::read(file);
    println!("{}", m);
}

Read from input.mseed, and write only those records from the network AU to output.mseed:

extern crate miniseed;

use miniseed::{ms_input, ms_output};

fn main() {
    let input = ms_input::open("input.mseed");
    let mut output = ms_output::open("output.mseed").unwrap();

    for record in input {
        if record.network() == "AU" {
            output.write(&record);
        }
    }
}

Documentation

https://docs.rs/miniseed/

About

MiniSEED library for rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published