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.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.

  • protocol ({‘scp’, ‘matlab’, ‘jcamp’, ‘csv’, ‘excel’}, optional) – Protocol used for writing. If not provided, the correct protocol is inferred (whnever it is possible) from the file name extension.

  • directory (str, optional) – Where to write the specified filename . If not specified, write in the current directory.

  • description (str, optional) – A Custom description.

Returns

out (pathlib object) – path of the saved file.

Examples

The extension will be added automatically >>> X.write_jcamp(‘myfile’)