{'fraction_non_alphanumeric': 0.02816798182395622, 'fraction_numerical': 0.0136320328341436, 'mean_word_length': 4.701908343780471, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The HaloSat and PolarLight CubeSat Missions for X-ray Astrophysics

Astronomical observations in the X-ray band are subject to atmospheric attenuation and have to be performed in the space. CubeSats offer a cost effective means for space-based X-ray astrophysics but allow only limited mass and volume. In this article, we describe two successful CubeSat-based missions, HaloSat and PolarLight, both sensitive in the keV energy range. HaloSat was a 6U CubeSat equipped with silicon drift detectors. It conducted an all-sky survey of oxygen line emission and revealed the clumpy nature of the circumgalactic medium surrounding the Milky Way. PolarLight is a dedicated X-ray polarimeter performing photoelectron tracking using a gas pixel detector in a 1U payload. It observed the brightest X-ray objects and helped constrain their magnetic field or accretion geometry. On-orbit operation of both missions for multiple years demonstrates the capability of CubeSats as an effective astronomical platforms. The rapid time scales for development and construction of the missions makes them particularly attractive for student training.


Introduction
CubeSats are a class of small satellites that follow certain design specifications. A CubeSat may occupy a volume of one, several, or a fraction of a 'unit' (U) defined with dimensions of 10 cm × 10 cm × 10 cm. Most CubeSats have a size of 1U, 3U, 6U, or 12U. Use of fixed design specifications and interfaces enables CubeSats to fly on a variety of launch vehicles and decouples construction of the CubeSat from the specific launch opportunity. This allows CubeSats to piggyback on the launch of large missions, greatly reducing cost. CubeSats have become an effective and affordable means to demonstrate new technologies for space science and to train students in the development of space missions.
Along with the growing popularity of CubeSats, there has been increasing interest in their use for space-based astronomy [1]. Unlike balloons that fly within the atmosphere, CubeSats operate in space, enabling observations in wavebands subject to substantial atmospheric attenuation such as the UV and soft X-ray bands. Compared with the very short durations of sounding rockets flights, CubeSats can operate for years. Astrophysical missions based on CubeSats may take advantage of long duration observations to compensate for the small telescope apertures and detection areas that result from the constraints on CubeSat mass and volume. Due to their low cost, CubeSat missions can be designed for very specific scientific goals. This enables, e.g., observing programs devoted to deep observations of a limited number of targets enabling long-term monitoring.
In this chapter, we focus on CubeSat missions for extrasolar X-ray astrophysics, in particular on two missions launched in recent years: HaloSat [2] and PolarLight [3]. Both are sensitive in the energy range of a few keV. Gamma-ray CubeSat missions are described and discussed in Section IV of this book. There have also been several solar X-ray missions based on CubeSats [4,5]; they are not included in this chapter. HaloSat performed an all-sky survey of oxygen line emission in the soft Xray band to attempt to better understand the distribution of hot plasma in the Milky Way halo [6]. PolarLight is a collimated X-ray polarimeter observing the brightest X-ray sources in the sky in order to diagnose their magnetic field or accretion geometry [3]. In the following sections, we introduce the instrumentation, operation, and performance of the two missions, and briefly summarize the science results. Then, we discuss a few lessons learned in building CubeSats for space astronomy, and how such missions can benefit student training.

HaloSat
HaloSat was the first competitive-selected CubeSat funded by NASA's Astrophysics Division. The scientific goal of HaloSat was to map the spatial distribution of hot gas in the halo or circumgalactic medium of the Milky Way by mapping soft Xray line emission [2]. The mission was developed in less than 2.5 years from the start of funding to launch. The mission was deployed from the International Space Station on 2018 July 13, began science operations in 2018 October, and re-entered Earth's atmosphere on 2021 January 4. The data from the full mission have been archived at NASA's High Energy Astrophysics Science Archive Research Center (HEASARC) and are publicly available in the standard data formats and can be reduced and analyzed using standard tools for X-ray data analysis. This enables their use by the astrophysics community.

Scientific Goals
In 1956, Spitzer first suggested the existence of a 'Galactic corona' or halo of hot (10 6 K) gas surrounding in the Milky Way to help explain of presence of clouds of gas far from the Galactic plane [7]. The halo or circumgalactic medium (CGM) has played a key role in evolution of the Milky Way. It is the source of material for star formation and a repository for metals thereby produced [8,9]. The CGM may also be a repository for baryons seen in the early universe, but undetected locally [10].
The CGM is multiphase with the majority of the gas at temperatures near 10 6 K [11]. Gas at this temperature is best studied in the X-ray band, either via absorption line or emission line spectroscopy. The primary lines used are those of oxygen, which has the highest cosmological abundance after hydrogen and helium and is not fully ionized at the ∼ 10 6 K temperatures of the halo. Absorption line spectroscopy requires a bright background source, usually an X-ray bright active galactic nucleus (AGN), in order to obtained the high signal to noise ratio required. Given the capabilities of current X-ray observatories, only about 30 lines of sight can be probed in absorption [11].
X-ray emission is produced directly by the halo gas and provide a means to study the entire halo. Major X-ray observatories, mainly XMM-Newton and Suzaku, have been used to measure X-ray emission from the halo, but they were not designed for the study of diffuse emission on large angular scales. Also, the spectra obtained are often contaminated by foreground heliospheric emission that limits the accuracy of measurements of the emission from the CGM. The scientific goal of HaloSat was to map the spatial distribution of hot gas in the circumgalactic medium of the Milky Way by mapping oxygen line emission in the soft X-ray band.

Mission and Operations Design
HaloSat was designed to provide good sensitivity to diffuse X-ray emission extended on large angular scales (tens of degrees) in the soft X-ray band. The mission and operations were designed to produce an all-sky survey while minimizing foreground heliospheric and magnetospheric emission.
The figure of merit for the study of diffuse emission is 'grasp' which is the product of the effective area of the instrument multiplied by the field of view. HaloSat has a small effective area, about 5.1 mm 2 at 600 eV for each detector which is limited by the physical constraints of the CubeSat format, but has a large field of view of approximately 100 square degrees. Three essentially identical X-ray detectors were used giving a total grasp of 17.6 cm 2 deg 2 at 600 eV. This exceeds the grasp of Chandra at launch and is within a factor of 4 of the grasp of XMM-Newton. This shows that small X-ray astronomy missions can be competitive with major missions when designed for a specific scientific goal. Charge exchange interactions between energetic charged particles in the solar wind and neutral atoms within the solar system can leave oxygen ions in excited states that decay with the emission of an X-ray indistinguishable from X-rays produced in the halo. This is foreground emission often limits the accuracy of soft X-ray measurements of the halo. The observing strategy of HaloSat was designed to minimize the foreground due to solar wind charge exchange (SWCX; for a review see [12]). HaloSat observations are scheduled to occur preferentially towards the anti-Sun direction. This limits the path length both through the heliosphere and through the X-ray bright parts of the magnetosphere. This provides a significant decrease in SWCX contamination, particularly relative to spacecraft such as XMM-Newton which use a fixed solar array and therefore require observation at angles roughly perpendicular to the Sun [6]. Figure 1 shows the sequence of operations during each HaloSat spacecraft orbit. HaloSat was in a low Earth orbit of about 90 minutes. During the day (Sun lit) half of each orbit, HaloSat orients so the solar array is normal to the Sun to maximize power received and the science instruments are switched off. This maintained a positive power budget throughout the mission. Also, the frequent power cycling of the instrument ensured that any single event upsets or software failures within the instrument impacted less than 90 minutes of operations. During the night half of each orbit, HaloSat pointed at two different targets, one in the quarter of the orbit between the dusk terminator and spacecraft midnight and the other between midnight and the dawn terminator. This enabled HaloSat to observe towards the anti-Sun direction without Earth obscuration. The rapid changes in aspect, three per Fig. 2 HaloSat after integration of the science instrument with the spacecraft. The BCT avionics module is on the left and the science instrument is on the right (there was a cover over the instrument on-orbit). The spacecraft structure has a large opening through which the three co-alligned science instrument view the sky. The fields of view were defined by the three large aluminum washers. The diamond-shaped plastic part covers an alignment mirror. Each instrument had identical and independent electronics visible on top. 90 minute spacecraft orbit, were feasible because the compact size and low mass of the CubeSat led to a low moment of inertia.
Instrumental background due to interactions of energetic charged particles with the detectors and the spacecraft was the other major source of background on HaloSat. Each detector was equipped with a passive shield to decrease the background as described in the following section. However, high background counting rates were encountered while passing through the South Atlantic Anomaly (SAA) or through the 'polar horns' at high equatorial latitudes. The most common launch opportunities for CubeSats provided by NASA are via launches to the International Space Station (ISS). CubeSats deployed into the ISS orbit have a relatively high inclination (51.6 • ) and spend significant time in high radiation regions at high latitudes. Ride share missions to lower inclinations could provide a significantly better radiation environment for future X-ray CubeSats.
HaloSat was built around a commercial CubeSat bus built by Blue Canyon Technologies (BCT). Use of a commercial bus provided reduced cost and improved heritage relative to a custom-designed bus. Spacecraft operations were performed by BCT based on science operations sequences planned by the University of Iowa. This provided an effective division of labor and utilized the expertise of each organization in a cost effective manner.

Science instrument development and calibration
The science instrument and its integration with the spacecraft, see Figure 2, is described in [13]. Design and construction of the instrument is described in [14] and ground calibration in [15]. Here, we summarize a few key features and design considerations.
HaloSat used commercially available silicon drift detectors (SDDs) from Amptek, Inc. Each SDD is a sealed package containing an X-ray sensor with an active area of 17 mm 2 , a Si 3 N 4 window, a multilayer collimator, and a thermoelectric cooler. The SDD was cooled to −30 • C during operations and provided an energy resolution of ∼85 eV (FWHM) at 677 eV [13]. The rapid timescale of 2.5 years from start to flight was possible only because no significant technology development was needed for the mission.
Each SDD was mounted inside a shell of 1.2 mm thick copper-tungsten composite, the mix of high and low atomic number materials acted as a graded shield. The shield was electroplated with nickel and an outer layer of gold, chosen because it has no florescence lines in the energy band of interest. The charge pulses produced by X-rays detected in each SDD were processed using an analog electronics chain with a discriminator, preamplifier, shaping amplifier, and sample/hold [14]. Prototypes of each component of the instrument electronics were designed, built, and tested beginning early in the program with multiple iterations. The EM was subject to environmental testing, particularly repeated thermal cycling, to identify faults and ensure that our electronics were reliable and would meet the performance requirements over the full on-orbit temperature range and over the full mission duration. This enabled us to hold the Instrument Design Review eleven months after project start with a fully operational engineering model (EM) meeting all performance requirements.
Extensive ground calibration in vacuum over the full on-orbit temperature range [15] was critical in achieving reliable science results. The channel-to-energy calibration used an X-ray tube that excited florescence lines of F (677 eV), Al (1488 eV), Si (1743 eV), and Cr (5412 eV). The flight model (FM) of the HaloSat science instrument was mounted in a thermal-vacuum chamber and cycled over the temperature range from −25 • C to +45 • C. The channel-to-energy calibration was found to be temperature dependent. The calibration data were used to derive empirical relations used to correct the energy calibration on-orbit. HaloSat experienced relatively rapid temperature changes due to its low Earth orbit and small mass. Hence, the calibrations were applied on an event-by-event basis using a temperature reading obtained within 16 s of the event time. The calibration data were used to estimate the electronic noise and the energy resolution as a function of energy. Spectra of radioactive 55 Fe sources were used to tune the parameters of a model of the SDD response based on code for simulation of Si X-ray detectors written by Scholze and Prokop [16]. The model was originally developed for the SDDs used on the Neutron star Interior Composition Explorer (NICER) instrument [17] and provided to the HaloSat team by Dr. Jack Steiner. The SDDs used by HaloSat are identical to the ones used by NICER except for the type of the entrance window and the dimensions for the three, co-aligned X-ray detectors. Spectra include emission from the Galactic halo, the local hot bubble, and the cosmic X-ray background as shown. These astrophysical emission components are assumed to be identical for the three detectors. The particle-induced instrumental background varies between the three detector.
of the internal collimator. The effective area of the SDDs was calculated from the properties of the Si 3 N 4 window and multilayer collimator provided by HS Foils, Oy, and the SDD dead layer thickness and active depth provided by Amptek, Inc. The effective area curve was validated on-orbit using observations of the Crab nebula. The effective area and response were used to create response files compatible with the Xspec X-Ray spectral fitting package [18].

Science results
HaloSat's primary scientific goal was to constrain the spatial distribution and mass of hot gas associated with the Milky Way by mapping soft X-ray line emission from highly ionized oxygen. A study of the southern Galactic sky with HaloSat showed The black X's mark bright X-ray sources. Figure adapted from [13].
that the X-ray emission exhibits strong variations on angular scales of ∼ 10 • , has an overall trend versus Galactocentric radius proportional to the surface density of molecular hydrogen which is a tracer of star formation, and has a relatively small scale height of a few kpc [6]. These results suggest that the X-ray emission is predominantly from hot plasma produced via stellar feedback.
HaloSat conducted an all-sky survey including all Galactic latitudes. This enabled a broad range of investigations of hot plasma within the Milky Way produced by stellar and nuclear feedback. HaloSat data have been used to study the North Polar Spur that was historically considered to be the result of a nearby supernova but has recently been interpreted as related to feedback from the nuclear supermassive black hole and to the bubbles seen by the Fermi satellite at GeV energies. The HaloSat results on pressure and electron density favor a Galactic-scale event with an energy of ∼ 6 × 10 54 erg and an age of ∼10 Myr [14]. HaloSat data on the Cygnus superbubble, a region of bright soft X-ray emission in the direction of local spiral arm, show that the temperature and absorption are consistent across different parts, suggesting a singular origin, potentially as a hypernova remnant [19]. HaloSat observations have also been used to make the first measurement of the total X-ray luminosity of the Vela supernova remnant using CCD-level energy resolution [20].
HaloSat has also enabled studies beyond the topic of hot plasma within the Milky Way, ranging from within the solar system to clusters of galaxies. HaloSat data have been used to investigate heliospheric SWCX emission [21], the Large Magellanic cloud [22], the Virgo cluster of galaxies [23], and to search for 3.5 keV line emission from a putative sterile neutrino produced in the decay of dark matter [24].

Data archive
The HaloSat all-sky survey tiled the sky with 334 fields with attention paid to avoid known bright X-ray sources, see Fig. 4. The data from the full HaloSat mission have been archived at NASA's High Energy Astrophysics Science Archive Research Center (HEASARC) and are publicly available for use by the astronomical community (https://heasarc.gsfc.nasa.gov/docs/halosat/). Spectral, event, and ancillary data are available and may be accessed via the standard HEASARC Browse interface or anonymous SFTP. Pre-processed spectra using standard cuts for data filtering are available for each field. All of the data files are in standard FITS (Flexible Image Transport System) format. Response matrices in standard file formats compatible with the Xspec X-Ray Spectral Fitting Package are available. This enables analysis of the data with tools commonly used throughout the X-ray astronomy community. The HaloSat HEASARC site also hosts analysis guides providing descriptions of the data, processing pipeline, data analysis, and instrumental background modeling. Public availability of archived data has been important in enhancing the scientific return of many observatories. It is important to continue this policy for CubeSats and to archive the data in standard formats and with sufficient documentation that they can be easily used by the community.

PolarLight
PolarLight is an X-ray polarimeter based on the photoelectric effect and is sensitive in the energy range of 2-8 keV. It is a 1U payload in the CubeSat Tongchuan-1, which was launched into a LEO on 2018 October 29. As of this writing, PolarLight is still operating on orbit (for over 3 years) and is measuring X-ray polarization of the brightest X-ray sources in the sky. The purpose of the mission is to demonstrate the new technology for future X-ray telescopes, understand the on-orbit background, and obtain science results in this field that has not been well explored.

Detector
As a photoelectron is ejected by the electric field of an X-ray's electromagnetic wave, the photon's polarization signature is imprinted in the emission direction of the electron [25]. On the plane perpendicular to the photon propagation direction, the emission angle of the photoelectron has a cos 2 distribution with respect to the polarization angle of the photon. Thus, the X-ray polarization can be measured via electron tracking in a low density medium such as a gas. For PolarLight, this is done with a gas pixel detector (GPD), which is a 2D position-sensitive ionization chamber that enables the measurement of electron tracks.
The GPD was first designed by the INFN-Pisa group and subsequently developed for space astronomy [26][27][28][29]. It is a 2D gas proportional counter with pixel readout. Dimethyl ether (DME; CH 3 OCH 3 ) at a pressure of 0.8 atm was selected as the working gas, thanks to its low electron diffusion coefficient. The gas has an absorption depth of 1 cm, and is sealed in a ceramic chamber with a 100 µm thick beryllium entrance window for incident X-rays. After the DME absorbs an X-ray, a photoelectron is generated, with a kinetic energy slightly less than the photon energy (minus the electron binding energy, which is 543 eV for the O K-shell and less for C and H). Then, the photoelectron travels in the gas and ionizes DME molecules, leaving behind pairs of electrons and ions along its trajectory. A high voltage is applied in the chamber to create a drift electric field of 2 kV/cm, such that the ions move toward the cathode, which is the beryllium window, and the electrons move toward the anode. The drift field strength is chosen to minimize the transversal diffusion of electrons [29].
In the chamber and right above the anode, there is a gas electron multiplier (GEM) for electron multiplication. The GEM is a 100 µm thick dielectric foil made of liquid crystal polymer (LCP) coated with 5 µm copper on both sides [31], manufactured by SciEnergy Inc. The foil consists of laser etched microholes with a diameter of 50 µm and a pitch of 100 µm in a hexagonal pattern. A high voltage of about 600-700 V is applied across the top and bottom copper electrodes. The field lines are squeezed into the microholes, where the electric field strength is high enough to trigger avalanches when electrons go through the holes.
Beneath the GEM lies an ASIC chip [32], which is the anode of the chamber used for collecting and processing the charge signals. The chip is pixelated to 300 × 352 pixels in a hexagonal pattern. Each pixel has a full electronic chain including the preamplifier, shaping amplifier, sample and hold, and multiplexer. The noise is around 50 e − rms per pixel. The shaping time is 3-10 µs and externally adjustable. The ASIC pixels measure the charges produced by the photoelectron after multiplication with the GEM, and provide the 2D photoelectron track on the plane of the detector.

Payload
The PolarLight payload has a size of 1U, containing three printed circuit boards (PCBs) in an aluminum case. From top to bottom, the three PCBs respectively host the GPD, the high voltage (HV) power supply, and the data acquisition (DAQ) system.
To avoid source confusion and reduce the diffuse background, a collimator is mounted on top of the GPD. The collimator is a capillary plate made of lead glass (with ∼38% lead oxide), manufactured by North Night Vision Technology Co. Ltd. It is 1.66 mm thick and contains cylindrical micropores with a diameter of 83 µm and an open fraction of 71%. The field of view (FOV) is 2.3 • full width at half maximum (FWHM), or 5.7 • full width at zero response.
The HV is provided by a compact module UMHV0540N manufactured by HVM Technology, Inc. It has a cubic geometry with a length of 0.5 inch on each side, and is powered by a low voltage power supply of 5 V. With a programming pin, the HV output is adjustable from 0 to −4 kV. The output is split into three channels to power the drift plate and the two electrodes of the GEM. The three HV outputs are monitored with analog to digital converters (ADCs). Two independent HV modules are mounted on the same board for a cold backup; the backup has never been used on orbit.
The DAQ board contains a microcontroller, ADC, flash memory, and communication interface to the CubeSat. It also receives the global positioning system (GPS) signal for accurate timing.
The total mass of PolarLight is about 580 g and the total power consumption is about 2.2 W during normal operation.  55 Fe before (blue) and after gain map correction. Reproduced using data in Ref. [3].

Performance
The effective area of PolarLight as a function of energy is shown in Fig. 6. The high energy roll-over is determined by the quantum efficiency of the sensitive volume, i.e., 0.8 atm pure DME at a thickness of 1 cm. The 100 µm beryllium window together with the thermal insulation foil outside the CubeSat shape the low-energy cutoff. Only X-rays absorbed in the region above the ASIC chip can be recorded; in practice, we discard events near the edge of the ASIC and only use the central ±7 mm region for analysis. Therefore, the geometric detection area is 1.96 cm 2 .
Considering the open fraction of the collimator, which is 71%, and the detection efficiency, the effective area has a peak of about 0.16 cm 2 . Therefore, PolarLight is indeed a tiny instrument. The modulation factor, which is the amplitude of the angular modulation of photoelectrons in response to fully polarized X-rays, determines the sensitivity of polarization measurement, and is one of the key parameters of the instrument. The modulation factors at different energies in the PolarLight band, also displayed in Fig. 6, are measured with 45 • Bragg diffracted X-rays, which are 100% polarized. At low energies, the electron track is short and partially unresolved, leading to low modulation factors.
Due to the non-uniformity of the GEM thickness [33], the GEM gain varies as a function of position and needs be calibrated and flattened. The gain map is measured with an 55 Fe source illuminating the whole surface. The relative gain at different positions are measured and displayed in Fig. 7. The spectral resolution (FWHM/E) of the detector at 5.9 keV improves from 33.5% to 18.5% after flat-fielding.

Operation
PolarLight was launched into a LEO on October 29, 2018. It is a nearly circular Sun-synchronous orbit with an altitude of 520 km and a period of about 95 minutes. Fig. 8 shows a typical one-day orbit of the CubeSat on top of the flux map of high energy electrons trapped on the orbital plane by the Earth's magnetosphere. As charged particles may damage the GPD if the flux is too high, the HV is powered off when the CubeSat passes through the high flux regions, including the south Atlantic anomaly (SAA) and two polar regions (Fig. 8). As it takes time to power on/off the HV, we do not attempt to turn on the detector if the window for observation is less than 15 min, and discard the short observing windows near the two poles. In addition, in around half of the durations suitable for observations, the target may be occulted by the Earth. On average, there are around 10 orbits a day, each with an effective exposure of 15 min or so, in which science data can be obtained.
Limited by the small effective area, PolarLight is only sensitive to the brightest X-ray sources in the sky. The Crab nebula is the primary target of PolarLight. It is also the only source with a significant detection in keV X-ray polarization prior to the launch of PolarLight [35,36]. The second target is Scorpius (Sco) X-1, which is the first discovered extrasolar X-ray source and the brightest persistent object in this band besides the Sun. Transient X-ray binaries in the Milky Way with a brightness similar to the Crab nebula are also potential targets.
In the first four months after the launch, the PolarLight detector was only briefly powered on for functional test, due to major software upgrades of the CubeSat and massive tests of the ground stations. This long delay was caused by unexpected technical issues and could be significantly reduced. Regular science observations Crab Sco X-1 A 0535+262 Background Fig. 9 One-day averaged lightcurves for the three targets and background observed with Po-larLight. Reproduced using data in Ref. [34].
started in March 2019 and the first target was the Crab nebula. When the Crab nebula was not observable due to Sun avoidance, PolarLight observed Sco X-1.
In August 2020, the monitoring program for the Crab nebula ended and Sco X-1 became the primary target. In late 2020, the accreting pulsar A 0535+262 went into outburst, with a peak flux several times the Crab nebula. The schedule for Sco X-1 was interrupted in response to this target of opportunity. In each orbit, during Earth occultation of the target, the instrument points at a random direction for background measurement. A one-day averaged light curve for the three sources as well as the background are shown in Fig. 9. The data archive of PolarLight as of October 2021 is summarized in Table 1.

On-orbit Background
PolarLight measures the on-orbit background while the science target is occulted by the Earth. In that case, the detector points roughly at the anti-Sun direction (so that the solar panel faces the Sun for battery charging) and rocks with a half angle of about 30 • . Therefore, a random sky region or the Earth's atmosphere is observed. Taking into account the narrow FOV and small effective detection area, as well as the fact that the dominant source of background is charged particles on the orbit, pointing at a random direction is equivalent of observing the pure background.
In order to model and understand the background, we created a mass model and ran particle simulations [37] using the Geant4 package 1 . The mass model includes detailed structures of the GPD and the whole CubeSat. The source of background consists of the diffuse cosmic X-rays [38] and high energy charged particles on the orbit [39].
The simulated background spectrum decomposed into different incident components is plotted in Fig. 10 against the measurement. It is obvious that the electroninduced background is the dominant component. It occupies 81% of the background counts in 1-10 keV, or 76% in 2-8 keV. The fractions are 15% and 17% for the proton-induced background, and 4% and 7% for the leaked (i.e., not through the apertures) X-ray background, respectively, in the two energy bands.
Events caused by X-rays of a few keV and those due to high energy charged particles may show different image morphologies. Generally speaking, the tracks produced by X-rays are shorter and more curved than those produced by high energy charged particles. Event images that are likely resulted from X-rays and high energy Tracks due to X-ray events are usually small in size and show a curved morphology, while the charged particles tend to produce long and straight tracks. Reproduced using data in Ref. [40]. charged particles, respectively, are displayed in Fig. 11 for comparison. This difference allows us to distinguish background events from source events. An energy dependent algorithm is proposed for particle discrimination [40]. When an event triggers the electronics, a rectangle readout window is defined to include all triggered pixels plus some margins. The diagonal size of the readout window and the number of pixels above the triggering threshold, as a function of event energy, are used to distinguish between the source and background events, based on their different distributions. They find that such a discrimination algorithm can remove roughly 70% of the background events measured with PolarLight, while the remaining events show the same distributions as the source photons do, and cannot be removed. This is not because the algorithm is not effective enough, rather it is due to the nature of energy deposited. Simulations [37] reveal that ∼30% of the background events are due to energy deposits from secondary electrons with an energy of a few keV, i.e., these are essentially identical to the photoelectrons produced by X-rays and thus indistinguishable. Given the background level after discrimination, with an observing time of 1 Ms, PolarLight can reach a minimum detectable polarization of about 10% for a 0.2 Crab source, or 5% for a 0.5 Crab source.

Science results
Prior to PolarLight, the Crab nebula was the only astrophysical source with a significant polarimetric measurement in the keV band. In the 1970s, the Bragg polarime-ter onboard OSO-8 measured a polarization fraction (PF) of 0.157 ± 0.015 with a polarization angle (PA) of 161.1 • ± 2.8 • from the total nebular emission [35]; a phase-resolved analysis [36] indicates that the pure nebular emission has a PF of 0.192 ± 0.010 and a PA of 156.4 • ± 1.4 • . The above results were obtained in a narrow band around 2.6 keV due to the nature of Bragg diffraction, and consistent results were seen around 5.2 keV (the second order diffraction) with slightly larger uncertainties.
With PolarLight, two new findings were obtained with observations of the Crab nebula. In 2019, PolarLight revealed a possible variation in polarization (a sudden decrease in PF) coincident in time with the glitch of the Crab pulsar on July 23 [41]. The variation was found to have a significance of 3σ using different methods, including the Bayes factors, Bayesian posterior distributions, and bootstrap analysis. This may suggest that the pulsar magnetosphere altered after the glitch. Then, the polarization recovered roughly 100 days after the glitch [42]. With more data being accumulated, the PA measured with PolarLight from the total nebular emission was found to have a difference of 18.0 • ± 4.6 • from that measured 42 years ago with OSO-8, indicating a secular evolution of polarization associated with either the Crab nebula or pulsar [42]. The long-term variation in PA could be a result of multiple glitches in the history [41,43], magnetic reconnection in the synchrotron emitting regions in the nebula [44,45], or secular evolution of the pulsar magnetic geometry [46,47].
Sco X-1 is the brightest persistent extrasolar object in the keV sky. It is powered by accretion from a low-mass companion star onto a low-magnetic neutron star [48], classified to be a so-called Z-source based on the color-color diagram [49]. OSO-8 observed the source and produced a non-detection in X-ray polarization around 2.6 keV, but obtained a 3σ detection around 5.2 keV [50]. PolarLight yielded consistent results: a non-detection below 4 keV but a significant detection in 4-8 keV; the significance in the hard band is up to 5σ when the source shows the highest intensity [51]. The PA measured with PolarLight is consistent with that obtained with OSO-8 within errors, and in line with the orientation of the radio jet of Sco X-1 on the plane of the sky [52]. The jet is supposed to be launched along the symmetry axis of the system. The results favor the scenario that an optically-thin corona is located in the transition layer of Sco X-1 under the highest accretion rates [53][54][55], and disfavor the accretion disk corona model [56,57].
A 0535+262 is an accreting pulsar and underwent a giant outburst in 2020, with a peak flux of about 3 Crab in the PolarLight band [58]. PolarLight monitored the outburst and produced a non-detection in X-ray polarization with only an upper limit. The results are being analyzed and will be reported elsewhere in the near future (Long et al. in prep.).

Discussion
HaloSat and PolarLight demonstrate that CubeSats can be useful platforms for Xray astronomy. CubeSats can produce cutting-edge science results. They provide affordable access to space for scientific research which is particularly important for universities and colleges, where students may take a leading role.
CubeSats are not just scaled-down versions of large satellites. Due to the high risk of space exploration and the huge investment behind large space missions, reliability always has first priority. Therefore, strict rules are required in the choice of components and materials, and extensive documentation, testing, and review is required in each development phase. These incur considerable cost in both time and money. For CubeSat-based missions, one may use strategies to decrease cost and schedule while incurring higher, but tolerable, risk.
One such strategy is the use of commercial parts. Most CubeSats are launched in to LEO which presents a relatively benign radiation environment and have mission durations of a few years or less, limiting the radiation dose. This enables use of commercial parts, including those that have not been tested in space. Commercial parts can offer significant cost saving and decreased procurement times. Selection of an automotive-grade microcontroller for the PolarLight DAQ board provides an example of an appropriate balance between cost and reliability. This strategy can be extended to the use of larger components such as single board computers (SBCs), amplifiers, and power supplies. This also saves significant development time and cost. It is important to perform environmental testing before final selection for flight of such parts, including extensive thermal cycling, thermal-vacuum testing, and radiation testing. A commercial high voltage power supply (HVPS) was selected for PolarLight, based on its compactness. The HVPS was then subjected to thermal and thermal-vacuum tests. Also, a cold back-up system was implemented in case of failure.
Reduction in required documentation and reviews can greatly streamline the development process. Typically, only the key requirements and interfaces need be documented. CubeSat development can bypass the initial study phases of larger missions which typically produce mainly documentation. The time saved can be put into building and testing of prototypes, which also puts more joy in the process. Reviews by experts outside the project team should be performed, but can be advisory rather than act as gates to program continuation. This makes the reviews more collaborative, with the review team invested in and actively contributing to mission success.
Software development (flight, operations, and data processing) for CubeSats is challenging because the mission teams are quite small while the complexity of the needed software is not necessarily reduced by the same factor. Re-use or adaption of existing software is essential. HaloSat used an existing system for mission operations developed by Blue Canyon Technologies and new software was written only for HaloSat-specific observation planning. HaloSat adapted previously developed codes to calculate the silicon drift detector response and PolarLight used previously developed codes to analyze photoelectron tracks. Flight software should be made as simple as possible, but not simpler (to paraphrase Einstein) and extensively tested. For both HaloSat and PolarLight, the payload computer is rebooted each spacecraft orbit to bypass bugs (such as memory leaks) that accumulate in long-term running and to limit the impact of software crashes to at most a single orbit. One advantage of CubeSats regarding data processing software is that the data volumes are typically limited. Therefore, processing efficiency is not paramount allowing use of higher level languages such as Python.
We note that PolarLight is different from HaloSat and many other missions, in the sense that it is not the sole payload and shares the CubeSat with others. This means that we just need to pay for a "seat" instead of a whole "bus", which lowers the cost substantially. Of course, it is important to ensure there is no conflict between payloads, including regarding mission operations. PolarLight is the only payload on its spacecraft that requires specific pointing and, in other words, was able to obtain the "driver's seat". However, the spacecraft on-board computer (OBC) did not allow for customized programs to maximize the observation efficiency. Observations with PolarLight were accomplished via combinations of commands uploaded daily.
CubeSats are a great tool for student training. The development of large-scale missions usually takes a decade or so. It is unlikely for a student to follow the project from the very beginning to the end. It is also hard for students to take leading roles in large projects. In contrast, both PolarLight and HaloSat were developed in less than two years and with involvement of individual students from near project initiation to on-orbit operations. Students played lead roles in the construction and testing of engineering and flight model instruments and in the flight-model scientific calibration. Students also played lead roles in the flight operations and the development of mission planning and data processing software. The time scale is sufficiently short that the student on HaloSat who acquired the first X-ray spectra with the engineering model detectors was able to write a thesis using data collected during the first year of on-orbit operations. Students can mature quickly if they are provided with a major role on a real space mission. Such training is a rare opportunity but can be well adapted into a CubeSat project. Such training extends to science, engineering, and leadership.