  The Star-Planet Activity Research CubeSat (SPARCS) is a 6U CubeSat under
development to monitor the flaring and chromospheric activity of M dwarfs at
near-ultraviolet (NUV) and far-ultraviolet (FUV) wavelengths. The spacecraft
hosts two UV-optimized delta-doped charge-coupled devices fed by a 9-cm
telescope and a dichroic beam splitter. A dedicated science payload processor
performs near real-time onboard science image processing to dynamically change
detector integration times and gains to reduce the occurrence of pixel
saturation during strong M dwarf flaring events and provide adequate flare
light curve structure resolution while enabling the detection of low-amplitude
rotational modulation. The processor independently controls the NUV and FUV
detectors. For each detector, it derives control updates from the most recent
completed exposure and applies them to the next exposure. The detection of a
flare event in the NUV channel resets the exposure in the FUV channel with new
exposure parameters. Implementation testing of the control algorithm using
simulated light curves and full-frame images demonstrates a robust response to
the quiescent and flaring levels expected for the stars to be monitored by the
mission. The SPARCS onboard autonomous exposure control algorithm is adaptable
for operation in future point source-targeting space-based and ground-based
observatories geared towards the monitoring of extreme transient astrophysics
phenomena.
