spectrochempy.write_jcamp
- write_jcamp(*args, **kwargs)[source]
Write a dataset in JCAMP-DX format.
(see Published JCAMP-DX Protocols http://www.jcamp-dx.org/protocols.html#ir4.24) Up to now, only IR output is available.
- Parameters
filename (str or pathlib object, optional) – If not provided, a dialog is opened to select a file for writing.
directory (str, optional) – Where to write the specified
filename. If not specified, write in the current directory.**kwargs – Additional keyword arguments accepted by the generic writer API. This specialized writer always exports JCAMP-DX files. Deprecated generic writer kwargs such as
protocol=anddescription=still emit aDeprecationWarning; removal remains warning-first and is governed by the SpectroChemPy deprecation lifecycle policy.
- Returns
out (
pathlibobject) – path of the saved file.
Examples
The extension will be added automatically >>> X.write_jcamp(‘myfile’)
Using the explicit namespace API >>> scp.jcamp.write(X, ‘myfile’)