{ "info": { "author": "Angeline G. Burrell", "author_email": "agb073000@utdallas.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Physics" ], "description": "[![Build Status](https://www.travis-ci.org/aburrell/ocbpy.svg?branch=master)](https://www.travis-ci.org/aburrell/ocbpy)\t[![Coverage Status](https://coveralls.io/repos/github/aburrell/ocbpy/badge.svg?branch=master)](https://coveralls.io/github/aburrell/ocbpy?branch=master)\t[![Documentation Status](https://readthedocs.org/projects/ocbpy/badge/?version=latest)](http://ocbpy.readthedocs.io/en/latest/?badge=latest) [![DOI](https://zenodo.org/badge/96153180.svg)](https://zenodo.org/badge/latestdoi/96153180)\n\n# Overview\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). This is particulary useful for statistical\nstudies of the poles, where gridding relative to a fixed magnetic coordinate\nsystem would cause averaging of different physical regions, such as auroral\nand polar cap measurements. This coordinate system is described in:\n\n * Chisham, G. (2017), A new methodology for the development of high\u2010latitude\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](http://ocbpy.rtfd.io/)\n\nOCBs must be obtained from observations for this coordinate transformation.\nIn the British Antarctic Survey's [IMAGE Auroral Boundary data project](https://www.bas.ac.uk/project/image-auroral-boundary-data/)\nfrom three auroral instruments provide northern hemisphere OCB locations\nfor 3 May 2000 03:01:42 UT - 22 Aug 2002 00:01:28, though not all of the times\nincluded in these files contain high-quality estimations of the OCB.\nRecommended selection criteria are included as defaults in the OCBoundary class.\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\nThese routines may be used as a guide to write routines for other datasets.\n\n# Python versions\n\nThis module has been tested on python version 2.7, 3.4 - 3.6. Local testing on\n3.3 was also performed, but may not be supported in the next version.\n\n# Dependencies\n\nThe listed dependecies were tested with the following versions:\n * datetime \n * numpy (1.11.3, 1.12.1, 1.14.1)\n * logbook\n * setuptools (36.0.1)\n\nTesting is performed using the python module, unittest\n\n# Installation\n\nInstallation is now available through pypi [![PyPI version](https://badge.fury.io/py/ocbpy.svg)](https://badge.fury.io/py/ocbpy)\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\".\n\n```\n $ cd ocbpy/\n $ python setup.py install\n```\n\nTo run the unit tests,\n\n```\n $ python setup.py test\n```\n\n# Example\n\nIn iPython, run:\n\n```\nimport numpy as np\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.OCBoundary()\nprint ocb\n```\n\nThe output should be as follows:\n\n```\nOpen-Closed Boundary file: ~/ocbpy/ocbpy/boundaries/si13_north_circle\nSource instrument: IMAGE\nOpen-Closed Boundary reference latitude: 74.0 degrees\n\n219927 records from 2000-05-05 11:35:27 to 2002-08-22 00:01:28\n\nYYYY-MM-DD HH:MM:SS NumSectors Phi_Centre R_Centre R R_Err Area\n-----------------------------------------------------------------------------\n2000-05-05 11:35:27 4 356.93 8.74 9.69 0.14 3.642e+06\n2000-05-05 11:37:23 5 202.97 13.23 22.23 0.77 1.896e+07\n2002-08-21 23:55:20 8 322.60 5.49 15.36 0.61 9.107e+06\n2002-08-22 00:01:28 7 179.02 2.32 19.52 0.89 1.466e+07\n```\n\nGet the first good OCB record, which will be record index 27.\n\n```\nocb.get_next_good_ocb_ind()\nprint ocb.rec_ind\n\n27\n```\n\nNow plot the location of the OCB\n\nFirst initialise the figure\n```\nimport matplotlib.pyplot as plt\nf = plt.figure()\nax = f.add_subplot(111, projection=\"polar\")\nax.set_theta_zero_location(\"S\")\nax.xaxis.set_ticks([0, 0.5*np.pi, np.pi, 1.5*np.pi])\nax.xaxis.set_ticklabels([\"00:00\", \"06:00\", \"12:00 MLT\", \"18:00\"])\nax.set_rlim(0,25)\nax.set_rticks([5,10,15,20])\nax.yaxis.set_ticklabels([\"85$^\\circ$\",\"80$^\\circ$\",\"75$^\\circ$\",\"70$^\\circ$\"])\n```\n\nMark the location of the circle centre in AACGM coordinates\n```\nphi_cent_rad = np.radians(ocb.phi_cent[ocb.rec_ind])\nax.plot([phi_cent_rad], [ocb.r_cent[ocb.rec_ind]], \"mx\", ms=10, label=\"OCB Pole\")\n```\n\nCalculate at plot the location of the OCB in AACGM coordinates\n```\nlon = np.arange(0.0, 2.0 * np.pi + 0.1, 0.1)\ndel_lon = lon - phi_cent_rad\nlat = ocb.r_cent[ocb.rec_ind] * np.cos(del_lon) + np.sqrt(ocb.r[ocb.rec_ind]**2 - (ocb.r_cent[ocb.rec_ind] * np.sin(del_lon))**2)\nax.plot(lon, lat, \"m-\", linewidth=2, label=\"OCB\")\nax.text(lon[35], lat[35]+1.5, \"74$^\\circ$\", fontsize=\"medium\", color=\"m\")\n```\n\nAdd reference labels for OCB coordinates\n```\nlon_clock = list()\nlat_clock = list()\n\nfor ocb_mlt in np.arange(0.0, 24.0, 6.0):\n aa,oo = ocb.revert_coord(74.0, ocb_mlt)\n lon_clock.append(oo * np.pi / 12.0)\n lat_clock.append(90.0 - aa)\n\nax.plot(lon_clock, lat_clock, \"m+\")\nax.plot([lon_clock[0], lon_clock[2]], [lat_clock[0], lat_clock[2]], \"-\", color=\"lightpink\", zorder=1)\nax.plot([lon_clock[1], lon_clock[3]], [lat_clock[1], lat_clock[3]], \"-\", color=\"lightpink\", zorder=1)\nax.text(lon_clock[2]+.2, lat_clock[2]+1.0, \"12:00\",fontsize=\"medium\",color=\"m\")\nax.text(lon[35], olat[35]+1.5, \"82$^\\circ$\", fontsize=\"medium\", color=\"m\")\n\n```\n\nNow add the location of a point in AACGM coordinates, calculate the\nlocation relative to the OCB, and output both coordinates in the legend\n```\naacgm_lat = 85.0\naacgm_lon = np.pi\nocb_lat, ocb_mlt = ocb.normal_coord(aacgm_lat, aacgm_lon * 12.0 / np.pi)\nplabel = \"Point (MLT, lat)\\nAACGM (12:00,85.0$^\\circ$)\\nOCB ({:.0f}:{:.0f},{:.1f}$^\\circ$)\".format(np.floor(ocb_mlt), (ocb_mlt - np.floor(ocb_mlt))*60.0, ocb_lat)\n\nax.plot([aacgm_lon], [90.0-aacgm_lat], \"ko\", ms=5, label=plabel)\n\nax.legend(loc=2, fontsize=\"small\", title=\"{:}\".format(ocb.dtime[ocb.rec_ind]), bbox_to_anchor=(-0.4,1.15))\n```\n\n\nThe figure should now look like:\n
\n \n \"OCB\n
\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aburrell/ocbpy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ocbpy", "package_url": "https://pypi.org/project/ocbpy/", "platform": "", "project_url": "https://pypi.org/project/ocbpy/", "project_urls": { "Homepage": "https://github.com/aburrell/ocbpy" }, "release_url": "https://pypi.org/project/ocbpy/0.2b2/", "requires_dist": [ "numpy", "logbook" ], "requires_python": "", "summary": "Location relative to open/closed field line boundary", "version": "0.2b2" }, "last_serial": 3891897, "releases": { "0.2b1": [ { "comment_text": "", "digests": { "md5": "d2d13013edfb7217f53451c134cca86f", "sha256": "96f7cde1fd617b392d992cfc29407b3a19d07bcafd63514f06bbbeba4669bcc8" }, "downloads": -1, "filename": "ocbpy-0.2b1-py2-none-any.whl", "has_sig": false, "md5_digest": "d2d13013edfb7217f53451c134cca86f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11472373, "upload_time": "2018-04-12T02:34:12", "url": "https://files.pythonhosted.org/packages/41/2c/91a4049528093adefdf225868059c103e56892c558221bbde6fe61c63f35/ocbpy-0.2b1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1bcea2a5a58ff552d1bc7b9837bba6c", "sha256": "88a06443926463938253db4e64395d4bedb52e5dc90959c79cff7b9815c0518f" }, "downloads": -1, "filename": "ocbpy-0.2b1-py3-none-any.whl", "has_sig": false, "md5_digest": "e1bcea2a5a58ff552d1bc7b9837bba6c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11472372, "upload_time": "2018-04-12T02:38:59", "url": "https://files.pythonhosted.org/packages/0b/e4/236981b6a0d269de7a4bf7905b74bf8bee740b23aea6555df83b291047ff/ocbpy-0.2b1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9208831a45dd02342c441d117b57c6f", "sha256": "4d200129a759170ee9d564ec05f2a15716b0cd822e4fa533bec85a211d28753c" }, "downloads": -1, "filename": "ocbpy-0.2b1.tar.gz", "has_sig": false, "md5_digest": "e9208831a45dd02342c441d117b57c6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11358571, "upload_time": "2018-04-12T02:41:51", "url": "https://files.pythonhosted.org/packages/22/b2/21398d8cb55c0eb36611f27dc25356a6081da8b4a9518dff3cf1259cfeb4/ocbpy-0.2b1.tar.gz" } ], "0.2b2": [ { "comment_text": "", "digests": { "md5": "edb06123aa60167080ec5dbb49f8b720", "sha256": "ecff2f85fe27b01dbd0cccf8aebce23c7a9d0af529a10288c48912dac89c6a7f" }, "downloads": -1, "filename": "ocbpy-0.2b2-py2-none-any.whl", "has_sig": false, "md5_digest": "edb06123aa60167080ec5dbb49f8b720", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11468869, "upload_time": "2018-05-23T15:52:14", "url": "https://files.pythonhosted.org/packages/53/26/a1e132db1ee856874ddaeec0b196b24782b39bc5036ddef158e937c84075/ocbpy-0.2b2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "106d867af507dfbe84cc5f9675a529b2", "sha256": "b0353bf08e010de80a633e723ac47b4512508c3034453cfda1260587c5c51453" }, "downloads": -1, "filename": "ocbpy-0.2b2-py3-none-any.whl", "has_sig": false, "md5_digest": "106d867af507dfbe84cc5f9675a529b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11472743, "upload_time": "2018-05-23T15:52:20", "url": "https://files.pythonhosted.org/packages/68/d9/b8c226a0d8df898bf41b78409ce0e1164a3aa5b03cfff549e907d4dacc32/ocbpy-0.2b2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "647250848524ca759c3e748115208c74", "sha256": "a3962397a3df167086926eaee6f7facfa09153e8b3c7165adf7c1291eaaa80df" }, "downloads": -1, "filename": "ocbpy-0.2b2.tar.gz", "has_sig": false, "md5_digest": "647250848524ca759c3e748115208c74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11358281, "upload_time": "2018-05-23T15:52:27", "url": "https://files.pythonhosted.org/packages/58/a5/43a5b589fd0b4922d2bf0ff9baf5f435ea6ede6534331a48f9bd283b3046/ocbpy-0.2b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "edb06123aa60167080ec5dbb49f8b720", "sha256": "ecff2f85fe27b01dbd0cccf8aebce23c7a9d0af529a10288c48912dac89c6a7f" }, "downloads": -1, "filename": "ocbpy-0.2b2-py2-none-any.whl", "has_sig": false, "md5_digest": "edb06123aa60167080ec5dbb49f8b720", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11468869, "upload_time": "2018-05-23T15:52:14", "url": "https://files.pythonhosted.org/packages/53/26/a1e132db1ee856874ddaeec0b196b24782b39bc5036ddef158e937c84075/ocbpy-0.2b2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "106d867af507dfbe84cc5f9675a529b2", "sha256": "b0353bf08e010de80a633e723ac47b4512508c3034453cfda1260587c5c51453" }, "downloads": -1, "filename": "ocbpy-0.2b2-py3-none-any.whl", "has_sig": false, "md5_digest": "106d867af507dfbe84cc5f9675a529b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11472743, "upload_time": "2018-05-23T15:52:20", "url": "https://files.pythonhosted.org/packages/68/d9/b8c226a0d8df898bf41b78409ce0e1164a3aa5b03cfff549e907d4dacc32/ocbpy-0.2b2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "647250848524ca759c3e748115208c74", "sha256": "a3962397a3df167086926eaee6f7facfa09153e8b3c7165adf7c1291eaaa80df" }, "downloads": -1, "filename": "ocbpy-0.2b2.tar.gz", "has_sig": false, "md5_digest": "647250848524ca759c3e748115208c74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11358281, "upload_time": "2018-05-23T15:52:27", "url": "https://files.pythonhosted.org/packages/58/a5/43a5b589fd0b4922d2bf0ff9baf5f435ea6ede6534331a48f9bd283b3046/ocbpy-0.2b2.tar.gz" } ] }