{ "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": "# MHDWaveHarmonics\nSome simple tools for modelling MHD wave harmonics in an arbitrary magnetic field geometry.\n\n## Installation\n\nInstall using `pip3`:\n\n```\npip3 install MHDWaveHarmonics --user\n```\n\nThe installation will require the following packages:\n\n* `numpy`\n* `scipy`\n* `matplotlib`\n* `PyGeopack`\n* `FieldTracing`\n\nall of which will be installed automatically. For modelling waves in\nMercury's magnetosphere you will also require the `KT17` model.\n\n## Usage\n\n### 1. `GetFieldLine`\n\nThe `GetFieldLine` function will trace a model field, returning a \n`TraceField` object alongside a `numpy.ndarray`, `s`, which contains the \ndistance along the traced field line and optionally `h` if the \npolarization is specified:\n\n```python\nimport MHDWaveHarmonics as wh\nT,s = wh.GetFieldLine(pos,Date=None,ut=None,Model='KT17',Delta=None,Polarization='none',**kwargs)\nT,s,h = wh.GetFieldLine(pos,Date=None,ut=None,Model='KT17',Delta=None,Polarization='poloidal',**kwargs)\n```\n\nwhere `h` is provided using a second trace if the `Polarization` parameter\nis set to `'poloidal'`, `'toroidal'` or a `float` corresponding to an\nangle in degrees anticlockwise from the poloidal direction (the outward\npointing normal direction of the field line). Use ```wh.GetFieldLine?```\nto find out more about this procedure from its docstring.\n\n### 2. `SolveWave`\n\nThis procedure will attempt to solve the wave equation along an arbitrary\nmagnetic field trace such as that provided by `GetFieldLine`:\n\n```python\nyr = wh.SolveWave(f,x,B,R=None,Va=None,halpha=None,Params=None,InPlanet=None,Method='Simple',Unscale=True)\nyr,yi,phase = SolveWave(f,x,B,R=None,Va=None,halpha=None,Params=None,InPlanet=None,Method='Complex',Unscale=True)\n```\n\nwhere `yr` is the real part of the scaled field displacement, ξ/hα , `yi` \nis the imaginary part, and `phase` is a continuous measure of the waves\nphase along the trace. See the docstring for more information.\n\n### 3. `FindHarmonics`\n\nThis will attempt to solve the wave equation in order to find a number\nof harmonics which would be allowed to exist:\n\n```python\nfreq,success,niter = wh.FindHarmonics(T,s,Params,halpha=None,Harmonics=[1,2,3],x0=None,df=1.0,Method='Complex')\n```\nwhere `freq` is an array of allowed frequencies, `success` is a Boolean \narray denoting whether each fit was successful or not and `niter` is an \narray containing the number of iterations reqquired for each fit.\n\n### 4. `CalcFieldLineVa`\n\nThis will calculate the Alfven speed at each point along the trace:\n\n```python\nva = CalcFieldLineVa(T,s,Params,halpha=None)\n```\n\nor at the midpoint between each pair of consecutive steps along the trace:\n\n```python\nvamid = CalcFieldLineVaMid(T,s,Params,halpha=None)\n```\n\n### 5. `PlotHarmonics`\n\nThis will produce a plot of the allowed toroidal and poloidal harmonics \non a field line given an initial position for the trace and a plasma\nmass density profile along the field.\n\n```python\nPlotHarmonics(pos,Params,nh=3,df=1.0,Rp=1.0,Colours=None,Method='Complex',**kwargs)\n```\n### 6. `FitPlasmaToHarmonic`\n\nAttempts to fit a power law or the Sandhu et al model plasma mass density\nprofile to a given field trace.\n\n```python\np_eq = FitPlasmaToHarmonic(T,s,halpha,f,Params,Harm=1,df=1.0,Method='Complex')\n```\n\n### 7. `FitPlasma`\n\nThis tries to fit the plasma mass density profile to a set of observed\nfrequencies (with their assumed harmonic numbers) along a field trace.\n\n```python\nparams = FitPlasma(T,s,halpha,freqs,harms,Params0,df=1.0,Method='Complex',ParamFit=None)\n```\n\n### 8. `GetSandhuParams`\n\nCalculates the parameters for the Sandhu et al electron density and \naverage ion mass models.\n\n```python\nne0,alpha,a,beta,mav0 = GetSandhuParams(mlt,L)\n```\n\n### 9. `PlotFieldLineDensity`\n\nPlots the modelled density along a field line given a position in which\nto start a field trace and a set of plasma profile parameters.\n\n```python\nPlotFieldLineDensity(pos,Params,fig=None,maps=[1,1,0,0],Overplot=False,**kwargs)\n```\n\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/mattkjames7/MHDWaveHarmonics", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "MHDWaveHarmonics", "package_url": "https://pypi.org/project/MHDWaveHarmonics/", "platform": "", "project_url": "https://pypi.org/project/MHDWaveHarmonics/", "project_urls": { "Homepage": "https://github.com/mattkjames7/MHDWaveHarmonics" }, "release_url": "https://pypi.org/project/MHDWaveHarmonics/0.0.3/", "requires_dist": [ "numpy", "scipy", "matplotlib", "PyGeopack (>=0.2.7)", "FieldTracing" ], "requires_python": "", "summary": "Some simple tools for modelling MHD wave harmonics in an arbitrary magnetic field geometry.", "version": "0.0.3", "yanked": false, "yanked_reason": null }, "last_serial": 7690447, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "63b2e2c1d351b4142a4f18b6d2fbf817", "sha256": "5db1db725b0637f3358a980306082b5b56afed188652c5c59c17922f10feb184" }, "downloads": -1, "filename": "MHDWaveHarmonics-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "63b2e2c1d351b4142a4f18b6d2fbf817", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 74039, "upload_time": "2018-11-26T16:17:08", "upload_time_iso_8601": "2018-11-26T16:17:08.486237Z", "url": "https://files.pythonhosted.org/packages/40/64/b627e0acd07f10f558399bac5c44a9f64d8fb8d0d1c654b70f1dc57254cd/MHDWaveHarmonics-0.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "6841715326ca3d8afc98bfb473ae352e", "sha256": "97bce9ba4f737470ecf2d316e3b92e40aeccf499c0aac2ab1b5d8f6675f794cb" }, "downloads": -1, "filename": "MHDWaveHarmonics-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6841715326ca3d8afc98bfb473ae352e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 60293, "upload_time": "2018-11-26T16:17:10", "upload_time_iso_8601": "2018-11-26T16:17:10.849897Z", "url": "https://files.pythonhosted.org/packages/ee/44/45272edfadb7c5603b893c099019431e8aed6c0bf30e2ee12d341f6e5188/MHDWaveHarmonics-0.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7b429681980fc744e72c9a43f8b88b8a", "sha256": "091e20fa39eb7773f573e3104ca7fb83f64c17bf55ea564779e81656ca3e2de0" }, "downloads": -1, "filename": "MHDWaveHarmonics-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7b429681980fc744e72c9a43f8b88b8a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 79453, "upload_time": "2019-10-22T19:04:07", "upload_time_iso_8601": "2019-10-22T19:04:07.232325Z", "url": "https://files.pythonhosted.org/packages/54/6d/93d56048651c19d70cc2bdd0fea4aaba075b6ceb839b8c58d0e1f240e8cf/MHDWaveHarmonics-0.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "d16cdef97a3a91b78a55c9f9c7235374", "sha256": "a1d2b573b367c5428eb0b3f0b6045c26015c2f3c44e4bfc9f6478c7a5a6cf2dd" }, "downloads": -1, "filename": "MHDWaveHarmonics-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d16cdef97a3a91b78a55c9f9c7235374", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 79475, "upload_time": "2020-07-13T13:29:16", "upload_time_iso_8601": "2020-07-13T13:29:16.340428Z", "url": "https://files.pythonhosted.org/packages/43/01/05e71ce139c15fe6c52a92b5210f3bfb2d2c461a8ff95bdd79c6dfd8bc14/MHDWaveHarmonics-0.0.3-py3-none-any.whl", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d16cdef97a3a91b78a55c9f9c7235374", "sha256": "a1d2b573b367c5428eb0b3f0b6045c26015c2f3c44e4bfc9f6478c7a5a6cf2dd" }, "downloads": -1, "filename": "MHDWaveHarmonics-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d16cdef97a3a91b78a55c9f9c7235374", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 79475, "upload_time": "2020-07-13T13:29:16", "upload_time_iso_8601": "2020-07-13T13:29:16.340428Z", "url": "https://files.pythonhosted.org/packages/43/01/05e71ce139c15fe6c52a92b5210f3bfb2d2c461a8ff95bdd79c6dfd8bc14/MHDWaveHarmonics-0.0.3-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }