{"id":24791838,"url":"https://github.com/aburrell/ocbpy","last_synced_at":"2025-10-12T15:31:41.160Z","repository":{"id":22404210,"uuid":"96153180","full_name":"aburrell/ocbpy","owner":"aburrell","description":"Convert between magnetic and adaptive, polar boundary coordinates","archived":false,"fork":false,"pushed_at":"2025-01-27T21:24:55.000Z","size":142467,"stargazers_count":7,"open_issues_count":5,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-27T22:29:59.554Z","etag":null,"topics":["coordinate-systems","coordinate-transformation","coordinates","ionosphere","magnetic","magnetic-coordinates","python","space","space-physics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aburrell.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/supported_datasets.rst","governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-03T21:52:25.000Z","updated_at":"2024-06-07T15:56:04.000Z","dependencies_parsed_at":"2025-01-27T22:36:40.736Z","dependency_job_id":null,"html_url":"https://github.com/aburrell/ocbpy","commit_stats":{"total_commits":1057,"total_committers":6,"mean_commits":"176.16666666666666","dds":"0.14853358561967833","last_synced_commit":"ef0516582eda9f6e6af211502ef7ab38f7c379ec"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburrell%2Focbpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburrell%2Focbpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburrell%2Focbpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburrell%2Focbpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aburrell","download_url":"https://codeload.github.com/aburrell/ocbpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236239200,"owners_count":19117165,"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":["coordinate-systems","coordinate-transformation","coordinates","ionosphere","magnetic","magnetic-coordinates","python","space","space-physics"],"created_at":"2025-01-29T19:19:18.618Z","updated_at":"2025-10-12T15:31:36.106Z","avatar_url":"https://github.com/aburrell.png","language":"Python","readme":"[![Documentation Status](https://readthedocs.org/projects/ocbpy/badge/?version=latest)](http://ocbpy.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://zenodo.org/badge/96153180.svg)](https://zenodo.org/badge/latestdoi/96153180)\n[![PyPI version](https://badge.fury.io/py/ocbpy.svg)](https://badge.fury.io/py/ocbpy)\n\n[![Test Status](https://github.com/aburrell/ocbpy/actions/workflows/main.yml/badge.svg)](https://github.com/aburrell/ocbpy/actions/workflows/main.yml)\n[![Coverage Status](https://coveralls.io/repos/github/aburrell/ocbpy/badge.svg)](https://coveralls.io/github/aburrell/ocbpy)\n\n\u003ch1\u003e \u003cimg width=\"128\" height=\"128\" src=\"https://raw.githubusercontent.com/aburrell/ocbpy/main/docs/figures/ocbpy_logo.gif\" alt=\"Planet with auroral oval and two pythons representing closed and open magnetic field lines\" title=\"OCBpy Logo\" style=\"float:left;\"\u003e\nOverview \u003c/h1\u003e\n\nOCBpy is a Python module that converts between AACGM coordinates and a magnetic\ncoordinate system that adjusts latitude and local time relative to the Open\nClosed field line Boundary (OCB), Equatorial Auroral Boundary (EAB), or both.\nThis is particulary useful for statistical studies of the poles, where gridding\nrelative to a fixed magnetic coordinate system would cause averaging of\ndifferent physical regions, such as auroral and polar cap measurements.  This\ncoordinate system is described in:\n\n  * Chisham, G. (2017), A new methodology for the development of high‐latitude\n    ionospheric climatologies and empirical models, Journal of Geophysical\n    Research: Space Physics,\n    [doi:10.1002/2016JA023235.](https://doi.org/10.1002/2016JA023235)\n\n  * Full [documentation](https://ocbpy.readthedocs.io/en/latest/)\n\nBoundaries must be obtained from observations or models for this coordinate\ntransformation. Several boundary data sets are included within this package.\nThese include northern hemisphere boundaries from the IMAGE satellite,\nnorthern and southern hemisphere OCBs from AMPERE, and single-point boundary\nlocations from DMSP.\n\n  * [IMAGE Auroral Boundary data](https://www.bas.ac.uk/project/image-auroral-boundary-data/)\n  * Burrell, A. G. et al. (2020): AMPERE Polar Cap Boundaries, Ann. Geophys.,\n    38, 481-490,\n    [doi:10.5194/angeo-38-481-2020](https://doi.org/10.5194/angeo-38-481-2020)\n  * [DMSP SSJ Boundaries](https://zenodo.org/records/3373812)\n\nCurrently, support is included for files from the following datasets:\n\n  * SuperMAG (available at http://supermag.jhuapl.edu)\n  * SuperDARN Vorticity (contact GC at gchi@bas.ac.uk)\n  * Any pysat Instrument (available at https://github.com/pysat/pysat)\n\nThese routines may be used as a guide to write routines for other datasets.\n\n# Python versions\n\nThis module currently supports Python version 3.10 - 3.13.\n\n# Dependencies\n\nThe listed dependecies were tested with the following versions:\n  * numpy\n  * aacgmv2\n  * pysat (3.2.1+)\n  * zenodo_get\n\nTesting is performed using the python module, unittest.  To limit dependency\nissues, the pysat and zenodo_get dependencies are optional.\n\n# Installation\n\nInstallation is now available through pypi\n\n```\n    $ pip install ocbpy\n```\n\nYou may also checkout the repository and install it yourself:\n\n```\n    $ git clone git://github.com/aburrell/ocbpy.git;\n```\n\nChange directories into the repository folder and run the setup.py file.  For\na local install use the \"--user\" flag after \"install\". For development, add\nthe \"-e\" flag.\n\n```\n    $ cd ocbpy/\n    $ pip install .\n```\n\nTo run the unit tests,\n\n```\n    $ python -m unittest discover\n```\n\n# Example\n\nIn iPython, run:\n\n```\nimport datetime as dt\nimport ocbpy\n```\n\nThen initialise an OCB class object.  This uses the default IMAGE FUV file and\nwill take a few minutes to load.\n\n```\nocb = ocbpy.OCBoundary()\nprint(ocb)\n```\n\nThe output should be as follows:\n\n```\nOpen-Closed Boundary file: ~/ocbpy/ocbpy/boundaries/image_north_circle.ocb\nSource instrument: IMAGE\nBoundary reference latitude: 74.0 degrees\n\n305805 records from 2000-05-04 03:03:20 to 2002-10-31 20:05:16\n\nYYYY-MM-DD HH:MM:SS Phi_Centre R_Centre R\n-----------------------------------------------------------------------------\n2000-05-04 03:03:20 4.64 2.70 21.00\n2000-05-04 03:07:15 147.24 2.63 7.09\n2002-10-31 20:03:16 207.11 5.94 22.86\n2002-10-31 20:05:16 335.47 6.76 11.97\n\nUses scaling function(s):\nocbpy.ocb_correction.circular(**{})\n```\n\nGet the first good OCB record, which will be record index 0.\n\n```\nocb.get_next_good_ocb_ind()\nprint(ocb.rec_ind)\n```\n\nTo get the good OCB record closest to a specified time (with a maximum of a\n60 sec time difference, as a default), use **ocbpy.match_data_ocb**\n\n```\ntest_times = [dt.datetime(otime.year, otime.month, otime.day, otime.hour,\n                          otime.minute, 0) for otime in ocb.dtime[1:10]]\nitest = ocbpy.match_data_ocb(ocb, test_times, idat=0)\nprint(itest, ocb.rec_ind, test_times[itest], ocb.dtime[ocb.rec_ind])\n\n4 5 2000-05-05 11:39:00 2000-05-05 11:39:20\n```\n\nMore examples are available in the documentation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faburrell%2Focbpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faburrell%2Focbpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faburrell%2Focbpy/lists"}