Skip to content
index.rst 1.97 KiB
Newer Older
Christoph Knote's avatar
Christoph Knote committed
.. 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.

Christoph.Knote's avatar
Christoph.Knote committed
icartt
Christoph.Knote's avatar
Christoph.Knote committed
============================
Christoph.Knote's avatar
Christoph.Knote committed
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

Christoph Knote's avatar
Christoph Knote committed
.. toctree::
   :maxdepth: 2
   :caption: Contents:
.. include:: ../../INSTALL.rst
Using an existing dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^

::

   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

   # add data, depending of format and type of variable:
      - file type 1001, add value of independent variable:
      ivar.append(234.4)

      - file type 1001, add value of dependent variable:
      ivar.append(234.4, 18.2)

      
      - file type 2110, add value of independent (unbounded) variable:
      ivar.append(234.4)

      - file type 2110, add value of independent (bounded) variable:
      ivar.append(234.4, 9148.2)

      - file type 2110, add value of dependent variable:
      ivar.append(234.4, 9148.2, 34.2)

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

Creating a new dataset
^^^^^^^^^^^^^^^^^^^^^^^

::
   
   imoprt icartt

   ict = icartt.Dataset(format=icartt.Formats.FFI_1001)

   ict.IVAR



Christoph.Knote's avatar
Christoph.Knote committed
API
----

Christoph.Knote's avatar
Christoph.Knote committed
Variable
^^^^^^^^^^

Christoph.Knote's avatar
Christoph.Knote committed
.. autoclass:: Variable
   :members:
Christoph.Knote's avatar
Christoph.Knote committed

Dataset
^^^^^^^^^^

Christoph.Knote's avatar
Christoph.Knote committed
.. autoclass:: Dataset
   :members:
Formats
^^^^^^^^^^

.. autoenum:: Formats

Christoph Knote's avatar
Christoph Knote committed
Indices and tables
==================

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