{ "info": { "author": "Vincent Morello", "author_email": "vmorello@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: Unix", "Programming Language :: Fortran", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Astronomy" ], "description": "# pyne2001\n\n[![Build Status](https://travis-ci.com/v-morello/pyne2001.svg?branch=master)](https://travis-ci.com/v-morello/pyne2001) ![License](https://img.shields.io/pypi/l/pyne2001.svg) ![Python versions](https://img.shields.io/pypi/pyversions/pyne2001.svg)\n\nA python wrapper around the original FORTRAN implementation of the NE2001 Galactic free electron density model, published in the paper \n[NE2001.I. A New Model for the Galactic Distribution of Free Electrons and its Fluctuations](https://arxiv.org/abs/astro-ph/0207156), by J.M. Cordes and T.J.W. Lazio.\n\n**If using `pyne2001` contributes to a project that leads to a scientific publication, please cite the article above.**\n\nThe python functions implemented in `pyne2001` simply call the NE2001 executable and parse the resulting text output. This module uses version 1.0 of the FORTRAN code available from [http://hosting.astro.cornell.edu/~cordes/NE2001/](http://hosting.astro.cornell.edu/~cordes/NE2001/), with a few minor changes documented below (c.f. section \"FORTRAN code changes\"). **None of the changes affect the numerical results returned by the NE2001 program**, they are just minor bugfixes and quality-of-life changes to make the parsing of the text output easier.\n\n### Dependencies and Python version\n\n`pyne2001` works with both python 2.7 and python 3+, and does not depend on any external python libraries. A FORTRAN compiler must be available on the system prior to installing the module.\n\n\n### Installation\n\n`pyne2001` can be installed easily with pip:\n```bash\npip install pyne2001\n```\n\nTo check that all went well, try importing the module and running the unit tests, you should see something like this:\n\n```ipython\nIn [1]: import pyne2001\n\nIn [2]: pyne2001.test()\n..............\n----------------------------------------------------------------------\nRan 14 tests in 0.599s\n\nOK\n```\n\n### Installation in development mode\n\nIf you want to be able to modify the code freely: clone the repository, then in its base folder type ```make install```. This compiles the FORTRAN code and runs ```pip install``` in [editable mode](https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs).\n\n\n### Usage\n\n`pyne2001` provides 6 functions, see their docstrings for the full details:\n\n- `get_dist`: Calculate the NE2001 distance for the given Galactic coordinates and DM. Returns a tuple `(dist_kpc, lim)` where `lim` is a boolean flag that is `True` if the returned distance value is only a lower limit estimate (i.e. input DM exceeds Galactic contribution).\n\n- `get_dist_full`: Same as `get_dist`, but instead return the full NE2001 output as a dictionary. The keys are parsed from the second output column of the NE2001 program, see table below and original paper for further details.\n\n- `get_dm`: Calculate the NE2001 DM for for the given Galactic coordinates and distance.\n\n- `get_dm_full`: Same as `get_dm`, but instead return the full NE2001 output as a dictionary. The keys are parsed from the second output column of the NE2001 program, see table below and original paper for further details.\n\n- `get_galactic_dm`: A convenience function to get the Galactic DM contribution for a given line of sight. Simply calls `get_dm` with `dist_kpc = 30.0`.\n\n- `test`: Run all unit tests\n\nThe output keys when returning the full output are:\n```\nKey Unit Description\n------------------------------------------------------------\nDIST (kpc) ModelDistance\nDM (pc-cm^{-3}) DispersionMeasure\nDMz (pc-cm^{-3}) DM_Zcomponent\nSM (kpc-m^{-20/3}) ScatteringMeasure\nSMtau (kpc-m^{-20/3}) SM_PulseBroadening\nSMtheta (kpc-m^{-20/3}) SM_GalAngularBroadening\nSMiso (kpc-m^{-20/3}) SM_IsoplanaticAngle\nEM (pc-cm^{-6}) EmissionMeasure_from_SM\nTAU (ms) PulseBroadening @1GHz\nSBW (MHz) ScintBW @1GHz\nSCINTIME (s) ScintTime @1GHz @100 km/s\nTHETA_G (mas) AngBroadeningGal @1GHz\nTHETA_X (mas) AngBroadeningXgal @1GHz\nNU_T (GHz) TransitionFrequency\nLOWERLIM If True, ModelDistance is a lower limit only\n```\n\n\n### FORTRAN code changes\n\n##### Bugfixes:\n\n- Removed extra space between declared `common` arrays (`dmdsm.NE2001.f:68`)\n\n- Replaced hardcoded `1` by `1.0` in a call to `max()` that needs two arguments of type float (`dmdsm.NE2001.f:408`)\n\n- Replaced `iargc` by `iargc_` (`NE2001.f:28-29`)\n\n- Replaced obsolete PAUSE statement with a WRITE (`density.NE2001.f:697`)\n\n##### Changes:\n\n- Input files are now all placed in `/bin`. Removed `/input` directory.\n\n- Removed `run_NE2001.pl`\n\n- Changed compiler from f77 to gfortran (`Makefile`)\n\n- `make clean` now also deletes `libNE2001.a` (`Makefile`)", "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/v-morello/pyne2001", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "pyne2001", "package_url": "https://pypi.org/project/pyne2001/", "platform": "", "project_url": "https://pypi.org/project/pyne2001/", "project_urls": { "Homepage": "https://github.com/v-morello/pyne2001" }, "release_url": "https://pypi.org/project/pyne2001/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "A simple python wrapper around the original FORTRAN implementation of the NE2001 Galactic free electron density model", "version": "0.1.3" }, "last_serial": 4743566, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "dd8660ca739acf6aef55f424f81fa999", "sha256": "08333294c71096e98e4e8eb0135ad46574cfc419748b09ca1d36203757e351b5" }, "downloads": -1, "filename": "pyne2001-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dd8660ca739acf6aef55f424f81fa999", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49406, "upload_time": "2019-01-18T14:13:49", "url": "https://files.pythonhosted.org/packages/45/89/99da82cb5c706e3d6933507a682ba95d1f7a2d7bc787ad71661c46780aef/pyne2001-0.1.1.tar.gz" } ], "0.1.1rc1": [ { "comment_text": "", "digests": { "md5": "b3d9db0ad68243b3c94abdc7c1653f7d", "sha256": "7d66882144ddb1ff95e07e9cfc6336518d587046cbc00f478efac8ea78f6893f" }, "downloads": -1, "filename": "pyne2001-0.1.1rc1.tar.gz", "has_sig": false, "md5_digest": "b3d9db0ad68243b3c94abdc7c1653f7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49405, "upload_time": "2019-01-18T14:03:53", "url": "https://files.pythonhosted.org/packages/43/d2/2ac1f40ae77414917ebdb714097c50e8ce9e4a798d4bdaed870a447a577b/pyne2001-0.1.1rc1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8bc8a263cd54be9de2dbb6e856cc4ed5", "sha256": "d7b9a158c657243ead602202af71cad7d4f7734946b0bfbdd953ab125d4e9081" }, "downloads": -1, "filename": "pyne2001-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8bc8a263cd54be9de2dbb6e856cc4ed5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49584, "upload_time": "2019-01-24T17:05:26", "url": "https://files.pythonhosted.org/packages/73/02/d1daf549cc1721ce2e1c4760f0d5250905b8554e27aa28efe9e289ea5e9e/pyne2001-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "5b6777827d280d45f076b6baeb2a1e54", "sha256": "a566c07e3bd8154b10f849e647f537bcbf52a9558fb8e6734bc2da88830d3433" }, "downloads": -1, "filename": "pyne2001-0.1.3.tar.gz", "has_sig": false, "md5_digest": "5b6777827d280d45f076b6baeb2a1e54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50050, "upload_time": "2019-01-26T12:08:36", "url": "https://files.pythonhosted.org/packages/d8/d1/7a2a2a83091416e73fe43b1413dea1c842ea06438431545b315d7e1cfd76/pyne2001-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5b6777827d280d45f076b6baeb2a1e54", "sha256": "a566c07e3bd8154b10f849e647f537bcbf52a9558fb8e6734bc2da88830d3433" }, "downloads": -1, "filename": "pyne2001-0.1.3.tar.gz", "has_sig": false, "md5_digest": "5b6777827d280d45f076b6baeb2a1e54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50050, "upload_time": "2019-01-26T12:08:36", "url": "https://files.pythonhosted.org/packages/d8/d1/7a2a2a83091416e73fe43b1413dea1c842ea06438431545b315d7e1cfd76/pyne2001-0.1.3.tar.gz" } ] }