Skip to main content

Python tools for (some) SCIAMACHY data

Project description

SCIAMACHY data tools

builds docs coveralls scrutinizer

doi code doi mcmc samples

Overview

These SCIAMACHY tools are provided as convenience tools for handling SCIAMACHY level 1c limb spectra and retrieved level 2 trace-gas densities.

More extensive documentation is provided on sciapy.rtfd.io.

Level 1c tools

The sciapy.level1c submodule provides a few conversion tools for SCIAMACHY level 1c calibrated spectra, to be used as input for trace gas retrieval with scia_retrieval_2d.

Note that this is not a level 1b to level 1c calibration tool.

For calibrating level 1b spectra (for example SCI_NL__1P version 8.02 provided by ESA via the ESA data browser) to level 1c spectra, use the SciaL1C command line tool or the free software nadc_tools. The first produces .child files, the second can output to HDF5 (.h5).

Further note: .child files are currently not supported.

Level 2 tools

The sciapy.level2 submodule provides post-processing tools for trace-gas densities retrieved from SCIAMACHY limb scans. Support simple operations as combining files into netcdf, calculating and noting local solar time at the retrieval grid points, geomagnetic latitudes, etc.

The level 2 tools also include a simple binning algorithm.

Regression

The sciapy.regress submodule can be used for regression analysis of SCIAMACHY level 2 trace gas density time series, either directly or as daily zonal means. It uses the regressproxy package for modelling the proxy input with lag and lifetime decay. The regression tools support various parameter fitting methods using scipy.optimize and uncertainty evaluation using Markov-Chain Monte-Carlo sampling with emcee. Further supports covariance modelling via celerite and george.

Install

Prerequisites

Sciapy uses features from a lot of different packages. All dependencies will be automatically installed when using pip install or python setup.py, see below. However, to speed up the install or for use within a conda environment, it may be advantageous to install some of the important packages beforehand:

  • numpy at least version 1.13.0 for general numerics,
  • scipy at least version 0.17.0 for scientific numerics,
  • matplotlib at least version 2.2 for plotting,
  • netCDF4 for the low level netcdf4 interfaces,
  • h5py for the low level hdf5 interfaces,
  • dask,
  • toolz,
  • pandas and
  • xarray for the higher level data interfaces,
  • astropy for (astronomical) time conversions,
  • parse for ASCII text parsing in level1c,
  • pybind11 C++ interface needed by celerite
  • celerite at least version 0.3.0 and
  • george for Gaussian process modelling,
  • emcee for MCMC sampling and
  • corner for the sample histogram plots,
  • regressproxy for the regression proxy modelling.

Out of these packages, numpy is probably the most important one to be installed first because at least celerite needs it for setup. It may also be a good idea to install pybind11 because both celerite and george use its interface, and both may fail to install without pybind11.

Depending on the setup, numpy and pybind11 can be installed via pip:

pip install numpy pybind11

or conda:

conda install numpy pybind11

sciapy

Official releases are available as pip packages from the main package repository, to be found at https://pypi.org/project/sciapy/, and which can be installed with:

$ pip install sciapy

The latest development version of sciapy can be installed with pip directly from github (see https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support and https://pip.pypa.io/en/stable/reference/pip_install/#git):

$ pip install [-e] git+https://github.com/st-bender/sciapy.git

The other option is to use a local clone:

$ git clone https://github.com/st-bender/sciapy.git
$ cd sciapy

and then using pip (optionally using -e, see https://pip.pypa.io/en/stable/reference/pip_install/#install-editable):

$ pip install [-e] .

or using setup.py:

$ python setup.py install

Usage

The whole module as well as the individual submodules can be loaded as usual:

>>> import sciapy
>>> import sciapy.level1c
>>> import sciapy.level2
>>> import sciapy.regress

Basic class and method documentation is accessible via pydoc:

$ pydoc sciapy

The submodules' documentation can be accessed with pydoc as well:

$ pydoc sciapy.level1c
$ pydoc sciapy.level2
$ pydoc sciapy.regress

License

This python package is free software: you can redistribute it or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (GPLv2), see local copy or online version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sciapy-0.0.8.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

sciapy-0.0.8-py2.py3-none-any.whl (1.3 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file sciapy-0.0.8.tar.gz.

File metadata

  • Download URL: sciapy-0.0.8.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for sciapy-0.0.8.tar.gz
Algorithm Hash digest
SHA256 648604d9e8da1b52d33f4043974e7a36dae8090ffe76bd573b5b7ef42b5974bd
MD5 da0bb2e8e1aca76acaef1d39cd5d1f84
BLAKE2b-256 94510ce0c05a473c7a7e64dfcb61712a27844b0f250db774163f75fe0cc6dc1f

See more details on using hashes here.

File details

Details for the file sciapy-0.0.8-py2.py3-none-any.whl.

File metadata

  • Download URL: sciapy-0.0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for sciapy-0.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8b9a45c4cc87b8eec825f1e76d7ca6ba8888ca344b264c9dfe4c1a064a408796
MD5 178614c1ff5d296e2146d5450a6bc52d
BLAKE2b-256 5504ad724f317b11376eecd02af200df218ec2f576553ed64d8b9af930f09bdc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page