Ipython: a System for Interactive Scientific

Total Page:16

File Type:pdf, Size:1020Kb

Ipython: a System for Interactive Scientific P YTHON: B ATTERIES I NCLUDED IPython: A System for Interactive Scientific Computing Python offers basic facilities for interactive work and a comprehensive library on top of which more sophisticated systems can be built. The IPython project provides an enhanced interactive environment that includes, among other features, support for data visualization and facilities for distributed and parallel computation. he backbone of scientific computing is All these systems offer an interactive command mostly a collection of high-perfor- line in which code can be run immediately, without mance code written in Fortran, C, and having to go through the traditional edit/com- C++ that typically runs in batch mode pile/execute cycle. This flexible style matches well onT large systems, clusters, and supercomputers. the spirit of computing in a scientific context, in However, over the past decade, high-level environ- which determining what computations must be ments that integrate easy-to-use interpreted lan- performed next often requires significant work. An guages, comprehensive numerical libraries, and interactive environment lets scientists look at data, visualization facilities have become extremely popu- test new ideas, combine algorithmic approaches, lar in this field. As hardware becomes faster, the crit- and evaluate their outcome directly. This process ical bottleneck in scientific computing isn’t always the might lead to a final result, or it might clarify how computer’s processing time; the scientist’s time is also they need to build a more static, large-scale pro- a consideration. For this reason, systems that allow duction code. rapid algorithmic exploration, data analysis, and vi- As this article shows, Python (www.python.org) sualization have become a staple of daily scientific is an excellent tool for such a workflow.1 The work. The Interactive Data Language (IDL) and IPython project (http://ipython.scipy.org) aims to Matlab (for numerical work), and Mathematica and not only provide a greatly enhanced Python shell Maple (for work that includes symbolic manipula- but also facilities for interactive distributed and par- tion) are well-known commercial environments of allel computing, as well as a comprehensive set of this kind. GNU Data Language, Octave, Maxima tools for building special-purpose interactive envi- and Sage provide their open source counterparts. ronments for scientific computing. Python: An Open and General- 1521-9615/07/$25.00 © 2007 IEEE Purpose Environment Copublished by the IEEE CS and the AIP The fragment in Figure 1 shows the default inter- FERNANDO PÉREZ active Python shell, including a computation with University of Colorado at Boulder long integers (whose size is limited only by the BRIAN E. GRANGER available memory) and one using the built-in com- plex numbers, where the literal 1j represents Tech-X Corporation i = −1 . MAY/JUNE 2007 THIS ARTICLE HAS BEEN PEER-REVIEWED. 21 $ python # $ represents the system prompt One of us (Fernando Pérez) started IPython as Python 2.4.3 (Apr 27 2006, 14:43:58) a merger of some personal enhancements to the [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 basic interactive Python shell with two existing Type “help”, “copyright”, “credits” or “license” open source projects (both now defunct and sub- for more information. sumed into IPython): >>> print “This is the Python shell.” This is the Python shell. • LazyPython, developed by Nathan Gray at Cal- tech, and >>> 2**45+1 # long integers are built-in •Interactive Python Prompt (IPP) by Janko 35184372088833L Hauser at the University of Kiel’s Institute of >>> import cmath # default complex math library Marine Research. >>> cmath.exp(–1j*cmath.pi) (–1–1.2246063538223773e-16j) After an initial development period as a mostly single-author project, IPython has attracted a growing group of contributors. Today, Ville Figure 1. Default interactive Python shell. In the two computations Vainio and other collaborators maintain the sta- shown—one with long integers and one using the built-in complex ble official branch, while we’re developing a next- numbers—the literal 1j represents i = −1 . generation system. Since IPython’s beginning, we’ve tried to pro- vide the best possible interactive environment for This shell allows for some customization and ac- everyday computing tasks, whether the actual work cess to help and documentation, but overall it’s a was scientific or not. With this goal in mind, we’ve fairly basic environment. freely mixed new ideas with existing ones from However, what Python lacks in the sophistica- Unix system shells and environments such as tion of its default shell, it makes up for by being Mathematica and IDL. a general-purpose programming language with access to a large set of libraries with additional ca- Features of a Good pabilities. Python’s standard library includes Interactive Computing Environment modules for regular expression processing, low- In addition to providing direct access to the un- level networking, XML parsing, Web services, derlying language (in our case, Python), we con- object serialization, and more. In addition, hun- sider a few basic principles to be the minimum dreds of third-party Python modules let users do requirements for a productive interactive comput- everything from work with Hierarchical Data ing system. Format 5 (HDF5) files to write graphical appli- cations. These diverse libraries make it possible Access to all session state. When working interac- to build sophisticated interactive environments tively, scientists commonly perform hundreds of in Python without having to implement every- computations in sequence and often might need to thing from scratch. reuse a previous result. The standard Python shell remembers the very last output and stores it into a IPython variable named “_” (a single underscore), but each Since late 2001, the IPython project has provided new result overwrites this variable. IPython stores tools to extend Python’s interactive capabilities be- a session’s inputs and outputs into a pair of num- yond those shipped by default with the language, bered tables called In and Out. All outputs are also and it continues to be developed as a base layer for accessible as _N, where N is the number of results new interactive environments. IPython is freely (you can also save a session’s inputs and outputs to available under the terms of the BSD license and a log file). Figure 2 shows the use of previous re- runs under Linux and other Unix-type operating sults in an IPython session. Because keeping a very systems, Apple OS X, and Microsoft Windows. large set of previous results can potentially lead to We won’t discuss IPython’s features in detail memory exhaustion, IPython lets users limit how here—it ships with a comprehensive user manual many results are kept. Users can also manually (also accessible on its Web site). Instead, we highlight delete individual references using the standard some of the basic ideas behind its design and how Python del keyword. they enable efficient interactive scientific computing. We encourage interested readers to visit the Web site A control system. It’s important to have a secondary and participate on the project’s mailing lists. control mechanism that is reasonably orthogonal 22 COMPUTING IN SCIENCE & ENGINEERING to the underlying language being executed (and in- $ ipython dependent of any variables or keywords in the lan- Python 2.4.3 (Apr 27 2006, 14:43:58) guage). Even programming languages as compact Type “copyright”, “credits” or “license” for more as Python have a syntax that requires parentheses, information. brackets, and so on, and thus aren’t the most con- venient for an interactive control systems. IPython 0.7.3 — An enhanced Interactive Python. IPython offers a set of control commands (or ? –> Introduction to IPython features. magic commands, as inherited from IPP) designed %magic –> Information about IPython magic % to improve Python’s usability in an interactive con- functions. text. The traditional Unix shell largely inspires the syntax for these magic commands, with white Help –> Python help system. space used as a separator and dashes indicating op- object? –> Details about object. ?object also tions. This system is accessible to the user, who works, ?? prints more. can extend it with new commands as desired. In [1]:2**45+1 The fragment in Figure 3 shows how to activate Out[1]:35184372088833L IPython’s logging system to save the session to a In [2]:import cmath named file, requesting that the output is logged In [3]:cmath.exp(–1j*cmath.pi) and every entry is time stamped. IPython auto- Out[3]:(–1–1.2246063538223773e–16j) matically interprets the logstart name as a call # The last result is always stored as '_' to a magic command because no Python variable In [4]:_ ** 2 with that name currently exists. If there were such Out[4]:(1+2.4492127076447545e–16j) a variable, typing %logstart would disambiguate # And all results are stored as N, where _N is the names. their number: Operating system access. Many computing tasks In [5]:_3+_4 involve working with the underlying operating Out[5]:1.2246063538223773e–16j system (reading data, looking for code to execute, loading other programs, and so on). IPython lets users create their own aliases for common system tasks, navigate the file system with familiar com- Figure 2. The use of previous results in an IPython session. In mands such as cd and ls, and prefix any command IPython, all outputs are also accessible as _N, where N is the number with ! for direct execution by the underlying OS. of results. Although these are fairly simple features, in prac- tice they help maintain a fluid work experience— they let users type standard Python code for In [2]: logstart –o –t ipsession.log programming tasks and perform common OS- Activating auto–logging. Current session state level actions with a familiar Unix-like syntax.
Recommended publications
  • Alternatives to Python: Julia
    Crossing Language Barriers with , SciPy, and thon Steven G. Johnson MIT Applied Mathemacs Where I’m coming from… [ google “Steven Johnson MIT” ] Computaonal soPware you may know… … mainly C/C++ libraries & soPware … Nanophotonics … oPen with Python interfaces … (& Matlab & Scheme & …) jdj.mit.edu/nlopt www.w.org jdj.mit.edu/meep erf(z) (and erfc, erfi, …) in SciPy 0.12+ & other EM simulators… jdj.mit.edu/book Confession: I’ve used Python’s internal C API more than I’ve coded in Python… A new programming language? Viral Shah Jeff Bezanson Alan Edelman julialang.org Stefan Karpinski [begun 2009, “0.1” in 2013, ~20k commits] [ 17+ developers with 100+ commits ] [ usual fate of all First reacBon: You’re doomed. new languages ] … subsequently: … probably doomed … sll might be doomed but, in the meanBme, I’m having fun with it… … and it solves a real problem with technical compuBng in high-level languages. The “Two-Language” Problem Want a high-level language that you can work with interacBvely = easy development, prototyping, exploraon ⇒ dynamically typed language Plenty to choose from: Python, Matlab / Octave, R, Scilab, … (& some of us even like Scheme / Guile) Historically, can’t write performance-criBcal code (“inner loops”) in these languages… have to switch to C/Fortran/… (stac). [ e.g. SciPy git master is ~70% C/C++/Fortran] Workable, but Python → Python+C = a huge jump in complexity. Just vectorize your code? = rely on mature external libraries, operang on large blocks of data, for performance-criBcal code Good advice! But… • Someone has to write those libraries. • Eventually that person may be you.
    [Show full text]
  • Data Visualization in Python
    Data visualization in python Day 2 A variety of packages and philosophies • (today) matplotlib: http://matplotlib.org/ – Gallery: http://matplotlib.org/gallery.html – Frequently used commands: http://matplotlib.org/api/pyplot_summary.html • Seaborn: http://stanford.edu/~mwaskom/software/seaborn/ • ggplot: – R version: http://docs.ggplot2.org/current/ – Python port: http://ggplot.yhathq.com/ • Bokeh (live plots in your browser) – http://bokeh.pydata.org/en/latest/ Biocomputing Bootcamp 2017 Matplotlib • Gallery: http://matplotlib.org/gallery.html • Top commands: http://matplotlib.org/api/pyplot_summary.html • Provides "pylab" API, a mimic of matlab • Many different graph types and options, some obscure Biocomputing Bootcamp 2017 Matplotlib • Resulting plots represented by python objects, from entire figure down to individual points/lines. • Large API allows any aspect to be tweaked • Lengthy coding sometimes required to make a plot "just so" Biocomputing Bootcamp 2017 Seaborn • https://stanford.edu/~mwaskom/software/seaborn/ • Implements more complex plot types – Joint points, clustergrams, fitted linear models • Uses matplotlib "under the hood" Biocomputing Bootcamp 2017 Others • ggplot: – (Original) R version: http://docs.ggplot2.org/current/ – A recent python port: http://ggplot.yhathq.com/ – Elegant syntax for compactly specifying plots – but, they can be hard to tweak – We'll discuss this on the R side tomorrow, both the basics of both work similarly. • Bokeh – Live, clickable plots in your browser! – http://bokeh.pydata.org/en/latest/
    [Show full text]
  • Writing Mathematical Expressions with Latex
    APPENDIX A Writing Mathematical Expressions with LaTeX LaTeX is extensively used in Python. In this appendix there are many examples that can be useful to represent LaTeX expressions inside Python implementations. This same information can be found at the link http://matplotlib.org/users/mathtext.html. With matplotlib You can enter the LaTeX expression directly as an argument of various functions that can accept it. For example, the title() function that draws a chart title. import matplotlib.pyplot as plt %matplotlib inline plt.title(r'$\alpha > \beta$') With IPython Notebook in a Markdown Cell You can enter the LaTeX expression between two '$$'. $$c = \sqrt{a^2 + b^2}$$ c= a+22b 537 © Fabio Nelli 2018 F. Nelli, Python Data Analytics, https://doi.org/10.1007/978-1-4842-3913-1 APPENDIX A WRITING MaTHEmaTICaL EXPRESSIONS wITH LaTEX With IPython Notebook in a Python 2 Cell You can enter the LaTeX expression within the Math() function. from IPython.display import display, Math, Latex display(Math(r'F(k) = \int_{-\infty}^{\infty} f(x) e^{2\pi i k} dx')) Subscripts and Superscripts To make subscripts and superscripts, use the ‘_’ and ‘^’ symbols: r'$\alpha_i > \beta_i$' abii> This could be very useful when you have to write summations: r'$\sum_{i=0}^\infty x_i$' ¥ åxi i=0 Fractions, Binomials, and Stacked Numbers Fractions, binomials, and stacked numbers can be created with the \frac{}{}, \binom{}{}, and \stackrel{}{} commands, respectively: r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$' 3 3 æ3 ö4 ç ÷ 4 è 4ø Fractions can be arbitrarily nested: 1 5 - x 4 538 APPENDIX A WRITING MaTHEmaTICaL EXPRESSIONS wITH LaTEX Note that special care needs to be taken to place parentheses and brackets around fractions.
    [Show full text]
  • SSWGDL Installation on Ubuntu 10.04 Using VMWARE Player
    SSWGDL Installation on Ubuntu 10.04 using VMWARE Player 1. Install ubuntu 10.04 on vmware a) ubuntu-10.04.1-desktop-i386.iso, 32 bit b) configure with 1-2 GB mem, 20-40 GB disk c) vmware tools - d) shared folders e) do not enable multiple processors even if your machines supports many f) pword yourpassword g) /home/yourname - that's the way I did it - h) login name is yourchoice 2. Configure Ubuntu a) do default system update via system update manager b) install vmware tools using easy install, run the perl scipt (.pl), let it compile and install c) use ubuntu software center d) cvs, plplot x11 driver, tcsh, wxidgets I grabbed wx2.8 dev and lib packages, see package- manager-installs.txt for details. 3. Download and install GDL with dependencies a) Download and unpack 0.90 release tar.gz into gdl-0.9 (use current release from gdl) b) Get dependencies using sudo apt-get build-dep gnudatalanguage c) cd to gdl-0.9 d) Configure using “./configure --with-Magick=no --with-python=no --with-openmp=no – with-hdf=no” e) Does anyone know how to install numarray so we don't have to use python=no switch f) Here is the message of success after configure: GDL - GNU Data Language • ----- compilation options: --------------------------- • System: i686-pc-linux-gnu • Installation prefix: /usr/local • C++ compiler: g++ -g -O2 • OpenMP support: no • Build type: standalone (other: Python module) • ----- optional libraries (consult README/INSTALL): --- • wxWidgets: yes • Magick: no • NetCDF: yes • HDF4: no • HDF5: yes • FFTW: yes • libproject: no (see also
    [Show full text]
  • Jazyk Gdl Na Spracovanie Vedeckých Dát
    JAZYK GDL NA SPRACOVANIE VEDECKÝCH DÁT ŠECHNÝ, Martin (SK) Abstrakt. GNU Data Language (GDL) je jazyk na spracovanie vedeckých dát a zároveň prostredie na spúšťanie programov v tomto jazyku. GDL je slobodný softvér kompatibilný s komerčne licencovaným Interactive Data Language (IDL). GDL je platformovo nezávislé prostredie a využíva iné dostupné nainštalované knižnice a aplikácie. Jazyk GDL umožňuje spracovávať vstupy z klávesnice, dátové súbory, obrázky a dokáže vizualizovať dáta tabuľkami, grafmi, obrázkami. GDL je efektívny pri numerickej analýze dát, vektorovej reprezentácii, použití matematických funkcií a procedúr. Tento nástroj je vhodný pre široké použitie vo vede, výskume, aj ako alternatíva k známym matematickým a vizualizačným nástrojom. Kľúčové slová. GDL, IDL, vedecké dáta, programovanie, vizualizácia. GDL LANGUAGE FOR SCIENTIFIC DATA PROCESSING Abstract. GNU Data Language (GDL) is a language for scientific data processing and also the environment for launching programs in that language. GDL is a free software that is compatible with commercially licensed Interactive Data Language (IDL). GDL is a platform-independent environment and uses other available libraries and applications installed. GDL language enables to process keyboard input, data files, images and can visualize data tables, charts, pictures. GDL is effective in the analysis of numerical data, vector representation, the use of mathematical functions and procedures. This tool is suitable for wide use in science, research, and as an alternative to known mathematical and visualization tools. Key words and phrases. GDL, IDL, scientific data, programming, visualization. 1 Úvod GNU Data Language (GDL)1 je jazyk na spracovanie vedeckých dát a zároveň prostredie (interpreter a inkrementálny prekladač) na spúšťanie programov v tomto jayzku.
    [Show full text]
  • Ipython Documentation Release 0.10.2
    IPython Documentation Release 0.10.2 The IPython Development Team April 09, 2011 CONTENTS 1 Introduction 1 1.1 Overview............................................1 1.2 Enhanced interactive Python shell...............................1 1.3 Interactive parallel computing.................................3 2 Installation 5 2.1 Overview............................................5 2.2 Quickstart...........................................5 2.3 Installing IPython itself....................................6 2.4 Basic optional dependencies..................................7 2.5 Dependencies for IPython.kernel (parallel computing)....................8 2.6 Dependencies for IPython.frontend (the IPython GUI).................... 10 3 Using IPython for interactive work 11 3.1 Quick IPython tutorial..................................... 11 3.2 IPython reference........................................ 17 3.3 IPython as a system shell.................................... 42 3.4 IPython extension API..................................... 47 4 Using IPython for parallel computing 53 4.1 Overview and getting started.................................. 53 4.2 Starting the IPython controller and engines.......................... 57 4.3 IPython’s multiengine interface................................ 64 4.4 The IPython task interface................................... 78 4.5 Using MPI with IPython.................................... 80 4.6 Security details of IPython................................... 83 4.7 IPython/Vision Beam Pattern Demo.............................
    [Show full text]
  • Easybuild Documentation Release 20210907.0
    EasyBuild Documentation Release 20210907.0 Ghent University Tue, 07 Sep 2021 08:55:41 Contents 1 What is EasyBuild? 3 2 Concepts and terminology 5 2.1 EasyBuild framework..........................................5 2.2 Easyblocks................................................6 2.3 Toolchains................................................7 2.3.1 system toolchain.......................................7 2.3.2 dummy toolchain (DEPRECATED) ..............................7 2.3.3 Common toolchains.......................................7 2.4 Easyconfig files..............................................7 2.5 Extensions................................................8 3 Typical workflow example: building and installing WRF9 3.1 Searching for available easyconfigs files.................................9 3.2 Getting an overview of planned installations.............................. 10 3.3 Installing a software stack........................................ 11 4 Getting started 13 4.1 Installing EasyBuild........................................... 13 4.1.1 Requirements.......................................... 14 4.1.2 Using pip to Install EasyBuild................................. 14 4.1.3 Installing EasyBuild with EasyBuild.............................. 17 4.1.4 Dependencies.......................................... 19 4.1.5 Sources............................................. 21 4.1.6 In case of installation issues. .................................. 22 4.2 Configuring EasyBuild.......................................... 22 4.2.1 Supported configuration
    [Show full text]
  • Intro to Jupyter Notebook
    Evan Williamson University of Idaho Library 2016­03­02 Introducing Jupyter Notebook for Python and R Three questions: http://goo.gl/forms/uYRvebcJkD ​ Try Jupyter https://try.jupyter.org/ Install Jupyter ● Get Python (suggested: Anaconda, Py3, 64­bit, https://www.continuum.io/downloads ) ​ ​ ● Manually install (if necessary), http://jupyter.readthedocs.org/en/latest/install.html ​ pip3 install jupyter Install R for Jupyter ● Get R, https://cran.cnr.berkeley.edu/ ​ (suggested: RStudio, https://www.rstudio.com/products/RStudio/#Desktop ) ​ ​ ● Open R console and follow: http://irkernel.github.io/installation/ ​ Start a Notebook ● Open terminal/command prompt jupyter notebook ● Notebook will open at http://127.0.0.1:8888 ​ ● Exit by closing the browser, then typing Ctrl+C in the terminal window Create Slides ● Open terminal/command prompt jupyter nbconvert slideshow.ipynb --to slides --post serve ● Note: “­­post serve” locally serves the file so you can give a presentation in your browser. If you only want to convert, leave this option off. The resulting HTML file must be served to render correctly. Slides use Reveal.js, http://lab.hakim.se/reveal­js/ ​ Reference ● Jupyter docs, http://jupyter.readthedocs.org/en/latest/index.html ​ ● IPython docs, http://ipython.readthedocs.org/en/stable/index.html ​ ● List of kernels, https://github.com/ipython/ipython/wiki/IPython­kernels­for­other­languages ● A gallery of interesting IPython Notebooks, https://github.com/ipython/ipython/wiki/A­gallery­of­interesting­IPython­Notebooks ● Markdown basics,
    [Show full text]
  • Numpy for MATLAB Users – Mathesaurus
    NumPy for MATLAB users Help MATLAB/Octave Python Description doc help() Browse help interactively help -i % browse with Info help help or doc doc help Help on using help help plot help(plot) or ?plot Help for a function help splines or doc splines help(pylab) Help for a toolbox/library package demo Demonstration examples Searching available documentation MATLAB/Octave Python Description lookfor plot Search help files help help(); modules [Numeric] List available packages which plot help(plot) Locate functions Using interactively MATLAB/Octave Python Description octave -q ipython -pylab Start session TAB or M-? TAB Auto completion foo(.m) execfile('foo.py') or run foo.py Run code from file history hist -n Command history diary on [..] diary off Save command history exit or quit CTRL-D End session CTRL-Z # windows sys.exit() Operators MATLAB/Octave Python Description help - Help on operator syntax Arithmetic operators MATLAB/Octave Python Description a=1; b=2; a=1; b=1 Assignment; defining a number a + b a + b or add(a,b) Addition a - b a - b or subtract(a,b) Subtraction a * b a * b or multiply(a,b) Multiplication a / b a / b or divide(a,b) Division a .^ b a ** b Power, $a^b$ power(a,b) pow(a,b) rem(a,b) a % b Remainder remainder(a,b) fmod(a,b) a+=1 a+=b or add(a,b,a) In place operation to save array creation overhead factorial(a) Factorial, $n!$ Relational operators MATLAB/Octave Python Description a == b a == b or equal(a,b) Equal a < b a < b or less(a,b) Less than a > b a > b or greater(a,b) Greater than a <= b a <= b or less_equal(a,b)
    [Show full text]
  • Status of GDL-GNU Data Language
    Astronomical Data Analysis Software and Systems XIX O14.3 ASP Conference Series, Vol. XXX, 2009 Y. Mizumoto, K.-I. Morita, and M. Ohishi, eds. Status of GDL - GNU Data Language A. Coulais LERMA, Obs. de Paris, ENS, UPMC, UCP, CNRS, Paris, France M. Schellens1 J. Gales Goddard Space Flight Center, Greenbelt, MD, USA S. Arabas Institute of Geophysics, University of Warsaw, Poland M. Boquien University of Massachusetts, Dep. of Astronomy, Amherst, MA, USA P. Chanial P. Messmer, D. Fillmore Tech-X GmbH, Zurich, Switzerland; Tech-X Corp, Boulder, CO, USA O. Poplawski Colorado Div. (CoRA) of NorthWest Res. Ass. Inc., Boulder, CO, USA S. Maret LAOG, Obs. de Grenoble, UJF, CNRS, Grenoble, France G. Marchal2, N. Galmiche2, T. Mermet2 arXiv:1101.0679v1 [astro-ph.IM] 4 Jan 2011 Abstract. Gnu Data Language (GDL) is an open-source interpreted language aimed at numerical data analysis and visualisation. It is a free implementation of the Interactive Data Language (IDL) widely used in Astronomy. GDL has a full syntax compatibility with IDL, and includes a large set of library routines targeting advanced matrix manipulation, plotting, time-series and image analy- sis, mapping, and data input/output including numerous scientific data formats. We will present the current status of the project, the key accomplishments, and the weaknesses - areas where contributions are welcome! 1Head of the project 2Former students at LERMA CNRS and Observatoire de Paris 1 2 Coulais et al. 1. Dependencies GDL is written in C++ and can be compiled on systems with GCC (≥ 3.4) and X11 or equivalents. The code, under GNU GPL, is hosted by SourceForge.
    [Show full text]
  • GNU Data Language (GDL) - a Free and Open-Source Implementation of IDL
    Geophysical Research Abstracts Vol. 12, EGU2010-924-1, 2010 EGU General Assembly 2010 © Author(s) 2009 GNU Data Language (GDL) - a free and open-source implementation of IDL Sylwester Arabas (1), Marc Schellens (), Alain Coulais (2), Joel Gales (3), and Peter Messmer (4) (1) Institute of Geophysics, University of Warsaw, Warsaw, Poland ([email protected] / +48225546882), (2) LERMA, CNRS and Observatoire de Paris, Paris, France, (3) NASA Goddard Space Flight Center, Greenbelt, Maryland, USA, (4) Tech-X Corporation, Boulder, Colorado, USA GNU Data Language (GDL) is developed with the aim of providing an open-source drop-in replacement for the ITTVIS’s Interactive Data Language (IDL). It is free software developed by an international team of volunteers led by Marc Schellens - the project’s founder (a list of contributors is available on the project’s website). The development is hosted on SourceForge where GDL continuously ranks in the 99th percentile of most active projects. GDL with its library routines is designed as a tool for numerical data analysis and visualisation. As its proprietary counterparts (IDL and PV-WAVE), GDL is used particularly in geosciences and astronomy. GDL is dynamically-typed, vectorized and has object-oriented programming capabilities. The library routines handle numerical calculations, data visualisation, signal/image processing, interaction with host OS and data input/output. GDL supports several data formats such as netCDF, HDF4, HDF5, GRIB, PNG, TIFF, DICOM, etc. Graphical output is handled by X11, PostScript, SVG or z-buffer terminals, the last one allowing output to be saved in a variety of raster graphics formats.
    [Show full text]
  • Sage Tutorial (Pdf)
    Sage Tutorial Release 9.4 The Sage Development Team Aug 24, 2021 CONTENTS 1 Introduction 3 1.1 Installation................................................4 1.2 Ways to Use Sage.............................................4 1.3 Longterm Goals for Sage.........................................5 2 A Guided Tour 7 2.1 Assignment, Equality, and Arithmetic..................................7 2.2 Getting Help...............................................9 2.3 Functions, Indentation, and Counting.................................. 10 2.4 Basic Algebra and Calculus....................................... 14 2.5 Plotting.................................................. 20 2.6 Some Common Issues with Functions.................................. 23 2.7 Basic Rings................................................ 26 2.8 Linear Algebra.............................................. 28 2.9 Polynomials............................................... 32 2.10 Parents, Conversion and Coercion.................................... 36 2.11 Finite Groups, Abelian Groups...................................... 42 2.12 Number Theory............................................. 43 2.13 Some More Advanced Mathematics................................... 46 3 The Interactive Shell 55 3.1 Your Sage Session............................................ 55 3.2 Logging Input and Output........................................ 57 3.3 Paste Ignores Prompts.......................................... 58 3.4 Timing Commands............................................ 58 3.5 Other IPython
    [Show full text]