The Modular Multispectral Imaging Array (MMIA) of the ASIM Payload on the International Space Station

The Modular Multispectral Imaging Array (MMIA) is a suite of optical sensors mounted on an external platform of the European Space Agency’s Columbus Module on the International Space Station. The MMIA, together with the Modular Xand Gammaray Sensor (MXGS), are the two main instruments forming the Atmosphere-Space Interactions Monitor (ASIM). The primary scientific objectives of the ASIM mission are to study thunderstorm electrical activity such as lightning, Transient Luminous Emissions (TLEs) and Terrestrial Gamma-ray Flashes (TGFs) by observing the associated emissions in the UV, near-infrared, xand gamma-ray spectral bands. The MMIA includes two cameras imaging in 337 nm and 777.4 nm, at up to 12 frames per second, and three high-speed photometers at 180–230 nm, 337 nm and 777.4 nm, sampling at rates up to 100 kHz. The paper describes the MMIA and the aspects that make it an essential tool for the study of thunderstorms. The mission architecture is described in Neubert et al. (Space Sci. Rev. 215:26, 2019, this issue) and the MXGS instruments in Østgaard et al. (Space Sci. Rev. 215:23, 2019, this issue).

these, the sprite, was discovered by chance in 1989. Another serendipitous discovery occurred few years later in 1994, when the Compton Gamma Ray Observatory (CGRO) satellite, designed to study radiation from space, observed millisecond-duration bursts of gammarays originating from Earth atmosphere in conjunction with thunderstorms. These are now known as Terrestrial Gamma-ray Flashes (TGFs). Although such manifestations of thunderstorm activity were predicted at the beginning of the 20th century by C.T.R. Wilson (Wilson 1925a(Wilson , 1925b, and optical emissions above storms were reported even earlier (MacKenzie and Toynbee 1886), the discoveries came as a surprise to the scientific community and caused a great excitement, triggering further observations and studies.
With the Atmosphere-Space Interactions Monitor (ASIM) on the International Space Station (ISS) we will study TLEs and TGFs with dedicated instrumentation designed specifically for the purpose. TLEs will be measured by the Modular Multispectral Imaging Array (MMIA) and the TGFs by the Modular X-and Gamma-ray Sensor (MXGS) (Østgaard et al. 2019). This paper describes the MMIA instruments.
TLEs are now known in many forms. They include the sprites, which are electrical discharges in the mesosphere at 50 to 80 km altitude and the blue jets that are streamer/leader type discharges propagating upward from cloud tops through the stratosphere to about 50 km altitude. Jets may also remain small as the so-called blue starters or propagate to the bottom ionosphere at 90 km altitude as the gigantic jets. Additional small, localized discharges include the pixies and trolls. Common for these emissions is that they are the signatures of electrical breakdown of the atmosphere. Another type of manifestation are the elves, which are horizontally expanding, donut-shaped light emissions at the bottom ionosphere. They are emissions from neutral species that are excited by collision with free electrons accelerated by the electromagnetic pulses from lightning discharges Lyons et al. 2000;Lyons 2006;Neubert et al. 2008;Pasko et al. 2012;Siingh et al. 2012).
The scientific interest has led scientists to undertake optical observational campaigns from the ground, in particular in the US, Taiwan, Japan and Europe (Sentman et al. 1995;Wescott et al. 1998;Lyons et al. 2000;Gerken et al. 2000;Bering et al. 2004;Neubert et al. 2005;van der Velde et al. 2006;Chanrion et al. 2007;Bór et al. 2009;Soula et al. 2011;Su et al. 2002Huang et al. 2012;Fukunishi et al. 1996;Stenbaek-Nielsen and McHarg 2008;McHarg et al. 2007;Moudry et al. 2003;Singh et al. 2014). Cameras onboard the Space Shuttle Orbiter observed in the early days many TLEs by chance (Vaughan and Vonnegut 1989) and by design (Yair et al. 2004). The first dedicated satellite instrument in space was the Imager of Sprite/Upper Atmospheric Lightning mounted on the FORMOSAT-2 satellite Kuo et al. 2015). In addition, cameras operated by astronauts onboard the ISS also recorded TLEs during the LSO experiment (Blanc et al. 2004), the JAXA expedition 28/29 (Yair et al. 2013) and the THOR experiment Michel et al. 2017). A dedicated instrument suite, GLIMS (Global Lightning and sprIte MeasurementS), installed on the KIBO module of the ISS has also recorded many observations (Sato et al. 2011(Sato et al. , 2015.
Although numerous observations and research activities were conducted during the last 25 years, many questions remain open, for instance related to the thunderstorm source of the emissions and to the nature of jets and gigantic jets for which we lack consolidated models. The combination of the MMIA and the MXGS in the same payload also attempts to describe the lightning processes that lead to TGF emissions.
ASIM is an observatory on an external platform of the European Space Agency's Columbus Module of the ISS. With its two cameras and three photometers, the MMIA currently offers the highest available spatial (∼400 m) and temporal resolutions (100 kHz) of thunderstorm electrical activity. The MXGS and the MMIA take time-synchronized, concurrent observations and cross-trigger each other when flashes are detected. In addition to ASIM, the ISS carries another instrument for thunderstorm observations, the ISS-LIS, which is a spare of the Lightning Imaging Sensor (LIS) of the TRMM satellite and is installed on the DoD STP-H5 pallet (Blakeslee et al. 2014), thus allowing for observations of thunderstorms simultaneously with ASIM.
The first section of the paper describes the scientific objectives of the ASIM mission, with emphasis on the role of the MMIA, and characterizes the emissions of the optical event to be measured. The second and third sections describe the instrument package, and the fourth section summarizes the MMIA performance in terms of sensitivity, spatial and temporal resolution. The last section describes the operational modes of the instruments and the data products. We conclude by summarizing the contributions that the measurements of the MMIA bring to the ASIM mission and to the scientific community.

Science Objectives
The main goal of the mission is to better understand lightning, TLEs and TGFs, and the role they play in the dynamics of the atmosphere and in our climate. The objectives are discussed in Neubert et al. (2019, this issue) and are summarized in the following.
The primary science objectives are (1) to conduct a comprehensive global survey of TLEs and TGFs covering all local night-times and seasons, (2) to secure data for understanding the fundamental kinetic processes of TLEs and TGFs, and (3) to understand the relationship of TLEs and TGFs to lightning activity. Additional objectives that can be addressed with the ASIM observations are (1) meteor precipitation in the atmosphere, (2) the optical and x-ray aurorae, (3) the effects on cloud electrification of dust storms, forest fires and volcanoes, (4) intensification of hurricanes and its relation to lightning activity.

Characterization of the Events
The optical emissions associated with thunderstorms involve excitation of neutrals by electron impact, which releases photons while returning to a lower energy level. The bands of interest are related to the main constituent of air: nitrogen, and oxygen. The first band selected is centered on 337 nm with a bandwidth of 4/5 nm. It is one of the strongest emissions occurring in air discharges and is associated with the second positive (SPN2) system of the nitrogen molecule with peaks at this wavelength. The band is in the near ultraviolet (NUV) but still within range of traditional camera imaging systems. The second band selected is a wide band corresponding to the nitrogen Lyman-Birge-Hopfield (LBH) system of molecular nitrogen, with emissions ranging between 127 nm and 240 nm. The band is in the far/middle ultraviolet (FUV/MUV) and is chosen because it is strongly absorbed in air allowing estimation of the altitude of the emission when comparing to the emissions in the 337 nm band. The last band is of 3 nm width around the 777.4 nm, corresponding atomic oxygen (OI). This band is in the infrared and is the strongest optical band in the red region of the spectrum. It is from the hot lightning leader, while remaining weak in the colder sprites and elves. It chosen for space observation of lightning (LIS) and can be imaged with traditional camera technology.
The lightning and TLEs emission intensities have been estimated from ISUAL measurements (Chen et al. 2008;H. Frey private communication) and are summarized in Table 1 O. Chanrion et al. Lightning N/A 1.2 × 10 6 -3.9 × 10 8 10 7 -2 × 10 8 TLE 5 × 10 4 -1.5 × 10 6 8 × 10 5 -6 × 10 6 ≤ 2 × 10 6 after rescaling to ASIM altitude, the lower values are determined by the instrument sensitivity. The typical duration of TLEs and lightning emissions vary in the range 0.8-150 ms and 0.4-1000 ms, respectively. The fastest rise time can be less than 100 µs. The characteristic spatial dimension of elves are rings extending to a horizontal radius of ∼500 km with a vertical dimension of ∼10 km and centered at ∼90 km altitude. A jellyfish sprite is typically ∼ 40 × 40 × 50 km, centered at ∼65 km altitude with its streamers 100 m or smaller in diameter. Lightning illuminating a cloud appears with a typical size of ∼ 20 × 20 × 10 km at ∼8 km.
The characteristic size, time and spectral intensity of the events played a key role in the specifications of the MMIA. Thus, the instruments have been designed for a sub-km spatial resolution, for 10 µs time-resolution and for a high sensitivity and dynamic range. Spectral bands ranging from FUV to infrared were selected for measuring the fastest and faintest events and to allow altitude discrimination of events from differences in atmospheric absorption. Although the primary objectives have driven the design, the MMIA sensor suite also allows fulfillment of the secondary objectives.

Design Philosophy
The external platform of Columbus has four locations for instruments. ASIM is installed on the lower deck facing the starboard direction. The MMIA has two cameras and three photometers that are co-aligned. As shown on Fig. 1, they are mounted on the top of a structure and tipped upwards by 5 • to avoid obstruction by a payload on the bottom platform facing nadir. The instruments are so sensitive to light that they are only operated during nighttime.
The spectral bands allow separation of the emissions in altitude with little absorption of 777.4 nm, some absorption of 337 nm depending on altitude, and strong absorption in the LBH. Lightning dominates the 777.4 nm band, whereas the both lightning and TLEs contribute to the FUV/MUV bands. However, since the LBH band is almost completely absorbed in the atmosphere, emissions observed in this band must likely come from higher altitudes, and therefore flashes observed in this band are considered signatures of TLEs. Emissions in 337 nm is partly absorbed in the atmosphere and their strength relative to emissions in the 777.4 nm band is an indication of the altitude of the emissions. Some characteristics of the MMIA sensors are summarized in Table 2.
The main engineering budgets are summarized in Table 3. The engineering budgets were defined by the constraints related to the launch and to ISS operations. The MMIA power usage represents 60% of the overall ASIM power budget of 105 W, the mass represents about 20% of the mass of the complete payload and the data sent to ground fits in the telemetry budget of 760 MB/day. . The Camera Head Units (CHUs) and the photometers (PHOTs) are mounted on an optical bench that sits on top of a support structure to avoid having the payload on the nadir-directed platform in the field of view. The instrument computer, the Data Processing Unit (DPU), is placed directly on the CEPA and is clad with a radiating shield for thermal control. The viewing direction is indicated by a black arrow in the ISS frame given by the velocity vector, the nadir and starboard direction

Camera Head Unit
The CHUs are composed of three key elements; 1. an optical assembly consisting of a baffle to reduce stray light and optics hosting a narrow band filter. 2. a focal plane assembly containing an Electron Multiplication Charge Coupled Device (EM-CCD) of high sensitivity. 3. control and readout electronics capable of reading out up to 12 full frames per second from the sensor. O. Chanrion et al.  The CHUs are shown in Fig. 2 as Computer-Aided Design (CAD) models (top) and the actual flight model (bottom). The CHU1 camera is to the right and the CHU2 camera to the left. The CHU electronics is shown in Fig. 4. The optics on both CHUs has a square 80°-diagonal FOV with a F-number of 1.2 for CHU1 and 4.8 for CHU2. The position of the narrow band filter in the optical stack is designed to limit high incident angle on the filter in order to ensure as little shift in the center wavelength as possible. The CHU1 optics has the lowest F-number in order to detect faint TLEs such as elves with sufficient Signal-to-Noise Ratio (SNR) whereas CHU2 was designed for minimum filter bandwidth by relaxing the F-number since it is detecting lightning with much higher signal intensities. The filter of CHU1 has optimum throughput around the 337.0 nm with a 4 nm bandwidth at −3 dB and for CHU2 the filter is at 777.4 nm with a 3 nm bandwidth at −3 dB. Their transmittances are shown in Fig. 3. Each set of optics also contains a dedicated front lens heater that can be activated for contamination removal.
Both cameras are equipped with a back illuminated electron multiplying CCD201 from Teledyne e2V mounted in a highly thermo-mechanically stable focal plane. This includes a cold finger that keeps the CCD temperature below 0°C even when operating under worstcase thermal conditions.
• Electron multiplication gain: up to 1000 allowing shot noise limited imaging.
• Frame transfer in 1.5 ms.
• Pixel readout rate: 15 Mpixels/s resulting in a maximum of 12 full frames per second.
The above values were measured and confirmed. More details about e2V frame transfer electron multiplying CCD can be found in can be found in Harding et al. (2015). The CCD readout is handled by an analogue front-end image processor containing a correlated double sampler, analogue amplifier, 14-bit ADC and Low-Voltage Differential Signaling (LVDS) interface. A field-programmable array (FPGA) handles the interface to the MMIA DPU, controls 10 dedicated CCD clock driver circuits and finally interface to the front-end ADC. All electronics are made using space qualified components and consumes approximately 6 W during full-speed image capture. Table 4 summarizes the key properties for MMIA CHUs. Both CHUs output image frames consist of 1026 lines (1024 active lines + 2 transition lines) with 1056 pixels per line (1024 active pixels + 32 dark references), each pixel being encoded as a 12-bit value. The pixels are output on a three-lane serial interface at 60 MHz O. Chanrion et al.  where each lane is dedicated to the transmission of the lower, middle, and upper nibble of each pixel. The image frame is transmitted line by line with a synchronization word marking the start of every line and frame. The CHUs are controlled by the DPU FPGA by means of two identical modules, which operate independently from each other. Together, the two modules make up the CHU instrument handler. The CHU instrument handler also serves to record the image frames being output by the CHUs. For this purpose, the incoming serial data is being sampled on both edges of the 120 MHz clock also being output to the CHU instruments, resulting in the data being oversampled with a factor of 4 times the data rate. The synchronization words preceding each frame and line in a data frame are evaluated by the CHU instrument handler in order to determine the optimum time for latching the value of each received bit as well as to ensure proper synchronization between the three data lanes. Thus, a dedicated data clock is not used for transferring data from the CHU instruments to the CHU instrument handlers. Since the CHUs operate at different frequencies than that of the 50 MHz DPU system clock, the CHU instrument handler also deals with a number of clock-domain crossings. Most of the clock-domain crossing signals are synchronous with constraints derived automatically from the system clock constraints. The remaining signals have been treated as asynchronous signals with appropriate synchronization and metastability elimination schemes carried out in the destination clock domains.

Photometer
The three PHOTs are composed of an optical assembly made of a baffle to reduce stray light, lenses focusing on the photocathode of a Photo-Multiplier Tube (PMT) operating in photon counting mode, proximity electronics and a calibration light emitting diode (LED). The three PMTs are from E.T. Enterprises Ltd. due to their flight heritage and are selected according to the spectral ranges of interest. Figure 5 illustrates the construction of the PHOTs with the help of partial section cut of their CAD models.
The PHOT1 and PHOT3 have identical optical designs which includes a lens system, a narrow band filter and a small straylight baffle. Similar to the CHUs a telecentric illumination of the interference filter reduces the maximum incident angles and thus limits the center wavelength shift. Between the filter and the last lens, a square field aperture limits the PHOT FOV to match the image of the two CHUs. A collimator lens is included after the field stop in order to spread the photon energy homogeneously on the PMT photocathode surfaces, which are 25 mm in diameter. Additionally, a front lens heater is located in the optics, which can be activated for contamination removal.
The PHOT2 has a larger straylight baffle and the optics consist only of a 22 mm diameter aperture placed between a protective front glass and a filter that protects the PMT from potential harmful sunlight by cutting off transmission above 270 nm. The photocathode responds only to photon wavelengths below 280 nm. The lower wavelength response is limited by the transmittance of the fused silica glass and is at 180 nm. PHOT2 also is equipped a dedicated front lens heater for contamination removal. A summary of the PHOT apertures and filter properties can be found in Table 5 and in Fig. 6.
When a photon releases an electron at the cathode, electron avalanches are initiated in the PMT. The PHOT electronics converts the resulting impulse current into a digital signal that is passed to a pulse detector in the DPU. The trigger level for the digital signal can only be changed indirectly by varying the photomultiplier current pulse amplitude through the O. Chanrion et al. high voltage applied to PMT. The PMTs are said to operate in "photon counting mode" as each impulse current signal (photon) is counted when above the trigger level. The three PHOTs utilize similar electrical designs, the functions of the proximity electronics are illustrated in the block diagram in Fig. 7. The PMTs are powered by an adjustable high voltage (HV) power supply based on the Royer topology, which generates the high voltages necessary for PMT operations from the ±5 V power supply lines to the photometer. The HV levels are adjustable by an analog 0-3 V control signal, provided by the MMIA DPU. A separate LVDS line from the DPU is used to control the pulse activation and duration of the calibration UV LED. The impulse current is read from the anode of the PMT, which is amplified and passed to the comparator where the signal is digitized. The comparator output is connected via the LVDS transceiver to the DPU.
The amplifier is non-inverting, 11 times current feedback, with a bandwidth of 200 MHz. The bandwidth of the sensors is limited by the finite pulse rise times of the photomultiplier tubes and by the finite fall times defined by the capacitance and the shunt resistor in the signal path. For the PMTs used in PHOT1 and PHOT3, the rise time is 4.5 ns, while it is 3 ns for PHOT2. The fall times are trimmed to be around 5 ns for all 3 photometers. The full length of a photon pulse is thus approximately 10 ns, which means that the pulses cannot occur more often than every 10 ns, as the pulses would otherwise fuse together and create a pileup or saturate the sensor. This sets the maximum count rate of the sensors to be 100 MHz.
Although the design of the proximity electronics is identical, there is a difference in the maximum voltage of PHOT1/3 and PHOT2. This difference is dictated by the difference in the absolute maximum ratings of the photomultiplier tubes used. The maximum high voltage for PHOT1 and PHOT3 is limited to 2000 V, while it is 3000 V for PHOT2.
Each PHOT contains a UVTOP250UV LED used for in-flight test of photometer health and on-ground test of the PHOTs. The LED has a center wavelength of 250 nm, at which all three PHOTs are sensitive. The led allows for adjustment of the pulse threshold in case the cathode sensitivity and amplification degrades over time. The LED is driven by a constant current generator located in the proximity electronics and is controlled by the DPU via a single LVDS line. The LED requires a relatively high current to produce a stable output which depends on the temperature. To reduce the intensity and thus produce a pulse of acceptable amplitude, an aperture and a UV band pass filter with low transmission are installed in front of the LED. Additionally, the UV band pass filter removes a long fluorescent afterglow from the LED. The LED is located as shown in Fig. 5, and uses an aluminum bracket to reflect the light into the front of the PMT.
The PHOT PMTs are calibrated by a set of 3 pulses from the calibration LED which are measured and logged together with the temperature of the tube. The average pulse magnitude of the 100 ms long pulses is compensated for thermal effects and background noise, before compared with earlier values to determine if the PMT has degraded. The HV setting for the PMT of each PHOT is also calibrated periodically. This is performed by three pulses from the calibration LED at −5%, 0%, +5% and +10% HV. The average pulse height must decrease at −5% and not increase significantly at +5% and +10% HV for the HV setting to be correct. Table 5 summarizes the key properties for MMIA photometers.

Hardware
The ASIM payload computer, the Data Handling Power Unit (DHPU) serves as the interface between the instruments and the Columbus Module that supplies power to the payload and O. Chanrion et al.

Fig. 8
The MMIA DPU board-component side telemetry connection to the ground segment. The DHPU sends telecommands to control the instruments based on broadcast data on the ISS, e.g. the passage from daytime to nighttime or reverse, as well as the passage over the South Atlantic Anomaly. It sends a time synchronization signal to the instruments enabling an absolute time accuracy of below 20 ms and a MMIA-MXGS cross-time correlation below 5 µs. It transmits telecommands from the ground to the MMIA and transmits data packets from the MMIA to the downlink. The MMIA DPU is based on a Xilinx Virtex-5 FPGA (FX130T). It delivers the computational power to command the instruments, to receive instrument data and to run selection algorithms to reduce the volume of data to the most interesting for downlink. Power is supplied by a 28 V operational power line controlled by the DHPU, which allows the DPU to switch the MMIA instruments on and off. The DPU includes various power conditioner circuitries to supply power to the DPU itself and to the sensors connected to the DPU. Commanding and handling of data from the sensors is done by the processor of the DPU. The DPU is mounted in a separate box on the CEPA and is thermally insulated from the CEPA. The DPU's radiator is covered with a second surface mirror tape and the other surfaces are covered and insulated by beta cloth and multilayer insulator. The DPU is also equipped with internal heaters to handle the different thermal conditions. The sensors are automatically turned off during daylight using the ISS provided data. For added security, a daylight sensor is implemented on the optical bench and is connected to the DPU, which will turn off the sensors if the other system fails.
The electronic components of the DPU are shown in Fig. 8. The FPGA is the main component that is programmed with firmware from the PROM at power up. Due to the requirement of real time analysis for trigger events on the data from the CHU, a powerful Xilinx Virtex-5 FPGA (FX130T) is chosen. The firmware on the FPGA contains a LEON3FT processor (IP-core). The application software (ASW) is executed by the processor and is located in the EEPROM. The ASW can be modified by upload through tele-commanding from the DHPU. The processor interfaces (through the FPGA) to the System Memory (SRAM for ASW), the Mass Memory and the Ring Buffer. Several components in the DPU (incl. the memory components) are chosen from the high-density 3D PLUS radiation tolerant family. The Mass Memory is used to temporarily store data from the sensors (CHU and PHOT) before uploading to the DHPU through the telemetry Fig. 9 The MMIA DPU architecture line. The Ring Buffer is used as a delay line between input drivers of the sensors and the Mass Memory to enable capture of the data prior to an MXGS to MMIA event trigger. This way the data present in the Ring Buffer contain data before and after the event. The data can be transferred to the Mass Memory and subsequently they can be transmitted to Earth by tele-commanding through the DHPU. The ADC and DAC circuitry is mainly used for housekeeping.
The LEON3FT processor is highly configurable and permits the design of custom instrument handlers. The architecture of the configured processor together with the instrument handlers is shown in Fig. 9.
The CHU instrument data are continuously recorded into a one-second-long circular buffer in SDRAM that accumulates data in time slots based on a camera frame integration time basis (12 frames per second during nominal operation). During the acquisition of an image frame, metadata consisting of row and column sums are calculated by the FPGA on the fly and appended to each image frame stored in the circular buffer.
The FPGA process the photon current pulses from the PHOT sensors. The pulses are sampled at 400 MS/s to resolve the pulse rise-and decay time. A count is incremented for each positive edge and the counts are accumulated for 10 µs and stored in a 12-second-long circular ring buffer corresponding to a rate of 100 kcounts/s with 1200000 sample values ranging from 0 to 1250 for each photometer. The FPGA also produces metadata to ease the event detection based on the photometers measurements. The metadata is a configurable accumulation (10 to 127) of the 100 kHz measurements to form smoother photometer light curves corresponding to sampling rates from 10 kHz to 787 Hz. The FPGA also provides a utility whereby the DPU ASW can order any part of the contents of the photometer circular ring buffers to be transferred to the more permanent mass memory storage wherefrom the photometer data may be analyzed and/or downlinked.
The acquisition of the data from the PHOTs and CHUs are time synchronized on a 1-sec time pulse coming from the DHPU. The trigger logic of the Application Software searches for peaks detected in the camera and photometer metadata. The trigger thresholds are configurable.
The backbone of the LEON3FT-based DPU architecture consists of an AMBA Advanced High-performance Bus (AHB), which serves to connect the CPU with DMA devices such as memory controllers. The memory controllers for the mass memory and the ring buffers are in turn connected to their own, separate AHB buses in order to keep any traffic related to mass memory/ring buffer access from interfering with the CPU operations and vice versa. Instead, this traffic is handled by the ring buffer/mass memory transfer module. This module, which is connected to both the ring buffers and the mass memory AHB buses, provides a series of interfaces for ring buffer/mass memory I/O. Each write interface for mass memory and ring buffers is implemented with two input buffers-when the first buffer is full, the second buffer is set as the input buffer. If the corresponding AHB bus is free, the contents of the first buffer are written immediately to the memory by means of a burst write. If the AHB bus is busy, a write request is set instead. Similarly, the read interfaces perform burst reads on their corresponding AHB buses if they are free, otherwise, read requests are set instead. However, the read interfaces are not buffered by the ring buffer/mass memory transfer module.
All pending read and write requests are served by means of a round-robin scheme with priority being given to write requests. AHB signaling, arbitration of read/write request, and input buffer switching are carried out within the ring buffer/mass memory transfer module and are thus transparent to the connected entities. For ring buffer write access, each instrument present in the MMIA is provided with its own interface; hence the PHOTs and CHUs are served by 3 and 2 ring buffer write interfaces, respectively.
In order to provide functionality for transferring data from the ring buffer to mass memory, two VHDL modules-the PHOT transfer module and the CHU transfer module-are also connected to the ring buffer/mass memory transfer module. The PHOT transfer module is served by 3 ring buffer read interfaces and 3 mass memory write interfaces whereas the CHU transfer module is connected to 2 ring buffer read interfaces and 2 mass memory write interfaces.
For each of the 3 PHOTs, the PHOT transfer module permits the ASW to specify the number of photometer samples to be transferred as well as their start address in mass memory. Similarly, the CHU transfer module allows the transfer of full or cropped CHU image frames. Also, an option to transfer metadata only is provided. As is the case with PHOT transfers, the start address in mass memory is selectable by ASW. When CHU images frames are transferred, pixel cramming is performed on the fly in order to conserve Mass Memory space. Since the AHB buses used in the design operate with 32-bit data words, 8 12-bit CHU pixels are contained within 3 words after pixel cramming.
After set-up and activation, the operation of the PHOT and CHU transfer modules require no further intervention from ASW. The status of an initiated transfer (complete/not complete) is continuously presented to status registers, which can be read from ASW. Access from the CPU to the mass memory is provided by means of an AHB2AHB bridge, which connects the CPU AHB bus and the mass memory AHB bus.
The Virtex 5 FPGA (FX130T) is radiation hardened per design. The block RAM of the FPGA and the external memory is radiation tolerant but still susceptible to single event effects (SEE). To mitigate this, the LEON 3FT is supplied with automatic error detection and correction (EDAC) facility and all 32-bit storages in the mass memory are supplied with 16 bit EDAC information to enable correction of error. A scrubbing mechanism is scheduled in the ASW to correct errors detected by the automatic EDAC on the processor. The rate of the scrubbing is configurable from the DHPU.
When in trigger mode, data from the CHUs is continuously captured at a rate of 12 fps with a resolution of 1024 × 1024 pixels/frame and a pixel resolution of 12 bit. The photon pulses from the PHOT's are captured at a maximum rate of 50 MHz to ring buffers implemented in BRAM of the FPGA. The instrument handlers of the CHU's and PHOT's analyze data for event triggering before storage in the ring buffers. If a trigger is detected, an interrupt is induced in the processor that immediately raise the MMIA event trigger to the MXGS and initiate data capture from the ring buffers to the mass memory. The CHU instrument handler crops the images based on light increase detections in the row and column sums of the metadata.

Software
The software is divided into Boot Software (BSW) and ASW, where the BSW executes at power-on. Both BSW and ASW are implemented in Ada 2012 using AdaCore GNAT Pro for LEON Bare Board-thereby saving the additional layer that an operating system would introduce. Instead, the Ada runtime system takes the place of the operating system. The BSW is implemented using one Ada task whereas the ASW uses around 30 Ada tasks. The Ada tasks in the ASW adhere to the Ravenscar profile, enabling reliable measurements of worst-case execution times in order to perform a schedulability analysis and ensure that all tasks meet their deadline. The following software modes and sub-modes are defined, and the possible transitions are shown in Fig. 10.
• Boot mode: Initialize, load ASW, patch and dump ASW • Configuration mode: Sensor power, patch and dump ASW and configuration parameters • Operational mode: • Triggered collection sub-mode: Collect TLE/lightning data based on trigger algorithms • Timed data collection sub-mode: Collect raw photometer and camera data as commanded • Data processing sub-mode: Compress and format the collected data for downlink For nominal operations, the MMIA is in one of the two data collection sub-modes during nighttime, while being in data processing sub-mode during daytime.
The software is divided into a platform part and a science part. The platform part, which handles telecommand processing, telemetry generation, housekeeping acquisition, memory load/dump, sensor power selection, configuration parameter management and software mode transitions, shares several concepts as well as some of the code with the MXGS software. The science part handles the science data acquisition, processing and buffering.
The software is highly configurable. For instance, the trigger and TLE/lightning categorization and prioritization algorithms can be tuned via more than 250 individual configuration parameters. All instrument configurations, including sensor power selection, is managed in configuration mode. However, since the photometers are permanently damaged if powered on during daylight for more than a few seconds, they are only armed for power in configuration mode. Only if the daylight sensor does not detect daylight, are the armed sensors powered on by the software.
In terms of science data flow, the photometer and camera data is acquired by the hardware and placed in the ring buffer. The data is divided into frames such that each frame spans the integration of a camera image, and a frame period is between 1/12 and 1 second. In triggered data collection sub-mode, the ASW analyses the incoming metadata (camera image row and column sums and down-sampled photometer data) and detects and categorizes triggers in each frame. The ASW only copies the scientifically interesting data to the mass memory, and the collected data is bundled into observations consisting of at most 8 consecutive frames in triggered data collection sub-mode, where each observation has a pre-frame and a postframe without any triggers. The combined data is a MMIA event. If an event is longer than 8 frames, a new event is created. For observations in timed data collection sub-mode, an observation simply contains the number of frames commanded via telecommand.
The mass memory implements two buffers, namely a data collection buffer and a downlink buffer. The data collection buffer has three partitions for 1st, 2nd and 3rd priority observations. The priority is used for selection of the next observation to process and pass on to the downlink buffer such first priority is downlinked first. The priority assigned to an observation depends on the TLE/lightning categorization and any incoming cross-trigger from the MXGS instrument. Per default, the assigned priority and the data stored are: • 1st priority partition: For triggered observation classified as a TLE event, for instance if there is a pulse in the light curve of the 180-230 nm PHOT above the pre-set trigger threshold. In this case, the camera metadata, pixel data and photometer data is selected. The camera pixel data is cropped to include the scientifically interesting part of the image. For other MMIA triggers, or from triggers passed from the MXGS with no simultaneous MMIA trigger, the camera metadata and the photometer data are selected. • 2nd priority partition: Observations collected in timed data collection sub-mode. The observations may optionally be compressed when passed on the downlink buffer using a modified JPEG2000 compression algorithm described at the end of this section. • 3rd priority partition: For MMIA trigger events that are not classified as TLEs the cropped camera pixel data are selected. Figure 11 shows how frame data is being collected, processed and buffered. The frame metadata comprises the parameters of the TLE/lightning categorization and cropping algorithms related to the latest 12 frames in the ring buffer, as well as any incoming cross-triggers from the MXGS. For triggered observations, it is therefore possible to decide if a frame from the ring buffer is to be copied before it is overwritten.
The dotted line in Fig. 11 indicates that 1st priority observations may be stored in the data collection buffer for 3rd priority observations in case the buffer for 1st priority observations is full. When passing over major thunderstorm areas, it is anticipated that a large amount of 3rd priority observations are discarded due to a full data collection buffer. However, all observations are downlinked according to their priority, irrespective of the buffer in which they are stored.
As an option, the 2nd priority image data may be compressed using a wavelet-based image coder, inspired by JPEG2000 (J2K), but tailored and simplified specifically for Fig. 11 Science data collection, processing and buffering the ASIM mission and with time-critical processing replaced by faster methods. The input images with 12 bit-values per pixel (bpp) can be compressed to a preset value, with 1.5 bpp as the default, thus providing a compression by a factor of 8. As in J2K, a bi-orthogonal wavelet transforms the image into wavelet subbands coefficients. This is followed by a specific quantization, reflecting a priority of subbands designed for the ASIM mission. The coefficients of the subbands are coded in bit-planes from mostsignificant-bit-plane until the specified number of bits is reached. Instead of arithmetic coding as in J2K, a faster entropy coder was implemented (Forchhammer et al. 1999;Andersen et al. 2008).

Instrument Performance
The performance of the MMIA surpasses preceding missions by having the highest sensitivity, dynamical range, and temporal resolution. From the technical description of the instruments given above, we can relate the performance of the instrument to the events they observe. For the cameras, the estimation of the sensitivity is made assuming that the light associated with an event is contained entirely inside one frame 83 ms duration. In addition, that the size of the illuminated region when seen towards the nadir is 35 km × 35 km for lightning, halo and sprites, and 100000 km 2 for elves. For the photometer, we proceed the same way by assuming that light is contained within a 3 ms time interval for lightning, halos and sprites, and 0.8 ms for elves. The performances are summarized in Table 6 where the sensitivity range is given for an electron multiplication gain of 10 for the cameras, which can be improved up to a gain of 100.
The timing and pointing accuracy are determined by the specifications of the ISS and of the MMIA instrument and the CHU co-alignment accuracy is below 0.5°. However, it will be improved by combining concurrent observations from space and ground.
As mentioned above, the calibration of the instrument is done by the internal calibration LED for the PHOT and the CHU calibration is done by PHOT cross-calibration. Cross calibration can also be done by comparing measurements with concurrent observations. For instance, the photon flux calibration is improved by cross calibration with the Lightning Imager Sensor and the timing accuracy is improved by associating observations with ground-based lightning network observations. The measurements of ISS attitude will also be improved by the star cameras installed on the MAXI instrument (Matsuoka et al. 2009). O. Chanrion et al. Table 6 Performance of the MMIA instrument (the CHU sensitivity range is given for an electron multiplication gain of 10 and can be improved by a factor 10 for a gain of 100) Elves [ph/cm 2 /event] 1 × 10 5 -1.5 × 10 6 8 × 10 5 -6 × 10 6 −2 × 10 6 Jet [ph/cm 2 /event] N/A 1 × 10 8 -1 × 10 9 N/A Lightning [ph/cm 2 /event] N/A 1.2 × 10 6 -3.9 × 10 8 1 × 10 7 -2 × 10 8 Aurora [ph/cm 2 /s] 10 8 -10 10 2 × 10 7 -2 × 10 9 8 × 10 6 -8 × 10 8

Expected Scientific Performance
The expected number of TLE and lightning observations can be estimated from the ISUAL observations (Chen et al. 2008) by comparing sensitivities and duty cycles of ISUAL with the MMIA instrument on the ISS. The photon fluxes recorded by the ISUAL limb viewing sensors at ∼700 km altitude rescaled to the ASIM nadir viewing sensors at ∼400 km altitude is given in Table 7 (H.U. Frey, private communication): When comparing the intensity of the events with the sensitivity given in the previous section, we estimate that MMIA is more sensitive than ISUAL. Assuming that the ground footprint of ISUAL is three times bigger than that of MMIA which operates 8 hours a day, we find that the MMIA is expected to record more than 70 lightning events, 3 TLEs per day and that it will be triggered about 50 times per day by the MXGS, including 3 TGFs. Considering the highest sensitivity and the fact that the downlink is limited in volume, the instrument is designed to record about 860 lightning events, 8 TLEs per day and to be triggered by 50 TGFs triggers per day by the MXGS. We can also note than the imager is able to record auroras.

Operational Modes and Data Products
The MMIA can operate in several operational modes dedicated to primary and secondary science objectives. For the primary science objectives related to observation of transient luminous flashes of emissions from thunderstorms, the triggered data collection mode allows for the recording of sudden change of lights. This is used to collect data on lightning events, TLEs, meteors and TGFs. For the secondary science objectives related to e.g. auroras, the timed data collection mode allows the performing of scheduled periodic observation of fixed duration. The instrument generates data from both modes and also from housekeeping to check the health and status of the instruments. The focus of this section will be only on the data of scientific interest, corresponding to the triggered or timed data collection mode.

Triggered Data Collection Mode
The triggered data collection mode is implemented to automatically select the most interesting emissions originating from thunderstorms. It is constructed on 2 levels of selection. The first level selects flashes by triggering on light emission or on a signal from the MXGS indicating it has possibly observed a TGF. The second categorize the observation in TLEs, lightning or TGFs for prioritization of downlink data volume.
The PHOT trigger algorithm is based on real-time analysis of 10 kHz down-sampled photometer readings of each of the photometer. The background level is first evaluated on a few ms long window by averaging a number of preceding sub-samples. Having set two parameters Nc and Ns, a photometer is triggered if at least Nc consecutive down-samples are above the background level plus at least Ns standard deviation. The algorithm therefore detects a sudden increase of light level in the photometer.
The CHU trigger algorithm is based on real-time analysis of the row and column sums in consecutive frames. The basic principle of the algorithm is the same as for the photometer. The background is defined by the sums in the preceding frame assumed to be dark. A row or column sum is triggered if a number of consecutive sums are above the background sums plus at least Ns standard deviation. The frame is triggered if both the columns and rows are triggered. The algorithm therefore detects a sudden increase of light level in consecutive frames. Furthermore, it allows reduction of the volume of data to download by cropping the images using the region of interest given by the location where the sums are triggered.
Finally, the MMIA implements a cross-triggering function allowing the instrument to be triggered when a signal indicating that its companion instrument, the MXGS is triggered.
The triggering algorithm is constructed on the frame duration: At the end of each frame the trigger flag is evaluated for each instrument, and if at least one instrument indicates that a sudden increase of light occurred during the frame acquisition, the whole MMIA is triggered and data can be collected from all instruments.
The corresponding data is then further processed by a prioritization algorithm to evaluate the scientific relevance of the data. First, the optical data is evaluated to see if it contains most likely a TLE or only a lightning event. The baseline algorithm checks if the signal in the FUV/MUV (PHOT 2) is sufficient which suggests the presence of a TLE. For the sake of minimizing the risk of relying on only one photometer to prioritize the data, another O. Chanrion et al. For every triggered observation, a data package contains the instrument readings for the duration of one frame before the first triggered one, all the triggered frames, and one frame after the last triggered frame. In nominal configuration of the instrument, the data is composed of the 3 photometers reading at 100 kHz sampling rate and from 2 cameras recording at 1/12 s sampling rate together with the row and column sums of each camera frame. The outcome of the prioritization algorithm defines the data to be downloaded, which is summarized in Table 8.

Timed Data Collection Mode
The timed data collection mode allows scheduling in advance observations to be recorded. For instance, if aurora, noctilucent clouds or thunderstorms are forecasted the timed data collection mode gives the possibility to perform observations at the precise ISS overflight time. This mode is based on the scheduling of a start time, total observation duration and a number of frames to record in each second. It is to be noted that the camera frame integration time can be set to multiples of 1/12 s up to 1 s to allow improved sensitivity if required. When the instrument is in timed data collection mode, it produces a data package for every observation, containing the instrument readings corresponding to the scheduled observation.

On-Ground Data Conversion
The data from the triggered and timed data collection modes are received as digital counts and need to be converted to physical units for correct interpretation. In the following, we briefly describe the conversion of data of scientific use. The easiest data to convert comes from the photometer, since it measures a count of photons entering the tube. The conversion to flux of energy entering the instrument is given by: where C is the count per sample recorded by the instrument, S is the aperture, Q E (T ) is the quantum efficiency of the cathode, t s is the sampling time, t d is a typical time for piling up correction, E is the photon energy corresponding to the center wavelength of the bandpass filter, and T l and T f are respectively the lens and filter transmission coefficients. The parameters are given in Table 9.
For the sake of simplicity, the temperature dependency expressed by the term Q E (T ) and the boresight angular dependency expressed by the correction factor 1 C(θ ) are not given here.
For the camera the conversion formula can be written as: 10 6 · AG · DN · f ps ·E S · EMG · Q E (T ) · T l · T f · P F OV · 1 C(θ) µW sr cm 2 where DN is the digital number associated with a given camera pixel, S the aperture, Q E (T ) is the quantum efficiency of the sensor, AG and EMG are the analog and electron amplification gain, f ps is the number of frames per second, P F OV is the pixel field of view, E is the photon energy corresponding to the center wavelength of the bandpass filter, and T l and T f are the lens and filter transmission coefficients, respectively. The parameters are given in Table 10. O. Chanrion et al. Once again, the temperature dependency expressed by the term Q E (T ) and the boresight angular dependency expressed by the correction factor 1 C(θ) are not given here. All the data collected by the instrument is converted by the above formulas to construct data products for triggered and timed data collection mode based on physical units.

Conclusions
In April 2018, the mission ASIM was launched and installed on the external EPF_SDX location of the Columbus laboratory of the International Space Station. A part of the ASIM instrument suite, The MMIA is operating in the visible range, performing measurement of optical emissions associated with thunderstorms, meteors and auroras. In this paper, we have presented the main characteristics of the cameras, the photometers and the data processing unit that make the MMIA a highly sensitive and configurable instrument for the study of thunderstorms and auroras. Together with the MXGS, the MMIA will support ongoing research activities in a broad range of sciences from the study of atmospheric electricity including lightning, transient luminous events and terrestrial gamma ray flashes physics, to the study of auroras and meteors.
To conclude, we give an overview of the ASIM Data Center (ASDC) whose role is to support the instrument commissioning, calibrate the instruments, convert the raw data to physical units and to deliver consolidated data products to the scientific community. The raw data from ASIM and therefore from the MMIA is made available via the Belgian User Science Operations Center (B.USOC) to the ASDC. The ASDC unpacks the telemetry packets, converts the data to physical units by using the conversion formulas given above and by geolocating the data with ISS position and attitude recording. Furthermore, the ASDC analyses the triggering activity to tune the threshold parameters for best performance of the on-board detection and prioritization algorithm given the available telemetry bandwidth and realizes cross-calibration of the instrument with concurrent observations. Ideally, the ASDC will coordinate observational campaigns planned during the mission to help the collection, analysis and cross-validation of concurrent observations coming from space, ground, balloon or aircraft. Finally, the ASDC facilitates the scientific exploitation of the MMIA instrument granting access to several levels of data upon agreement by the ASIM Facility Science Team. Level 0, 1 and 2 correspond to raw, converted and fine-tuned data, respectively. and Science who supported ASIM from the Danish Globalization Fund for Climate Initiatives (2009Initiatives ( -2012 via a special contribution to ESA. The development of the ASIM instrument computer was supported by the ESA PRODEX contracts PEA 4000105639 and 4000111397.
Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.