EChOSim: The Exoplanet Characterisation Observatory software simulator

EChOSim is the end-to-end time-domain simulator of the Exoplanet Characterisation Observatory (EChO) space mission. EChOSim has been developed to assess the capability of the EChO mission concept to detect and characterise the atmospheres of transiting exoplanets. Here we discuss the details of the EChOSim implementation and describe the models used to represent the instrument and to simulate the detection. Software simulators have assumed a central role in the design of new instrumentation and in assessing the level of systematics affecting the measurements of existing experiments. Thanks to its high modularity, EChOSim can simulate basic aspects of several existing and proposed spectrometers including instruments on the Hubble Space Telescope and Spitzer, ground-based and balloon-borne experiments. A discussion of different uses of EChOSim is given, including examples of simulations performed to assess the EChO mission.


Introduction
The study of planets orbiting stars other than our Sun is one of the most fascinating and rapidly growing fields in the physical sciences. Also growing rapidly is the list of confirmed exoplanets, which currently exceeds 1,000 exoplanetary systems hosting nearly 2,000 planets. Ongoing and planned ESA and NASA missions form space such as GAIA [1], Cheops [2], PLATO [3], Euclid [4], Kepler II [5] and TESS [6] will increase the number of known systems to tens of thousands. Ground-based surveys using a variety of direct and indirect techniques will contribute further.
Pioneering work in the last decade has allowed us to go beyond simple detection and to attempt the characterisation of gaseous atmospheres. The technique used is transit spectroscopy where the signal of a transiting exoplanet's atmosphere superimposes a tiny modulation in time over the dazzling signal of the parent star during a transit or during an eclipse (see [7] and references therein for a recent review). Signals are small, at the level of 1 × 10 −4 of the star, and detections therefore require an exquisite control of observational and instrumental systematics both at instrument level and during data analysis. The risk is in coupling the star signal into that of the exoplanet's atmosphere. When observing from the ground, the Earth's atmospheric emission can also couple to the much smaller planet's signal [8] if systematics are not sufficiently under control. A dedicated space mission addresses both problems. The Exoplanet Characterisation Observatory [9], EChO, was a proposed space mission for the ESA science programme (M3) which underwent a two year long study phase. EChO was designed for photometric stability over a spectral band spanning from the visible to the mid-IR part of the electromagnetic spectrum and EChOSim is the end-to-end software simulator developed to aid the instrument definition and to validate the mission concept.
Static radiometric instrument models can assess the sensitivity of an experiment in delivering its scientific goals, but are often inadequate to model challenging systematic effects which can compromise the detection. This is particularly true when systematics manifest in the time-domain with a non-trivial temporal behaviour, an example of which is the coupling between the stability of the telescope pointing system and the focal plane detectors in the presence of nonperfect flat-fielding, or when detector pixel responses depart from a spatially flat optical response. EChOSim has been developed to study the impact of this and other time-domain effects, and it can also be used, as can any radiometric model, to assess the overall sensitivity of the instrument. With a parametric definition of the mission concept, EChOSim has been developed to validate EChO and demonstrate its ability to deliver the mission science requirements. Because of its high modularity, EChOSim can also be used for a number of different applications such as the design of novel exoplanet spectroscopic experiments (whether from the ground, from space or from a stratospheric balloon platform), or to study the significance of an existing detection by specifying a suitable instrument model in a parametric form.
In this work, we review the algorithms implemented in EChOSim and the approximations made to make the execution of these simulations efficient so that run times of the order of a few tens of seconds are achieved on normal laptop-size computers. The code is fully implemented in Python, with standard numerical libraries for portability, and simulations can be run on Windows, Linux and MacOS based machines. Each simulation begins with the generation of the frequency-and time-dependent astronomical signals expected from the extrasolar system, which are then propagated through a cascade of processes that are involved in the detection. We briefly discuss possible uses of the simulator in the final part of this work.

EChO instrument design
The EChO instrument is discussed briefly in this section. A more comprehensive review of this mission concept can be found in the EChO assessment study report, the "yellow book" 1 , and in [9]. The telescope has a 1.2 m aperture diameter which is passively cooled to less than 50 K. The radiation collected by the primary aperture feeds five spectroscopic channels covering continuously the required spectral band from 0.55 to 11 μm. Extension of the short and long wavelength limits to 0.4 and 16 μm, respectively, are also considered in the study. Figure 1 shows the spectral coverage of each of the five channels: the Visible and Near Infrared (VNIR) channel, the Short Wavelength Infrared (SWIR) channel, the Medium Wavelength Infrared (MWIR-1 and MWIR-2) channels, and the Long Wavelength Infrared (LWIR) channel. An optical Fine Guidance System (FGS) is also part of the science payload. This is a star tracker used by the attitude control system, but it is not implemented in EChOSim. In each channel, a spectrograph disperses the collected light along one direction of the focal plane array: the spectral direction. A slit at the input of each channel limits the amount of diffuse radiation reaching the focal plane. The width of each slit is chosen so as to avoid PSF clipping, which would otherwise reduce throughput and impose too stringent a requirement on the pointing system.
Each spectral resolving element, λ = λ/R, where R is the spectral resolving power and λ is the wavelength, is Nyquist sampled by at least 2 detector pixels. The spectral resolving power is designed such that the requirements in the Mission Requirements Document 2 are satisfied. These are: resolving power greater than 300 at wavelengths shorter than 5μm, and resolving power greater than 30 at wavelengths longer than 5 μm. EChO is designed to achieve photometric stability better than 10 −4 over a time period which can be up to 10 hours.

The EChOSim simulator
The purpose of EChOSim is to provide a software tool to assess all critical aspects of the EChO mission concept baseline and alternative solutions by using realistic, time-domain simulations of the astronomical scene and instrument detection. The goal is to replicate the physical processes occurring during the detection of the signal, and to provide a realistic time-domain description of these processes, accounting for their correlations in time and space. The signal timeline is the wavelength-dependent light curve of the star and planet intensity spectrum at the telescope, i.e. the stellar spectrum modulated in time by the effects of the transiting exoplanet. The aim of the simulation is to study the impact of relevant systematic effects involved in the detection which cannot be easily accounted for in a static radiometric model. Optical aberrations and transmission, pointing stability and its coupling to focal plane onidealities such as the detector inter-pixel and intra-pixel responses are accounted for using modelling discussed in the following sections. Photon noise, detector dark currents, readout noise and the coupling of the instrument Point Spread Function with the focal plane arrays are also represented.
Each simulation begins with a realisation of the astronomical scene to be observed, and ends with the generation of detector timelines. These are the timelines sampled by the on-board Analogue to Digital Converter (ADC) and do not include additional filtering, compression and telemetry for the transmission of the data to ground equipment. As such, no provision is given for simulating housekeeping with the only exception being the housekeeping expected from the FGS used for de-trending the timelines, as discussed in Section 3.4. The output of the simulation is therefore similar to what would be generally expected for a "level 0" product consisting of timelines in units of detector counts (i.e. electrons) in one integration period which can be used to reconstruct the star and exoplanet spectra using suitable reduction software. The overall structure of the simulator is shown in Fig. 2 which describes the logical and computational flow. EChOSim initialises by reading a parametric description of the instrument model being implemented, as well as a description of the exoplanetary system being observed. The latter is subsequently generated in the simulation by the Astroscene module where wavelength-dependent light curves are estimated for either a primary transit or for a secondary eclipse. Emission by foregrounds and their effects on the signal attenuation are estimated in the Foreground module, where Zodiacal light is accounted for. In case of a ground-based or balloonborne instrument, the Foreground module also accounts for the effects of the Earth's atmosphere in both emission and transmission. Effects of atmospheric seeing are not included because adaptive optics systems can be used on ground instrumentation and are irrelevant at stratospheric altitudes. The instrumental detection is simulated by the Instrument module which outputs noise-free detector timelines. The Noise module estimates sources of astrophysical and instrumental noise taking into account spatial and temporal correlations when appropriate. Noise realizations are stochastic processes added to the noise-free timelines. The final detector timelines (signal + noise) are the end product of the simulator and are written to disk by the Output module.
To open up the possibility of Monte Carlo analyses of instrumental and astrophysical effects, EChOSim is optimised for computational efficiency without compromising the fidelity of the simulated detection. Each simulation takes less than 100s to complete. This is achieved by splitting each simulation into a slow and a fast temporal domain. The light curves are sampled on an irregular temporal grid with a cadence chosen to be the minimum required to Nyquist sample the time-varying astronomical signal. This means that the light curve is sampled with a cadence proportional to the time derivative of the light curve (see next section and Fig. 3). All quasistatic processes involving the detection and light dispersion on the focal planes are computed in this temporal domain. Faster processes include telescope pointing jitter, noise, detector acquisition, etc. These are computed at the end of the simulation in the Noise module, and co-added to the Instrument module's signals re-sampled on a faster temporal grid adequate to represent the sampling done by the detector pixels in the focal plane arrays. The EChOSim project will continue in the next years as a general purpose tool and it is worth summarizing here what EChOSim does not include and what constitutes future additions to the simulator. EChOSim does not provide Fig. 2 Overview of the EChOSim architecture. The main software programme calls a number of modules describing the sky and the payload instrument parameters data reduction software to reconstruct the planet and star spectra, and their uncertainties from the simulated timelines. A reduction pipeline to reconstruct the spectra from EChOSim simulations has been developed for the EChO assessment study [10] and was used by [11] to compare the retrieved atmospheric properties (temperature structure, composition and cloud properties) with the known input values.
The only detector non-idealities included in the simulations are the ones mentioned above. The effects of persistence and cross-talk between adjacent detector pixels were not considered in the EChO study and therefore are not included. This would require implementing a detailed detector model which will be included in future releases. The star is treated as a static emitter and no account is made for the effects of stellar variability. For the EChO study this was addressed using estimates The datapoints show the asynchronous sampling adopted to Nyquist sample the astronomical signal obtained independently from EChOSim (e.g. [12]), but future releases will include the effects of stellar granulation, oscillations as well as the presence of active regions and star rotation.
Optical surface and detector temperatures have implications on the final noise budget as do variations in these temperatures. EChOSim does not implement a realtime model for temperature fluctuations. The effects of temperature fluctuations on instrument emission or on detector dark currents over a temporal scale comparable to the transit are not relevant for EChO as by design these noise components are negligible. Variations over longer time-scales can be estimated using EChOSim in Monte Carlo analyses.

Astroscene module
The observed flux from the combined star and planet is computed in a three step process involving -The stellar emission, calculated taking into account the star diameter, effective temperature and distance. The user has the option to approximate the flux using a black body spectrum. Alternatively, Spectral Energy Distributions (SED) tabulated in a library pre-computed using PHOENIX 3 stellar models can be used. -The planetary contribution to the flux received by the telescope, estimated for a primary transit or a secondary eclipse, as a wavelength-dependent transit depth, which accounts for the exoplanet's atmospheric emission, transmission, as well as for reflected stellar light. -The planetary orbit, simulated using the analytical description of [13]. Light curves computed in this way are normalized taking into account the wavelengthdependent stellar SED and transit depth (see Fig. 3).
For primary transits, limb darkening effects are accounted for if the wavelength is smaller than 5μm, but no limb darkening is assumed at longer wavelengths as this effect becomes negligible. For this purpose, quadratic limb darkening coefficients are taken from [14] and linearly interpolated over the spectral band. The transmission spectrum can be provided by the user, pre-computed using a radiative transfer model. When this is not available EChOSim estimates a wavelength-independent primary transit signal where the depth of the light curve is given by Here, R p and R s are, respectively, the planet and star radii, and H is the atmospheric scale height given by where k b is the Boltzmann constant, T p is the planet's temperature, g its gravity acceleration and μ the mean molecular weight of the atmosphere (see e.g. [15]).
For secondary eclipses, the light curve's depth is estimated from both the planetary day-side emission and the reflected starlight. The fraction of starlight reflected by the exoplanet is proportional to its geometric albedo and projected planetary surface area as a function of orbital phase.
The emission spectrum can be provided by the user as a wavelength-dependent planet-star contrast ratio, or can be estimated assuming a black body emission computed for the planet's temperature. In either case, the magnitude of the signal for the secondary eclipse, in units of the stellar SED, is given by where F p and F s are the planet and star SED, respectively, and (t) is the exoplanet view factor (i.e. the fraction of the planetary day-side visible at a given orbital phase). The exoplanet's temperature plays an important role in the simulations. When not supplied by the user, EChOSim estimates the temperature using a simple radiative balance argument between the radiating energy received from the star (accounting for albedo), and the emission, which is assumed to be a black body. Inclusion of emissivity and whether the planet is tidally locked is also possible.
The transit depth estimated for the primary transit and secondary eclipse cases are then used to estimate the signal at the telescope. This is done by calculating the planet orbital solution and light curve [13], normalized to physical units using the calculated transit depth and stellar SED.

Foregrounds module
For space instrumentation operating at EChO's wavelengths, one major source of background emission is due to Zodiacal light. This is dominated at short wavelengths (λ < 3.5 μm) by scattered sunlight, and at longer wavelengths by the thermal emission from the same dust. Extinction is negligible [16]. The zodiacal emission is implemented as a modified version of the JWST-MIRI Zodiacal model [17], parametrised as where B λ (T ) is the Planck function. In order to represent the variation in Zodiacal light seen at different ecliptic latitudes and times of observation, three levels are defined. These correspond to minimum (0.9 × I Zodi ), average (2.5 × I Zodi ), and maximum (8 × I Zodi ) Zodiacal light intensity. This is an adequate description for the exoplanet systems studied with the simulator. Exoplanets on a line of sight with higher Zodiacal column density are not considered, as the foreground becomes prohibitively high for the detection. The multiplicative factor of the Zodiacal model can also be user-defined to represent Zodiacal emission towards a particular target's line of sight. This can be estimated from the best fit of (4) to a realistic Zodiacal model computed using publicly available software [18] at the ecliptic latitude and longitude of the target, and at the expected time of observation.
Earth's atmospheric emission and transmission models can be used for simulations of ground-based and balloon-borne experiments. Atmospheric spectra can be pre-computed by the user with Modtran 4 or similar software and used in EChOSim simulations as one additional input to the Foregrounds module.

Instrument module
The detection of light is simulated in the instrument module. Light is collected by the telescope and then split by a series of dichroic filters to feed the 5 spectroscopic channels. Dispersion, diffraction and emission from optical surfaces and from instrument enclosures are all effects taken into account, as well as the detection by the focal plane detector pixels with their nonideal response to light.
The telescope comprises a user-defined number of reflecting surfaces. For EChO these are the primary, secondary and tertiary mirrors and a beam-folding mirror. Each of these surfaces have user-defined, wavelength-dependent reflectivities, used to estimate the overall telescope efficiency, η tel = η 0 i r i (λ), where the r i (λ) is the reflectivity of the i-th reflective surface and η 0 is an overall efficiency, estimated using optical CAD software.

Telescope
The output of the simulated telescope comprises the signals from the point source (star and planet), the foregrounds and the emission from the optical surfaces of the telescope, and are, respectively, where T i is the temperature of each of the N optical surfaces with user defined emissivities i (λ), and i is an index defining the optical surface. The effective area of the telescope is A eff , and F ps (λ, t) is the time-dependent flux from the star and the planet computed by the Astroscene module. These three signals are maintained in three different data structures because they behave differently when dispersed by the channel spectrometers.

Dichroic filters
The telescope output is split into channels by a set of dichroic filters. Each filter has user-defined transmission and reflection spectra. The emission of each filter is calculated from its user-defined wavelength-dependent emissivity property, in a way similar to the emission of the reflective elements of the telescope. The inputs to each spectroscopic channel are Q P ,C (λ, t), Q D,C (λ), and Q O,C (λ), which contain the effects on the light passing through the filters for the point source, diffuse radiation and optics emission, respectively.

Dispersive optics and diffraction
Regardless of the technology used to disperse light in each channel, EChOSim assumes that each focal plane has a spectral and a spatial axis. Light is dispersed along the spectral direction, the x-axis in a xy reference located at the focal plane. The spatial direction of the spectrometer is along the y-axis. The spectral dispersion on the focal plane is given by a linear dispersion law between wavelength and position along the x-axis: where pix is the linear dimension of a detector pixel in the focal plane and R(λ 0 ) = λ 0 / λ 0 is the spectral resolving power estimated at the central wavelength of each channel. This is a very good approximation for the EChO baseline design and for many grating spectrometers with a spectral resolving power proportional to the wavelength. There is a factor of 2 in the above equation to reflect a design where each spectral element, λ, is sampled by two detector pixels, required for Nyquist-sampling of spectral features. The dispersed signals are sampled by the detector pixels assuming a diffraction pattern, or Point Spread Function (PSF). For the EChO instrument, this is approximated as a top-hat function for the fibre-fed VNIR channel, and by a Gaussian function for the longer wavelength channels. Assuming a diffraction limited instrument, the Gaussian PSF is where the coordinate x 0 is a function of the wavelength through the linear dispersion law The size of the PSF for a diffraction limited instrument is where F # is the telescope's f -number. The two constants K x and K y are used to model optical aberrations. One important aspect for computational efficiency is that the PSF is the product of two functions in the independent variables x and y: p(x, y, λ) = p(x, λ)p(y, λ). The PSF sampled by each detector is the convolution between the PSF and the intra-pixel response (F (x) and F (y)), i.e. the real-valued optical transfer function of the detector pixel. This is given by where the diffusion length l d is set to 1.7μm (see [19] -F (y) has a similar expression in the y-coordinate). Therefore the PSF sampled by each detector pixel is the effective pixel response: where the convolution operator is indicated by the symbol " * ".

Point source
The convolution between Q P ,C (λ, t) and the sampled PSF gives an estimate of the portion of the detected signal contributed by the point source in each detector pixel in the focal plane array : The detector quantum efficiency is QE(λ). The indices i and j identify the detector pixel located at physical coordinates x i and y j in the focal plane array. A relation between the pixel's physical coordinates, the indices and the wavelength exists: , and N x and N y are the number of detector pixels in the spectral and spatial direction, respectively. The wavelength sampled at the centre of the ij -pixel is λ i = i pix /LD + λ 0 . For computational efficiency, EChOSim takes advantage of the fact that the size of the sampled PSF changes slowly in the spectral direction compared to its amplitude variation in both spectral and spatial directions. The fractional variation of the PSF width between two adjacent detector pixels along the spectral direction is ∼ 1/R. When 1/R << 1 (as is the case for any medium to high resolution spectrometer), and the PSF is sampled by two to a few pixels per FWHM, this approximation holds true. Under this assumption, the spatial component of the sampled PSF can be taken out of the integral: With this approximation, the convolution between the spectrum and the PSF can be computed in one dimension, and the effects of the instrument's pointing stability (discussed later) can be studied independently on the spatial and spectral axes, when required.

Diffuse radiation
Diffuse radiation from the Zodiacal light (and the atmospheric emission from the Earth when simulating sub-orbital experiments) contributes to the loading on a detector pixel. This is proportional to the pixel solid angle, where f eff is the effective focal length. An input slit is used to limit the level of the background and a slit image is formed at the focal plane. If L is the slit's linear dimension measured in the focal plane, then a given detector pixel receives diffuse radiation over the wavelength range λ i − pix 2 L LD , λ i + pix 2 L LD . Therefore the signal sampled by the ij -pixel is

Instrument emission
The instrument emission sampled by a detector pixel depends on its entedue: G = π 4 2 pix /f # , where f # is the working f -number. The signal sampled by the ij -pixel has a similar expression to the case of diffuse radiation discussed above: A temporal snapshot of the Instrument module is shown in Fig. 4.

Noise module
The Noise module simulates the main sources of instrumental and astrophysical noise. In a real instrument, noise sources act at every stage of the detection, but EChOSim estimates and adds noise contributions to the timelines at the end of each simulation. This is required for computational efficiency as the random processes of Bottom: total estimated signal and its components noise require a larger (temporal) bandwidth, which is very different from the bandwidth of the astronomical signal. The first task of the noise module is to re-sample the timelines to the user-defined detector sampling rate. The following noise components are then added to the signal-only timelines: -photon noise, -detector dark current and dark current noise, -detector readout noise, -detector inter-pixel gain variation, and -telescope pointing jitter.
These are all uncorrelated random processes with the exception of the telescope pointing jitter which is correlated among all detector pixels in every focal plane. It is assumed that the power spectrum of each noise component is constant over one transit time. Point source, instrument emission and foregrounds contribute to the shot noise. A shot noise contribution comes also from the detector dark current Q DC (i, j ) = I 0 e −α/T D , where I 0 and α are detector-specific parameters, and T D is the temperature of the focal plane array. Therefore shot noise is estimated as a Gaussian random process with variance where G ij is a detector gain defined later.
The detector readout noise assumes a simple follow-up-the-ramp readout strategy and it depends on the number of non-destructive reads, N NDR σ 2 ro = 12 where σ r is the 1 − σ readout noise on a single non-destructive read. The readout noise contribution to the timelines, Q RO (i, j, t), is generated as a random Gaussian process with zero-mean and a σ ro standard deviation. Detector gains are expected to be measured both before launch and during operations, and are used by the data reduction pipeline to flat-field the focal plane array when reconstructing the exoplanet's spectrum. EChOSim implements pixel-to-pixel detector gain variation (or inter-pixel response) to simulate uncertainties in the flatfield operation. A detector-specific gain, G ij , is randomly assigned to each pixel with a user-defined RMS indicating the level of precision obtained in the calibration process.
The stability of the instrument attitude and orbital control system (AOCS) is quantified in terms of mean performance error (MPE), performance reproducibility error (PRE) and relative performance error (RPE). These are ESA defined pointing error terms 5 affecting the measured timelines via mainly two mechanisms: 1) the drifting of the spectrum along the spectral axis of the detector array, from here on referred to as spectral jitter; 2) the drift of the spectrum along the spatial direction (or spatial jitter). The effect of jitter on the observed timelines is the introduction of correlated noise, characterized by the power-spectrum of the telescope pointing. The amplitude of the resultant photometric scatter depends on the amount of spectral/spatial displacement of the spectrum, the PSF of the instruments, the detector intra-pixel response and the amplitude of the inter-pixel variations.
The effects of spectral jitter are not simulated by EChOSim. This is motivated by the reasoning that drifts in the spectrum along the spectral axis of the array can be effectively removed during data reduction using the several stellar emission and absorption lines detected with high significance (see e.g. [20,21]). Spectral jitter is also less severe compared to spatial as the electron count difference along the spectral axis is modulated by the difference in flux between adjacent spectral pixels. The spatial component of the jitter affects the point source signal only and is simulated through a second-order variation between the position of the sampled PSF in the spatial direction in (18) and the location of the detector pixel: where < δθ > t is the time-averaged angular displacement of the telescope's line-of-sight from the target, and t is the detector sampling interval. The jitter δθ is simulated as a Gaussian random process with an user-defined power spectrum (and bandwidth) which defines the electromechanical response of the AOCS. When the AOCS loop is closed on the information provided by a star sensor (i.e. the FGS in Fig. 1), pointing information is also available. EChOSim provides this housekeeping information with a user-defined accuracy on the absolute pointing knowledge and housekeeping update rate. This information can be used by a data reduction pipeline to de-correlate the effects of pointing jitter when estimating the exoplanet spectrum from the data. The reason for modelling the pointing jitter as a first and second order effect is for computational efficiency. It would be more computationally onerous to simulate the jitter early on because of the different bandwidths characterising the astronomical signal, the detector sampling rates and the AOCS. The combined output of the simulation provides the input to the Output module discussed next.

Output module
Each detector timeline, Q tot (i, j, t), is saved into FITS files. Each fits file is a frame, i.e. data collected during one integration time, t, and contains one image extension for each channel. Information from the simulated FGS housekeeping is also stored in the file.

Use of EChOSim
Time-domain simulations of the spectroscopic detection of exoplanet atmospheres are a valuable tool for a wide range of experimental activities and scientific analyses. A data reduction pipeline is the first tool required in order to reconstruct the exoplanet's atmospheric spectrum from the raw simulated data. EChOSim allows the development of novel data reduction pipelines which can be tested against the simulation's inputs. This allows the validation of the reduction pipeline in reconstructing the signal in the presence of correlated and uncorrelated noise sources, and systematics. A data reduction pipeline has been developed to analyse EChOSim simulations in the context of the EChO mission study [10]. Case studies discussed in the last paragraph of this section have been analysed using this reduction software.
EChOSim can be used to validate the ability of a proposed instrument concept and mission scenario to deliver its scientific goals. Similarly, the proposed scientific goals and mission scenario can be used by EChOSim to obtain technical instrument requirements such as pointing jitter, detector noise, temperature stability, spectral resolving power, etc., required for a successful detection. Therefore this simulator plays a central role when designing an instrument or when formulating a mission concept.

Fig. 5
The emission spectra of exoplanets 55 Cnc e and HD 189733b are reconstructed to high significance. The top and bottom panels are representative of EChO's "Census" and Rosetta-stone observing modes, respectively. The input spectra are shown in gray with the reconstructed 1-σ error bars EChOSim simulations of exoplanet primary transits and secondary eclipses were used by [11] to demonstrate how an EChO-type mission would be effective in constraining atmospheric models using the methodology discussed in [22] and [23]. Figure 5 shows an analysis done for the hot super-Earth 55 Cnc e, and the hot Jupiter HD 189733b at wavelengths longer than 1μm observed in emission (secondary eclipse). The simulations capture the fidelity with which the emission spectrum can be detected with a dedicated space mission in one transit or combining 5 eclipses. The two cases correspond to the "Chemical Census" mode and "Rosettastone" mode, respectively, discussed in the EChO yellow book. Similar simulations can be used to predict molecular detectability (see e.g. [24]), to estimate observing times (which in turn affects scheduling [25]), and also to show the sensitivity of EChO in detecting different types of exoplanets [26].

Conclusions
We have implemented an end-to-end time-domain instrument simulator to study the most critical and challenging aspects involved in the detection and characterisation of the atmospheres of extrasolar planets with the method of transit spectroscopy. The simulator capabilities extend beyond those of a static radiometric model by implementing time-varying instrumental effects such as pointing jitter and time domain correlated and uncorrelated noise realisations. This is of particular importance because this method of the detection involves measuring the tiny time-domain modulations that the transiting planet imposes on the much larger signal of the host star, and a non-optimal control of the systematics can result in the coupling of the star signal with the exoplanet signal, completely dazzling it. In this paper, we have presented a detailed description of the algorithms implemented by EChOSim to deliver realistic simulations. Simulation run-times are less than 100 s enabling the possibility of Monte Carlo analyses. EChOSim has been used to assess the EChO space mission, and can be adopted as a tool to develop novel mission concepts, or to investigate detection confidence for existing sub-orbital and space instrumentation.