The MIRI Sensor Chip Assembly (SCA) simulator

41
The MIRI Sensor Chip Assembly (SCA) simulator Steven Beard UK Astronomy Technology Centre Royal Observatory, Edinburgh, UK ROE Workshop “Following the Photon”, 10-12 October 2011

description

The MIRI Sensor Chip Assembly (SCA) simulator. Steven Beard UK Astronomy Technology Centre Royal Observatory, Edinburgh, UK. ROE Workshop “Following the Photon”, 10-12 October 2011. JWST Instruments and Detectors. MIRI. NIRCAM. NIRSPEC. FGS-TFI. 3 Si:As detectors. 2 HgCdTe detectors. - PowerPoint PPT Presentation

Transcript of The MIRI Sensor Chip Assembly (SCA) simulator

Page 1: The MIRI Sensor Chip Assembly (SCA) simulator

The MIRI Sensor Chip Assembly (SCA) simulator

Steven BeardUK Astronomy Technology CentreRoyal Observatory, Edinburgh, UK

ROE Workshop “Following the Photon”, 10-12 October 2011

Page 2: The MIRI Sensor Chip Assembly (SCA) simulator

JWST Instruments and Detectors

MIRI NIRCAM NIRSPEC FGS-TFI

3 Si:As detectors 2 HgCdTe detectors 2 HgCdTe detectors10 HgCdTe detectors

Page 3: The MIRI Sensor Chip Assembly (SCA) simulator

JWST Detector Readout

Integration

Time

Dropped Framesbetween Groups

Signal onDetector

F0

G0

G1

G2

G3

G4

5 Groupsin this

Integration

Averaged Frameswithin Groups

ResetDetector

Each integration is made from several non-destructive reads, divided into groups.

Page 4: The MIRI Sensor Chip Assembly (SCA) simulator

MIRI Summary

ImagerCoronagraphLow Res. Spectrograph

Medium Res. Spectrograph• Short wavelength• Long wavelength

Page 5: The MIRI Sensor Chip Assembly (SCA) simulator

MIRI Modes to be Simulated

MIRI has a number of different modes to be simulated, each of which include several common requirements:

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion

Simulate Detector

Simulate Target(s)

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Target

Simulate Background

Simulate Phase Mask

Transmission

Simulate Distortion

Simulate Detector

Simulate Test Sources

Simulate Telescope Simulator

MTS Sim MRS Imaging LRSCoronagraphy

Page 6: The MIRI Sensor Chip Assembly (SCA) simulator

MIRI Modes to be Simulated

MIRI has a number of different modes to be simulated, each of which include several common requirements:

MRS mode is simulated by Specsim.

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion

Simulate Detector

Simulate Target(s)

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Target

Simulate Background

Simulate Phase Mask

Transmission

Simulate Distortion

Simulate Detector

Simulate Test Sources

Simulate Telescope Simulator

MTS Sim MRS Imaging LRSCoronagraphy

Page 7: The MIRI Sensor Chip Assembly (SCA) simulator

MIRI Modes to be Simulated

MIRI has a number of different modes to be simulated, each of which include several common requirements:

MRS mode is simulated by Specsim.

All the imager modes are simulated by Mirim Sim (Rene Gastaud’s presentation?).

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion

Simulate Detector

Simulate Target(s)

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Target

Simulate Background

Simulate Phase Mask

Transmission

Simulate Distortion

Simulate Detector

Simulate Test Sources

Simulate Telescope Simulator

MTS Sim MRS Imaging LRSCoronagraphy

Page 8: The MIRI Sensor Chip Assembly (SCA) simulator

MIRI Modes to be Simulated

MIRI has a number of different modes to be simulated, each of which include several common requirements:

MRS mode is simulated by Specsim.

All the imager modes are simulated by Mirim Sim (Rene Gastaud’s presentation).

MTS Sim simulates the telescope simulator used for Flight Model (FM) testing.

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion

Simulate Detector

Simulate Target(s)

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Target

Simulate Background

Simulate Phase Mask

Transmission

Simulate Distortion

Simulate Detector

Simulate Test Sources

Simulate Telescope Simulator

MTS Sim MRS Imaging LRSCoronagraphy

Page 9: The MIRI Sensor Chip Assembly (SCA) simulator

MIRI Modes to be Simulated

MIRI has a number of different modes to be simulated, each of which include several common requirements:

MRS mode is simulated by Specsim.

All the imager modes are simulated by Mirim Sim (Rene Gastaud’s presentation).

MTS Sim simulates the telescope simulator used for Flight Model (FM) testing.

All the simulators share the same detector simulation – provided by SCA Sim.

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Targets

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion

Simulate Detector

Simulate Target(s)

Simulate Background

Simulate Instrument

Transmission

Simulate Distortion & Dispersion

Simulate Detector

Simulate Target

Simulate Background

Simulate Phase Mask

Transmission

Simulate Distortion

Simulate Detector

Simulate Test Sources

Simulate Telescope Simulator

MTS Sim MRS Imaging LRSCoronagraphy

Page 10: The MIRI Sensor Chip Assembly (SCA) simulator

The MIRI Simulator Suite

• Having a suite of simulators ensures that every problem is solved only once.– But we did miss the opportunity

to share “simulate targets” and “simulate background”.

• SCASim provides a common detector simulation service for the other simulators.

• It converts detector illumination information from any MIRI simulator and generates simulated MIRI data in a choice of formats accepted by MIRI pipeline and analysis software.

DMS MIRI Pipeline

DHASmiri_sloper

DET

Simulated FITSWriter FITS

File

SCA Simulator

Specsim (MRS)

Detector Illumination Image File

TargetInformationMTS Sim

MIRIM SimMO Sim

Coro LRS

TargetInformation

SCASCA SCA

Simulated Level 1 FITS

File

Page 11: The MIRI Sensor Chip Assembly (SCA) simulator

Required SCA Simulator StepsThe SCA Simulator simulates:• Quantum efficiency• Reference pixels and outputs• Bad pixels• Dark current and hot pixels• Persistence• Readout modes• Poisson noise and read noise• Bias, gain and non-linearity• Cosmic ray effects• Subarray (window) modes

The simulation is controlled by:• Input parameters

• e.g. Readout mode

• Configuration information• e.g. Detector properties

• Configuration measurements• e.g. Dark current vs temperature

• Calibration data• e.g. Bad pixel map

X

X

X

X

Integrate and Apply Poisson

Noise

Coadd and Apply QE

Fringe Map

Simulated MIRI Level 1

FITS data

Integration time or ngroups

Subarray name

Readout mode

Flux in photons/second/pixel

Detector Illumination Image File (I,λ)

DetectorProperties

QE vs λ

Bad Pixel Map

Dark & Hot Pixel Map

Dark Current vs T

Read Noise vs T

AmplifierProperties

Cosmic RayProperties

StScI Cosmic Ray Library

Apply Fringe Map

(if any)

Apply Reference

Pixels

Apply Bad Pixels

Add Dark Current

For each readout...

Apply Read Noise

Apply Bias, Gain and

Non-linearity

Hit with Cosmic

Rays

Extract Subarray

Nextreadout

Format Output

Expected electrons/second/pixel

Actual electrons/pixel

Flux in electrons/second/pixel

DN/pixel

FPA name

Cosmic Ray mode

Persistence

Measurement

Configuration Info

Data Files

Calibration Data

Input Parameters

Input file name

Output file name

Page 12: The MIRI Sensor Chip Assembly (SCA) simulator

Design Decisions

• I used an Object-Oriented design that would make SCASim more flexible and reusable.– I also wrote the simulator in Python – an object-oriented language with

several useful scientific and array processing add-ons (numpy, scipy, matplotlib, pyfits, etc…)

• Since the JWST detector readout modes are very similar, I chose to make the SCASim workable with any JWST detector – not just the MIRI detectors.– So ngroups ≠ nframes. Useful for NIRCAM and NIRSPEC as well?

• I also chose to encapsulate as much of the detector information in parameter files, rather than in software constants.– By modifying these parameters and/or the class methods, SCASim could

be adapted to similar kinds of detector.

• The simulator modules were developed along with unit tests.– This ensured that changes didn’t generate unwanted side effects.

Page 13: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

The SCA simulator has an object-oriented design.

The core of the simulator is a Detector Array class.

The operational interface is generic: All detectors are illuminated, reset, integrated and read out, or can be hit by a cosmic ray.

The detailed implementation of the methods simulates the effects of the MIRI detector.

This makes the design adaptable and reusable.

OperationsAttributes

Name of class

Page 14: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

The detector uses a helper class, the Poisson Integrator, which encapsulates the Poisson statistics.

Other associated classes are used to describe detector characteristics, such as bad pixels, hot pixels, dark current and quantum efficiency.

Page 15: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

Each detector may be read out by one or more amplifiers (4 in the case of MIRI + ref. output).

Page 16: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

Each detector may be read out by one or more amplifiers (4 in the case of MIRI + ref. output).

Each amplifier is responsible for reading a particular slice (or zone) on the detector surface.

Each amplifier has an associated gain, linearity and read noise.

Note that dark current and read noise are derived from a generic “Measured Variable” class, used to described laboratory measurements (in this case measuring how dark current and read noise vary with temperature).

Read 1

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4 1 2 3 4

5 5

5 5

5 5

5 5

5 5

5 5

5 5

5 5

Close upBlind

referenceoutput pixels

Read 2

Read 3

Read 4

Read 5

Dark reference columns

Normal columnsDetector Surface

4+1024+4=1032 pixels

1024

pix

els

Page 17: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

Each detector may be read out by one or more amplifiers (4 in the case of MIRI + ref. output).

Each amplifier is responsible for reading a particular slice (or zone) on the detector surface.

Each amplifier has an associated gain, linearity and read noise.

Note that dark current and read noise are derived from a generic “Measured Variable” class, used to described laboratory measurements (in this case measuring how dark current and read noise vary with temperature).

Page 18: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

The detector and the amplifiers can both be hit by cosmic rays during an integration, depending on the integration time and their target area.

A Cosmic Ray Environment class describes the cosmic ray environment (solar condition etc…), and can generate Cosmic Ray events.

Cosmic ray events are selected from a library of simulated events created by Massimo Roberto at STScI (for all JWST detectors).

Page 19: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

The SCA simulator also defines classes describing how an exposure is constructed from a series of integrations.

The Integration class sequences the reset/integrate/readout operations in the Detector Array.

An illumination map describes the intensity and wavelength of the illumination across the detector surface.

Page 20: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Design

Finally, these additional classes show how the contents of the input file are distributed, and how the data associated with each exposure is written to an output file.

The Sensor Chip Assembly class manages the simulation and provides a selection of interfaces to the outside world (not shown here).

Page 21: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim External Interfaces

Page 22: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim Demonstration.Start with some test illumination data.

Intensity data Wavelength data

Page 23: The MIRI Sensor Chip Assembly (SCA) simulator

Add Reference Pixels and Outputs

Page 24: The MIRI Sensor Chip Assembly (SCA) simulator

Apply Quantum Efficiency

Page 25: The MIRI Sensor Chip Assembly (SCA) simulator

Add Bad Pixels

Page 26: The MIRI Sensor Chip Assembly (SCA) simulator

Add Dark Current & Hot Pixels

Page 27: The MIRI Sensor Chip Assembly (SCA) simulator

Apply Gain and Non-linearity

Page 28: The MIRI Sensor Chip Assembly (SCA) simulator

Add Poisson Noise (frame 2/18 shown)

Page 29: The MIRI Sensor Chip Assembly (SCA) simulator

Add Read Noise (frame 2/18 shown)

Page 30: The MIRI Sensor Chip Assembly (SCA) simulator

Add Cosmic Ray Events(frame 8/18 shown)

Page 31: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 32: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 33: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 34: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 35: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 36: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 37: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 38: The MIRI Sensor Chip Assembly (SCA) simulator

Build up of signal with group

Page 39: The MIRI Sensor Chip Assembly (SCA) simulator

SCASim ExperienceGood

• OO design made SCASim highly flexible and reusable.– Rapid development time.– Additional effects (such as

variable dark current and persistence) were easy to add.

– Now a useful tool adaptable for other detectors.

• SCASim made successful predictions for MIRI FM testing.– Expected S/N and exposure

times.– Effect of cosmic ray hits.

• It also helped development and testing of analysis software.– DHAS cosmic ray detection

Bad• Too many inputs.

– Nobody has yet edited the configuration files or provided their own calibration files.

– But the simulation is only as good as the calibration and configuration info. given to it.

• Only known effects can be simulated.– The underlying causes of the

“first and last integration effect” and the “pixel lag” effect are not yet known.

• Perhaps caused by leaving detectors too long without flushing?

– Subarray vs full frame.– But the simulator can help

investigate such effects by trying out ideas.

Page 40: The MIRI Sensor Chip Assembly (SCA) simulator

The MIRI Sensor Chip Assembly(SCA) Simulator - Summary

• What does it do?– It simulates the behaviour of the MIRI detector chips and

focal plane electronics.– This simulation is common to all MIRI simulators, so it saves

duplication of effort.

• What is it for?– MIRI observation planning.– MIRI Flight Model test planning.– JWST Pipeline development and testing.

• Design Features– OO design, written in Python.– Highly adaptable and reusable.– Valid for all JWST detectors – could be adapted for other

instruments.

Page 41: The MIRI Sensor Chip Assembly (SCA) simulator

Questions?

?