Skip to main content
Files added late

2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.

ipython_ferretmagic

IPython notebook extension for ferret (a great software for Data Visualisation and Analysis from NOAA/PMEL).

Browse the demo notebooks from http://nbviewer.ipython.org/github/PBrockmann/ipython_ferretmagic/tree/master/notebooks

Combine ferret and ipython widgets and create interactive notebooks !

Test it with binder. Binder

Browse a basic ferret tutorial using ferretmagic from: https://github.com/PBrockmann/C-CASCADES_notebooks/blob/master/ferretBasics.ipynb

ScreenShot

Latest news

2018/10/01

  • Compatibility with python 3 with print command and base64 encoding
  • Tested with pyferret==7.43, notebook==5.7.0, jupyter==1.0.0, ipython==5.8.0, ipywidgets==7.4.2
  • Update pip package (now last version is 20181001 https://pypi.org/project/ferretmagic/)

2018/01/18

2017/03/17

  • Tested with pyferret==7.1, jupyter==4.2.0, ipywidgets==6.0.0

2016/10/28

  • Tested with pyferret==7.0, jupyter==4.2.0 and ipython==5.1.0
  • Installation from pip

Installation

Install PyFerret following instructions from http://ferret.pmel.noaa.gov/Ferret/documentation/pyferret It will set all directories needed to run pyferret (font, ppl, jnls, datasets, ...).

You can also install PyFerret as a conda package from https://anaconda.org/conda-forge/pyferret (no datasets distributed).

Then install the ferret magic extension (ferretmagic.py) by typing pip install ferretmagic

Usage

In a Jupyter notebook with kernel python (previously named ipython), load the magics:

In [2]: %load_ext ferretmagic

Line magics

The %ferret_run magic enables one-line execution of ferret command in the IPython interpreter or notebook:

    In [3]: for i in [100,500,1000]:
      ....: 	%ferret_run -s 400,400 'plot sin(i[i=1:%(i)s]*0.1)' % locals()

Cell magics

Multi-line input can be entered with the %%ferret cell magic:

In [4]: %%ferret
  ....: use levitus_climatology
  ....: shade temp[k=1]			! comments
  • Control size of plot with --size, -s option.
  • Create a local pdf at the same time with --pdf, -p option.
In [5]: %%ferret -s 400,300 -pdf myfig.pdf
  ....: shade temp[k=1]			

Passing variables between Python and ferret

  • Variables can be pushed from IPython into ferret with %ferret_putdata:
In [18]: %%ferret
   ....: use levitus_climatology
In [19]: %ferret_getdata tempdict = temp
   ....: Message: tempdict is now available in python as a dictionary containing the variable's metadata and data array.
In [20]: print tempdict.keys()
   ....: ['axis_coords', 'axis_types', 'data_unit', 'axis_units', 'title', 'axis_names', 'missing_value', 'data']
  • Variables can be pulled from ferret into IPython with %ferret_getdata:
In [31]: import numpy as np
   ....: b = {}
   ....: b['name']='myvar'
   ....: b['name']='myvar'
   ....: x=np.linspace(-np.pi*4, np.pi*4, 500)
   ....: b['data']=np.sin(x)/x
   ....: b.keys()
Out[31]: ['data', 'name']
In [32]: %ferret_putdata --axis_pos (1,0,2,3,4,5) b
   ....: Message: b is now available in ferret as myvar

Explore notebook for examples.

Known issues and limitations

Metadata

Release files for ferretmagic 20181001

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Files added late

2 files were uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for ferretmagic 20181001
File Size Uploaded Provenance Actions
ferretmagic-20181001.tar.gz 7.5 kB File added late: Without provenance Details for ferretmagic-20181001.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ferretmagic 20181001
File Interpreter ABI Platform Actions
ferretmagic-20181001-py3-none-any.whl Python 3 none any Details for ferretmagic-20181001-py3-none-any.whl
ferretmagic-20181001-py2-none-any.whl Python 2 none any Details for ferretmagic-20181001-py2-none-any.whl

Total release size: 24.6 kB

Release files / ferretmagic-20181001.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL ferretmagic-20181001.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e1ad96c267a877aac902e070c73bec73e6eaed75ac6bcf05137caddc56f42626
BLAKE2b-256 checksum
How to use checksums
21b6b143120ea4f9934dc6c8b4cb9c01873c59b764b8feb9f394e55cf1e2e306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

Release files / ferretmagic-20181001-py3-none-any.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL ferretmagic-20181001-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95a5bb6c2addc0bb66748bd9a59dbf0ca6d5156a887b76797121d9112a0a3d94
BLAKE2b-256 checksum
How to use checksums
f296a74de7ad391d5298222f7c2beefea3f2231d877199cfb6564d7179086be0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

Release files / ferretmagic-20181001-py2-none-any.whl

Download URL ferretmagic-20181001-py2-none-any.whl
Size 8.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
04569de9e8502996646c6708d15a9902c72f6c8ca979f0fa51736231e1ea31e6
BLAKE2b-256 checksum
How to use checksums
8cda964534bdebd7736ae9d89602e280557865f48b0d03845a0c1697752496c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.12

Security for ferretmagic 20181001

Upload timing

Files added late

2 files were uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page