Ginga Documentation Release 3.2.1.Dev14+G754e5b1

Total Page:16

File Type:pdf, Size:1020Kb

Ginga Documentation Release 3.2.1.Dev14+G754e5b1 ginga Documentation Release 3.2.1.dev14+g754e5b1 Ginga Maintainers Sep 24, 2021 CONTENTS I About Ginga1 II Copyright and License5 III Requirements and Supported Platforms9 IV Getting the Source 13 V Building and Installation 17 1 Installation 21 VI Documentation 27 2 What’s New 29 3 Quick Reference 43 4 User’s Manual 51 5 Developer’s Manual 157 6 Optimizing Performance 207 7 FAQs 209 8 Reference/API 213 i VII Bug Reports 289 VIII Developer Info 293 IX Etymology 297 X Pronunciation 301 Python Module Index 305 Index 307 ii Part I About Ginga 1 ginga Documentation, Release 3.2.1.dev14+g754e5b1 Ginga is a toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel datain NumPy arrays. It can view astronomical data such as contained in files based on the FITS (Flexible Image Transport System) file format. It is written and is maintained by software engineers at the National Astronomical Observatory ofJapan, the Space Telescope Science Institute, and other contributing entities. The Ginga toolkit centers around an image display class which supports zooming and panning, color and intensity mapping, a choice of several automatic cut levels algorithms and canvases for plotting scalable geometric forms. In addition to this widget, a general purpose “reference” FITS viewer is provided, based on a plugin framework. A fairly complete set of “standard” plugins are provided for features that we expect from a modern FITS viewer: panning and zooming windows, star catalog access, cuts, star pick/FWHM, thumbnails, etc. 3 ginga Documentation, Release 3.2.1.dev14+g754e5b1 4 Part II Copyright and License 5 ginga Documentation, Release 3.2.1.dev14+g754e5b1 Copyright (c) 2011-2021 Ginga Maintainers. All rights reserved. Ginga is distributed under an open-source BSD licence. Please see the file LICENSE.txt in the top-level directory for details. 7 ginga Documentation, Release 3.2.1.dev14+g754e5b1 8 Part III Requirements and Supported Platforms 9 ginga Documentation, Release 3.2.1.dev14+g754e5b1 Because Ginga is written in pure Python, it can run on any platform that has the required Python modules and has a supported widget set. The basic Ginga display class supports the Qt (4 and 5), PySide, Gtk (3), Tk widget sets natively as well as any Matplotlib Figure, and HTML5 canvases in a web browser. The full reference viewer supports Qt and Gtk variants. Ginga can also be used in Jupyter notebooks. 11 ginga Documentation, Release 3.2.1.dev14+g754e5b1 12 Part IV Getting the Source 13 ginga Documentation, Release 3.2.1.dev14+g754e5b1 Clone from Github: git clone https://github.com/ejeschke/ginga.git To get a ZIP file or tarball instead, see the links on About Ginga. 15 ginga Documentation, Release 3.2.1.dev14+g754e5b1 16 Part V Building and Installation 17 ginga Documentation, Release 3.2.1.dev14+g754e5b1 Download and install from pip: pip install ginga Or conda: conda install ginga-c conda-forge The reference viewer can then be run using the command ginga. For detailed instructions, see: 19 ginga Documentation, Release 3.2.1.dev14+g754e5b1 20 CHAPTER ONE INSTALLATION 1.1 Dependencies Ginga is written entirely in Python, and only uses supporting Python packages. There is nothing to compile (unless you need to compile one of the supporting packages). In recent Linux, Mac, and Windows versions, all of the packages are available in binary (installable) form. It should not be necessary to compile anything, but as always, your mileage may vary. 1.1.1 REQUIRED • python (v. 3.7 or higher) • setuptools-scm • numpy (v. 1.14 or higher) • astropy Strongly recommended, because some features will not be available without it: • scipy • pillow • opencv-python (also distributed as opencv or python-opencv, depending on where you get it from) • piexif • beautifulsoup4 • docutils (to display help for plugins) For opening FITS files you will need one of the following packages: • astropy • fitsio For WCS resolution you will need one of the following packages: • astropy • kapteyn • astLib • starlink 21 ginga Documentation, Release 3.2.1.dev14+g754e5b1 1.1.2 BACKENDS (one or more) Ginga can draw its output to a number of different back ends. Depending on which GUI toolkit you prefer (andwhat you want to do), you will need at least one of the following: • QtPy (PyQt4 or PyQt5) • PySide (Qt4/Qt5 alternative) • pygobject (gi) AND pycairo (GTK 3) • tkinter • matplotlib • tornado • aggdraw • Pillow (PIL fork) 1.1.3 RECOMMENDED Certain plugins in the reference viewer (or features of those plugins) will not work without the following packages: • matplotlib (required by: Pick, Cuts, Histogram, LineProfile) • scipy (required by: Pick, some built-in auto cuts algorithms used when you load an image) • astroquery (required by Catalogs) To save a movie: • mencoder (command line tool required by: Cuts) Helpful, but not necessary (may optimize or speed up certain operations): • opencv-python (speeds up rotation, mosaicing and some transformations) • pyopengl + pycairo (for using OpenGL features; very useful for 4K or larger monitors) • filemagic (aids in identifying files when opening them) • Pillow (useful for various RGB file manipulations) 1.2 Notes on Supported Widget Sets In the discussion below, we differentiate between the Ginga viewing widget, such as used inthe examples/\*/ example\*.py programs and the full reference viewer, which includes many plugins (ginga). Note: For the full reference viewer, Mac and Windows users should probably install the Qt version, unless you are the tinkering sort. Linux can use either Qt or GTK fine. 22 Chapter 1. Installation ginga Documentation, Release 3.2.1.dev14+g754e5b1 1.2.1 Qt/PySide Ginga can use either PyQt or PySide, version 4 or 5. It will auto-detect which one is installed, using the qtpy compat- ibility package. There is support for both the basic widget and the full reference viewer. Note: If you have both installed and you want to use a specific one then set the environment variable QT_API to either “pyqt” or “pyside”. This is the same procedure as for Matplotlib. 1.2.2 GTK Ginga can use GTK 3 (with gi). (If you have an older version of pycairo package, you may need to install a newer version from pycairo). 1.2.3 Tk Ginga’s Tk support is limited to the viewing widget itself. For overplotting (graphics) support, you will also need one of: • Pillow • opencv-python • aggdraw 1.2.4 Matplotlib Ginga can render directly into a Matplotlib figure. Support is limited to the viewing widget itself. Any of the backends that Matplotlib supports is usable. Performance is not as good as to one of the “native” backends listed above, but oh, the overplot options! 1.2.5 HTML5 web browser Ginga can render into an HTML5 canvas via a web server. Support is limited to the viewing widget itself. See the notes in examples/pg/example2_pg.py. Tested browsers include Chromium (Chrome), Firefox, and Safari. 1.3 Basic Installation You can download and install via pip by choosing the command that best suits your needs (full selection is defined in setup configuration file): pip install ginga # The most basic installation pip install ginga[recommended,qt5] # Qt5 pip install ginga[recommended,gtk3] # GTK 3 Or via conda: 1.3. Basic Installation 23 ginga Documentation, Release 3.2.1.dev14+g754e5b1 conda install ginga-c conda-forge The reference viewer can then be run using the command ginga. 1.4 Installation from Source 1. Clone from Github: git clone https://github.com/ejeschke/ginga.git Or see links on this page to get a ZIP file or tarball. 2. Unpack, go into the top level directory, and run: pip install-e. 1.5 Platform Specific Instructions 1.5.1 Linux (Debian/Ubuntu) If you are on a relatively recent version of Debian or Ubuntu, something like the following will work: apt install python3-ginga If you are using another distribution of Linux, we recommend to install via Anaconda or Miniconda as described below. 1.5.2 Mac/Windows/Linux (others) Anaconda For Mac/Windows or other Linux users, we recommend installing the Anaconda distribution (or Miniconda). This distribution already includes all of the necessary packages to run Ginga. After installing Anaconda, open the Anaconda Prompt and follow instructions under Basic Installation via conda. 1.6 Running tests 1. Install the following packages: $ pip install -e .[test] 2. Run the tests using pytest: $ pytest 24 Chapter 1. Installation ginga Documentation, Release 3.2.1.dev14+g754e5b1 1.7 Building documentation 1. Install the following packages: $ pip install -e .[docs] 2. Build the documentation using make: $ cd doc $ make html 1.7. Building documentation 25 ginga Documentation, Release 3.2.1.dev14+g754e5b1 26 Chapter 1. Installation Part VI Documentation 27 CHAPTER TWO WHAT’S NEW 2.1 Ver 3.3.0 (unreleased) • Fixed an issue with image rotation when OpenCv is installed • Removed support for OpenCL • Fixed Crosshair plugin to update the plot when image changes in channel • Fixed an issue where a thumbnail could be generated even if the channel was configured not to generate thumbs 2.2 Ver 3.2.0 (2021-06-07) • Minimum supported Python version is now 3.7 • Fixed some numpy deprecation warnings with numpy 1.19.0 • Canvas shapes can now be copied • Added an option to make a copy of existing shape in Drawing plugin • Added an option to make a copy of existing cut in Cuts plugin • Added new iqcalc_astropy module to handle FWHM fitting and source finding using astropy and photutils • Added new calc_fwhm_lib configuration item to let Pick switch between iqcalc and iqcalc_astropy • Fixed a
Recommended publications
  • Computer Science & Information Technology 33
    Computer Science & Information Technology 33 Dhinaharan Nagamalai Sundarapandian Vaidyanathan (Eds) Computer Science & Information Technology Fifth International Conference on Computer Science, Engineering and Applications (CCSEA-2015) Dubai, UAE, January 23 ~ 24 - 2015 AIRCC Volume Editors Dhinaharan Nagamalai, Wireilla Net Solutions PTY LTD, Sydney, Australia E-mail: [email protected] Sundarapandian Vaidyanathan, R & D Centre, Vel Tech University, India E-mail: [email protected] ISSN: 2231 - 5403 ISBN: 978-1-921987-26-7 DOI : 10.5121/csit.2015.50201 - 10.5121/csit.2015.50218 This work is subject to copyright. All rights are reserved, whether whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the International Copyright Law and permission for use must always be obtained from Academy & Industry Research Collaboration Center. Violations are liable to prosecution under the International Copyright Law. Typesetting: Camera-ready by author, data conversion by NnN Net Solutions Private Ltd., Chennai, India Preface Fifth International Conference on Computer Science, Engineering and Applications (CCSEA-2015) was held in Dubai, UAE, during January 23 ~ 24, 2015. Third International Conference on Data Mining & Knowledge Management Process (DKMP 2015), International Conference on Artificial Intelligence and Applications (AIFU-2015) and Fourth International Conference on Software Engineering and Applications (SEA-2015) were collocated with the CCSEA-2015. The conferences attracted many local and international delegates, presenting a balanced mixture of intellect from the East and from the West.
    [Show full text]
  • Python Qt Tutorial Documentation Release 0.0
    Python Qt tutorial Documentation Release 0.0 Thomas P. Robitaille Jun 11, 2018 Contents 1 Installing 3 2 Part 1 - Hello, World! 5 3 Part 2 - Buttons and events 7 4 Part 3 - Laying out widgets 9 5 Part 4 - Dynamically updating widgets 13 i ii Python Qt tutorial Documentation, Release 0.0 This is a short tutorial on using Qt from Python. There are two main versions of Qt in use (Qt4 and Qt5) and several Python libraries to use Qt from Python (PyQt and PySide), but rather than picking one of these, this tutorial makes use of the QtPy package which provides a way to use whatever Python Qt package is available. This is not meant to be a completely exhaustive tutorial but just a place to start if you’ve never done Qt development before, and it will be expanded over time. Contents 1 Python Qt tutorial Documentation, Release 0.0 2 Contents CHAPTER 1 Installing 1.1 conda If you use conda to manage your Python environment (for example as part of Anaconda or Miniconda), you can easily install Qt, PyQt5, and QtPy (a common interface to all Python Qt bindings) using: conda install pyqt qtpy 1.2 pip If you don’t make use of conda, an easy way to install Qt, PyQt5, and QtPy is to do: pip install pyqt5 qtpy 3 Python Qt tutorial Documentation, Release 0.0 4 Chapter 1. Installing CHAPTER 2 Part 1 - Hello, World! To start off, we need to create a QApplication object, which represents the overall application: from qtpy.QtWidgets import QApplication app= QApplication([]) You will always need to ensure that a QApplication object exists, otherwise your Python script will terminate with an error if you try and use any other Qt objects.
    [Show full text]
  • Testing Pyside/Pyqt Code Using the Pytest Framework and Pytest-Qt
    Testing PySide/PyQt Code Using the pytest framework and pytest-qt Florian Bruhin “The Compiler” Bruhin Software 06. November 2019 Qt World Summit, Berlin About me • 2011: Started using Python • 2013: Started using PyQt and developing qutebrowser • 2015: Switched to pytest, ended up as a maintainer • 2017: qutebrowser v1.0.0, QtWebEngine by default • 2019: 40% employed, 60% open-source and freelancing (Bruhin Software) Giving trainings and talks at various conferences and companies! Relevant Python features Decorators registered_functions: List[Callable] = [] def register(f: Callable) -> Callable: registered_functions.append(f) return f @register def func() -> None: .... Relevant Python features Context Managers def write_file() -> None: with open("test.txt", "w") as f: f.write("Hello World") Defining your own: Object with special __enter__ and __exit__ methods. Relevant Python features Generators/yield def gen_values() -> Iterable[int] for i in range(4): yield i print(gen_values()) # <generator object gen_values at 0x...> print(list(gen_values())) # [0, 1, 2, 3] PyQt • Started in 1998 (!) by Riverbank Computing • GPL/commercial • Qt4 $ PyQt4 Qt5 $ PyQt5 PySide / Qt for Python • Started in 2009 by Nokia • Unmaintained for a long time • Since 2016: Officially maintained by the Qt Company again • LGPL/commercial • Qt4 $ PySide Qt5 $ PySide2 (Qt for Python) Qt and Python import sys from PySide2.QtWidgets import QApplication, QWidget, QPushButton if __name__ == "__main__": app = QApplication(sys.argv) window = QWidget() button = QPushButton("Don't
    [Show full text]
  • The Elinks Manual the Elinks Manual Table of Contents Preface
    The ELinks Manual The ELinks Manual Table of Contents Preface.......................................................................................................................................................ix 1. Getting ELinks up and running...........................................................................................................1 1.1. Building and Installing ELinks...................................................................................................1 1.2. Requirements..............................................................................................................................1 1.3. Recommended Libraries and Programs......................................................................................1 1.4. Further reading............................................................................................................................2 1.5. Tips to obtain a very small static elinks binary...........................................................................2 1.6. ECMAScript support?!...............................................................................................................4 1.6.1. Ok, so how to get the ECMAScript support working?...................................................4 1.6.2. The ECMAScript support is buggy! Shall I blame Mozilla people?..............................6 1.6.3. Now, I would still like NJS or a new JS engine from scratch. .....................................6 1.7. Feature configuration file (features.conf).............................................................................7
    [Show full text]
  • A Pyqt GUI for a Soc Design a Pyqt GUI for a Soc Design SMR3249
    Jose´ Antonio de la Torre las Heras Universidad de Castilla-La Mancha SMR3249 A PyQT GUI for a SoC design A PyQT GUI for a SoC design SMR3249 Contents 1 Vivado and SDK 4 2 main.c 9 3 Opening development environment 9 4 Designing the interface 11 4.1 Design in QtDesigner . 11 4.2 Exporting the interface . 18 5 Programming the controller 19 6 Testing the design 26 7 Optional exercises 31 7.1 Add controls to select a serial device and baudrate (easy) . 31 7.2 Use layouts to make tabs responsive . 31 7.3 Modify how pyqtgraph looks (easy) . 31 7.4 Modify how data is sent . 31 1 A PyQT GUI for a SoC design SMR3249 Introduction In this tutorial, you will learn how to communicate external devices like pmods sensors, and leds from Zedboard to a PC (frontend). In order to avoid privative software like: Matlab, Visual Basic, Labview. In this laboratory, we are going to use Python and different libraries which are completely free and open source. The advantages of using these kind of technologies are the following ones: you have control over all parts of your system and you don't need to trust in external companies and private design cycles. In this project, you will learn how to integrate a fully functional project from a reconfigurable part to high level programming in Python. The main objective of the project is that the student, at the end, understands how to integrate all the parts to create a final product. Objectives • To design a fully functional GUI (Graphical User Interface) • To create a controller of the GUI • To connect a Zedboard to the GUI • To control a Zedboard from the GUI • To get data and plot from Zedboard Procedure This project has different parts.
    [Show full text]
  • Download Pyqt Tutorial (PDF Version)
    PyQt About the Tutorial PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt is a blend of Python programming language and the Qt library. This introductory tutorial will assist you in creating graphical applications with the help of PyQt. Audience This tutorial is designed for software programmers who are keen on learning how to develop graphical applications using PyQt. Prerequisites You should have a basic understanding of computer programming terminologies. A basic understanding of Python and any of the programming languages is a plus. Disclaimer & Copyright Copyright 2015 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected]. i PyQt Table of Contents About the Tutorial ..............................................................................................................................................
    [Show full text]
  • Openoffice Spreadsheet Override Auto Capatilization
    Openoffice Spreadsheet Override Auto Capatilization Selfsame Randie thraws her anesthesia so debauchedly that Merwin spiles very raspingly. Mitral Gerrard condones synchronically, he catches his pitchstone very unpreparedly. Is Lon Muhammadan or associate when rematches some requisition tile war? For my monobook skin is a list of As arch Capital will change percentage setting in gorgeous Voice Settings dialog. What rate the 4 basic layout types? Class WriteExcel Documentation for writeexcel 104. OpenOfficeorg 3 Getting Started Calamo. Saving Report Output native Excel XLSX Format. Installed tax product to another precious you should attend Office Manager and. Sep 2015 How to boast Off Automatic Capitalization in Excel 2013 middot Click. ExportMode Defaults to 'xlsx' and uses the tow Office XML standards. HttpwwwopenofficeorglicensesPDLhtml with the additional caveat that anyone. The Source Documents window up the Change Summary window but easily be. Usually if you change this option it affects all components. Excel Export allows exporting ag-Grid data create Excel using Open XML format xlsx or its's own XML format. Lionel Elie Mamane fdo57640 Auto capitalization for letters wrong. Associating a document with somewhat different template 75. The Advantages of Apache OpenOffice Apache OpenOffice Wiki. Note We always prompt response keywords in first capital letters for clarity but the. It is based on code from Apache OpenOffice made available getting the. Citations that sort been inserted with automatic citation updates disabled would be inserted. Getting Started with LibreOffice 60 Dash. Ranges in A1 notation must restore in uppercase like outlook Excel. Open up office vs closed plan office advantages and. OpenDocument applications such as OpenOfficeorg let this change the format of.
    [Show full text]
  • U.S. Government Printing Office Style Manual, 2008
    U.S. Government Printing Offi ce Style Manual An official guide to the form and style of Federal Government printing 2008 PPreliminary-CD.inddreliminary-CD.indd i 33/4/09/4/09 110:18:040:18:04 AAMM Production and Distribution Notes Th is publication was typeset electronically using Helvetica and Minion Pro typefaces. It was printed using vegetable oil-based ink on recycled paper containing 30% post consumer waste. Th e GPO Style Manual will be distributed to libraries in the Federal Depository Library Program. To fi nd a depository library near you, please go to the Federal depository library directory at http://catalog.gpo.gov/fdlpdir/public.jsp. Th e electronic text of this publication is available for public use free of charge at http://www.gpoaccess.gov/stylemanual/index.html. Use of ISBN Prefi x Th is is the offi cial U.S. Government edition of this publication and is herein identifi ed to certify its authenticity. ISBN 978–0–16–081813–4 is for U.S. Government Printing Offi ce offi cial editions only. Th e Superintendent of Documents of the U.S. Government Printing Offi ce requests that any re- printed edition be labeled clearly as a copy of the authentic work, and that a new ISBN be assigned. For sale by the Superintendent of Documents, U.S. Government Printing Office Internet: bookstore.gpo.gov Phone: toll free (866) 512-1800; DC area (202) 512-1800 Fax: (202) 512-2104 Mail: Stop IDCC, Washington, DC 20402-0001 ISBN 978-0-16-081813-4 (CD) II PPreliminary-CD.inddreliminary-CD.indd iiii 33/4/09/4/09 110:18:050:18:05 AAMM THE UNITED STATES GOVERNMENT PRINTING OFFICE STYLE MANUAL IS PUBLISHED UNDER THE DIRECTION AND AUTHORITY OF THE PUBLIC PRINTER OF THE UNITED STATES Robert C.
    [Show full text]
  • Asyncprotect T1 Extunderscore Gui Documentation
    async_gui Documentation Release 0.1.1 Roman Haritonov Aug 21, 2017 Contents 1 Usage 1 1.1 Installation................................................1 1.2 First steps.................................................1 1.3 Tasks in threads.............................................2 1.4 Tasks in processes............................................3 1.5 Tasks in greenlets.............................................3 1.6 Returning result.............................................3 2 Supported GUI toolkits 5 3 API 7 3.1 engine..................................................7 3.2 tasks...................................................8 3.3 gevent_tasks...............................................9 4 Indices and tables 11 Python Module Index 13 i ii CHAPTER 1 Usage Installation Install with pip or easy_install: $ pip install --upgrade async_gui or download latest version from GitHub: $ git clone https://github.com/reclosedev/async_gui.git $ cd async_gui $ python setup.py install To run tests: $ python setup.py test First steps First create Engine instance corresponding to your GUI toolkit (see Supported GUI toolkits): from async_gui.tasks import Task from async_gui.toolkits.pyqt import PyQtEngine engine= PyQtEngine() It contains decorator @engine.async which allows you to write asynchronous code in serial way without callbacks. Example button click handler: @engine.async def on_button_click(self, *args): self.status_label.setText("Downloading image...") 1 async_gui Documentation, Release 0.1.1 # Run single task in separate thread
    [Show full text]
  • Introduction to GUI Development Using Qt
    Introduction to GUI development using Qt Paolo Quadrani – [email protected] Andrea Negri – [email protected] SuperComputing Applications and Innovation Department What is Qt ● Qt is a cross-platform development framework written in C++ ● Can be used in several programming languages through bindings ● Ruby ● Java ● Perl ● Python → PyQt ● The Qt Toolkit is a collection of classes for various purposes ● Database management ● XML ● WebKit ● Multimedia ● Networking ● ... ● For desktop, mobile and embedded development ● Used by more than 350,000 commercial and open source developers ● Backed by Qt consulting, support and training ● Trusted by over 6,500 companies worldwide Qt modules Qt brief timeline ● Qt Development Frameworks founded in 1994 ● Trolltech acquired by Nokia in 2008 ● Qt Commercial business acquired by Digia in 2011 ● Qt business acquired by Digia from Nokia in 2012 Why Qt • Write code once to target multiple platforms • Produce compact, high-performance applications • Focus on innovation, not infrastructure coding • Choose the license that fits you • Commercial, LGPL or GPL • Count on professional services, support and training PyQt ● PyQt is a set of Python bindings for Qt framework ● Bindings implemented as Python modules (620+ classes) ● Almost the entire Qt library is available ● Take advantage of both languages key strength ● Python: easy to learn, lot of extensions, no compilation required ● Qt: abstraction of platform-specific details, GUI designer “Hello world” in PyQt 1/2 from PyQt4.QtCore import * from PyQt4.QtGui
    [Show full text]
  • View the Index
    INDEX Symbols creating the fleet, 258–264 dropping the fleet, 267 + (addition), 26 reaching bottom of * (asterisk) operator, 147 screen, 276 {} (braces), 92, 105 rebuilding the fleet, 270 / (division), 26 bullets, 246–252 ** (double asterisk) operator, 149 collisions, with aliens, == (equality operator), 72–73 268–269, 291–292 ** (exponent), 26 deleting old, 250 // (floor division), 260 firing, 249 > (greater than), 75 limiting number of, 251 >= (greater than or equal to), 75 making larger, 270 # (hash mark), for comments, 29 settings, 247 != (inequality operator), 74 speeding up, 271 < (less than), 75 classes <= (less than or equal to), 75 Alien, 256–258 % (modulo operator), 116–117, 122 Bullet, 247–248 * (multiplication), 26 Button, 280–281 \n (newline), 22 GameStats, 273 ! (not), 74 Scoreboard, 288–289 += operator, 115 Settings, 231 [] (square brackets), 34 Ship, 233–235 - (subtraction), 26 ending the game, 276 \t (tab), 22 files alien_invasion.py, 229 A bullet.py, 247 addition (+), 26 button.py, 280 aliases, 152 game_stats.py, 273 alice.py, 197–199 scoreboard.py, 288 Alien Invasion project. See also settings.py, 231 Pygame ship.bmp, 233 aliens initializing dynamic checking edges, 266 settings, 286 collisions, with bullets, levels 268–269, 291–292 adding, 285–287 collisions, with ship, 272–275 modifying speed controlling fleet settings, 285 direction, 266 resetting the speed, 287 creating an alien, 256 planning, 228 Alien Invasion project, continued asterisk (*) operator, 147 Play button attributes, 159. See also classes: adding, 280–285
    [Show full text]
  • Our Journey from Java to Pyqt and Web for Cern Accelerator Control Guis I
    17th Int. Conf. on Acc. and Large Exp. Physics Control Systems ICALEPCS2019, New York, NY, USA JACoW Publishing ISBN: 978-3-95450-209-7 ISSN: 2226-0358 doi:10.18429/JACoW-ICALEPCS2019-TUCPR03 OUR JOURNEY FROM JAVA TO PYQT AND WEB FOR CERN ACCELERATOR CONTROL GUIS I. Sinkarenko, S. Zanzottera, V. Baggiolini, BE-CO-APS, CERN, Geneva, Switzerland Abstract technology choices for GUI, even at the cost of not using Java – our core technology – for GUIs anymore. For more than 15 years, operational GUIs for accelerator controls and some lab applications for equipment experts have been developed in Java, first with Swing and more CRITERIA FOR SELECTING A NEW GUI recently with JavaFX. In March 2018, Oracle announced that Java GUIs were not part of their strategy anymore [1]. TECHNOLOGY They will not ship JavaFX after Java 8 and there are hints In our evaluation of GUI technologies, we considered that they would like to get rid of Swing as well. the following criteria: This was a wakeup call for us. We took the opportunity • Technical match: suitability for Desktop GUI to reconsider all technical options for developing development and good integration with the existing operational GUIs. Our options ranged from sticking with controls environment (Linux, Java, C/C++) and the JavaFX, over using the Qt framework (either using PyQt APIs to the control system; or developing our own Java Bindings to Qt), to using Web • Popularity among our current and future developers: technology both in a browser and in native desktop little (additional) learning effort, attractiveness for new applications.
    [Show full text]