Skip to main content

igwn_ligolw/
lib.rs

1//! Rust-native reader and writer for the LIGO_LW XML format.
2//!
3//! LIGO_LW is the XML container used across the International
4//! Gravitational-Wave Observatory Network for tabular event data
5//! (single-detector triggers, coincidences, sky-map metadata) as well
6//! as the diagnostic-test (DTT) document family. This crate parses
7//! LIGO_LW documents into typed Rust structures, writes them back out
8//! in a round-trippable form, and transparently decompresses gzip
9//! input (and, behind feature flags, bzip2 and xz).
10//!
11//! The parser is intentionally tolerant of the LIGO_LW format quirks
12//! observed in real files emitted by the LVK low-latency pipelines
13//! (gstlal, mbta, pycbc, spiir, aframe, cwb, mly): mixed whitespace,
14//! trailing delimiters, quoted strings with embedded commas, modern
15//! `int_8s` identifiers alongside legacy `ilwd:char` strings, and
16//! cross-table column-name prefixes.
17
18mod coinc;
19mod document;
20mod error;
21mod parser;
22mod stream;
23mod types;
24mod value;
25mod writer;
26
27pub use coinc::{CoincInspiralEvent, SnglInspiral};
28pub use document::{
29    Array, ArrayEncoding, Child, Column, Dim, Document, GenericElement, LigoLwElement, Param,
30    Table, Time,
31};
32pub use error::{Error, Result};
33pub use parser::{parse_bytes, parse_path, parse_reader};
34pub use types::LigoType;
35pub use value::Value;
36pub use writer::{write_to_bytes, write_to_path, write_to_writer};