Talk The use of Python to simulate the behaviour of the Mid Infrared Instrument of the James Web Space Telescope

Abstract

Authors: The MIRI European Consortium software development team:
J. Blommaert, R. Huygen, Vandenbussche (KUL, Belgium)
P. Bouchet, R. Gastaud, C. Nehme (CEA, France)
S. Chaintreuil (LESIA, France)
C. Cavarroc (IAS, France)
J. Bouwman, J. Schreiber (MPIA, Germany)
J. Morin, T. Ray, A. Scaife (DIAS, Ireland)
R. Azzollini (CSIC, Spain)
A. Glauser (ETHZ, Switzerland)
F. Lahuis (SRON, Netherlands)
B. Brandl (Leiden, Netherlands)
A. Glasse, A. Glauser, S. Beard (UKATC, UK)
J. Pye, O. Littlejohns (University of Leicester, UK)

We discuss the use of Python in the development of data simulators for the MIRI
instrument. Data simulators are used during observation planning to predict the
exposure times and signal to noise levels expected for certain types of
observation, which allows more accurate planning of observations and less
wastage of valuable telescope time. The simulators are also essential to test
the data reduction pipeline software and to support the pre-launch testing of
the instrument. They not only need to reproduce the behaviour of the instrument
faithfully, they also need to be adaptable so that information learned about
the instrument during the pre-launch testing can be fed back into the
simulation.

MIRI is a very versatile instrument operating in the 5-28 um wavelength range
and divided in two optical channels. The first channel provides direct imaging,
coronographic imaging at selected wavelengths and long-slit low-resolution
spectroscopy (LRS, R~100). The second one can record a data cube of medium
resolution spectra (MRS, R~3,000) through an integral field unit.

We have developed a suite of MIRI simulators which operate together: Specsim
simulates the MRS components; MirimSim simulates imaging, coronographic or LRS
components. Finally scasim simulates the behaviour of the MIRI detectors and is
thus an essential component for all other simulators. Here we discuss our most
recent developments -- based on Python for better integration with the future
data analysis pipeline -- including scasim (now operational) and MirimSim (work
in progress).

Traditionally, data simulators tend to be developed using a data-oriented
language such as IDL. But we have found the object-oriented nature and dynamic
data typing of Python (with support from the numpy and scipy libraries) makes
it possible to develop reusable and adaptable simulators. The ability to
encapsulate the knowledge of an instrument component within a particular class
is a key ingredient of a flexible design. In addition, Python has proven very
suitable to efficiently separate actual processing code from specifications and
parameters, and to manage their evolutions. The numpy and scipy libraries have
allowed us to process large amounts of data efficiently using Python. We have
also used the Python unit testing facilities to verify the scasim simulator in
all possible combinations of instrument modes before releasing it to users.

From the user point of view, the choice of Python is an undeniable advantage
with high-quality libraries freely available on a variety of platforms, and
results in ergonomic programs that can be easily used in interactive
environments, batch processing scripts or GUI applications.

tagged by
no related entity