ocbpy

Convert between magnetic and adaptive, polar boundary coordinates

https://github.com/aburrell/ocbpy

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    2 of 6 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords

coordinate-systems coordinate-transformation coordinates ionosphere magnetic magnetic-coordinates python space space-physics
Last synced: 6 months ago · JSON representation

Repository

Convert between magnetic and adaptive, polar boundary coordinates

Basic Info
  • Host: GitHub
  • Owner: aburrell
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 173 MB
Statistics
  • Stars: 9
  • Watchers: 2
  • Forks: 7
  • Open Issues: 5
  • Releases: 8
Topics
coordinate-systems coordinate-transformation coordinates ionosphere magnetic magnetic-coordinates python space space-physics
Created over 8 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Support Authors Zenodo

README.md

Documentation Status DOI PyPI version

Test Status Coverage Status

Planet with auroral oval and two pythons representing closed and open magnetic field lines Overview

OCBpy is a Python module that converts between AACGM coordinates and a magnetic coordinate system that adjusts latitude and local time relative to the Open Closed field line Boundary (OCB), Equatorial Auroral Boundary (EAB), or both. This is particulary useful for statistical studies of the poles, where gridding relative to a fixed magnetic coordinate system would cause averaging of different physical regions, such as auroral and polar cap measurements. This coordinate system is described in:

  • Chisham, G. (2017), A new methodology for the development of highlatitude ionospheric climatologies and empirical models, Journal of Geophysical Research: Space Physics, doi:10.1002/2016JA023235.

  • Full documentation

Boundaries must be obtained from observations or models for this coordinate transformation. Several boundary data sets are included within this package. These include northern hemisphere boundaries from the IMAGE satellite, northern and southern hemisphere OCBs from AMPERE, and single-point boundary locations from DMSP.

Currently, support is included for files from the following datasets:

  • SuperMAG (available at http://supermag.jhuapl.edu)
  • SuperDARN Vorticity (contact GC at gchi@bas.ac.uk)
  • Any pysat Instrument (available at https://github.com/pysat/pysat)

These routines may be used as a guide to write routines for other datasets.

Python versions

This module currently supports Python version 3.10 - 3.13.

Dependencies

The listed dependecies were tested with the following versions: * numpy * aacgmv2 * pysat (3.2.1+) * zenodo_get

Testing is performed using the python module, unittest. To limit dependency issues, the pysat and zenodo_get dependencies are optional.

Installation

Installation is now available through pypi

$ pip install ocbpy

You may also checkout the repository and install it yourself:

$ git clone git://github.com/aburrell/ocbpy.git;

Change directories into the repository folder and run the setup.py file. For a local install use the "--user" flag after "install". For development, add the "-e" flag.

$ cd ocbpy/ $ pip install .

To run the unit tests,

$ python -m unittest discover

Example

In iPython, run:

import datetime as dt import ocbpy

Then initialise an OCB class object. This uses the default IMAGE FUV file and will take a few minutes to load.

ocb = ocbpy.OCBoundary() print(ocb)

The output should be as follows:

``` Open-Closed Boundary file: ~/ocbpy/ocbpy/boundaries/imagenorthcircle.ocb Source instrument: IMAGE Boundary reference latitude: 74.0 degrees

305805 records from 2000-05-04 03:03:20 to 2002-10-31 20:05:16

YYYY-MM-DD HH:MM:SS PhiCentre RCentre R

2000-05-04 03:03:20 4.64 2.70 21.00 2000-05-04 03:07:15 147.24 2.63 7.09 ... 2002-10-31 20:03:16 207.11 5.94 22.86 2002-10-31 20:05:16 335.47 6.76 11.97

Uses scaling function(s): ocbpy.ocb_correction.circular(**{}) ```

Get the first good OCB record, which will be record index 0.

ocb.get_next_good_ocb_ind() print(ocb.rec_ind)

To get the good OCB record closest to a specified time (with a maximum of a 60 sec time difference, as a default), use ocbpy.matchdataocb

``` testtimes = [dt.datetime(otime.year, otime.month, otime.day, otime.hour, otime.minute, 0) for otime in ocb.dtime[1:10]] itest = ocbpy.matchdataocb(ocb, testtimes, idat=0) print(itest, ocb.recind, testtimes[itest], ocb.dtime[ocb.rec_ind])

4 5 2000-05-05 11:39:00 2000-05-05 11:39:20 ```

More examples are available in the documentation.

Owner

  • Name: Angeline Burrell
  • Login: aburrell
  • Kind: user
  • Location: Washington D.C.
  • Company: Naval Research Laboratory

Research Physicist at the Naval Research Laboratory

GitHub Events

Total
  • Create event: 8
  • Release event: 1
  • Issues event: 9
  • Watch event: 2
  • Delete event: 5
  • Issue comment event: 11
  • Push event: 20
  • Pull request event: 17
Last Year
  • Create event: 8
  • Release event: 1
  • Issues event: 9
  • Watch event: 2
  • Delete event: 5
  • Issue comment event: 11
  • Push event: 20
  • Pull request event: 17

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 1,057
  • Total Committers: 6
  • Avg Commits per committer: 176.167
  • Development Distribution Score (DDS): 0.149
Top Committers
Name Email Commits
Angeline Burrell a****l@n****l 900
aburrell a****3@l****k 124
Angeline Burrell a****l@u****m 17
aburrell a****0@u****u 14
Dominic Jodoin d****c@t****m 1
jpreistad j****d@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 54
  • Total pull requests: 81
  • Average time to close issues: 6 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 0.81
  • Average comments per pull request: 1.52
  • Merged pull requests: 76
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 5
  • Pull requests: 16
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 8 hours
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.88
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aburrell (49)
  • jpreistad (3)
  • gchi-bas (2)
Pull Request Authors
  • aburrell (83)
  • jklenzing (2)
  • cotsog (1)
  • jpreistad (1)
Top Labels
Issue Labels
enhancement (15) testing (10) bug (7) help wanted (2) duplicate (1)
Pull Request Labels
bug (14) enhancement (14) testing (3)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 128 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 8
  • Total maintainers: 1
pypi.org: ocbpy

Convert between magnetic/geodetic and adaptive, polar boundary coordinates

  • Documentation: https://ocbpy.readthedocs.io/
  • License: Copyright (c) 2017, Angeline G. Burrell (AGB) and Gareth Chisham (GC) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ocbpy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 0.6.0
    published 6 months ago
  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 128 Last month
  • Docker Downloads: 0
Rankings
Docker downloads count: 4.3%
Dependent packages count: 10.1%
Forks count: 14.2%
Average: 15.8%
Stargazers count: 19.3%
Dependent repos count: 21.6%
Downloads: 25.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • aacgmv2 *
  • numpy *
  • numpydoc *
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/pip_rc_install.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
pyproject.toml pypi
  • aacgmv2 *
  • numpy *
requirements.txt pypi
  • aacgmv2 *
  • coverage *
  • coveralls *
  • flake8 *
  • numpy *
  • packaging *