Warning

You are reading the documentation related to the development version. Go here if you are looking for the documentation of the stable release.

spectrochempy.read_carroucell

read_carroucell(directory=None, **kwargs)[source]

Open .spa files in a directory after a carroucell experiment.

The files for a given sample are grouped in NDDatasets (sorted by acquisition date). The NDDatasets are returned in a list sorted by sample number. When the file containing the temperature data is present, the temperature is read and assigned as a label to each spectrum.

Parameters
  • directory (str, optional) – If not specified, opens a dialog box.

  • **kwargs (keyword parameters, optional) – See Other Parameters.

Returns

object (NDDataset or list of NDDataset) – The returned dataset(s).

Other Parameters
  • spectra (array-like of 2 int (min , max ), optional, default: None) – The first and last spectrum to be loaded as determined by their number. If None all spectra are loaded.

  • discardbg (bool, optional, default: True) – If True : do not load background (sample #9).

  • delta_clocks (int, optional, default: 0) – Difference in seconds between the clocks used for spectra and temperature acquisition. Defined as t(thermocouple clock) - t(spectrometer clock) .

See also

read

Generic reader inferring protocol from the filename extension.

read_zip

Read Zip archives (containing spectrochempy readable files)

read_dir

Read an entire directory.

read_opus

Read OPUS spectra.

read_labspec

Read Raman LABSPEC spectra (.txt).

read_omnic

Read Omnic spectra (.spa, .spg, .srs).

read_soc

Read Surface Optics Corps. files (.ddr , .hdr or .sdr).

read_galactic

Read Galactic files (.spc).

read_quadera

Read a Pfeiffer Vacuum’s QUADERA mass spectrometer software file.

read_topspin

Read TopSpin Bruker NMR spectra.

read_csv

Read CSV files (.csv).

read_jcamp

Read Infrared JCAMP-DX files (.jdx, .dx).

read_matlab

Read Matlab files (.mat, .dso).

read_wire

Read REnishaw Wire files (.wdf).

Notes

All files are expected to be present in the same directory and their filenames are expected to be in the format : X_samplename_YYY.spa and for the background files : X_BCKG_YYYBG.spa where X is the sample holder number and YYY the spectrum number.

Examples

>>> scp.read_carroucell("irdata/carroucell_samp")
no temperature file
[NDDataset: [float64] a.u. (shape: (y:6, x:11098)), NDDataset: ...