.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_auto_examples_1D_1_examples_plot_4_FTIR.py>`     to download the full example code
    .. rst-class:: sphx-glr-example-title

    .. _sphx_glr_auto_examples_1D_1_examples_plot_4_FTIR.py:


Fourier Transform Infrared Spectroscopy (FTIR) dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The following
`FTIR dataset <http://wwwchem.uwimona.edu.jm/spectra/index.html>`_,
was obtained as a JCAMP-DX file, and subsequently converted to the CSD model
file-format. The data structure of the FTIR dataset follows,


.. code-block:: default

    import csdmpy as cp

    filename = "https://osu.box.com/shared/static/0iw0egupb1hkulkbdq4hagzzhkbvqjkv.csdf"
    FTIR_data = cp.load(filename)
    print(FTIR_data.data_structure)





.. rst-class:: sphx-glr-script-out

 Out:

 .. code-block:: none

    {
      "csdm": {
        "version": "1.0",
        "read_only": true,
        "timestamp": "2019-07-01T21:03:42Z",
        "description": "An IR spectrum of caffeine.",
        "dimensions": [
          {
            "type": "linear",
            "count": 1842,
            "increment": "1.930548614883216 cm^-1",
            "coordinates_offset": "449.41 cm^-1",
            "quantity_name": "wavenumber",
            "reciprocal": {
              "quantity_name": "length"
            }
          }
        ],
        "dependent_variables": [
          {
            "type": "internal",
            "name": "Caffeine",
            "numeric_type": "float32",
            "quantity_type": "scalar",
            "component_labels": [
              "Transmittance"
            ],
            "components": [
              [
                "99.31053, 99.08212, ..., 100.22944, 100.22944"
              ]
            ]
          }
        ]
      }
    }




and the corresponding plot.


.. code-block:: default


    cp.plot(FTIR_data, reverse_axis=[True])




.. image:: /auto_examples/1D_1_examples/images/sphx_glr_plot_4_FTIR_001.png
    :class: sphx-glr-single-img





Because, FTIR spectrum is conventionally displayed on a reverse axis, an
optional `reverse_axis` argument is provided to the :meth:`~csdmpy.plot` method.
Its value is an order list of boolean, corresponding to the order of the
dimensions.


.. rst-class:: sphx-glr-timing

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


.. _sphx_glr_download_auto_examples_1D_1_examples_plot_4_FTIR.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_4_FTIR.py <plot_4_FTIR.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_4_FTIR.ipynb <plot_4_FTIR.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
