spectrochempy.read_topspin
- read_topspin(*paths, **kwargs)[source][source]
Open Bruker TOPSPIN (NMR) dataset.
- Parameters:
*paths (str, optional) – Paths of the Bruker directories to read.
**kwargs (keyword parameters, optional) – See Other Parameters.
- Returns:
object (
NDDatasetor list ofNDDataset) – The returned dataset(s).- Other Parameters:
expno (
int, optional) – Experiment number.procno (
int, optional) – Processing number.use_list (
boolorstr, optional, default:False) – Whether to use a list to make indirect coordinates for pseudo-2D spectra (e.g., for relaxation experiments). IfTruethe listvdlistis used. If a string, the list with the given name is used.protocol (
str, optional) –Protocolused for reading. It can be one of {'scp','omnic','opus','topspin','matlab','jcamp','csv','excel'}. If not provided, the correct protocol is inferred (whenever it is possible) from the filename extension.directory (
Pathobject objects or valid urls, optional) – From where to read the files.merge (
bool, optional, default:False) – IfTrueand several filenames or adirectoryhave been provided as arguments, then a singleNDDatasetwith merged (stacked along the first dimension) is returned.sortbydate (
bool, optional, default:True) – Sort multiple filename by acquisition date.description (
str, optional) – A Custom description.origin (one of {
'omnic','tga'}, optional) – Used when reading with the CSV protocol. In order to properly interpret CSV file it can be necessary to set the origin of the spectra. Up to now only'omnic'and'tga'have been implemented.csv_delimiter (
str, optional, default:csv_delimiter) – Set the column delimiter in CSV file.content (
bytesobject, optional) – Instead of passing a filename for further reading, a bytes content can be directly provided as bytes objects. The most convenient way is to use a dictionary. This feature is particularly useful for a GUI Dash application to handle drag and drop of files into a Browser.iterdir (
bool, optional, default:True) – IfTrueand no filename was provided, all files present in the provideddirectoryare returned (and merged ifmergeisTrue. It is assumed that all the files correspond to current reading protocol.Changed in version 0.6.2:
iterdirreplace the deprecatedlistdirargument.
See also
readGeneric reader inferring protocol from the filename extension.
read_zipRead Zip archives (containing spectrochempy readable files)
read_dirRead an entire directory.
read_opusRead OPUS spectra.
read_labspecRead Raman LABSPEC spectra (
.txt).read_omnicRead Omnic spectra (
.spa,.spg,.srs).read_socRead Surface Optics Corps. files (
.ddr,.hdror.sdr).read_galacticRead Galactic files (
.spc).read_quaderaRead a Pfeiffer Vacuum’s QUADERA mass spectrometer software file.
read_csvRead CSV files (
.csv).read_jcampRead Infrared JCAMP-DX files (
.jdx,.dx).read_matlabRead Matlab files (
.mat,.dso).read_carroucellRead files in a directory after a carroucell experiment.
read_wireRead REnishaw Wire files (
.wdf).
Examples using spectrochempy.read_topspin
Sine bell and squared Sine bell window multiplication
Processing NMR spectra (slicing, baseline correction, peak picking, peak fitting)