aohma / fuvpy

Python code to work with FUV images
MIT License
3 stars 3 forks source link

Overview

The fuvpy package contains code to work with global Far-Ultraviolet (FUV) images of aurora. At present, the package includes functions to remove background emissions and to detect and model auroral boundaries.

The code uses xarray.Dataset objects to store the images. Functions to read .idl and .sav files produced by fuview3 and xvis (IMAGE and Polar mission software) into this format are provided. Other formats need to be converted into a xarray.Dataset with coordinates ['date','row','col'] and data_vars = ['img','mlat','mlon','mlt','glat','glon','dza','sza']. Here, 'date' is the datetime of the images and 'row' and 'col' refer to the row and column of the camera (2D images). The data_vars are thus 3D arrays:

If needed, the magnetic coordinates can be calculated from the geographic coordinates (or vice versa) using e.g. apexpy (pip install apexpy). The solar zenith angle can be calculated based on the subsolar point, which is found using fuvpy.subsol()

Dependencies

fuvpy depends on the following:

You should also have git version >= 2.13

Install

Clone the repository::

git clone https://github.com/aohma/fuvpy

Use or create a virtual environment with conda or mamba where all dependencies are installed. A working environment is also provided in the repository. Here we create an environment called fuvpy-env as an example::

conda env create --name fuvpy-env --file fuvpy/binder/fuvpy-env.yml
conda activate fuvpy-env

Use pip to install in editable (development) mode::

pip install -e ./fuvpy