{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import ipywe.imagedisplay as imgdisp\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "xg,yg = np.mgrid[1:500, 1:500]\n", "\n", "class Image:\n", " def __init__(self, x0, y0, sigma):\n", " self.data = np.exp(-((xg-x0)**2+(yg-y0)**2)/2/sigma**2)\n", "\n", "images = [Image(250., 250., s) for s in np.arange(5, 30, 1.)]" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "imgdisp.ImageDisplay(images[20], 300, 300)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.13" } }, "nbformat": 4, "nbformat_minor": 2 }