JASCOFiles.jl

JASCOFiles.jl reads JASCO spectrometer files (FTIR, Raman, UV-Vis): the CSV/text
exports from Spectra Manager, and the native binary .jws / .jrs files
directly — no manual export step. Both binary generations are supported:
the modern flat format (current Spectra Manager and instrument firmware) and
the legacy OLE-container format written by Spectra Manager 1.x, including
Raman files with non-linear CCD axes. The two share the .jws extension and
are told apart by their magic bytes automatically.
.jws is written by the desktop Spectra Manager software; .jrs is the same
spectrum as written by the spectrometer’s onboard firmware. Everything decodes
to the same JASCOSpectrum.
Installation
To install JASCOFiles.jl, use the Julia package manager:
using Pkg
Pkg.add("JASCOFiles")
Usage
using JASCOFiles
# Load a spectrum (works for FTIR, Raman, or UV-Vis)
s = JASCOSpectrum("path/to/spectrum.csv")
# Native binary files work through the same entry point
s = JASCOSpectrum("path/to/spectrum.jws") # or .jrs
# Access data
s.x # wavenumber or wavelength
s.y # absorbance, intensity, etc.
s.xunits # "1/CM", "nm", etc.
s.yunits # "ABSORBANCE", "INTENSITY", etc.
s.datatype # "INFRARED SPECTRUM", "RAMAN SPECTRUM", etc.
# Type predicates for dispatch
isftir(s) # true if FTIR spectrum
israman(s) # true if Raman spectrum
isuvvis(s) # true if UV-Vis spectrum
# All metadata from header and footer
s.metadata["TIME"]
s.metadata["Accumulation"]
Convenience features
# Copy a spectrum with selected fields replaced
s2 = JASCOSpectrum(s; title="corrected", y=s.y .- minimum(s.y))
# Footer keys with Japanese names are also accessible via English aliases
s.metadata["積算回数"] # "16"
s.metadata["Accumulation"] # "16"
s.metadata["光源"] # "Standard light source"
s.metadata["Light source"] # "Standard light source"
Supported Instruments
| Instrument |
datatype field |
CSV |
Modern binary |
Legacy binary |
| FTIR |
"INFRARED SPECTRUM" |
✓ |
✓ |
✓ |
| Raman |
"RAMAN SPECTRUM" |
✓ |
— |
✓ (NRS series) |
| UV-Vis |
"UV/VIS SPECTRUM" or blank |
✓ |
✓ |
— |
Binary dates are stored by the instrument in UTC and returned as such; CSV
exports carry instrument-local wall time.
If you have a file from an instrument, firmware version, or file-format variant not covered above, please open an issue or PR with a representative file attached.
评论