Note
Go to the end to download the full example code.
Reading Renishaw WiRE files
This example shows how to read a Renishaw WiRE files (.wdf format).
The spectral data used has been downloaded from
https://github.com/alchem0x2A/py-wdf-reader (MIT License) and stored in the
local directory ramandata/wire.
The examples given here is a modified version of the original examples: See https://github.com/alchem0x2A/py-wdf-reader/blob/master/examples
Import the package
import spectrochempy as scp
Read a single spectrum
dataset = scp.read_wire("ramandata/wire/sp.wdf")
_ = dataset.plot()

Read a depth series
dataset = scp.read_wdf("ramandata/wire/depth.wdf")
_ = dataset.plot(method="image")

Handle diverging colormaps
A diverging colormap is triggered when negative values are present. Enforce a sequential colormap explicitly:

Alternatively, adjust diverging_margin to keep the default colormap:
_ = dataset.plot(method="image", diverging_margin=0.1)

Filter blank spectra

Read line scan and grid scan data
Line scan from a StreamLine HR measurement:

Grid scan data:
/home/runner/work/spectrochempy/spectrochempy/src/spectrochempy/core/readers/read_wire.py:198: UserWarning: Map area type is not specified, will assume a xy (column major) scan for the mapping data.
warning_(
This ends the example ! The following line can be uncommented if no plot shows when running the .py script with python
# scp.show()
Total running time of the script: (0 minutes 6.242 seconds)

