{ "info": { "author": "Matthew Knight James", "author_email": "mattkjames7@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python :: 3" ], "description": "# KT17\n\nKT17/KT14 magnetic field model for Mercury written in C++ with a Python wrapper. See Korth et al., 2015 (JGR) and Korth et al., 2017 (GRL) for more details on the models themselves.\n\n## Installation\n\nBest to install using ```pip3```:\n\n```\npip3 install KT17 --user\n```\n\nThe installation will require the following packages:\n\n* numpy\n* scipy\n* matplotlib\n\nAlternatively clone this repo and build a wheel:\n\n```bash\ngit clone https://github.com/mattkjames7/KT17.git\ncd KT17\npython3 setup.py bdist_wheel\npip3 install dist/KT17-1.0.0-py3-none-any.whl\n```\n\nNOTE: This module includes C++ code which does all of the model calculating and tracing. The package includes `libkt.so` for Linux and `libkt.dll` for Windows 10 - if either of these files can't be loaded, the code will attempt to recompile. If the compilation fails, then make sure that you have `g++`(version >= 5) and `make` installed on your system. For Windows users, install TDM-GCC.\n\n## Usage\n\n### Model parameters\n\nBoth `KT17.ModelField()` and `KT17.TraceField()` functions accept five different keyword arguments (`**kwargs`) which affect the model:\n\n| Parameter | Model | Description |\n| ----------- | ----- | ---------------------------------------------------------- |\n| `Rsm` | KT14 | Magnetopause standoff distance (*RM*). |\n| `t1` | KT14 | Disk current field magnitude. |\n| `t2` | KT14 | Quasi-Harris sheet field magnitude. |\n| `Rsun` | KT17 | Distance of Mercury from the Sun (AU) |\n| `DistIndex` | KT17 | Anderson et al., 2013 disturbance index, in the range 0-97 |\n\nIf the KT17 parameters are provided, they are used to calculate the appropriate KT14 set of parameters as defined in Korth et al., 2017.\n\n### Obtaining model field vectors\n\nTo get model field vectors for some position(s) in the magnetosphere:\n\n```python\nimport KT17\n\n#default model\nBx,By,Bz = KT17.ModelField(x,y,z)\n\n#Custom KT14 model\nBx,By,Bz = KT17.ModelField(x,y,z,Rsm=1.3,t1=7.0,t2=2.5)\n\n#Custom KT17 model\nBx,By,Bz = KT17.ModelField(x,y,z,Rsun=0.4,DistIndex=25.0)\n\n```\n\nwhere `x`, `y` and `z` are either scalars or arrays of position(s) in\nthe MSM coordinate system. The returned `Bx`, `By` and `Bz` contain the magnetic\nfield vector(s) at each position in nT. For positions which are outside of the magnetopause, the magnetic field components are returned as NAN.\n\n### Tracing the magnetic field\n\nTo trace the magnetic field, use the `TraceField` object:\n\n```python\nT = KT17.TraceField(x0,y0,z0,**kwargs)\n```\n\nwhere `x0`, `y0` and `z0` are the starting position(s) of the traces in \nMSM coordinates. The parameters of the trace can be provided using `**kwargs` - see the `KT17.Tracefield` dosctring for more information using `help(KT17.TraceField)` or `KT17.TraceField?` in ipython.\n\n`TraceField` can be saved to a file and reloaded, e.g.:\n\n```python\n#save the Trace object\nT.Save('Trace.bin')\n\n#load the file\nT = KT17.TraceField('Trace.bin')\n```\n\n### Other routines\n\nFor a quick plot of the magnetic field in the X-Z plane run:\n\n```python\nKT17.TestTrace()\n```\n\nTo find out if a position in MSM coordinates is actually within the \nmagnetopause or not, run the following:\n\n```python\nKT17.WithinMP(x,y,z,Rsm=1.42)\n```\n\nTo get the latitude and local times of the northern and southern open-closed\nfield line boundaries, run:\n\n```python\nocb = KT17.ReadOCB()\n```\n\nwhere `ocb` is a `numpy.recarray` object which contains the following fields:\n\n| | |\n|:------ |:-------------------------------------- |\n| `Mlt` | Magnetic local time of the boundary. |\n| `LctN` | Local time in the northern hemisphere. |\n| `LctS` | Local time in the southern hemisphere. |\n| `Mlat` | Invariant latitude of the boundary. |\n| `LatN` | Latitude of the northern boundary. |\n| `LatS` | Latitude of the southern boundary. |\n\n### References\n\nAnderson, B. J., Johnson, C. L., and Korth, H. (2013), A magnetic disturbance index for Mercury's magnetic field derived from MESSENGER Magnetometer data, *Geochem. Geophys. Geosyst.*, 14, 3875\u2013 3886, doi:[10.1002/ggge.20242](https://doi.org/10.1002/ggge.20242 \"Link to external resource: 10.1002/ggge.20242\")\n\nKorth, H., Tsyganenko, N. A., Johnson, C. L., Philpott, L. C., Anderson, B. J., Al Asad, M. M., Solomon, S. C., and McNutt, R. L. (2015), Modular model for Mercury's magnetospheric magnetic field confined within the average observed magnetopause. *J. Geophys. Res. Space Physics*, 120, 4503\u2013 4518. doi: [10.1002/2015JA021022](https://doi.org/10.1002/2015JA021022 \"Link to external resource: 10.1002/2015JA021022\").Korth, H., Tsyganenko, N. A., Johnson, C. L., Philpott, L. C., Anderson, B. J., Al Asad, M. M., Solomon, S. C., and McNutt, R. L. (2015), Modular model for Mercury's magnetospheric magnetic field confined within the average observed magnetopause. J. Geophys. Res. Space Physics, 120, 4503\u2013 4518. doi: 10.1002/2015JA021022.\n\nKorth, H., Johnson, C. L., Philpott, L., Tsyganenko, N. A., & Anderson, B. J. (2017). A dynamic model of Mercury's magnetospheric magnetic field. *Geophysical Research Letters*, 44, 10,147\u2013 10,154. https://doi.org/10.1002/2017GL074699\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/mattkjames7/KT17", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "KT17", "package_url": "https://pypi.org/project/KT17/", "platform": null, "project_url": "https://pypi.org/project/KT17/", "project_urls": { "Homepage": "https://github.com/mattkjames7/KT17" }, "release_url": "https://pypi.org/project/KT17/1.0.0/", "requires_dist": [ "numpy", "scipy", "matplotlib", "PyFileIO" ], "requires_python": "", "summary": "KT17/KT14 magnetic field model for Mercury written in C++ with a Python wrapper. See Korth et al., 2015 (JGR) and Korth et al., 2017 (GRL) for more details.", "version": "1.0.0", "yanked": false, "yanked_reason": null }, "last_serial": 13258007, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1cff118ac7118f8025690def15d30fa6", "sha256": "f5ca0d6289ae385daa7f17428b1151d168b41e66702cccd4b029810cf92da0f3" }, "downloads": -1, "filename": "KT17-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1cff118ac7118f8025690def15d30fa6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 48371, "upload_time": "2018-11-26T22:58:14", "upload_time_iso_8601": "2018-11-26T22:58:14.935158Z", "url": "https://files.pythonhosted.org/packages/45/8a/540a9b68316b00f273c0f511cb62e750fdec04d2aeda20a290c85b5e3ff8/KT17-0.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "18c1a6bb4b978ca61470090ce6fd78d2", "sha256": "facda7486387d182ff22865da8881d644c4ad795e6b9de3e76626f8355d8bd51" }, "downloads": -1, "filename": "KT17-0.0.1.tar.gz", "has_sig": false, "md5_digest": "18c1a6bb4b978ca61470090ce6fd78d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45442, "upload_time": "2018-11-26T22:58:17", "upload_time_iso_8601": "2018-11-26T22:58:17.106326Z", "url": "https://files.pythonhosted.org/packages/ee/02/0a61000263d465357101401d8b188806316fc31157b6599b9bc55ef3ad21/KT17-0.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "25d74370780764d50f11fd56858313a7", "sha256": "54a35350fd0354c4e62be2f31d1470e28f4e86c9d936da53033fed77efacb4f1" }, "downloads": -1, "filename": "KT17-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "25d74370780764d50f11fd56858313a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 48361, "upload_time": "2019-03-12T10:04:13", "upload_time_iso_8601": "2019-03-12T10:04:13.670784Z", "url": "https://files.pythonhosted.org/packages/20/67/d6daa5ea9ed4780406f44aba2f75dfb8dc1de4551fb45dd054b3e843401f/KT17-0.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "f6d9ff1ab6f4ba53d7aeea15adb5437f", "sha256": "80a7579e0ceca333bb57ff18b194aa8dd7e1f94ccdf5fb1a451db547c2173818" }, "downloads": -1, "filename": "KT17-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f6d9ff1ab6f4ba53d7aeea15adb5437f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45448, "upload_time": "2019-03-12T10:04:15", "upload_time_iso_8601": "2019-03-12T10:04:15.443691Z", "url": "https://files.pythonhosted.org/packages/bb/73/c6af7a7d455d77e2e7b5144095d25f6afdf6589532bd5383b611c23086dd/KT17-0.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "8f3d9fbf6cc9e6a1f23f25e88a33a7c7", "sha256": "094d31e2480d6fd94a7ca906ab186bc2db919a952e2eb0a759da81106623db94" }, "downloads": -1, "filename": "KT17-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "8f3d9fbf6cc9e6a1f23f25e88a33a7c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 48372, "upload_time": "2019-03-12T10:26:10", "upload_time_iso_8601": "2019-03-12T10:26:10.767861Z", "url": "https://files.pythonhosted.org/packages/fc/8f/f3b80d72fb6d16a9e93fcdd1e6daa99210ff66a539d76a9d85982228967c/KT17-0.0.3-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "03b59340d38e6eb3f53fdb7c90f496df", "sha256": "b656dfed2f76fd4b05f49b308389db32f3a37ec7bce7397675496b6bf1cfd301" }, "downloads": -1, "filename": "KT17-0.0.3.tar.gz", "has_sig": false, "md5_digest": "03b59340d38e6eb3f53fdb7c90f496df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45468, "upload_time": "2019-03-12T10:26:12", "upload_time_iso_8601": "2019-03-12T10:26:12.478624Z", "url": "https://files.pythonhosted.org/packages/f7/5f/f156821d72eb80e9cf15d3555791c9e359f402b954a1a0d5ed507db64182/KT17-0.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "f99a921bba0a9a00259dab61a137fcf1", "sha256": "cf7f5dbd30fbf38157bf56d417f3fe6c716f8373bee023230619dec418e57ea1" }, "downloads": -1, "filename": "KT17-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f99a921bba0a9a00259dab61a137fcf1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 53464, "upload_time": "2019-10-22T14:52:37", "upload_time_iso_8601": "2019-10-22T14:52:37.896355Z", "url": "https://files.pythonhosted.org/packages/cf/92/32ec3502cbb6425bd276a6cc99c1219e37b00f48d886cd554195e7ebef07/KT17-0.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "547411bf2e0ad3d5b5b077c6e4ea1eeb", "sha256": "6cc454136267ee295d02a24ccdb06a74f9bb37c4fedded5358e2f755ddd4bc7a" }, "downloads": -1, "filename": "KT17-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "547411bf2e0ad3d5b5b077c6e4ea1eeb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 410298, "upload_time": "2022-03-23T00:32:48", "upload_time_iso_8601": "2022-03-23T00:32:48.311056Z", "url": "https://files.pythonhosted.org/packages/69/e1/c4da4d1e5e3dd2d38371f4fa829bd7335355f89cc77a8c2338c3386a9c7f/KT17-1.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "547411bf2e0ad3d5b5b077c6e4ea1eeb", "sha256": "6cc454136267ee295d02a24ccdb06a74f9bb37c4fedded5358e2f755ddd4bc7a" }, "downloads": -1, "filename": "KT17-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "547411bf2e0ad3d5b5b077c6e4ea1eeb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 410298, "upload_time": "2022-03-23T00:32:48", "upload_time_iso_8601": "2022-03-23T00:32:48.311056Z", "url": "https://files.pythonhosted.org/packages/69/e1/c4da4d1e5e3dd2d38371f4fa829bd7335355f89cc77a8c2338c3386a9c7f/KT17-1.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }