Git Product home page Git Product logo

trough's Introduction

trough

Python Package using Conda codecov

GitHub GitHub last commit Lines of code

Example

Example

Features

  • Download Madrigal TEC, OMNI and DMSP SSUSI data
  • Process datasets into more convenient xarray data structures and save as NetCDF
  • Automatically label main ionospheric trough

Usage

  1. Clone Repo
  2. create conda environment: conda env create -f environment.yml -n trough python=3.9
  3. conda activate trough
  4. pip install apexpy
  5. if you get a numpy error when you try to import apexpy: pip install --upgrade nump
  6. install trough with pip install -e .
  7. copy config.json.example --> config.json and change any options you want
  8. run with python -m trough config.json
  9. wait for it to finish (can take several days if you are running 5+ years)
  10. add import trough in your code and access the data using trough.get_data

Config

Main Options

Config Option Definition
base_dir base directory of trough downloads and processing, directories for downloading and processing will be created from here
madrigal_user_name name supplied to MadrigalWeb
madrigal_user_email email supplied to MadrigalWeb
madrigal_user_affil affiliation supplied to MadrigalWeb
nasa_spdf_download_method "http" or "ftp" (default)
lat_res latitude resolution of processed TEC maps (degrees Apex magnetic latitude)
lon_res longitude resolution of processed TEC maps (degrees Apex magnetic longitude)
time_res_unit time resolution units (passed to np.timedelta64)
time_res_n time resolution in units specified above (passed to np.timedelta64)
script_name which script to run, available scripts are in trough/scripts.py
start_date start date of interval (YYYYMMDD, YYYYMMDD_hh, YYYYMMDD_hhmm, or YYYYMMDD_hhmmss)
end_date end date of interval, see "start_date" for format
keep_download whether or not to keep the downloaded files (not recommended)
trough_id_params trough labeling algorithm parameters, see below

Trough Labeling Options

Config Option Definition
bg_est_shape background estimation filter size in pixels [time, latitude, longitude]
model_weight_max maximum value of L2 regularization before multiplication by coefficient l2_weight
rbf_bw RBF bandwidth, number of pixels to half weight
tv_hw total variation horizontal weight
tv_vw total variation vertical weight
l2_weight L2 regularization coefficient
tv_weight TV regularization coefficient
perimeter_th minimum perimeter for a connected component in a label image
area_th minimum area for a connected component in a label image
threshold score threshold below which a pixel is not labeled as MIT
closing_rad radius for disk structuring element passed to skimage.morphology.binary_closing

trough's People

Contributors

gregstarr avatar

Stargazers

 avatar

Watchers

 avatar

trough's Issues

xarray vs numpy indexing

there is a bug waiting to happen due to mixing xarray date slicing which includes the last date vs numpy index slicing which does not

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.