LECX: a cubesat experiment to detect and localize cosmic explosions in hard X rays

With the advent of the nanosat/cubesat revolution, new opportunities have appeared to develop and launch small ($\sim$\ts 1000 cm$^3$), low-cost ($\sim$\ts US\$ 1M) experiments in space in very short timeframes ($\sim$ 2\ts years). In the field of high-energy astrophysics, in particular, it is a considerable challenge to design instruments with compelling science and competitive capabilities that can fit in very small satellite buses such as a cubesat platform, and operate them with very limited resources. Here we describe a hard X-ray (30--200\ts keV) experiment, LECX ("Localizador de Explos\~oes C\'osmicas de Raios X"-- Locator of X-Ray Cosmic Explosions), that is capable of detecting and localizing within a few degrees events like Gamma-Ray Bursts and other explosive phenomena in a 2U-cubesat platform, at a rate of $\sim${\bf 5 events year$^{-1}$.} In the current gravitational wave era of astronomy, a constellation or swarm of small spacecraft carrying instruments such as LECX can be a very cost-effective way to search for electromagnetic counterparts of gravitational wave events produced by the coalescence of compact objects.


INTRODUCTION
The design of competitive space instruments to detect Xand gamma-ray fluxes from astrophysical sources has always been a challenge due to several limitations, especially on weight, size and power consumption. In order to achieve good sensitivities for the desired instrumental parameters such as energy range, imaging capabilities, energy resolution and field-of-view (FOV), instrument builders have to carefully select detector types and structural parts that meet the constraints imposed by the available or envisaged resource possibilities.
Normally, non-focusing instruments such as codedaperture telescopes (see Braga 2020 for a recent review) need both large detector areas to maximize source count rates and massive shielding systems to minimize background levels. With the current explosive growth of the nanosat phenomenon based especially on the so-called CubeSat platform E-mail: joao.braga@inpe.br (see Villela et al. 2019 and references therein), new opportunities for fast-development, low-cost small instruments have appeared.
In principle, X-and gamma-ray astrophysical instruments on such small satellites cannot compete with full-sized instruments operating on conventional large and complex satellite buses. Nevertheless, for very specific science goals, it is possible to design instruments compatible with cubesat buses that can meet the desired requirements. In this paper we describe an instrument developed for a cubesat platform that is capable of detecting and locating relatively strong cosmic explosions that manifest themselves electromagnetically mainly in the hard X-ray/low energy gammaray range. The experiment, called "Localizador de Explosões Cósmicas de Raios X" (LECX -Portuguese for Locator of X-ray Cosmic Explosions), will be sensitive enough to detect and localize within a few degrees events like the wellknown gamma-ray bursts (GRBs -see Zhang 2018) in the 30-200 keV energy range. With its 53 • ×53 • FWHM ("Full Width at Half Maximum") FOV, it is estimated that LECX will detect ∼ 5 GRBs per year.
In the recently-inaugurated mutimessenger astrophysics era, it is of paramount importance that wide-field space instruments constantly patrol the sky in order to instantly detect electromagnetic (EM) counterparts of gravitational wave (GW) and/or neutrino cosmic bursting events. With the increased sensitivities of ground-based observatories of gravitational waves (e.g. LIGO/VIRGO) and neutrinos (e.g. IceCube), it is expected that the rate of such events will gradually increase over the years. X-and gamma-ray space experiments will then have higher probabilities of contributing to multimessenger detections of such phenomena.
The technology being developed for LECX builds upon what has been developed for the protoMIRAX project (Braga et al. 2015), a balloon experiment that represents a prototype of the MIRAX (Monitor e Imageador de Raios X, in Portuguese) space mission (Braga 2006;Braga et al. 2004).
LECX is in the integration and testing phase of the engineering model and constitutes the payload of the CRON-1/nanoMIRAX satellite (Durão et al. 2019), which is based on a 2U-cubesat platform. nanoMIRAX is being developed by the Brazilian private company CRON in partnership with INPE (National Institute for Space Research). In section 2.1 we describe the components of the detector system and associated electronics of the LECX instrument. In section 2.2 we present the algorithm that we have developed to determine the sky positions of cosmic explosions that occur in the instrument FOV. In section 2.3 we discuss the expected background that the instrument will be subject to in low-Earth circular equatorial orbit and the expected sensitivity of the instrument for the detection of bright, shortlived point sources. In section 2.4 we describe simulations of GRB detections with LECX that show the potential of the instrument to localize these sources. In section 3 we describe the satellite bus and its capabilities. Finally, in section 4 we present our conclusions.

THE LECX INSTRUMENT
2.1 The detector system LECX employs four CdZnTe (CZT) planar detectors in a 2x2 configuration. Each detector is a 10mm x 10mm square with a thickness of 2mm, operating from 30 to 200 keV, described in detail in Braga et al. (2015). The lower limit is imposed by electronics noise and the higher limit is due to detector thickness. The separation between adjacent detector volumes is 3 mm due to the mechanical mounting and the presence of the detectors' ceramic (alumina) substrates. Figure 1 shows the detector plane. CZT room-temperature semiconductor detectors have been extensively used in astronomical X-and γ-ray space instruments due to their very high photoelectrical efficiency up to hundreds of keV and good energy resolution. They are also easy to handle and can be tiled to cover large surfaces. Pixelated CZT detectors can also be built for imaging instruments (Pike et al. 2018;Rodrigues et al. 2013). Figure 2 shows a typical energy spectrum of one detector, in this case with a 60 keV nuclear emission line coming  . Energy spectrum of one CZT detector exposed to a 241 Am radioactive source. The peak on the right is produced by a fixed-height pulser for peak width comparison. Taken from Braga et al. (2015).
from a 241 Am radioactive source. The energy resolution is about 11 per cent at 60 keV. The red wing at the 60 keV line is due to incomplete charge collection inside the detector material, an ubiquitous feature of CZT detectors. The array is surrounded by a Pb (1.0mm), Sn (1.7mm) and Cu (0.3mm) graded shield box to minimize background and define the instrument FOV. The distance from the detector plane surface to the top of the shielding box is 20mm. In the upper part of the box there is an aperture of 23mm x 23mm that matches the detector plane area below (considering the gaps between the detectors). The area of the aperture is closed with a 0.4mm-thick carbon fibre plate to prevent the entrance of environment light, which induces noise in the detector electronics.
The detector system is surrounded by a dielectric material (teflon) structure that provides mechanical support and housing for batteries and electronic parts. Teflon is widely used in space application due to its suitable mechanical properties. The whole system is mounted on a standard 89mm×89mm cubesat printed-circuit board (the DPCB, for Detector Printed Circuit Board) at the top of the satellite structure (the "top" direction hereafter refers to the instrument axis, i.e. the direction corresponding to the centre of its FOV). The front-end analog electronics for the detectors, which comprises four sets of charge pre-amplifiers and lownoise shaping amplifiers, is mounted on the opposite (bottom) side of the DPCB. This PCB, as well as the other two, has multiple interconnected copper layers to provide electrical shielding. At the bottom part of the detector substrates lies the bottom part of the shielding box, so that the two  . The upper carbon fibre plate is placed for structural purposes, whereas the bottom green plate is the DPCB (see text). We can see the teflon structure with the cylindrical space for the batteries, the passive shielding layers (Pb-Sn-Cu), the teflon plate underneath the detectors and the 0.4mm carbon fibre plate at the aperture entrance.
electric leads (the one that polarizes the anode with the reverse bias and the one carrying the charge signal pulse from the cathode) perforate the shielding material, in teflon tubes, in order to reach the PCB underneath. The radiation shielding is also connected to the common ground to contribute to the electrical shielding. Figure 3 shows an exploded-view diagram of the detector system mounted on this PCB and Figure 4 shows two different views of the system.
The performance of the detector plane has been demonstrated in the protoMIRAX experiment (Braga et al. 2015). The reverse bias of −200 V was carefully chosen so as to minimize signal losses due to incomplete charge collection within the CZT material (manifested by the red wing of the 60 keV photopeak in Figure 2) whilst keeping very low levels of dark current. The long-duration CR1216 Lithium Manganese Dioxide batteries used for the detector power supply are placed close to the detector plane and encapsulated in the teflon structure to avoid current leakage.
A second PCB (the TPCB, for Time Printed-Circuit Board), mounted underneath the DPCB, houses the four Height-Time Converter (HTC) electronics, which linearly converts the heights of the pulses coming from the detectors to a digital high level signal. A third PCB, the experiment on-board-computer (EOBC), houses the digital electronics, which is responsible for performing the following tasks: (a) receive signals from the 4 outputs of the TPCB; (b) measure the time duration of the correspondent high level signals and convert them into digital 8-bit words (this is proportional to the deposited energy of each event, divided in 256 channels), (c) flag the individual detector were the event occurred and convert it into a 2-bit word; (d) tag each event with the Universal Time from the satellite on-board computer (OBC), that uses a GPS receiver, with a resolution of 255µs; (e) build the event packages with time, detector ID and energy information (each event will generate a 24-bit word); (f) store data files and send copies to the spacecraft OBC for transmission to ground. The EOBC uses a commercial low power PIC24F32 microcontroller very suitable for this specific application. The power consumption of the LECX electronic system is less than 800 mW.
According to simulations of the radiation level to be measured in orbit (see section 2.3) the LECX payload will produce ∼ 100 bits/s in nominal operation, which will generate ∼ 540 kbits/orbit and ∼ 8.6 Mbits/day of data. Assuming at least one 10-minute ground station passage every orbit, this will require ∼ 900 bits/s telemetry capacity, well below the envisaged capabilities of the satellite.
The three PCBs of the nanoMIRAX payload, which comprise the LECX experiment, fill the first "U" of the satellite and constitute the payload module. The second "U", the service module, mounted on the bottom of the payload module, houses the satellite subsystems described in section 3.

The source position determination algorithm
With the four CZT detectors placed inside the passive shielding box, as described in the last section, the FOV of the detector system is a square region of the sky of 53 • × 53 • FWHM (≈ 7 per cent of the sky) and 90 • × 90 • FWZI ("Full Width at Zero Intensity"). In this section we describe a new algorithm we have devised to determine the celestial coordinates of strong cosmic explosions based on the intensities measured in each detector during the event.
In standard collimated high-energy detector systems, the fluxes of astrophysical sources are determined by subtracting a background level, measured separately, from the amount of radiation measured when the source is in the collimator FOV. For pixelated detector planes, one can use a coded mask in the aperture to obtain an image of the source field within the FOV (see, e.g. Braga 2020). In the LECX cubesat experiment described here, we have only 4 pixels (the four planar detectors) and a limited sensitivity due to the fact that the total area is only 4 cm 2 . Since we are interested in detecting strong, short-duration point-source cosmic explosions one at a time, a coded mask placed in the experiment's aperture will not be adequate to use due to three reasons: (a) the results to be obtained are not images of source fields, but only measured fluxes of short-duration (∼ seconds) point sources. The known persistent or transient astrophysical sources will be too weak to detect on those timescales; (b) the advantage of coded-mask systems in measuring source and background simultaneously are not important here, since we will have plenty of time to measure the background anyway, and in the same region of the sky; and (c) there are no "URA-like" mask patterns with 2 × 2 dimensions that could produce images with no intrinsic noise (see Fenimore & Cannon 1978), i.e. there are no 2 × 2 patterns with a 2D discrete Dirac-δ autocorrelation function. We decided to develop and use instead a different algorithm that takes into account the "shadows" projected on the detector plane by the walls of the shielding box. This has the additional advantage of not partially blocking the FOV with a mask.
During the detection of a radiation burst coming from a single direction (representing a cosmic explosion), the x and y extensions (with respect to the square shielding box and detector orientations) of the wall shadows on the detector plane is a function of the azimuth and zenith angles of the incoming photons. Since the number of source counts in each detector is proportional to the illuminated area, we can determine the source position in the sky by measuring the counts in each detector when the count rates sudden increase during the occurrence of such an event in the FOV.
To explain the method, let us first define a coordinate system with axes x and y along the detector sides for a given detector plane orientation in which North is to the top (y) and East is to the right (x); see Figure 5. The relevant units of distance are the detector side s (10mm in this case) and the height of the shielding walls above the detector surface, H (20mm).
The diagrams in Figure 5 show simulations in which the 4 detectors are depicted along with a surrounding area. A black square, with dashed lines outside it, represents the illuminated area. (In these simulations the detector areas are exactly adjacent, not separated by 3 mm as in the real case, but this introduces insignificant differences in the results when statistics are taken into account.) On the left the source is at infinity along the instrument's axis, so the 4 detectors are equally illuminated. On the right, the source photons are coming from an azimuth (A) of 333 • (4th quadrant) and a "zenith" angle (z) of 13 • , both with respect to the instrument coordinate system. The colour code gives the count scale in which 10k counts were initially thrown at each detector before correction by the shadows. The x and y extensions of the shadows (Lx and Ly; see Figure 5) will clearly be Now, starting from the upper left corner, let us call the detector illuminated areas A11, A12, A22 and A21, going clockwise. Then In this particular case, since detector (1, 1) has the highest number of counts, the azimuth angle clearly ranges from 270 • to 360 • . Similar schemes, with equivalent equations, hold for the other three quadrants. In the general case, the algorithm first identifies the quadrant where the incoming direction lies by finding the detector with the most counts. Then it flags the other detectors in a decreasing order of counts. We then solve equations in the form of equations 2 (depending on the quadrant) for Lx and Ly, and finally use equations 1 to find A and z. The algorithm reproduces the Figure 5. The detector plane of LECX, viewed from above with a coordinate grid shown in blue. The illuminated area lies inside the black square with shaded regions outside. The counts are shown in a colour scale. Left: incidence from the instrument axis (the "zenith"); Right: incidence from an azimuth of 333 • (with respect to the instrument coordinate system) and a zenith angle of 13 • . The position determination algorithm reproduces exactly the incidence direction from the four count values. incoming angles exactly when no statistical fluctuations are taken into account.
For large zenith angles of incidence, z > arctan(s/H) in the orthogonal directions up to z > arctan( √ 2s/H) in the diagonal directions, the radiation coming from the source will miss one line of detectors entirely. In those cases, the algorithm can only determine ranges of A and z due to the lack of information from the four detector count numbers, which prevents us from calculating count ratios between detectors. As an example, in Figure 6 we show a simulation in which the burst came from A = 23 • and z = 34 • , hence outside the FWHM FOV. In this case, we can only determine that the position in the sky was 14 • .8 < A < 27 • .8 and 29 • .5 < z < 46 • .0. Another example is in Figure 7; here the source is at A = 130 • and z = 43 • so that only one detector is illuminated; all we can say by measuring the counts is that 116 • .6 < A < 153 • .4 and 35 • .3 < z < 54 • .7.
Even in those cases, it is noteworthy that we can still get some localization despite using a very simple experimental setup. In particular, if the EM burst is coincident with a gravitational wave event, any independent localization may prove to be useful since the GW laserinterferometric detectors have poor localization capabilities. With the FOV of LECX, it is expected that the mission will detect ∼ 5 cosmic explosions per year (see section 2.4).

Background and sensitivity
Estimation of the energy spectrum of the background signal and its spatial distribution over the detector plane is crucial for the design of hard X-ray and gamma-ray astronomy telescopes. In the case of an observation of a point source from an orbital space platform (i.e. a satellite), the background consists in the diffuse EM radiation coming through the telescope aperture, emission from other sources in the FOV, and the instrumental background, which arises from interaction of high-energy particles with the detectors and surrounding material (Gehrels 1985;Dean et al. 2003;Gruber et al. 1999;Ajello et al. 2008;Armstrong et al. 1973). Therefore, in order to foresee the performance of LECX in orbit and its sensitivity to cosmic explosions, we need to have a good estimate of the background radiation the detectors will measure. We have calculated this using the well-known GEANT4 package (Agostinelli et al. 2003;Sarkar et al. 2011). Details of our procedure to calculate the background of an instrument from angle-dependent spectra of photons and particles in space can be found in Castro et al. (2016). Considering a nearequatorial low-Earth orbit (LEO) and a mass model of the LECX experiment, we have obtained the main components of the expected background in orbit, outside the South Atlantic Geomagnetic Anomaly (SAGA). This is shown in Figure 8. We can see that the main contributions come from the diffuse EM flux entering the aperture (up to ∼ 140 keV) and the albedo radiation coming from the Earth atmosphere (above ∼ 150 keV). During the occurrence of a cosmic explosion event, it is reasonable to consider that the Compton-scattered events and fluorescence on the collimator walls will not add significantly to the background that will be present during the event, since the graded-shield walls were specifically designed to minimize these radiations with the help of GEANT4 simulations (see Castro et al. 2016).
The sensitivity of LECX can be calculated considering that the number of counts in each detector, for a given integration time and a given energy bin, obey Poisson statistics. In the case of cosmic explosions observations, what will be measured are sudden increases in the total count rate that will last typically from a fraction of a second to tens of seconds during nominal operation. A trigger mechanism will detect these surges and automatically put the experiment in burst mode, which will end when the low count rates resume. During burst mode, the satellite service module will provide more frequent attitude information data. The electronics is designed so that all events will be time-tagged and stored ]onboard even if the count rate increases by a factor of ∼ 100. All science and spacecraft data will be transmitted to the ground during the ground station passages.
Under nominal operations, the detector system will be measuring background radiation before and after the detected bursting events. We will select the best timescales to get good statistics for the background measurements. Since we may have significant background variations during one orbit, we also have to minimize this integration time to get more accurate values with respect to the background in effect during the occurrence of the event. During the event, we subtract the background counts from the total counts in each selected energy bin to obtain the source spectrum. It is easy to show that the minimum detectable flux, in photons cm −2 s −1 keV −1 , for each energy bin ∆E centred on energy E will be where Nσ is the statistical significance (signal-to-noise ratio), (E) is the detector efficiency, B(E) is the background Figure 9. On-axis 3-σ sensitivity of LECX for different onsource integration times, considering 10 minutes for background integration. Strong and weak GRB spectra are shown in blue and the Crab spectra is shown in green for comparison.
in counts cm −2 s −1 keV −1 , A det is the detector geometrical area in cm 2 (in this case 4 cm 2 ), ∆E the energy bin in keV, TB the time spent measuring background and TS in the time spent measuring source+background (both in seconds). According to the expected count rates, 5 minutes is a reasonable time to measure background before and after a triggered event, considering a ∼ 90-minute orbit. Using then 10 minutes for background integration, we have calculated the on-axis 3-σ sensitivity of LECX for 1, 10, 100 and 1000 seconds. The results are shown on Figure 9.
One can see that LECX is capable of detecting a wide range of typical GRB fluxes even with one-second integrations. For longer-duration GRBs, even somewhat weak events could be detected. The Crab spectrum (Wallyn et al. 2001) is shown in the figure just for comparison purposes, since the Crab it is a strong standard candle in these energies. LECX will not be able to detect the Crab since it would require pointing and very long stabilized observations, capabilities that the nanoMIRAX satellite will not have.

Simulations of cosmic explosion detections
In order to predict the performance of LECX for observations of GRBs and related phenomena, we have carried out a series of Monte Carlo simulations taking into account typical GRB spectra and the predicted LECX background. Since the LECX's graded shield, which is the same as the one used in our balloon project protoMI-RAX (Braga et al. 2015), has been shown by Castro et al. (2016) to be very effective in absorbing most gamma-rays in the typical GRB energy ranges, and also in cutting off the lead and tin fluorescence, we do not expect to have any significant contribution of scattering and transmission of the burst photons in the collimator. We also expect that contamination from GRB photons scattering off the spacecraft structure will be negligible since there is very little material in the cubesat platform and the detector plane is well shielded from below. For the same reason, and also due to the fact that the background is highly dominated by the diffuse gamma-ray emission coming through the aperture up to ∼ 140 keV, as seen in section 2.3, the albedo contribution from the GRB photons themselves scattering off Earth's atmosphere is very likely to be unimportant. In these simulations, we did not take into account Compton scattered photons in one detector hitting another detector since these scatterings will be very rare (see below) and the geometrical cross section of one detector seen by another is extremely small. Taking these considerations into account, we found very reasonable, for estimation purposes, to carry our simulations in which the GRB photons only hit the detector surfaces.
GRBs are brief flashes of γ-rays with spectral energy distributions that peak around hundreds of keV (see Zhang 2018 for a recent review), which are expected to be detectable at a rate of ∼ 1 event per day in the entire sky with the currently available instrumentation (Williams et al. 2018). They represent the most energetic explosions in the Universe and can release up to 10 54 ergs in a few seconds. They follow a bimodal distribution in which most of the bursts last longer than ∼ 2 seconds, clustering around tens of seconds, and about 1/3 of them are shorter, clustering around 400 ms. The former are believed to be produced by the core collapse of massive, high-rotation stars, whereas the latter are best explained by the coalescence of neutron stars in a binary system (e.g. Berger 2014). These short bursts are additionally interesting because they are expected to emit copious amounts of energy in the form of gravitational waves, as was dramatically demonstrated by the GW 170817 event (e.g. Granot et al. 2017;Abbott et al. 2017a;Savchenko et al. 2017). As the current gravitational wave detectors (LIGO and VIRGO) are upgrading their sensitivities and new ones (KAGRA, LIGO-India) are about to start operating, it is expected that the rate of GW burst discoveries will significantly increase over the next years. It is extremely important that those detections are accompanied simultaneously by X-and γ-ray observations, since the GW instruments lack precise angular localization and the EM signals are complementary with respect to the characterisation of the source. In a sense, we "see" the event through EM signals and "hear" it through the GW signal.
Short GRBs (SGRBs) usually have harder spectra and are less energetic than long GRBs (Berger 2014). However, the fluxes detected at Earth vary by several orders of magnitude depending on the GRB distance. The time-integrated fluxes (fluences) for all GRBs range approximately from 10 −8 to 10 −4 erg cm −2 . The observed photon spectra also show significant diversity and can usually be fit with the socalled Band model, a broken power-law with a smooth junction (Band et al. 1993). In any event, since we are interested in order-of-magnitude values for the simulations, we can approximately consider that a typical GRB photon spectrum measured at Earth is F = AE −1 , where A varies from 0.25 (weakest GRBs) to 200 (strongest GRBs), E is measured in keV and F is given in photons cm −2 s −1 keV −1 . This corresponds to a flat νFν spectrum. Figure 9 shows the limiting cases of these spectra.
In the simulations, we have considered the LECX instrument in a near-equatorial LEO and an incident flux coming from a GRB in a given direction. If on-axis, a very strong GRB would produce ∼ 1,900 counts in 1 s in the 30-200 keV energy range, whereas a very weak GRB would produce ∼ 2 counts. The background rate calculated using the GEANT4 simulations is ∼ 2.5 counts/s.
Using these numbers, we can simulate the signal-tonoise ratio (SNR) and the localization accuracy that we could achieve in a GRB detection with LECX. As in the simulations reported in section 2.2, we first calculate the illuminated areas on the four detectors, defined by the direction in the sky from which the photons are coming. In the real observations, this will depend not only on the azimuth and elevation with respect to the experiment reference frame but also on the satellite attitude given by the spacecraft's attitude control system (see section 3). By combining the two coordinate systems, we will determine the celestial coordinates (e.g. right ascension and declination) of the event in the sky.
Once the illuminated areas are defined, we simulate random source counts at the level of the known sources in each detector using a Poisson distribution. These numbers scale with the illuminated fraction of the detector areas. The source counts are calculated convolving the source spectra with the response function of the instrument, which is given by the ratio of the effective area to the geometrical area of the detectors as a function of energy. In this case this will be essentially the photoelectric efficiency of the CZT detectors, since in these detectors the photoelectric effect is highly favoured with respect to Compton scatterings up to several hundred keV (Del Sordo et al. 2009). The background counts added to that are also Poissonian distributed and are given by the values provided by the GEANT4 simulations.
As a first somewhat unrealistic example to demonstrate the method, we simulated a 10-s very strong GRB, corresponding to a fluence of 5.4×10 −4 erg cm −2 in our 30-200 keV range, occurring at A = 23 • and z = 7 • . Figure 10 shows the count levels and the shadow position.
In this case we get ∼ 13,600 source counts and ∼ 117 background counts, providing a theoretical (Poissonian) SNR of ∼ 116. After repeating the simulation 100 times to determine the dispersion on the parameters, we get A = 23 ± 4 • and z = 7.0 ± 0.7 • . The values of the dispersions do not vary significantly for more than ∼ 5 repetitions of the simulations, so these 1-σ dispersion values are very robust. This GRB is detected at a level of 116σ (SNR = 116.4±0.5), in close agreement with the Poissonian value. Figure 11 shows the 1-σ sky localization region for the GRB. In a second example, more realistic for a short GRB, we simulated a SGRB 10 times weaker with a duration of 1 s. The fluence in this case is 5.4×10 −6 erg cm −2 . The incoming direction is A = 203 • and z = 14 • . We get ∼ 120 source counts and ∼ 11 background counts, providing a theoretical (Poissonian) SNR of ∼ 11. The 100 simulations provide A = 200 ± 20 • and z = 15.0 ± 3.3 • , with a SNR of 10.4 ± 0.5, again in good agreement with the theoretical value.
It is noteworthy that the algorithm also gives the source flux during the event. By determining the source direction, we can calculate the fraction of the total detector area that was illuminated. Knowing the zenith angle z, we can correct for the the projected area by dividing the geometrical area by cos z. Then, a deconvolution of the resulting flux in counts cm −2 s −1 keV −1 by the instrument's response function gives the source's flux in photons cm −2 s −1 keV −1 .
Since the satellite attitude determination precision is of ∼ 1 • and we do not expect the spacecraft to rotate by more than 1 • in 10 s (see section 3), the conversion of instrument to sky coordinates will have an error of 1 • , which will be a small fraction of the overall localization power for most detected GRBs.
These simulations demonstrate that LECX is able to detect cosmic explosions and determine their positions in the sky with enough accuracy to contribute to the search for EM counterparts of GW burst events detected by the new generation of GW laser-interferometric observatories.
Based on current estimates of GRB occurrence rates and LECX's sensitivity, we can estimate the rate at which we will be able to detect these events in our FOV. The GRB rates have been discussed extensively in the literature (e.g. Ghirlanda et al. 2016Ghirlanda et al. , 2015Williams et al. 2018) and the values vary by large factors, depending on different models used for the GRB luminosity function and redshift distribution and on the assumptions made. Since the GRB emission is generally supposed to be collimated in jets, here we are counting only detectable GRBs, meaning that real GRB occurrence rate in the Universe can be much higher, depending on the jet opening angles. In order to get an estimate, we have used Figure 3 of Ghirlanda et al. (2015) that shows cumulative GRB rates in number-of-GRBs year −1 sr −1 as a function of the peak flux in photons cm −2 s −1 . Considering that the detected GRBs will have a roughly uniform angular distribution with respect to the instrument axis, we first apply a factor of ∼ 2 decrease in the detector plane illuminated area, corresponding to a typical z angle of 25 • . This will produce an increase in the minimum detectable flux (the sensitivity) by a factor of ∼ √ 2. In order to use the 50-300 keV curve of Figure 3 of Ghirlanda et al. (2015), which is the more adequate one to use here, we have to estimate the count rate that LECX would produce in this energy range. We used our GEANT4 simulations for the 50-200 keV range, providing 1.4 counts s −1 , and the fact that LECX would detect a very small number of events from 200 to 300 keV due to the relatively low efficiency of our 2-mm thick detector in this range and the low background (this is estimated to have an upper limit of 0.2 counts s −1 ). Our estimation for the 10-s flux limit then gives ∼ 0.9 ph cm −2 s −1 , which corresponds to ∼ 11 GRBs yr −1 sr −1 in the above-mentioned figure (for all redshifts). Since our FWHM FOV covers 7% of the sky, this would allow us to detect ∼ 10 events per year or ∼ 1 event every 36 days. Working with a conservative estimate that the instrument will be pointed away from Earth for half the time (see section 3), the rate of detected/localized events would be a more realistic ∼ 5 events per year.
It is important to stress that the GRB rate in the Universe is still subject to considerable debate, and the fact that the only localized neutronstar/neutron star coalescence event localized so far (GW170817 - Abbott et al. 2017a) was also seen in gamma rays (Abbott et al. 2017b) seems to point towards more frequent multi-messenger observations of these events than previously thought.

THE NANOMIRAX SATELLITE
The LECX experiment is the payload of a 2U cubesat-based nanosatellite called nanoMIRAX or CRON-1 (Durão et al. 2019). The upper "U" comprises essentially the 3 PCBs that constitute the LECX experiment as described in section 2.1. The lower "U" is the service module, which includes 4 subsystems: the Attitude Determination and Control Module (ADCM), the Power Generation and Management Module (PGGM), the On-Board Computer (OBC), and the Communications Module (COMM).
The ADCM, developed by Horuseye Tech, has been designed with potential for pointing at a target. However, due to cost limitations and the availability of sensors, this spacecraft only provides stabilization of angular velocity after release of the cubesat, using magnetic torque actuators, and attitude determination with magnetometers, solar sensors and gyrometers. The ADCM has an innovative design with redundant sensors for increased reliability. After release, the cubesat will be stabilized using the measurements of a triad of MEMS gyros, which provide the angular velocity of the cubesat with respect to an inertial frame. The actuation will be done by magnetic torquers, which generate orthogonal proportional torques at the inertial angular velocity and magnetic field, expressed in the cubesat axes. It is ex-pected that the actuation will be capable of keeping the LECX's FOV away from the Earth for most of the time. The attitude determination phase starts after stabilization in angular speed. The attitude is determined using the measurements of a 3-axis magnetometer and the solar sensors in the cubesat panels when there is no obscuration of the sun. It is expected that the system will provide attitude knowledge with a ∼ 1 • average accuracy and an angular velocity limit of ∼ 0 • .1/s. The ADCM software will store the attitude information during an event and then process it to reach the best possible accuracy taking into account the precision of the onboard sensors and the limits of magnetic actuation.
The PGGM, also developed by Horuseye Tech, will optimise the energy transfer from the solar panels by converting the power with BOOST-type converters using MPPT (Maximum Power Point Tracking) mode. The MPPT operation seeks to maximize the utilization of the energy that the panels can generate. This is useful when the system needs to recharge the batteries and does not consume the full capacity of the panels. In this case, all excess consumption is directed to storage. The implemented circuit can operate in two MPPT modes: constant voltage and maximum power. The PGGM uses a high-performance, low-power Atmel microcontroller (IC1), ARM 32bits, M4, of the SAMG55 family. The system is expected to provide 800mW of power to LECX continuously, which will allow the experiment to be on all the time, maximizing the search for cosmic explosions.
The OBC, acquired from ISIS (Innovative Solutions in Space), uses a 400MHz 32-bit ARM9 processor. The data communications protocol is I2C with 400 kbps maximum capacity. The OBC will receive science and housekeeping data from the LECX experiment and store them in data files to be downloaded to the ground stations.
The COMM will use a TRXUV CubeSat transceiver also provided by ISIS. It operates in the 130-160 MHz (VHF) and 482-486 MHz (UHF) frequency ranges with a data rate of 1200-9600 bit/s. We will use small-satellite ground stations already operational at INPE (National Institute for Space Research in Brazil) at the Brazilian cities of Santa Maria, São José dos Campos and Natal.
All data acquired in the spacecraft will be transmitted to the ground and stored at the mission center. These include the science, attitude and housekeeping data. The onboard GPS will date all events with Universal Time. The science data will consist in all detected events in the 4 detectors with energy and time information (see section 2.1). The attitude data will include the satellite attitude and stabilization information as a function of time. The housekeeping data will include temperatures in several locations within the spacecraft and other diverse "health" parameters of the satellite.
In Table 1 we present the baseline numbers of the LECX/nanoMIRAX mission.

CONCLUSIONS
In this paper we present a very small high-energy astrophysics space experiment that is capable of contributing to the detection and localization of cosmic explosions that re-veal themselves by copious emission of hard X-rays and lowenergy γ-rays. The nanosat/cubesat revolution has opened new opportunities for the development of scientific space missions in the "smaller, faster and cheaper" paradigm. With innovative ideas, it is possible to contribute to science with low budgets and limited resources. The experiment described here is an example of a cubesat mission that is capable of doing competitive and important science by detecting and localizing cosmic explosions in the gravitational wave era of astronomy. This is accomplished by a new algorithm that uses the shadowing of shielding walls over the detector plane to reconstruct the incoming directions of photons coming from a bright and short-lived cosmic point source.
Simulations described here show that LECX can detect most GRBs and locate them within a few degrees in the sky at a rate of ∼ 5 per year. With a constellation of satellites of this kind, it would be possible to increase this rate significantly and provide a low-cost, fast-development network of electromagnetic localizers of gravitational wave events that could complement the observations made by the groundbased gravitational wave observatories. The development of such a constellation is one of our long-term goals and will be addressed elsewhere.
LECX is currently in the integration and testing phase of its engineering model. The flight model will integrate the solar panels and onboard antennas. We are analyzing launch opportunities and we expect to have the satellite launched by the end of 2020. One possibility is a launch in a LEO polar orbit by the Indian Polar Satellite Launch Vehicle (PSLV).