← Back to all sparks
L

lightr

ANALYTICS
Velocity0.0

Import spectral data and related metadata in R. Contribute to ropensci/lightr development by creating an account on GitHub.

Reorganised its parsers by vendor, then opened the parser slot to users.

spectrometryfile-parsersbreaking-changeextensibilityr-package
Current state
lightr reads spectrometry files from the proprietary formats that instrument vendors ship, and its recent releases have been about the structure of that parser collection rather than adding one more format. Version 2.0.0 renamed every low-level parser from lr_parse_<extension>() to lr_parse_<brand>_<extension>(), a breaking change made specifically so two vendors can share a file extension without colliding, and restored binary parsing for Avantes AvaSoft 8.4 using vendor-supplied format documentation. Version 2.1.0 follows through by exposing a parser argument on the high-level functions.
Where it's heading
The package is moving from a fixed set of formats it knows about to a dispatch system users can extend. The brand-qualified naming and the parser argument are two halves of the same design: name parsers unambiguously, then let callers select or supply one. Alongside that runs steady attention to metadata fidelity — measurement timestamps, checksum verification against tampering, and timezone handling that survived upstream tzdata removing legacy codes.
Prediction
Expect additional vendor parsers to arrive under the new brand-qualified scheme, and the custom-parser path to absorb formats the maintainers do not want to support directly. The entries do not name specific instruments planned next.

Recent moves

  1. 1mo ago

    High-level functions accept a custom parser argument

    Completes the restructuring 2.0.0 began: callers can now force a specific bundled parser or supply their own function, so an unsupported instrument format no longer requires a package change. Two OceanOptics parsers also got roughly 2x and 1.5x faster.

    View source ↗
  2. 1mo ago

    Parsers renamed by vendor; Avantes binary support restored

    ⚡ SPARK

    The structural release the package needed before it could grow: parser names are now qualified by brand, which is what makes per-vendor dispatch possible, and the extensibility work in 2.1.0 follows directly from it. Restoring the Avantes AvaSoft 8.4 binary formats also brings back a class of files the package had lost.

    View source ↗
  3. 1y ago

    Checksum verification and measurement timestamps in metadata

    lr_parse_procspec() gains checksum verification to detect files altered since the instrument software wrote them, and several parsers now return measurement date and time in their metadata. Both are provenance features, which is where much of this package's value sits for reproducible analysis.

    View source ↗
  4. 1y ago

    Reworks timezone handling after tzdata dropped legacy codes

    Upstream tzdata 2024b removed codes such as CET and EST, so OceanOptics timezone conversion had to be rebuilt internally. The release also raises the R requirement to 4.0.0 and declares future as a direct dependency.

    View source ↗
  5. 2y ago

    Adds lintr and stabilises floating-point tests

    Internal-only work: linting is now enforced and floating-point precision issues that caused CRAN test failures are handled. No user-visible change.

    View source ↗
  6. 4y ago

    Parser errors surface as warnings instead of being silenced

    Errors in low-level parsers now propagate as warnings through the high-level functions rather than disappearing, which turns a class of silent data loss into something the user can see. Avantes IRR8 irradiance files also become explicitly supported.

    View source ↗