Loading RAMAN experimental file

Here we load experimental LABSPEC spectra and plot them.

import spectrochempy as scp

Read and plot a single file

A = scp.read_labspec("ramandata/labspec/Activation.txt")
A
NDDataset [Activation] — float64, shape: (y:532, x:1024)
name
:
Activation
author
:
runner@runnervmlun5p
created
:
2026-09-09 20:34:41+00:00
description
:
Spectrum acquisition : 2016-05-01 11:22:14
history
:
2026-09-09 20:34:41+00:00> Imported from LabSpec6 text file /home/runner/.spectrochempy/testdata/ramandata/labspec/Activation.txt
Data
title
:
Counts
values
:
[[3.277e+05 3.278e+05 ... 7.594e+05 7.607e+05]
[3.239e+05 3.252e+05 ... 7.513e+05 7.501e+05]
...
[5.711e+04 5.69e+04 ... 9.721e+04 9.697e+04]
[ 3831 3826 ... 6476 6385]]
shape
:
(y:532, x:1024)
Dimension `x`
size
:
1024
title
:
Raman shift
coordinates
:
[ 198.2 199.8 ... 1692 1693] cm⁻¹
Dimension `y`
size
:
532
title
:
Time
coordinates
:
[ 0 308.4 ... 1.689e+05 1.692e+05] s
labels
:
[ 2016-05-01 11:22:14 2016-05-01 11:27:14 ... 2016-05-03 07:32:14 2016-05-03 07:37:14]


_ = A.plot()
plot read raman from labspec

Explore with different plot types

As a 2D dataset, we can display it as an image:

_ = A.plot_image()
plot read raman from labspec

or a contour plot:

_ = A.plot_map()
plot read raman from labspec

Read and merge multiple files

B = scp.read_labspec("ramandata/labspec/subdir")
_ = B.plot()
plot read raman from labspec

Uncomment the following line to display all figures when running the script directly with Python.

# scp.show()

Total running time of the script: (0 minutes 1.875 seconds)