# tsyganenko
[](https://doi.org/10.5281/zenodo.3937276)
[](https://github.com/johncoxon/tsyganenko/actions/workflows/tests.yaml)
A Python wrapper for N. A. Tsyganenko’s field-line tracing routines.
[For information on the models and routines that are wrapped by this package, please visit Empirical Magnetosphere
Models by N. A. Tsyganenko.](https://geo.phys.spbu.ru/~tsyganenko/empirical-models/)
## Citation
When using this software, please cite [the Zenodo record](https://zenodo.org/records/15763019) as well as citing the relevant papers.
## Copyright
Geopack and the other Fortran code in this repository are developed by N A Tsyganenko et al. and licenced under the GPL
v3 or later.
The Python wrappers were originally written by Sebastien de Larquier in 2012. They are now maintained by John C Coxon.
Small edits have been made to `Geopack-2008.for` to allow for `f2py` compilation. Code in this repository other than the
original Fortran is licenced under the MIT licence.
## Funding
John C Coxon was supported during this work by Science and Technology Facilities Council (STFC) Consolidated Grants
ST/R000719/1 and ST/V000942/1, and Ernest Rutherford Fellowship ST/V004883/1.
## Installation
pip install tsyganenko
pytest tests/test.py
Please note that at this time, Windows is not well-supported by this package; if you would like to help resolve this,
please check out [issue #15](https://github.com/johncoxon/tsyganenko/issues/15).
Tests take around 1 hour to run, so don’t be alarmed if you see this behaviour on your machine.
The tests are run against the `csv` files in the repository which were created on an Apple Silicon (M1) Mac. Compiling
the package on other machines leads to disparities which reflect the change in underlying architecture rather than
reflecting changes in code. As such, by default, `tests.py` is extremely permissive; it will test to a relative accuracy
of 0.5 or an absolute accuracy of 10.0. If you want to run tests with the `pytest` defaults, run
`pytest tests/test_exact.py`, and expect a large number of tests to fail unless you are running on an M1 chip.
## Usage
To use this module, simply follow the example provided in the Trace object docstring.
from tsyganenko.trace import Trace
help(Trace)
Alternatively, there are example notebooks provided which can be used to explore what this module can do:
cd notebooks
jupyter notebook
Raw data
{
"_id": null,
"home_page": null,
"name": "tsyganenko",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "magnetic field, magnetosphere",
"author": "Sebastien de Larquier",
"author_email": "John C Coxon <work@johncoxon.co.uk>",
"download_url": "https://files.pythonhosted.org/packages/86/72/e03e2ec67817e14661d36c96e390e921f868c071d638a431533a4d8ab410/tsyganenko-2020.2.3.tar.gz",
"platform": null,
"description": "# tsyganenko\n\n[](https://doi.org/10.5281/zenodo.3937276)\n[](https://github.com/johncoxon/tsyganenko/actions/workflows/tests.yaml)\n\nA Python wrapper for N. A. Tsyganenko\u2019s field-line tracing routines.\n\n[For information on the models and routines that are wrapped by this package, please visit Empirical Magnetosphere\nModels by N. A. Tsyganenko.](https://geo.phys.spbu.ru/~tsyganenko/empirical-models/)\n\n## Citation\n\nWhen using this software, please cite [the Zenodo record](https://zenodo.org/records/15763019) as well as citing the relevant papers.\n\n## Copyright\n\nGeopack and the other Fortran code in this repository are developed by N A Tsyganenko et al. and licenced under the GPL\nv3 or later.\n\nThe Python wrappers were originally written by Sebastien de Larquier in 2012. They are now maintained by John C Coxon.\nSmall edits have been made to `Geopack-2008.for` to allow for `f2py` compilation. Code in this repository other than the\noriginal Fortran is licenced under the MIT licence.\n\n## Funding\n\nJohn C Coxon was supported during this work by Science and Technology Facilities Council (STFC) Consolidated Grants \nST/R000719/1 and ST/V000942/1, and Ernest Rutherford Fellowship ST/V004883/1.\n\n## Installation\n\n pip install tsyganenko\n pytest tests/test.py\n\nPlease note that at this time, Windows is not well-supported by this package; if you would like to help resolve this,\nplease check out [issue #15](https://github.com/johncoxon/tsyganenko/issues/15).\n\nTests take around 1 hour to run, so don\u2019t be alarmed if you see this behaviour on your machine.\n\nThe tests are run against the `csv` files in the repository which were created on an Apple Silicon (M1) Mac. Compiling \nthe package on other machines leads to disparities which reflect the change in underlying architecture rather than\nreflecting changes in code. As such, by default, `tests.py` is extremely permissive; it will test to a relative accuracy\nof 0.5 or an absolute accuracy of 10.0. If you want to run tests with the `pytest` defaults, run\n`pytest tests/test_exact.py`, and expect a large number of tests to fail unless you are running on an M1 chip.\n\n## Usage\n\nTo use this module, simply follow the example provided in the Trace object docstring.\n\n from tsyganenko.trace import Trace\n help(Trace)\n\nAlternatively, there are example notebooks provided which can be used to explore what this module can do:\n\n cd notebooks\n jupyter notebook",
"bugtrack_url": null,
"license": null,
"summary": "A Python wrapper for N A Tsyganenko\u2019s field-line tracing routines.",
"version": "2020.2.3",
"project_urls": {
"Geopack": "https://geo.phys.spbu.ru/~tsyganenko/empirical-models/",
"doi": "https://doi.org/10.5281/zenodo.3937276",
"repository": "https://github.com/johncoxon/tsyganenko"
},
"split_keywords": [
"magnetic field",
" magnetosphere"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f8f6d9ed32efd515f8200da81695cce1a0b827ff9d9e2a8bf783feddd02e0f74",
"md5": "25032ad85a7b4f90951e2127331cae72",
"sha256": "8f3f71a5b5245c3dbbaf05e4fed4103ee5a809edbb17fa14add6b9e879384572"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3-cp312-cp312-macosx_14_0_arm64.whl",
"has_sig": false,
"md5_digest": "25032ad85a7b4f90951e2127331cae72",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 866385,
"upload_time": "2025-07-09T15:52:30",
"upload_time_iso_8601": "2025-07-09T15:52:30.814835Z",
"url": "https://files.pythonhosted.org/packages/f8/f6/d9ed32efd515f8200da81695cce1a0b827ff9d9e2a8bf783feddd02e0f74/tsyganenko-2020.2.3-cp312-cp312-macosx_14_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "366cca6c9da8b1b02795056c5be96a2fe0b5619efc63a287a66aae6cf42face4",
"md5": "5507084da71a290b99f57e74fa310970",
"sha256": "67f9f425c68e8acb5b00c1f28b8e82cb7e2fd59e47ad6e14cf40a02e229c645f"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "5507084da71a290b99f57e74fa310970",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 1271977,
"upload_time": "2025-07-09T15:52:32",
"upload_time_iso_8601": "2025-07-09T15:52:32.374464Z",
"url": "https://files.pythonhosted.org/packages/36/6c/ca6c9da8b1b02795056c5be96a2fe0b5619efc63a287a66aae6cf42face4/tsyganenko-2020.2.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9a35bff476822d0f7af032ebc4fdc61cc0b1a5742feb6c37640cd01fb79e60b5",
"md5": "9ebe64d1421d70fab699650d6c0968db",
"sha256": "a6aca3aca69a90f33d34c79b31287aef510c057295d4cc37a5d7538b79276f95"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3-cp312-cp312-musllinux_1_2_x86_64.whl",
"has_sig": false,
"md5_digest": "9ebe64d1421d70fab699650d6c0968db",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 1574039,
"upload_time": "2025-07-09T15:52:34",
"upload_time_iso_8601": "2025-07-09T15:52:34.171834Z",
"url": "https://files.pythonhosted.org/packages/9a/35/bff476822d0f7af032ebc4fdc61cc0b1a5742feb6c37640cd01fb79e60b5/tsyganenko-2020.2.3-cp312-cp312-musllinux_1_2_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "48f3f08e78c3f492d9ef8c836b589c4388d307384444daf1b9b0bfe59984b574",
"md5": "893337bec3a17a81e224ddd1262c6878",
"sha256": "d2008c05f958e58abfc22cf62e25efa8e178baf13210a4bc45be5f4141da11a8"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3-cp313-cp313-macosx_14_0_arm64.whl",
"has_sig": false,
"md5_digest": "893337bec3a17a81e224ddd1262c6878",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 866437,
"upload_time": "2025-07-09T15:52:36",
"upload_time_iso_8601": "2025-07-09T15:52:36.128776Z",
"url": "https://files.pythonhosted.org/packages/48/f3/f08e78c3f492d9ef8c836b589c4388d307384444daf1b9b0bfe59984b574/tsyganenko-2020.2.3-cp313-cp313-macosx_14_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "44e8f2df5fc25fd6ceca2457066a3b2eb466741954397e2325475b974512f632",
"md5": "d855ad19824640c69ef4bbc04c5966ff",
"sha256": "4c5056d40cf2cde22a025684e20ff934c8cd734e16e3b9672ed17205de0959dd"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "d855ad19824640c69ef4bbc04c5966ff",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 1272037,
"upload_time": "2025-07-09T15:52:37",
"upload_time_iso_8601": "2025-07-09T15:52:37.583000Z",
"url": "https://files.pythonhosted.org/packages/44/e8/f2df5fc25fd6ceca2457066a3b2eb466741954397e2325475b974512f632/tsyganenko-2020.2.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "730aaf79ed47e97ff4437b12396b194e021893304233cfe15df6573d26764c8e",
"md5": "b7cf949dfa59833bc181a92831ed44a6",
"sha256": "3e36ade6e3b986d451f6e5871c66bd4eb4d5199d0f1bc30ef07ff221bac15fde"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3-cp313-cp313-musllinux_1_2_x86_64.whl",
"has_sig": false,
"md5_digest": "b7cf949dfa59833bc181a92831ed44a6",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 1574043,
"upload_time": "2025-07-09T15:52:39",
"upload_time_iso_8601": "2025-07-09T15:52:39.476639Z",
"url": "https://files.pythonhosted.org/packages/73/0a/af79ed47e97ff4437b12396b194e021893304233cfe15df6573d26764c8e/tsyganenko-2020.2.3-cp313-cp313-musllinux_1_2_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8672e03e2ec67817e14661d36c96e390e921f868c071d638a431533a4d8ab410",
"md5": "eca7c3c9991104e6483e8c61b748e803",
"sha256": "90d6a1bd0e34d5dbfebdb80070620573b8ef47192a77e8479cac7802f5116f86"
},
"downloads": -1,
"filename": "tsyganenko-2020.2.3.tar.gz",
"has_sig": false,
"md5_digest": "eca7c3c9991104e6483e8c61b748e803",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 407150,
"upload_time": "2025-07-09T15:52:41",
"upload_time_iso_8601": "2025-07-09T15:52:41.458585Z",
"url": "https://files.pythonhosted.org/packages/86/72/e03e2ec67817e14661d36c96e390e921f868c071d638a431533a4d8ab410/tsyganenko-2020.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 15:52:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "johncoxon",
"github_project": "tsyganenko",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tsyganenko"
}