A user-friendly, object oriented, AO simulation in Python

Slides:



Advertisements
Similar presentations
A Workflow Engine with Multi-Level Parallelism Supports Qifeng Huang and Yan Huang School of Computer Science Cardiff University
Advertisements

INTRODUCTION TO SIMULATION WITH OMNET++ José Daniel García Sánchez ARCOS Group – University Carlos III of Madrid.
Fast & Furious: a potential wavefront reconstructor for extreme adaptive optics at ELTs Visa Korkiakoski and Christoph U. Keller Leiden Observatory Niek.
Python for Science Shane Grigsby. What is python? Why python? Interpreted, object oriented language Free and open source Focus is on readability Fast.
GLAO Workshop, Leiden; April 26 th 2005 Ground Layer Adaptive Optics, N. Hubin Ground Layer Adaptive Optics Status and strategy at ESO Norbert Hubin European.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
The Project Office Perspective Antonin Bouchez 1GMT AO Workshop, Canberra Nov
Aug-Nov, 2008 IAG/USP (Keith Taylor) ‏ Instrumentation Concepts Ground-based Optical Telescopes Keith Taylor (IAG/USP) Aug-Nov, 2008 Aug-Sep, 2008 IAG-USP.
Widening the Scope of Adaptive Optics Matthew Britton.
WFS Preliminary design phase report I V. Velur, J. Bell, A. Moore, C. Neyman Design Meeting (Team meeting #10) Sept 17 th, 2007.
Real Time Controller Functional Requirements Don Gavel & Marc Reinig UCO Lick, laboratory for Adaptive Optics. Keck NGAO Team Meeting December 13, 2007.
Introduction to Systems Analysis and Design Trisha Cummings.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
A First Program Using C#
JCE A Java-based Commissioning Environment tool Hiroyuki Sako, JAEA Hiroshi Ikeda, Visible Information Center Inc. SAD Workshop.
ROOT: A Data Mining Tool from CERN Arun Tripathi and Ravi Kumar 2008 CAS Ratemaking Seminar on Ratemaking 17 March 2008 Cambridge, Massachusetts.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
1 On-sky validation of LIFT on GeMS C. Plantet 1, S. Meimon 1, J.-M. Conan 1, B. Neichel 2, T. Fusco 1 1: ONERA, the French Aerospace Lab, Chatillon, France.
Adaptive Optics Nicholas Devaney GTC project, Instituto de Astrofisica de Canarias 1. Principles 2. Multi-conjugate 3. Performance & challenges.
1.eCognition Overview. 1 eCognition eCognition is a knowledge utilisation platform based on Active Knowledge Network technology eCognition covers the.
Laboratory prototype for the demonstration of sodium laser guide star wavefront sensing on the E-ELT Sexten Primary School July 2015 THE OUTCOME.
DCS Overview MCS/DCS Technical Interchange Meeting August, 2000.
Company Overview for GDF Suez December 29, Enthought’s Business Enthought provides products and consulting services for scientific software solutions.
Leslie Luyt Supervisor: Dr. Karen Bradshaw 2 November 2009.
DANSE Diffraction Software for the SNS: DiffDANSE S.J.L. Billinge Dept. Physics and Astronomy Michigan State University.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
1 Manal Chebbo, Alastair Basden, Richard Myers, Nazim Bharmal, Tim Morris, Thierry Fusco, Jean-Francois Sauvage Fast E2E simulation tools and calibration.
NSF Center for Adaptive Optics UCO Lick Observatory Laboratory for Adaptive Optics Tomographic algorithm for multiconjugate adaptive optics systems Donald.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Low order modes sensing for LGS MCAO with a single NGS S. Esposito, P. M. Gori, G. Brusa Osservatorio Astrofisico di Arcetri Italy Conf. AO4ELT June.
Tomographic reconstruction of stellar wavefronts from multiple laser guide stars C. Baranec, M. Lloyd-Hart, N. M. Milton T. Stalcup, M. Snyder, & R. Angel.
February 2013 Ground Layer Adaptive Optics (GLAO) Experiment on Mauna Kea Doug Toomey.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen
ATLAS The LTAO module for the E-ELT Thierry Fusco ONERA / DOTA On behalf of the ATLAS consortium Advanced Tomography with Laser for AO systems.
Improved Tilt Sensing in an LGS-based Tomographic AO System Based on Instantaneous PSF Estimation Jean-Pierre Véran AO4ELT3, May 2013.
1 MCAO at CfAO meeting M. Le Louarn CfAO - UC Santa Cruz Nov
Development of a Distributed MATLAB Environment with Real-Time Data Visualization Authors: Joseph Diamond, Richard McEver Affiliation: Dr. Jian Huang,
SITE PARAMETERS RELEVANT FOR HIGH RESOLUTION IMAGING Marc Sarazin European Southern Observatory.
Experimental results of tomographic reconstruction on ONERA laboratory WFAO bench A. Costille*, C. Petit*, J.-M. Conan*, T. Fusco*, C. Kulcsár**, H.-F.
Gemini AO Program SPIE Opto-Southwest September 17, 2001 Ellerbroek/Rigaut [SW01-114] AO … for ELT’s 1 Adaptive Optics Requirements, Concepts, and Performance.
March 31, 2000SPIE CONFERENCE 4007, MUNICH1 Principles, Performance and Limitations of Multi-conjugate Adaptive Optics F.Rigaut 1, B.Ellerbroek 1 and R.Flicker.
GLAO Workshop Leiden April 2005 Remko Stuik Leiden Observatory.
Page 1 Adaptive Optics in the VLT and ELT era Wavefront sensors, correctors François Wildi Observatoire de Genève.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
Fundamentals of adaptive optics and wavefront reconstruction Marcos van Dam Institute for Geophysics and Planetary Physics, Lawrence Livermore National.
COMP 4332 Tutorial 1 Feb 16 WANG YUE Tutorial Overview & Learning Python.
Theme 2 AO for Extremely Large Telescopes Center for Adaptive Optics.
François Rigaut, Gemini Observatory GSMT SWG Meeting, LAX, 2003/03/06 François Rigaut, Gemini Observatory GSMT SWG Meeting, LAX, 2003/03/06 GSMT AO Simulations.
CIS 595 MATLAB First Impressions. MATLAB This introduction will give Some basic ideas Main advantages and drawbacks compared to other languages.
Gemini AO Program March 31, 2000Ellerbroek/Rigaut [ ]1 Scaling Multi-Conjugate Adaptive Optics Performance Estimates to Extremely Large Telescopes.
Computationally Efficient Wavefront Reconstruction for Multi-Conjugate Adaptive Optics (MCAO) Brent Ellerbroek AURA New Initiatives Office IPAM Workshop.
Unit - 3 OBJECT ORIENTED DESIGN PROCESS AND AXIOMS
Andrew White, Brian Freitag, Udaysankar Nair, and Arastoo Pour Biazar
Matlab.
MET4750 Techniques for Earth System Modeling
Unified Modeling Language
Prepared by Kimberly Sayre and Jinbo Bi
Introduction to MATLAB
CSE Social Media & Text Analytics
Theme 2 AO for Extremely Large Telescopes
Python for Scientific Computing
Scientific Python Introduction
Simulation And Modeling
Theme 2 AO for Extremely Large Telescopes
NGAO Trade Study GLAO for non-NGAO instruments
Theme 2 AO for Extremely Large Telescopes
EKSE: A Command Line Interface for EGS-CC based Systems
Presentation transcript:

A user-friendly, object oriented, AO simulation in Python Andrew Reeves

Summary Another AO Simulation….? Python Programming Language Simulation code Overview Examples of current investigations

Why another Simulation? Written entirely in Python Object-Oriented Simulation “Toolkit” Easy to use Rapid development and testing of new, complicated AO concepts Learning tool to explore AO systems Written in python – upcoming language used in many applications. also uses accelerated libs Not intended as “end to end” sim (though does include all bits if you want to) Each modules an “object” which is self contained and can be fitted into different systems easily (easy in python – lists and so forth)

Python Interpreted, high-level, general purpose programming language. Portable, works “out of the box” on Windows, Mac OS, Linux etc…. Interpreter can be used interactively, with impressive interactive tools (matplotlib, ipython) Object-oriented, but can be used as a functional language, or just for scripting Enormous community support with packages available for almost anything with usage growing very quickly

Python Syntax Docstrings: Distinct from comments, these are used to document code as the code is written. Can be parsed by various tools to create documentation, or when “ help(function)” is called. Indentation: Code blocks are delimited by the indentation level, no {}s are required. Makes code very easy to read. Python can be used to write Object-Oriented or functional code, or can be used simply to write scripts.

Python data-structures Flexible data structures “lists”, “dictionarys” and “tuples” Can contain combinations of any type of data or object Can be dynamically expanded/shrunk as required list1 = ["helloWorld", 1, 10.67, aoSimObject, (10,10)] NumPy Arrays Multi-dimensional arrays of fixed size and type Fast data access, with many fancy indexing techniques array1 = numpy.array([1,2,3], [4,5,6]), slice = array1[1:2, :] No explicit pointer syntax, though NumPy Arrays will pass pointers automatically and NumPy methods are available which make this more user controllable.

Python performance Pure python isn’t very fast But…….. Many libraries exist which wrap fast C algorithms in python – especially for scientific purposes e.g. numPy, sciPy, matplotlib, pyfftw Multi-processing is very easy Tools such as Cython exist to accelerate pure python by converting to C and compiling. C-Python API makes writing extensions in C easy.

Time solving 100 iterations of the Laplace Equation for a 500x500 grid. Code is still high-level, easy to understand Python! Note that this is still the same code – just http://wiki.scipy.org/PerformancePython#head-a3f4dd816378d3ba4cbdd3d23dc98529e8ad7087

The Python AO Simulation An AO simulation which uses many of pythons features to make it simple to understand and easy to use and expand. AO components, such as WFSs, DMs, and reconstructors are modelled as self-contained objects, which act in an way which corresponds to the real world items. Objects can be run in the existing simulation framework, or used independently. A base class for most component types is available which deals with boiler-plate code. A new type of sub-system can be created quickly by inheriting the base and adding the new, interesting methods. Using external libraries, acceptable performance can be achieved.

Simulation Class Diagram Configuration WFSs LGSs Reconstructor DMs Science Cameras aoinit() makeIMat() aoloop() Class name: Example Class Attributes: Example Class Methods:

Simulation A B A B Atmosphere Wave-Front Sensor Reconstructor Configuration WFSs LGSs Reconstructor DMs Science Cameras aoinit() makeIMat() aoloop() Class A contains instances of Class B A B A Class B inherits from Class A B Atmosphere wholeScrns interpolatedScrns windSpeed loadScreens() moveScreens() randomScreens() Wave-Front Sensor Guide Star Position wavelength LGS wfsPhase() makeFocalPlane() frame() Reconstructor reconstructorMode controlMatrix loadCMat() saveCMat() Reconstruct() Deformable Mirrors actuators dmShapes makeIMat() frame() Science Camera fieldofView Wavelength pixels sciencePhase() makeFocalPlane() frame() Laser Guide Star LGS Wavelength LGS Height lgsPhase() makeLgsPsf() Shack-Hartmann sub-apertures pxlsPerSubap makeFocalPlane() CalculateSlopes() MVM SCAO cMatConditioning makeCMat() Reconstruct() Learn & Apply cMatConditioning learnFrames getLearnSlopes() Reconstruct() Zernike dmShapes nModes makeDMShapes() Piezo-stack dmShapes nActuators makeDMShapes()

Simulation Features Multiple Wave-Front Sensors Only Shack-Hartmann, but easy to create new types. WFS objects stored in a python, so can be easily accessed and examined.

Simulation Features Realistic Laser Guide Stars Physical propagation of up-link path includes tip-tilt variations LGS uplink PSF Convolved WFS spots

Simulation Features Realistic Laser Guide Stars Elongation modelled by propagating multiple LGS layers at different heights 8m Primary, 6” subap FOV 32x32 subaps 90km Sodium Layer, 10km thickness 5 elongation layers, Uplink turbulence

Simulation Features Using IPython console, can inspect and plot simulation data and change simulation parameters in real time

Simulation GUI, showing plotting of simulation data Simulation GUI, showing plotting of simulation data. Console can be used to inspect data and change parameters in real-time

Simulation Features Multiprocessing for multiple WFSs Each WFS assigned to a core. Simple with python Physical or geometric light propagation for WFSs and LGS. Variety of reconstructors implemented, including Woofer-Tweeter, Learn and Apply, Artificial Neural Network Simple configuration from Config file

Current Investigations

Artificial Neural Networks A potential tomographic reconstructor. There is evidence to suggest that ANNs are robust against changing turbulence profiles. ANN must be ``trained’’ on a generic data set, then can be used for any turbulence profile.

Artificial Neural Networks Easy to adapt the simulation to use an ANN. Sub-class the “Reconstructor” class, and override the “reconstruct” method Parent “Reconstructor” takes care of all interfaces and boiler-plate code Now simulation can use an ANN instead of traditional matrix based reconstructor

LGS Up-link Prediction Possible to predict LGS up-link path using tomography? If each WFS views the path through turbulence of other Lasers perhaps. Only possible if up-link path is not reciprocal to path down….

Correlation of tip-tilt modes in up and down-link paths through Kolmogorov turbulence Correlation of tip-tilt is small for a small aperture concentric with the telescope aperture. DLLT/D: Ratio of LGS launch aperture size to telescope diameter (Wilson & Jenkins, 1996)

Correlation of tip-tilt modes in up and down-link paths through Kolmogorov turbulence Correlation of tip-tilt is small for a small aperture concentric with the telescope aperture. DLLT/D: Ratio of LGS launch aperture size to telescope diameter (Wilson & Jenkins, 1996)

LGS Up-link Prediction If up-link and down-link tip-tilt uncorrelated, then slope measured on WFS is a combination of both effects Measured slope Component of slope due to down-link turbulence Component of slope due to up-link turbulence

LGS Up-link Prediction α β D h H … n If 2 LGS, α and β, the WFS β observes the up-link path of LGS α. Can prove that there is a linear relationship between down-link only slopes sαt, and sβt and the slopes measured on a WFS sα and sβ. With sαt, and sβt can now reconstruct on-phase correction as usual. Manuscript on the above in preparation

LGS Up-link Prediction α β D h H … n If 2 LGS, α and β, the WFS β observes the up-link path of LGS α. Can prove that there is a linear relationship between down-link only slopes sαt, and sβt and the slopes measured on a WFS sα and sβ. With sαt, and sβt can now reconstruct on-phase correction as usual. Manuscript on the above in preparation

LGS Up-link Prediction Since relationship between up-link slopes and down-link turbulence slopes is linear, can use Learn & Apply algorithm (Vidal, Gendron & Rousset, 2010) Relies on covariance matrices between off and on axis matrices. Can simulate this with realistic LGS up-link turbulence using python AO sim. LGS covariance on on-axis and 4 off-axis LGS for an 8x8 sub-aperture system Note vertical and horizontal dark lines of negative correlation. NGS LGS1 LGS2 LGS3 LGS4 NGS LGS1 LGS2 LGS3 LGS4

Simulation Parameters 512 phase points across aperture 16x16 sub-aperture system 17x17 actuator DM 4 off-axis LGS WFSs on 10” square LGS at height of 90km uses on-axis NGS for “learn” step 5 Layer Profile (shown right)

Results Algorithm improves performance over no tip-tilt correction. Not suited to high resolution imaging applications. Ground layer not corrected well, NGS could still be required for Ground layer correction Algorithm shows promise to improve GLAO performance for low resolution spectroscopy applications

Summary Python is a great language for scientific applications, including AO simulations. We have created a python AO simulation which can be run stand-alone, or used as a toolkit to quickly develop new AO ideas. Simulation already contains many useful features such as multiple WFSs, realistic LGS and different reconstructors. Code is under heavy development to increase features and performance. Simulation already being used to develop new, novel, ideas for AO.