.. ICARTT documentation master file, created by
   sphinx-quickstart on Thu Feb 10 09:33:37 2022.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

icartt
============================

icartt is an ICARTT file format reader and writer

The ICARTT data format is described here: https://www-air.larc.nasa.gov/missions/etc/IcarttDataFormat.htm

.. toctree::
   :maxdepth: 2
   :caption: Contents:

Installation
------------

.. include:: ../../INSTALL.rst

Example
------------

::

   import icartt

   # load a new dataset from an existing file
   ict = icartt.Dataset('path/to/example.ict')

   # list variable names
   ict.varnames
   # e.g. ['Fractional_Day', 'UTC', 'JDAY', 'INDEX', 'FLIGHT', 'LOCAL_SUN_TIME', ...

   # get data for variable 'UTC':
   ict['UTC']

   # some metadata
   ict.organization
   ict.dataSource
   ict.mission

   # write to (other) file:
   with open('path/to/output.ict', 'wb') as f:
      ict.write(f)

API
----

.. module:: icartt

Variable
^^^^^^^^^^

.. autoclass:: Variable
   :members:

Dataset
^^^^^^^^^^

.. autoclass:: Dataset
   :members:

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
