{"id":17663785,"url":"https://github.com/gregstarr/trough","last_synced_at":"2026-01-20T03:32:53.411Z","repository":{"id":37925902,"uuid":"270826789","full_name":"gregstarr/trough","owner":"gregstarr","description":"main ionospheric trough data downloading and labeling","archived":false,"fork":false,"pushed_at":"2024-08-14T19:37:51.000Z","size":423,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T09:45:09.009Z","etag":null,"topics":["data-science","dmsp","ionosphere","magnetosphere","satellite-data","space-physics","total-electron-content"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregstarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-08T21:01:20.000Z","updated_at":"2024-08-14T19:37:55.000Z","dependencies_parsed_at":"2024-10-30T22:35:56.565Z","dependency_job_id":null,"html_url":"https://github.com/gregstarr/trough","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregstarr%2Ftrough","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregstarr%2Ftrough/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregstarr%2Ftrough/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregstarr%2Ftrough/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregstarr","download_url":"https://codeload.github.com/gregstarr/trough/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247597416,"owners_count":20964312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","dmsp","ionosphere","magnetosphere","satellite-data","space-physics","total-electron-content"],"created_at":"2024-10-23T19:42:35.573Z","updated_at":"2026-01-20T03:32:53.385Z","avatar_url":"https://github.com/gregstarr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trough\n[![Python Package using Conda](https://github.com/gregstarr/trough/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/gregstarr/trough/actions/workflows/python-package-conda.yml)\n[![codecov](https://codecov.io/gh/gregstarr/trough/branch/master/graph/badge.svg?token=QNCESQ41EW)](https://codecov.io/gh/gregstarr/trough)\n\n![GitHub](https://img.shields.io/github/license/gregstarr/trough)\n![GitHub last commit](https://img.shields.io/github/last-commit/gregstarr/trough?color=blue\u0026style=flat)\n![Lines of code](https://img.shields.io/tokei/lines/github/gregstarr/trough?color=orange)\n\n### Example\n\n![Example](example.png)\n\n### Features\n- Download Madrigal TEC, OMNI and DMSP SSUSI data\n- Process datasets into more convenient `xarray` data structures and save as NetCDF\n- Automatically label main ionospheric trough\n\n# Usage\n\n1. Clone Repo\n2. create conda environment: `conda env create -f environment.yml -n trough python=3.9`\n3. `conda activate trough`\n4. `pip install apexpy`\n5. if you get a numpy error when you try to import apexpy: `pip install --upgrade nump`\n6. install trough with `pip install -e .`\n7. copy `config.json.example` --\u003e `config.json` and change any options you want\n8. run with `python -m trough config.json`\n9. wait for it to finish (can take several days if you are running 5+ years)\n10. add `import trough` in your code and access the data using `trough.get_data`\n\n### Config\n#### Main Options\n| Config Option | Definition                                                                                                              |\n| --- |-------------------------------------------------------------------------------------------------------------------------|\n| base_dir | base directory of trough downloads and processing, directories for downloading and processing will be created from here |\n| madrigal_user_name | name supplied to MadrigalWeb                                                                                            |\n| madrigal_user_email | email supplied to MadrigalWeb                                                                                           |\n| madrigal_user_affil | affiliation supplied to MadrigalWeb                                                                                     |\n| nasa_spdf_download_method | \"http\" or \"ftp\" (default)                                                                                               |\n| lat_res | latitude resolution of processed TEC maps (degrees Apex magnetic latitude)                                              |\n| lon_res | longitude resolution of processed TEC maps (degrees Apex magnetic longitude)                                            |\n| time_res_unit | time resolution units (passed to `np.timedelta64`)                                                                      |\n| time_res_n | time resolution in units specified above (passed to `np.timedelta64`)                                                   |\n| script_name | which script to run, available scripts are in `trough/scripts.py`                                                       |\n| start_date | start date of interval (YYYYMMDD, YYYYMMDD_hh, YYYYMMDD_hhmm, or YYYYMMDD_hhmmss)                                       |\n| end_date | end date of interval, see \"start_date\" for format                                                                       |\n| keep_download | whether or not to keep the downloaded files (not recommended)                                                           |\n| trough_id_params | trough labeling algorithm parameters, see below                                                                         |\n\n#### Trough Labeling Options\n| Config Option | Definition                                                                          |\n| --- |-------------------------------------------------------------------------------------|\n| bg_est_shape | background estimation filter size in pixels [time, latitude, longitude]             | \n| model_weight_max | maximum value of L2 regularization before multiplication by coefficient `l2_weight` |\n| rbf_bw | RBF bandwidth, number of pixels to half weight                                      |\n| tv_hw | total variation horizontal weight                                                   |\n| tv_vw | total variation vertical weight                                                     |\n| l2_weight | L2 regularization coefficient                                                       |\n| tv_weight | TV regularization coefficient                                                       |\n| perimeter_th | minimum perimeter for a connected component in a label image                        |\n| area_th | minimum area for a connected component in a label image                             |\n| threshold | score threshold below which a pixel is not labeled as MIT                           |\n| closing_rad | radius for disk structuring element passed to `skimage.morphology.binary_closing`   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregstarr%2Ftrough","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregstarr%2Ftrough","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregstarr%2Ftrough/lists"}