GithubHelp home page GithubHelp logo

andyto1234 / eispac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from usnavalresearchlaboratory/eispac

0.0 0.0 0.0 43.51 MB

Read the Docs

Home Page: https://eispac.readthedocs.io/en/latest/

License: MIT License

Python 100.00%

eispac's Introduction

EISPAC - EIS Python Analysis Code

eispac CI status Documentation Status

This software provides a set of tools for analyzing Hinode/EIS data within a python environment. The general approach is as follows:

  1. Sets of level 1 HDF5 files are processed from the latest EIS level 0 fits files and made available online by the NRL EIS team at https://eis.nrl.navy.mil/. The HDF5 files come in pairs of "data" and "header" files which contain corrected count rates, the calibration curve needed to convert counts into intensity, and all of the associated metadata and pointing information.

  2. This package provides python classes and functions that can read these hdf5 files, perform all of the necessary calibration and pointing adjustments, and create user-friendly python objects that can be manipulated as needed. Also included are functions for fitting the intensity profiles using the same template files and underlying methodology that is used in the IDL SolarSoft environment.

Please note that this package is under active development. If you have any questions or suggestions for future improvements, please email the development team

Installation and Requirements

Installing using pip

  1. Download or clone "eispac" to a convenient location on your computer (it does not matter where).
	> git clone https://github.com/USNavalResearchLaboratory/eispac.git
  1. Open a terminal and navigate to the directory
  2. To install:
	> python -m pip install .
  1. To upgrade:
	> python -m pip install --upgrade .

The package should then be installed to the correct location for your current Python environment. You can now import the package using import eispac. Since the package is not publically available or registered on PyPi,org, the only way to "update" the package is by repeating the process above (you do not need to uninstall the old version first, pip will automatically take care of that). A conda install script will be added in a future update

Required Packages

pip should automatically install the package dependencies. If it does not, here is a list of the required packages (older package versions might still work). Note: if you are using conda to manage your Python packages, you may wish to install or update the dependencies manually first, before installing eispac using pip.

  • python >= 3.7
  • numpy >= 1.18
  • scipy >= 1.4
  • matplotlib >= 3.1
  • h5py >= 2.9
  • astropy >= 3.1
  • sunpy >= 2.1
  • ndcube >= 2.0.0
  • parfive >= 1.5
  • python-dateutil>=2.8

Getting Started

  • Online user's guide: https://eispac.readthedocs.io/en/latest/index.html:

  • QUICK_GUIDE-cli.md: A very brief description of some command line tools for searching, downloading, and fitting the EIS observations

  • QUICK_GUIDE.md: A very brief description of EISPAC functions and objects.

  • examples: Tutorials using Juypter notebooks. In particular, eispac_tutorial.ipynb contains complete overview and introduction to using EISPAC

Code Organization

There are currently three core directories:

  1. eispac: main python code directory containing all of the programs required to read level 1 HDF5 files and fit templates and fit spectra using mpfit.

    Notable subdirectories:

    • ../eispac/core/: Main code directory. All functions here are loaded into the top-level namespace (i.e. eispac.{function name})
    • ../eispac/data/: Contains fitting templates for specific spectral lines. These HDF5 files are direct conversions of the ".genx" files used by some IDL users. Also included is an example EIS raster from 2021-03-06 at 06:44:44.
  2. scripts: GUI and command line tools

  3. docs: Source reStructuredText files used to build the online documentation

The QUICK_GUIDE.md text document also give a very brief overview of some key functions. It should also be noted that mpfit.py was written by Mark Rivers and Sergey Kopsov and is direct Python port of the mpfit.pro IDL procedure written by Craig Markwardt. As such, much of the documentation online for the IDL version of the code is still applicable to the Python version (please see the Python doc for more information).

TODO list

Here, in no particular order, is a list of some things that may be added in future releases.

  • Expanded documentation
  • More unit and integration tests
  • More detailed logging (with option to send all log information to a file)
  • Scripts for quickly viewing data and spectra fits
  • Scripts and routines for creating new fit templates
  • Consider adding a subclass of NDCubeSequence which can hold multiple spectral windows
  • Consider storing the output fit parameters in another NDCube
  • Restructure project to use the Sunpy affiliated package template?

eispac's People

Contributors

mjweberg avatar wtbarnes avatar dstansby avatar andyto1234 avatar hpwarren avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.