{ "info": { "author": "Patrick Brockmann", "author_email": "Patrick.Brockmann@lsce.ipsl.fr", "bugtrack_url": null, "classifiers": [ "Framework :: IPython", "Framework :: Jupyter", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "ipython_ferretmagic\n===================\n\nIPython notebook extension for ferret (a great software for Data Visualisation and Analysis from NOAA/PMEL).\n\nBrowse the demo notebooks from http://nbviewer.ipython.org/github/PBrockmann/ipython_ferretmagic/tree/master/notebooks\n\nCombine ferret and ipython widgets and create interactive notebooks !\n\nTest it with binder.\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/PBrockmann/ipython_ferretmagic/master)\n\nBrowse a basic ferret tutorial using ferretmagic from: https://github.com/PBrockmann/C-CASCADES_notebooks/blob/master/ferretBasics.ipynb\n\n![ScreenShot](./images/ferretmagic_widgets.png)\n\n## Latest news \n\n2018/10/01\n * Compatibility with python 3 with print command and base64 encoding\n * Tested with pyferret==7.43, notebook==5.7.0, jupyter==1.0.0, ipython==5.8.0, ipywidgets==7.4.2\n * Update pip package (now last version is 20181001 https://pypi.org/project/ferretmagic/)\n\n2018/01/18\n * a Docker image is available from https://hub.docker.com/r/pbrockmann/pyferret-7.3/\n * pyferret 7.3 and ferretmagic extension can now be fully tested from binder (http://mybinder.readthedocs.io/en/latest) !\n * Tested with pyferret==7.3, jupyter==4.4.0, ipython==5.5.0, ipywidgets==7.0.5\n\n2017/03/17\n * Tested with pyferret==7.1, jupyter==4.2.0, ipywidgets==6.0.0\n\n2016/10/28\n * Tested with pyferret==7.0, jupyter==4.2.0 and ipython==5.1.0\n * Installation from pip\n\n## Installation\n\nInstall PyFerret following instructions from http://ferret.pmel.noaa.gov/Ferret/documentation/pyferret\nIt will set all directories needed to run pyferret (font, ppl, jnls, datasets, ...).\n\nYou can also install PyFerret as a conda package from https://anaconda.org/conda-forge/pyferret (no datasets distributed).\n\nThen install the ferret magic extension (ferretmagic.py) by typing\n```pip install ferretmagic```\n\n## Usage\n\nIn a Jupyter notebook with kernel python (previously named ipython), load the magics:\n\n In [2]: %load_ext ferretmagic\n\n### Line magics\n\nThe `%ferret_run` magic enables one-line execution of ferret command in the IPython interpreter or notebook:\n\n```\n In [3]: for i in [100,500,1000]:\n ....: \t%ferret_run -s 400,400 'plot sin(i[i=1:%(i)s]*0.1)' % locals()\n```\n\n### Cell magics\n\nMulti-line input can be entered with the `%%ferret` cell magic:\n\n```\nIn [4]: %%ferret\n ....: use levitus_climatology\n ....: shade temp[k=1]\t\t\t! comments\n```\n\n* Control size of plot with --size, -s option.\n* Create a local pdf at the same time with --pdf, -p option.\n\n```\nIn [5]: %%ferret -s 400,300 -pdf myfig.pdf\n ....: shade temp[k=1]\t\t\t\n```\n\n### Passing variables between Python and ferret \n\n* Variables can be pushed from IPython into ferret with `%ferret_putdata`:\n\n```\nIn [18]: %%ferret\n ....: use levitus_climatology\nIn [19]: %ferret_getdata tempdict = temp\n ....: Message: tempdict is now available in python as a dictionary containing the variable's metadata and data array.\nIn [20]: print tempdict.keys()\n ....: ['axis_coords', 'axis_types', 'data_unit', 'axis_units', 'title', 'axis_names', 'missing_value', 'data']\n```\n\n* Variables can be pulled from ferret into IPython with `%ferret_getdata`:\n\n```\nIn [31]: import numpy as np\n ....: b = {}\n ....: b['name']='myvar'\n ....: b['name']='myvar'\n ....: x=np.linspace(-np.pi*4, np.pi*4, 500)\n ....: b['data']=np.sin(x)/x\n ....: b.keys()\nOut[31]: ['data', 'name']\nIn [32]: %ferret_putdata --axis_pos (1,0,2,3,4,5) b\n ....: Message: b is now available in ferret as myvar\n```\n\nExplore notebook for examples.\n\n## Known issues and limitations\n\n* Note that the pdf file produced by -p,--pdf option is not embedded in the notebook\n* Limitations are the ones exposed from pyferret, the qualifier /pattern is not usable for example. Read http://ferret.pmel.noaa.gov/Ferret/documentation/pyferret/known-issues\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/PBrockmann/ipython_ferretmagic/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PBrockmann/ipython_ferretmagic", "keywords": "jupyter,ipython,ferret,pyferret,magic,extension", "license": "", "maintainer": "", "maintainer_email": "", "name": "ferretmagic", "package_url": "https://pypi.org/project/ferretmagic/", "platform": "", "project_url": "https://pypi.org/project/ferretmagic/", "project_urls": { "Download": "https://github.com/PBrockmann/ipython_ferretmagic/tarball/master", "Homepage": "https://github.com/PBrockmann/ipython_ferretmagic" }, "release_url": "https://pypi.org/project/ferretmagic/20181001/", "requires_dist": null, "requires_python": "", "summary": "ipython extension for pyferret", "version": "20181001" }, "last_serial": 4615965, "releases": { "20181001": [ { "comment_text": "", "digests": { "md5": "b4ca7fdb07d66ed15b3ba7cd897ec6c5", "sha256": "04569de9e8502996646c6708d15a9902c72f6c8ca979f0fa51736231e1ea31e6" }, "downloads": -1, "filename": "ferretmagic-20181001-py2-none-any.whl", "has_sig": false, "md5_digest": "b4ca7fdb07d66ed15b3ba7cd897ec6c5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8107, "upload_time": "2018-10-01T13:44:09", "url": "https://files.pythonhosted.org/packages/8c/da/964534bdebd7736ae9d89602e280557865f48b0d03845a0c1697752496c5/ferretmagic-20181001-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ce1f613740fba165f5602e8571a40ef0", "sha256": "95a5bb6c2addc0bb66748bd9a59dbf0ca6d5156a887b76797121d9112a0a3d94" }, "downloads": -1, "filename": "ferretmagic-20181001-py3-none-any.whl", "has_sig": false, "md5_digest": "ce1f613740fba165f5602e8571a40ef0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8963, "upload_time": "2018-12-19T10:09:00", "url": "https://files.pythonhosted.org/packages/f2/96/a74de7ad391d5298222f7c2beefea3f2231d877199cfb6564d7179086be0/ferretmagic-20181001-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "533471287567b379cfdbde6968d3f86a", "sha256": "e1ad96c267a877aac902e070c73bec73e6eaed75ac6bcf05137caddc56f42626" }, "downloads": -1, "filename": "ferretmagic-20181001.tar.gz", "has_sig": false, "md5_digest": "533471287567b379cfdbde6968d3f86a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2018-12-19T10:09:02", "url": "https://files.pythonhosted.org/packages/21/b6/b143120ea4f9934dc6c8b4cb9c01873c59b764b8feb9f394e55cf1e2e306/ferretmagic-20181001.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4ca7fdb07d66ed15b3ba7cd897ec6c5", "sha256": "04569de9e8502996646c6708d15a9902c72f6c8ca979f0fa51736231e1ea31e6" }, "downloads": -1, "filename": "ferretmagic-20181001-py2-none-any.whl", "has_sig": false, "md5_digest": "b4ca7fdb07d66ed15b3ba7cd897ec6c5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8107, "upload_time": "2018-10-01T13:44:09", "url": "https://files.pythonhosted.org/packages/8c/da/964534bdebd7736ae9d89602e280557865f48b0d03845a0c1697752496c5/ferretmagic-20181001-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ce1f613740fba165f5602e8571a40ef0", "sha256": "95a5bb6c2addc0bb66748bd9a59dbf0ca6d5156a887b76797121d9112a0a3d94" }, "downloads": -1, "filename": "ferretmagic-20181001-py3-none-any.whl", "has_sig": false, "md5_digest": "ce1f613740fba165f5602e8571a40ef0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8963, "upload_time": "2018-12-19T10:09:00", "url": "https://files.pythonhosted.org/packages/f2/96/a74de7ad391d5298222f7c2beefea3f2231d877199cfb6564d7179086be0/ferretmagic-20181001-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "533471287567b379cfdbde6968d3f86a", "sha256": "e1ad96c267a877aac902e070c73bec73e6eaed75ac6bcf05137caddc56f42626" }, "downloads": -1, "filename": "ferretmagic-20181001.tar.gz", "has_sig": false, "md5_digest": "533471287567b379cfdbde6968d3f86a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2018-12-19T10:09:02", "url": "https://files.pythonhosted.org/packages/21/b6/b143120ea4f9934dc6c8b4cb9c01873c59b764b8feb9f394e55cf1e2e306/ferretmagic-20181001.tar.gz" } ] }