FORECASTOR. I. Finding Optics Requirements and Exposure Times for the Cosmological Advanced Survey Telescope for Optical and UV Research Mission

The Cosmological Advanced Survey Telescope for Optical and ultraviolet Research (CASTOR) is a proposed Canadian-led 1 m class space telescope that will carry out ultraviolet and blue optical wide-field imaging, spectroscopy, and photometry. CASTOR will provide an essential bridge in the post-Hubble era, preventing a protracted UV-optical gap in space astronomy and enabling an enormous range of discovery opportunities from the solar system to the nature of the cosmos, in conjunction with the other great wide-field observatories of the next decade (e.g., Euclid, Roman, Vera Rubin). FORECASTOR (Finding Optics Requirements and Exposure times for CASTOR) will supply a coordinated suite of mission-planning tools that will serve as the one-stop shop for proposal preparation, data reduction, and analysis for the CASTOR mission. We present the first of these tools: a pixel-based, user-friendly, extensible, multi-mission exposure time calculator built in Python, including a modern browser-based graphical user interface that updates in real time. We then provide several illustrative examples of FORECASTOR’s use that advance the design of planned legacy surveys for the CASTOR mission: a search for the most massive white dwarfs in the Magellanic Clouds, a study of the frequency of flaring activity in M stars and their distribution and impacts on habitability of exoplanets, mapping the proper motions of faint stars in the Milky Way, wide and deep galaxy surveys, and time-domain studies of active galactic nuclei.


INTRODUCTION
Corresponding author: Isaac Cheng isaac.cheng@uwaterloo.ca,isaac.cheng.ca@gmail.comSpanning a wavelength range from the hydrogen-ionizing threshold (912 Å) to roughly the onset of human vision (∼4000 Å), the ultraviolet sky is dominated by massive stars, their remnants, and their light scattered by dust through the Milky Way; by interstellar shocks; by rapidly-star forming galaxies and active galactic nuclei; and by accreting black holes and other compact objects.This invaluable window is almost totally inaccessible from beneath the Earth's atmosphere, necessitating observations from space.The early 1970s marked the dawn of UV space astronomy, with experiments including Apollo 16's Far Ultraviolet Camera & Spectrograph (Carruthers & Page 1972), Thor-Delta-1A (de Jager et al. 1974), and Orion 1 & 2 (Gurzadyan & Ohanesyan 1972).
These initial efforts paved the way for the enormous success of the International Ultraviolet Explorer (IUE, 1978(IUE, -1996;;Boggess et al. 1978), the Far Ultraviolet Spectroscopic Explorer (FUSE, 1999(FUSE, -2007;;Moos et al. 2000), and the Galaxy Evolution Explorer (GALEX, 2003(GALEX, -2013;;Martin et al. 2005) which together provided revolutionary insight into a host of astrophysical sources, from interstellar dust, to powerful distant quasars, and to massive star formation across the Universe (see e.g., Linsky 2018; Gómez de Castro et al. 2021, for reviews).Today, access to the ultraviolet is maintained thanks to the Hubble Space Telescope (Green et al. 2012;Woodgate et al. 1998), the Ultraviolet-Optical Telescope (UVOT) onboard the Neil Gehrels Swift Observatory (Roming et al. 2005), the optical-UV monitor onboard XMM-Newton (Mason et al. 2001), and the Ultraviolet Imaging Telescope (UVIT) onboard the AstroSat mission (Kumar et al. 2012).However, while the Decadal Survey on Astronomy & Astrophysics (Astro2020)1 has strongly endorsed a next-generation infrared/optical/UV space telescope (see also The LUVOIR Team 2019), any planned launch awaits the 2040s, threatening a protracted gap in UV astronomical capability in the coming years.
The Cosmological Advanced Survey Telescope for Optical and ultraviolet Research (CASTOR) is a proposed mission, led by the National Research Council of Canada and the Canadian Space Agency, to address this need by providing wide-field (∼0.25 deg 2 ) UV and optical imaging at Hubble-like resolution (∼0.′′ 15).This will enable an enormous improvement in discovery efficiency together with UV and blue optical spectroscopy (Côté et al. 2019b).With a planned launch in the late 2020s, CASTOR will image ∼5% of the sky within its first five years, reaching a u-band depth 1.3 magnitudes deeper than LSST (Côté et al. 2019a), and provide the widest, deepest, and highest-resolution legacy survey available in the UV and blue-optical.Also included in the present CASTOR reference design are low-resolution (R∼300-420) grism-mode spectroscopy in the UV-and u-bands over the entire field of view, and a digital micro-mirror device (DMD)-based configurable UV multi-object spectrograph (UVMOS) in a parallel field, providing access to  ∼ 1500-3000 Å with R ∼ 1500.
1 https://nap.nationalacademies.org/catalog/26141/pathways-to-discovery-in-astronomy-and-astrophysics-for-the-2020s CASTOR will enable transformative science in virtually every subfield of astronomy, from cosmology to black hole astrophysics to exoplanet atmospheres to mapping the outer solar system.At the same time, it will provide an enormous legacy of archival observations strongly complementary to other wide-field surveys over the next decade (e.g., Euclid, Roman).Through a dedicated transient survey and a Target of Opportunity (ToO) program, CASTOR will also provide a powerful tool for the study of cosmic transients.The mission has recently completed its phase 0 study, and readily-adaptable tools for assessing mission parameters and planning observations are thus needed by the international CASTOR community.
Here, we present the first such tool developed for the Finding Optics Requirements and Exposure times for CAS-TOR (FORECASTOR) project: a dedicated pixel-based photometric exposure time calculator and associated web-based graphical user interface.In Section 2, we outline the present reference design for the CASTOR mission.In Section 3, we describe the software implementation for our exposure time calculator and describe the essentials of its functionality.Finally, in Section 4, we use the calculator to develop a selection of several illustrative science cases: a highly complete survey for the most massive white dwarfs in both Galactic and Magellanic globular clusters; the distribution and frequency of M star flares and implications for habitability; highly-precise measurements of the proper motions of faint objects; comprehensive wide and deep galaxy surveys; and time-domain studies of active galactic nuclei.

CASTOR REFERENCE DESIGN
CASTOR's reference optical design is a 1 metre unobscured three-mirror anastigmat telescope.These mirrors divide the incident flux between three filters corresponding to the NUV-, u-, and g-bands, together providing simultaneous coverage over the wavelength range ∼150-550 nm.Note that a filter wheel including a grism is currently planned which will intercept the NUV-and u-channels, which may also include an additional filter that will split the UV-and u-bands (see Figure 1 and discussion in Section 4.4).UV multi-object spectroscopy (UVMOS) will be available in a parallel field (Glover et al. 2022).This design is presently being updated to include a coated secondary folding mirror that will minimize "red leak"-the detection of long-wavelength photons in a blue filter due to imperfect blocking of optical and IR light-in the NUV-and u-bands.This correction is reflected in the transmission curves shown in Figure 1.
The baseline detector design is for three 310 megapixel CMOS cameras with 10 µm (0. ′′ 1) pixels, with stringent requirements for minimal dark current at mission launch (∼10 −4 e -s −1 px −1 ) and read noise (3.0 e -px −1 ).Taking all the above specifications together, the target sensitivity is a limiting magnitude of AB ∼ 27 (at S/N ∼ 5) across all three channels in ∼600 s (approximately 1/10th of an orbit).To confirm this, in the following section we outline our exposure time calculator and its underlying assumptions.

AN OPEN-SOURCE EXPOSURE TIME CALCULATOR
The core of FORECASTOR's photometry ETC, cas-tor_etc2, is written entirely in Python with a strong emphasis on modular design and user-adaptability.We have endeavoured to make this package as flexible and as maintainable as possible while providing a simple user experience for those who do not need all of the possible customizations.All of the critical components of the software are organized into distinct object classes, such that a user may separately define instances of the telescope, background, and source, then pass these to a photometry object which returns the desired signalto-noise calculation.In the following, we describe each of these classes in turn and the general software execution flow.Appendix A contains a more detailed breakdown showing how to use the code in practice.

Telescope
The first step in using the castor_etc Python package is always to define an instance of a Telescope object.All aspects of the telescope are customizable.This includes, but is not limited to, the number and name of passbands, passband response curves and the passband limits, the PSF in each passband, pixel scale, read noise, the extinction coefficients of each passband, etc.For convenience, each Telescope a Using the equal-energy (EE) convention given in Eq. (A11) of Tokunaga & Vacca (2005).
b Flux longward of this wavelength is considered to be red leak for the given passband.
d By default, we choose the FWHM value to be the largest estimate amongst the three passband PSFs.The FWHM of each PSF is estimated to be 0. ′′ 08, 0. ′′ 12, and 0. ′′ 15 for the UV-, u-, and gbands, respectively.Note that this FWHM value is only used for estimating an "optimal aperture" size, as discussed in Section 3.4, and this value is easily modified by the user.Instead, we use the 2D PSFs for actually generating the mock signals pixel-by-pixel.
e The oversampling factor is relative to the telescope's pixel scale, meaning our PSF files have pixels with side lengths of 0. ′′ 1/20 = 0. ′′ 005.f Valid at detector's beginning-of-life and will increase linearly with time due to trapped proton radiation, reaching 0.01 e -s −1 px −1 by the end of five years.
g Currently not used for any photometry ETC calculations.
Note-These values represent our current, most up-to-date knowledge of the telescope design and performance.
object is initialized with sensible default values according to the most up-to-date information available at the time.
The default parameters are maintained and updated in a central file; a summary of the most critical of these is presented in Table 1.Note, however, that any of these values can be changed by the user, in which case one can pass in just the modified value(s) to a particular Telescope instance rather than modifying the source file directly.
Among the default parameters, castor_etc includes the nominal reference design throughput curves for the three CAS-TOR photometric passbands: UV, u, and g, shown in Figure 1.These, too, may be substituted for any arbitrary throughput appropriate to a given detector, optics, and filter combination.Given some passband response curve, the photometric zeropoint and pivot wavelength are calculated automatically.The photometric zero-point, defined as the AB magnitude which produces 1 e -s −1 in a given passband, is calculated assuming a flat spectrum in AB magnitude and converges on the zeropoint using either the secant or bisection method, depending on the user's choice.The pivot wavelength is computed following Eq.(A11) from Tokunaga & Vacca (2005) and uses Simpson's rule to approximate the integration.
For each of CASTOR's passbands, castor_etc also includes a default wavelength-averaged PSF sampled at 20× the telescope's pixel scale (i.e., each pixel has a side length of 0. ′′ 1/20 = 0. ′′ 005), as shown in Figure 2. Supersampling the PSF increases the accuracy of our calculations, as we explain in Section 3.4.Strictly speaking, these default PSFs are only valid near the centre of CASTOR's field of view, but drop-in replacements to other PSFs are easily accomplished through specifying the filepaths to the PSF files.
The ability to specify different PSFs and passbands that recompute zero-points and pivot wavelengths as needed, together with the complete customizability discussed above, means that theoretically, this package can be used for other missions as long as the telescope detector is CCD-or CMOSbased or similar.A more thorough discussion and example showing how to adapt FORECASTOR to other missions can be found in Appendix B.

Background
The sky background is characterized by three parameters: Earthshine, zodiacal light, and geocoronal emission (i.e., "airglow").By default, the Background object uses spectra from the Hubble Space Telescope (as given by the STScI Development Team 2013) that provide Earthshine and zodiacal light estimates (also see Table 6.4 and the paragraph preceding Figure 6.1 of Branton & Riley 2021).Users can also input their own Earthshine or zodiacal light spectra.Alternatively, users can describe the background conditions by specifying the sky background in AB magnitude per square arcsecond in each passband, which will take precedence over any spec-trum files.Note that these AB magnitudes should include the effects of both Earthshine and zodiacal light.
At this point, the Background object does not have any geocoronal emission lines added to it.Users can, however, add geocoronal emission lines of arbitrary wavelength, linewidth, and flux.For convenience, we set the default airglow value to represent the [Oii] 2471 Å emission line, which is centred at 2471 Å with a linewidth of 0.023 Å. castor_etc provides three predefined flux values (in units of erg cm −2 s −1 arcsec −2 ) following those used by the HST STIS Handbook (Branton & Riley 2021, Table 6.5): "high" (3.0 × 10 −15 ), "avg" (1.5 × 10 −15 ), and "low" (1.5 × 10 −17 ).By default, we assume a uniform sky background over the user-selected aperture (aperture selection will be discussed in Section 3.4), but spatially non-uniform backgrounds may also be defined pixel-by-pixel.

Source
Once the Telescope and Background objects have been defined, the next step is to define a Source object for mock observations.
In general, the creation of any Source object has three steps: 1. Determining the type of the source (a point source, an extended source like a diffuse nebula, a galaxy, etc.).2. Describing the physical properties of the source, such as its spectrum (including any emission/absorption lines), redshift, distance, surface brightness profile (for extended sources or galaxies), etc. 3. (Optional) Renormalizing the source spectrum.There are several normalization schemes available: normalize to an AB magnitude within a passband, normalize to a total luminosity and distance, normalize a blackbody spectrum to a star at a given radius and distance.Note that these normalizations can be applied at any time (e.g., can be before or after the addition of spectral lines).There are several subclasses to aid with item 1.Currently, we have: PointSource, ExtendedSource, and GalaxySource classes, which facilitate the creation of mock point sources, diffuse extended sources, and galaxies, respectively.If the user has a specific target in mind with a complicated spatial profile, the user can upload a FITS file of the source to create a CustomSource instance, and the data will be automatically interpolated to the Telescope's pixel scale.This feature allows the user to bypass the ETC's built-in source generation machinery while using the most of FORECASTOR ETC's other functionality like sky background estimation and aperture selection.
castor_etc also provides utilities to generate the following spectra, which are all agnostic to the Source class: blackbody, power-law, emission line with different line shapes, and a flat spectrum in either units of erg s −1 cm −2 Å −1 ,  erg s −1 cm −2 Hz −1 , AB magnitude, or ST magnitude.For convenience, we also provide stellar spectra from Pickles (1998), and spectra for spiral and elliptical galaxies from Fioc & Rocca-Volmerange (1997).Users can also load their own spectra from data files to use in any of the Source subclasses.Finally, we support adding emission and absorption lines with various line profiles to any spectrum, including custom spectra.

Photometry
The Photometry class handles the final step in obtaining photometric estimates from castor_etc.We initialize the Photometry class by giving it our Telescope, Source, and Background objects.Having a separate Photometry class allows for greater flexibility as calculations are not tied to a specific Telescope, Background, or Source instance.
We use photutils (Bradley et al. 2022) to generate apertures with fractional pixel contributions for our signal-tonoise (S/N) measurements, where the contribution of a pixel is directly proportional to how much of the pixel is contained within the aperture.Currently, we have support for rectangular apertures, elliptical apertures, and for point sources only, "optimal" apertures.
The optimal aperture of a point source is a circular aperture centred on the source that maximizes the S/N, assuming the only source of noise is shot noise (due to source counts, sky background, dark current).By default, the optimal aperture's diameter is set to 1.4× the telescope's FWHM, which is roughly the optimal aperture if the PSF is a 2D Gaussian.Since the PSFs are not Gaussians and differ between filters, however, the true optimal aperture will be slightly different in each passband.Another factor that causes the true optimal aperture to differ from this estimate is due to our photometry calculation not only including Poisson noise, e.g., due to the sky background and dark current (either of which may be set to be spatially varying), but also including noise due to detector read outs, which is not modelled by a Poisson process.In fact, due to the different source flux and sky background that passes through each filter, the relative contribution of the non-Poissonian read noise in each band is different and thus the size of the true optimal aperture varies from passband to passband even for the same PSF.Therefore, while in the absence of any more refined estimate we recommend the default factor of 1.4×, we also allow the user to optionally specify their own custom multiplicative factor to the telescope's FWHM when creating an optimal aperture.
In addition to the considerations above, Mighell (1999) notes that brighter stars also have larger optimal apertures than smaller stars.That being said, the S/N is fairly insensitive to the exact size of the aperture when it is close to the optimal aperture (Pritchet & Kline 1981).
Once the aperture is specified, we are able to generate 2D maps of the signal and noise in every pixel for each of the passbands.We create these 2D maps by convolving a noiseless image at the PSFs' supersampled resolution with each passband's PSF, then binning down to the telescope's resolution.For example, the default PSF is oversampled by a factor of 20, meaning we bin blocks of 20 × 20 = 400 subpixels down to 1 pixel.Thus, the higher the sampling resolution of the PSF, the more accurate the calculations will be, as it allows us to better approximate the continuous spatial distribution of flux.
We also determine the fraction of flux enclosed within the aperture (i.e., the encircled energy) by comparing the flux within the aperture to some reference flux value.For point sources, the reference flux is simply the sum of the PSF pixel values, which represents 100% of the flux from the source.For galaxies and extended sources, the reference flux is always defined using the noiseless image (i.e., before PSF convolution), since the total amount of flux should be independent of the PSF.In particular, the reference flux for galaxies is the flux contained within a centred elliptical aperture that is the same size as the galaxy's half-light radius and of the same orientation.We then assume the total flux from the galaxy to be twice this reference flux.For extended sources, we assume 100% of the flux is contained within the source's angular extent, which is true for extended sources with a uniform surface brightness profile.Thus, the reference value representing 100% of the flux for an extended source is the signal obtained through a centred elliptical aperture of the same dimensions and orientation as the extended source.
An enclosed flux fraction of 100% corresponds to the magnitude of the source that the user set.If the user normalizes a spectrum to, say, an AB magnitude of 25, then this AB magnitude will be the AB magnitude of the source if 100% of its flux was contained within the aperture.If the user selects an aperture that only contains 50% of the flux, however, the effective AB magnitude will be dimmer.
These enclosed flux fractions are used to determine the number of electrons produced per second on the detector in a given passband  using the following formula: where () is the apparent magnitude of the source through the passband (i.e., obtained through convolving the spectrum with the passband response curve), () is the extinction coefficient for that passband,  (−) is the reddening (which depends on the telescope pointing),  () is the photometric zero-point for that passband (determined from the passband response curve), and  () is the fraction of flux contained within the aperture.
The first two terms in the exponent of Eq. ( 1) is the extinction-corrected magnitude of the source.Thus, 10 −0.4[()+ () × (− ) ] converts the source magnitude into flux.Scaling the extinction-corrected magnitude to the passband's photometric zero-point (equivalent to dividing 10 −0.4[()+ () × (− ) ] by 10 −0.4 () ) converts the flux into the number of electrons produced per second on the detector.Finally, multiplying by  () accounts for the fraction of flux enclosed within the aperture; an aperture that encloses 50% of the flux from a source will produce half as much signal as an aperture that contains 100% of the flux.
Note that the ETC does this calculation pixel-by-pixel, as  () is defined per pixel and includes fractional pixel weighting, giving us a 2D array of the number of electrons produced per second per pixel in the aperture.Then, to calculate the signal-to-noise ratio Σ achieved in a given integration time , we use the standard S/N formula (see, e.g., Dressel 2021): where  is the total signal in the aperture (in units of e -s −1 ),  pix is the number of pixels in the aperture,  poisson is the Poisson noise due to Earthshine, zodiacal light, geocoronal emission, and dark current,  is the read noise, and  read is the number of detector readouts.We can clear the denominator and the square root in Eq. ( 2), and apply the quadratic formula to solve for the integration time  needed to achieve a desired signal-to-noise ratio Σ: To execute these calculations in practice, we use our 2D arrays describing the source signal, sky background, and dark current of every pixel, accounting for fractional pixels.The factor of  pix is implicitly included in these arrays, so simply summing these arrays is enough to calculate the total signal, sky background, and dark current without further multiplying by  pix .The only exception is the read noise and the number of detector readouts, which are scalars and are multiplied by  pix rounded up to the nearest integer (as you cannot read out a fraction of a pixel).We emphasize that this ETC is completely pixel-based, so changing any value in the 2D arrays describing the source, background, or dark current, or changing the number of effective  pix , will affect the photometry calculations.
We summarize the workflow and the organization of the FORECASTOR photometry ETC in Figure 3.At this moment, castor_etc can only simulate single objects from start to finish, however users can upload custom images (e.g., a crowded field) and use the ETC's tools to obtain photometry and spectroscopy (Glover et al. 2022) estimates.

Graphical User Interface
While the full castor_etc Python package is extremely flexible, creating S/N estimates from castor_etc requires some programming knowledge.Thus, we developed a graphical user interface (GUI) for castor_etc that requires no Python experience and can be accessed on any device with an internet connection.
The GUI is a web app developed in React that is currently hosted on the Canadian Advanced Network for Astronomical Research (CANFAR3) Science Portal, meaning it can even be used on a mobile device, such as a phone, with no installation necessary.It is designed to mimic the procedure described previously, with different tabs for each of the steps detailed in Section 3. Furthermore, the interface and calculations update as the user changes and saves different observing parameters.We show an example of this GUI in Figure 4.

EXAMPLE SCIENCE CASES
In order to demonstrate the functionality and utility of the FORECASTOR ETC, as well as its results for the performance of the proposed CASTOR mission, we provide in the following a few examples of preparatory calculations for Source Class • Generate spectra: uniform, blackbody, power-law, emission line

PointSource Class
ExtendedSource Class • Set physical or angular size along major/minor axes, distance, rotation • Set surface brightness profile ("uniform", "exponential", or a user-defined function) GalaxySource Class • Set effective (half-light) angular radius, Sérsic index, rotation, axial ratio (ratio of semiminor to semimajor axis) • (no parameters) Background Class  planned CASTOR surveys.Most examples here use a slightly more optimistic assumption of 2.0 e -px −1 for the read noise.

Massive White Dwarfs
The Magellanic Clouds provide an outstanding natural laboratory for studying populations of stars, their fates, and their impact on their surrounding environment at a known distance and subsolar (0.2-0.5 Z ⊙ ) metallicities.There has been little opportunity in the past, however, to study the Clouds systematically in the UV at high spatial resolution.In particular, the resolution of previously-available wide-field instruments has ranged from 1. ′′ 3 (AstroSat/UVIT; Tandon et al. 2020) to 4. ′′ 5-5.′′ 5 (GALEX; Martin et al. 2005).CASTOR's unique combination of sensitivity and spatial resolution will enable a new era of resolved stellar population studies at UV and blue optical wavelengths.
A fundamental outstanding problem in stellar astrophysics remains identifying the maximum initial mass of a star for which it will still leave behind a white dwarf (WD) at the end of its nuclear-burning lifetime, and conversely, the minimum mass needed to undergo a core collapse (Type II) supernova.The maximum mass of a WD is in itself well constrained at ≃1.37 M ⊙ from theoretical considerations (Takahashi et al. 2013;Althaus et al. 2022), which is consistent with the fact that none of the tens of thousands of spectroscopically confirmed WDs have a mass exceeding 1.36 M ⊙ (Kilic et al. 2021).The maximum initial stellar mass of a WD progenitor, thought to lie between 8 and 11 M ⊙ (Weidemann & Koester 1983;Weidemann 2000;Siess 2007Siess , 2010)), is much more uncertain.From a theoretical perspective, it is hard to make much progress as this threshold is sensitive to modelling assumptions concerning convection, overshoot, and mass loss during the late phases of stellar evolution.Yet, determining this critical mass, and understanding how it varies with metallicity, is essential to modelling the formation rates of compact objects and gravitational wave events (Giacobbo & Mapelli 2019), the nature of underluminous supernovae (Doherty et al. 2017), and the chemical enrichment of the Universe (Doherty et al. 2014).
To better constrain this limit, recent studies have focused on finding massive WDs in young clusters (Richer et al. 2021;Miller et al. 2022).In those populations, only massive stars have had the time to evolve to the WD stage, and the cooling age of a WD can be compared to the cluster age to establish the progenitor mass.Despite these efforts, few constraints exist for progenitor masses in excess of 6 M ⊙ and the WD initialfinal mass relation (IFMR) remains extremely uncertain in this high-mass regime (Cummings et al. 2018).A fundamental limitation of this approach is that there are very few young clusters in the solar neighbourhood, and that searching further out in the Milky Way is not promising due to confusion with field WDs.A new strategy recently demonstrated by Richer et al. (2022) consists of searching for massive WDs in young clusters in the Magellanic Clouds, where galactic contaminants can be more easily excluded.With this approach, Richer et al. (2022) were able to identify five very hot ( eff ≃ 150,000 K) WD candidates in NGC 2164 using HST photometry.
CASTOR's unique UV sensitivity will allow a deeper and wider search for massive cluster WDs in the Clouds.To quantify and confirm this, we make an estimate of the point source sensitivity and compare with the WD cooling track in all bands assuming a distance of 50 kpc to the Large Magellanic Cloud (LMC).Assuming for generality a flat AB magnitude spectrum within each CASTOR band, Table 2 provides the estimate from the FORECASTOR ETC for the time needed to reach S/N = 5 with a point source4.In Figure 5, we compare these limiting magnitudes to the evolution of a hydrogenatmosphere WD in the CASTOR ultraviolet HR diagram calculated using the Montreal atmosphere models (Tremblay et al. 2011;Bédard et al. 2020).
The CASTOR Magellanic Clouds Survey will image the Clouds with 4200 s exposures, thereby reaching a depth of    (Glatt et al. 2010).Some may not be rich enough and others may have a crowded background, but many of them are promising targets to identify young massive cluster WDs, as demonstrated by Richer et al. (2022).Note that the detection of only a handful of WDs per cluster is sufficient to provide useful constraints on the IFMR, since all that is required is to positively identify the hot end of the WD cooling sequence.Spectroscopically confirming the nature of WD candidates uncovered by this program will remain out of reach for the foreseeable future, but WDs in the Clouds can be identified with a very high degree of certainty solely based on their location in the CASTOR UV HR diagram.

M Star Flare Frequency Distributions
All M stars exhibit long-lived phases of elevated magnetic activity and frequent flaring throughout the first 0.5-5 Gyr of their lifetimes (Shkolnik & Barman 2014;Medina et al. 2022).During their adolescence, M stars produce extreme levels of UV emission that drive processes on orbiting planets, including atmospheric erosion (Owen & Wu 2013), photochemistry (Hu & Seager 2014), and impacts on surface habitability (Rugheimer et al. 2015).Characterizing the UV radiation environments of M stars both in quiescence and during flares is critical for our understanding of exoplanetary atmospheric processes and will be required to accurately interpret forthcoming biosignature detections in exoplanetary atmospheres.
To date, GALEX has served as the workhorse mission for characterizing M star UV radiation environments.Its combination of wide sky coverage, long duration source monitoring (≥ 30 min), and capability to record time-tagged photon lists, allowed GALEX to characterize M stars' chromospheric UV emission (Shkolnik & Barman 2014;Schneider & Shkolnik 2018) and UV flare rates (Brasseur et al. 2019;Jackman et al. 2023) as functions of stellar mass and age.CASTOR will build upon the legacy of GALEX by leveraging its improved effective collecting area in the NUV5 and flexible observation scheduling to conduct a deep time domain survey of M stars to measure their UV-u-g-band flare frequency distributions (FFD; i.e., flare rate versus flare energy).
CASTOR's M star Legacy Survey will survey M star members of ten young moving groups (YMG) in or near the tele-5 CASTOR's expected effective collecting area is ≈ 50× that of GALEX in the NUV at 2200 Å (Côté et al. 2019a).
scope's continuous viewing zone (CVZ), as well as a complement of field stars.In this way, the survey will sample the UV-u-g-band FFDs at different stellar evolutionary stages from ∼2 Myr to field ages, for both partially and fully convective M stars.We used the FORECASTOR ETC to estimate the multi-band photometric precision for each of our targets and to establish the depth of the M star Legacy Survey.We selected targets by first cross-matching the Gaia DR3 and 2MASS catalogs to derive stellar masses based on the   mass relation from Mann et al. (2019) and selecting stars with  ★ < 0.65 M ⊙ .We then ran each target through the BANYAN Σ tool (Gagné et al. 2018) to determine YMG membership probabilities based on Gaia kinematics and assign stellar ages.We estimated each star's UV-band AB magnitude using their J-band magnitudes and interpolating the We then derive u-and g-band magnitudes by scaling the semi-empirical HAZMAT spectral models, which accurately capture the photospheric and chromospheric contributions to M stars' UV-optical SEDs as a function of their mass and age (Peacock et al. 2020).
The results of the FORECASTOR ETC indicate that with a typical observing cadence of 21 seconds, CASTOR will achieve a S/N > 10 per UV-band exposure for more than 4000 M stars, which are roughly evenly split between partially versus fully convective stars (≲ 0.3 M ⊙ ) and between YMG members versus foreground field stars.This level of photometric precision and observing cadence is sufficient to detect typical flare energies in the UV-band (i.e.∼10 31 erg; Jackman et al. 2023) around stars with  AB,UV ≲ 25.1.The CASTOR M star Legacy Survey with this limiting magnitude is about 40× deeper than comparable M star surveys with GALEX/NUV and will have the capacity to monitor more than double the number of M stars with observing durations sufficient to detect a statistically significant number of flares (Jackman et al. 2023).An example of multi-band light curves for a randomly-selected Pleiades member, based on the FORECASTOR ETC predictions, is depicted in Figure 6. Figure 6 depicts typical light curves from the CASTOR M star Legacy Survey and illustrates the detection of a typical flare above the star's quiescent flux level.

Measuring Proper Motions for Near-Field Cosmology
We are entering a new era in the study of the Milky Way and nearby galaxies, and CASTOR will play a vital role in characterizing known and newly discovered Galactic substructures (stellar streams, globular clusters, dwarf galaxies-classical and ultra-faint), in synergy with other wide-field observatories like Roman and Vera Rubin.In particular, thanks to its HST-like spatial resolution, multi-epoch imaging with CAS- TOR will enable precise measurements of proper motions for faint stars, crucial for membership selection to study the stellar populations and density distribution in these substructures but also for measuring systemic proper motions of substructures and selecting targets for spectroscopic follow-up.Combined with its wide field of view, the astrometric capabilities of CAS-TOR will open unique opportunities in a range of subfields, but applications to near-field cosmology are perhaps the most obvious given how Gaia has already revolutionized our understanding of the Milky Way and its satellites, and how CASTOR can extend that exploration to fainter stars.CASTOR's UV and blue-optical coverage would also provide better leverage on the age and metallicity distribution of these faint stellar populations than the red-optical and infrared observations of other missions like Roman and Euclid.
To predict the precision of proper motion measurements from CASTOR, we assume that the single-exposure astrometric precision for well-exposed point sources is 0.01 px (e.g., Anderson & King 2006), or about 1 mas.This is consistent with current experience on space-based platforms such as HST, as long as a comparable level of calibration activities are carried out.For each observation, this systematic error ( sys ) is added in quadrature with the random astrometric error ( ast ) such that the total astrometric error is given by  tot = √︃  ast 2 +  sys 2 , where  ast =  PSF /(S/N) and  PSF = FWHM/2.354(e.g., Neuschaefer & Windhorst 1995), with FHWM taken to be 0. ′′ 15 for CASTOR6 and the signal-to-noise ratio (S/N) of point sources calculated with the FORECASTOR ETC as summarized below.
The precision of proper motion measurements (  ) depends on this total astrometric error and improves when increasing the time baseline  between the first and last epoch of observations (  ∝ 1/).We assume here a typical time baseline of four years between the first and last epoch given the mission lifetime of CASTOR, but note that further improvements in the precision of proper motions would be achieved with epochs scheduled during an extended mission phase.It is also assumed that at least one additional observation is obtained in-between the first and last epoch to control systematics, based on experience with HST.In principle, with sufficient calibrations and platform stability, the astrometric precision of well-exposed sources (S/N ≳ 200) can be improved by repeated dithered observations as  tot ∝ 1/ √ , where  is the number of dithered observations per epoch (e.g., WFIRST Astrometry Working Group et al. 2019).For most halo substructures, given their distances of a few tens of kpc and the exposure time needed to reach this S/N, this strategy would however be very time-consuming and not widely applicable.It may be worth exploring as part of specific CASTOR programs, but for the proper motion error estimates presented here we assume that this strategy is not used.
As the S/N is expected to be maximized in the g-band, our astrometric precision estimates are based on the FORE-CASTOR ETC calculations in this band even though UV-and u-band photometry would be obtained simultaneously (helping to characterize stellar populations).We assume default FORECASTOR values for the sky background and an average (''avg'') geocorononal emission flux.For each epoch, reaching S/N = 90 at a depth of g = 23 (about 3 magnitudes fainter than the Gaia limit) would limit random astrometric errors and keep the total astrometric error for those faint stars close to the lower limit set by the single-exposure systematic astrometric error of CASTOR (see Figure 7).This is achieved As part of the CASTOR Galactic Substructures Legacy Survey, proper motions will be measured for stars several magnitudes fainter than the Gaia limit (most Milky Way halo stars are fainter than G = 20) in a large sample of targeted Milky Way globular clusters, dwarf galaxies, and stellar streams.While these proper motions will in general not be precise enough for studies of the internal kinematics of these systems (for which ≲ 1 km s −1 or ≲ 1 µas yr −1 precision would be required), they will be critical to detect and map very low surface brightness features around these substructures by boosting sample sizes and statistical significance, even at distances of several tens of kpc (where CASTOR can measure proper motions with velocity uncertainties < 100 km s −1 as shown in Figure 7, which is generally sufficient for improved membership selection).This will provide a unique view of their structure and composition, and it will be crucial to understand to what extent their properties have been shaped by dark matter on sub-galactic scales and tidal interaction with the Milky Way.For example, CASTOR can probe the existence of small "starless" dark matter sub-halos predicted by theory through their gravitational influence by looking for the gaps they "punch" in thin stellar streams (e.g., Erkal et al. 2016Erkal et al. , 2017;;Bovy et al. 2017;Price-Whelan & Bonaca 2018;Bonaca et al. 2019).For a sample of streams within a distance of ∼20 kpc, CASTOR can measure velocities in proper motion with a precision of ∼30 km s −1 or better for stars as faint as 3 magnitudes fainter than the Gaia limit.At this depth, this proper motion precision while covering a large area of the streams will be unprecedented.It will reveal a large number of new stream members and be transformational for probing the morphology of the streams and perturbations from dark matter sub-halos.This is important because current searches for the dynamical perturbations of sub-halos on the morphology of streams are limited by knowledge of the Milky Way background/foreground in the region of the streams and made difficult by low-number statistics, leading to fluctuations in the star counts.

Star Formation in Galaxies
The UV emission from galaxies is usually dominated by massive stars, and is thus an excellent tracer of cosmic star formation.However, distant galaxies are faint in the UV region and, beyond the local universe, subtend only a few square arcseconds on the sky.GALEX was the first mission with sufficient sensitivity and field of view to allow a UV-based measurement of the star formation rate (SFR) density evolution.However, due to its limited resolution (∼5 ′′ ) and sensitivity, GALEX was only able to detect fairly massive galaxies, and only out to redshifts of  ∼ 1 (e.g., Schiminovich et al. 2005), even in its Deep Imaging Survey (covering 80 deg 2 and reaching NUV = 26 for galaxies).Because galaxy formation depends sensitively on mass, and peaks in activity around  ∼ 2 (Hopkins & Beacom 2006;Madau & Dickinson 2014), a large fraction of the star formation in the universe remains uncharted in the UV.
CASTOR will provide critical information on both the recent star formation histories of galaxies over cosmic time, and how this star formation is spatially distributed within them.The wide area CASTOR surveys, such as the Deep and Ultradeep surveys, will make it possible to put this within the context of the large-scale structure of the Universe.The Deep survey will image 83 deg 2 of the sky in six contiguous regions overlapping with LSST/Euclid Deep fields, reaching a 5 point source depth of  AB = 29.75 in the UV.The Ultradeep survey will extend the sample to  > 1.5 and enable accurate pixel-by-pixel SFR estimates by having four 0.25 deg 2 pointings with 10× longer integrations.These will help distinguish between the myriad feedback and dynamical mechanisms that can both stimulate and hinder star formation.
We use the FORECASTOR ETC to estimate the depths and surface brightness limits of galaxy photometry in the baseline Deep and Ultradeep surveys.The background includes an average geocoronal contribution as described in Section 3.2.In addition to the standard CASTOR bands, we include an option for a broad-band filter that splits the UV-and u-bands.An example of this, simply assuming a filter with sharp limits in the centre of each band, is shown in Figure 1.
We assume a Sérsic profile with an effective radius   = 0. ′′ 25 and  = 1, appropriate for faint star-forming galaxies at  = 1 (van der Wel et al. 2014).The spectral energy distribution is that of a local spiral galaxy, redshifted to  = 1.For this calculation the sources are assumed to be circular, and photometry is performed within a circular aperture that is twice the effective radius.Figure 8 shows the time required to reach 5 as a function of AB magnitude in each of the five filters.This is compared with the nominal depths of the Deep and Ultradeep surveys.Note that in the actual surveys, the g-band will be observed twice: once with the broadband filter in place and once without.It will therefore have a longer exposure than in the other filters.
To illustrate how these depths compare to the star formation rates of galaxies, we convert UV magnitudes to SFR following the conversion of Kennicutt (1998): log SFR(M ⊙ yr −1 ) = −27.85+ log   (erg s −1 Hz −1 ), (4) where   is the extinction-corrected luminosity at 150 ≲ /nm < 280.The SFR limits corresponding to the calculated UV depths of the Deep and Ultradeep surveys are shown in Figure 9.These are compared with the locus of the starforming main sequence for galaxies with log(/ ⊙ ) = 8.5 and log(/ ⊙ ) = 10.5, taken from Popesso et al. (2023).Our estimated SFR limits neglect the important effect of extinction and are thus optimistic.Nonetheless it is evident that CASTOR will be able to detect almost all cosmic star formation out to cosmic noon and, importantly, galaxies that lie well below the main sequence.The resolution and sensitivity of CASTOR enables an unprecedented opportunity to study the spatial distribution of star formation in galaxies over wide fields, out to  = 2, using pixel-based spectral energy distribution (SED) fitting techniques (e.g., Abraham et al. 1999;Sorba & Sawicki 2015;Abdurro'uf et al. 2022).To estimate the feasibility of this, we use the ETC to find the exposure time required to reach S/N = 5 per pixel at a given uniform surface brightness level.This is shown in Figure 10 for each of the five filters, relative to the proposed survey limits.In the UV, CASTOR will achieve this sensitivity for a surface brightness of  ≈ 25.6 mag arcsec −2 in the Deep survey, and  ≈ 27.0 mag arcsec −2 in the Ultradeep survey.For   measured in erg s −1 cm −2 Hz −1 within an angular area  = 1 arcsec 2 , we can convert to luminosity per area  in kpc 2 as where   and   are the luminosity and angular-diameter distances, respectively, measured in units of kpc for a ΛCDM cosmology.Combining this with Eq. ( 4) yields a physical star formation rate surface density, Σ: for Σ in units of M ⊙ yr −1 kpc −2 and  in AB mag arcsec −2 .The top axis of Figure 10 shows this corresponding SFR density, for  = 1.
With an ultradeep survey (50 hours per exposure) we will be able to constrain the SED in the UV to 27 mag arcsec −2 , which corresponds to the distant outskirts (>10 kpc) of typical galaxies (Bouquin et al. 2018).
To illustrate what CASTOR images of distant galaxies will look like, we show in Figure 11 simulated g, u, and UV observations of galaxies in the Hubble Ultra Deep Field (UDF).These images were produced by taking the spatially-resolved spectral energy distribution (SED) fits of UDF galaxies from the work of Sorba & Sawicki (2018) and using them to model their pixel-by-pixel appearance in the CASTOR filters.These images were then degraded with noise values predicted by FORECASTOR.Panel (a) of Figure 11 shows the result in UV, u, and g for a  = 0.6 UDF galaxy under three illustrative exposure times (1, 10, and 100 hours).Panel (b) of Figure 11 shows simulated 100-hour CASTOR UV images of 24 real UDF galaxies chosen to span a grid in redshift and brightness.In Figure 11 panel (b), galaxies are shown as a function of IR magnitude (Roman F140W here, which can be regarded as a proxy for stellar mass) because for extragalactic science, CASTOR will leverage Roman data.
Figure 12 illustrates how CASTOR's sensitivity to star formation in distant galaxies complements the sensitivity to existing stellar populations that will be provided by space-borne IR observatories such as Roman.Here, the CASTOR u-and g-band simulated images were produced by the procedure described above and assumed 100-hour integrations, and the Roman F184W image followed a similar procedure but for a 1-hour integration.

Time-Domain Studies of Active Galactic Nuclei
Active galactic nuclei (AGN) are one of the most energetic systems in the Universe-supermassive black holes (millions to billions of times more massive than our Sun) surrounded by an "accretion disk" of ionized gas and dust-located at the centres of massive galaxies.Accretion of matter onto the central black hole releases tremendous energy over a broad range of the electromagnetic spectrum although AGN power peaks in the UV.In addition, AGN are more variable in the UV than at optical or infrared wavelengths (MacLeod et al. 2010).The variability timescales in the UV are also shorter than those in the optical (MacLeod et al. 2010).For these reasons, the UV is a vital regime for the study of AGN.CASTOR will provide a unique window to the UV sky, including the sensitivity required to perform UV observations of AGN, higher spatial resolution to separate the central AGN from its host galaxy, and a slitless (grism) mode that will allow taking spectra of a large number of AGN targets in a single field of view.
Time-domain studies of AGN take advantage of the variability in AGN to understand the structure and kinematics of these systems.AGN vary on several timescales (Peterson et al. 1982).Tracking different timescales of variability allows us to derive the sizes of the inner regions of AGN, that can then be used to estimate the central black hole masses (combining AGN sizes with the gas velocities given by broad line widths from AGN spectra; Peterson et al. 2014).Determining black hole masses of AGN over a wide range of redshifts is essential for understanding how supermassive black holes grow over cosmic time.
Time-series analysis requires repeat observations of target AGN with sufficient S/N to track their variability over a certain time period.We used the FORECASTOR ETC to calculate the exposure times required to reach S/N values of 5 and 10 for AGN with a range of AB magnitudes in the UV-band of CASTOR, as shown in Figure 13.We assumed a  Figure 13 indicates that for brighter AGN, we need longer exposure times in bluer bands (i.e., purple circles for the UVband in Figure 13) compared to redder bands (i.e., red trian-gles for the g-band) to reach a desired S/N; however, fainter AGN require longer exposures in redder bands.Thus, CAS-TOR will probe the fainter AGN population more efficiently in UV bandpasses than in the optical g-band.
With CASTOR, we would need a range of different exposure times to probe AGN over a wide redshift range.Figure 14 displays a realistic AGN sample (black circles), obtained from the AGN UV luminosity function (Kulkarni et al. 2019), in the redshift-apparent AB magnitude space.A fraction of this sample extends to higher magnitudes ( UV ≥ 21; fainter targets).While a S/N of 5 can be reached with shorter exposures for brighter targets, achieving sufficient S/N to detect variability in fainter AGN would require considerably longer exposures.In such cases, stacking shorter exposures presents a way to build up to the higher S/N required for fainter AGN observations.With an AGN legacy survey, we aim to probe a unique luminosity-redshift parameter space for AGN time-domain science that includes a significantly large number of objects at low-to-medium luminosities in the redshift range of 0.3 ≲  ≲ 2.3.

CONCLUSION
The proposed CASTOR mission will be transformative, unveiling the ultraviolet and blue-optical sky at high resolution across an enormous field of view.The first of the FORECAS-TOR tools described above allows users in the community and prospective collaborators to evaluate how CASTOR photometry will be able to benefit their science case of interest.The ETC also allows users to compare and contrast CAS-TOR's performance with any arbitrary instrument within the same software environment, and indeed to develop associated multi-mission science cases using other instruments, by adopting a generalized framework wherein the user can define a telescope, background, or source object to arbitrary specifications.We have also developed a flexible web interface for "quick-look" calculations or those that are not immediately comfortable with working in Python.All of these tools are open access and available ready-to-use through the Canadian Astronomy Data Centre's CANFAR Science Portal.
Using the FORECASTOR photometry ETC, we have shown a number of illustrative science cases which highlight the science which CASTOR will be able to do, from assessing the habitability of other solar systems, to tracing the motions of stars far fainter than reached by Gaia, to charting the rise and fall of star formation across the history of the Universe.In a companion work, Glover et al. (2022) describe an early implementation of the UV multi-object spectrograph ETC tool, while Marshall et al. (2024) and Noirot et al. (in prep.)describe the wide field image simulation and the grism ETC tools, respectively.As the CASTOR mission looks ahead to the next phase in its development, this work will be invaluable in defining the next steps towards launch in ∼2030.We can add emission and absorption lines to the base spectrum as well as visualize the source spectrum, whose output is shown in Figure 15,

A.2. Extended Sources
Unlike point sources, the ExtendedSource class has non-zero angular dimensions where the flux may change with angular position.To this end, we supply two default surface brightness profiles: uniform and exponential.A uniform profile results in a constant surface brightness over an elliptical region, and the surface brightness drops to zero immediately outside this ellipse.In contrast, an exponential profile is defined by its scale lengths along the semimajor and semiminor axes, and the surface brightness smoothly decreases from the centre of the source out to infinity.If these profiles are insufficient, a user can also supply a function to the profile class parameter that describes some arbitrary surface brightness profile for the ExtendedSource.The following example illustrates how to generate a uniform surface brightness profile for an extended source like a diffuse nebula.We now assign a Gaussian emission line spectrum to this source, and renormalize the spectrum so it has an AB magnitude of 25 in the u-band.Under the hood, we use Simpson's rule to numerically integrate Eq. ( 2) of Bessell & Murphy (2012), interpolating the passband response curves to the wavelength resolution of the spectrum if necessary.We interpolate to the spectrum resolution for two main reasons.First, in most cases, the spectrum is higher resolution than our bandpass response curves.Second, the curves in our bandpass files are relatively well-behaved compared to observational spectra, which may have lots of sharp peaks and troughs.If we interpolate the spectrum to the bandpass resolution, we risk losing these features that may have a substantial contribution to our calculations.In contrast, since the passband throughput curves are smoother, any interpolation (even to a coarser spectrum) should capture the behaviour of the passband reasonably well.Note that we take the response function to be unity when renormalizing to a specific bolometric AB magnitude.In the notation of Bessell & Murphy (2012):   () = 1.In this case, it is also important to ensure that the spectrum used in bolometric AB magnitude calculations is sufficiently small at the edges.If the spectrum does not vanish at the ends, like a uniform spectrum, then the bolometric magnitude will depend on the length of the spectrum because the area under the curve does not converge.

A.3. Galaxy Sources
Finally, the GalaxySource class is similar to ExtendedSource, except the surface brightness profile follows a Sérsic model.The user supplies GalaxySource with an effective (half-light) radius, Sérsic index, and axial ratio-the ratio of semiminor to semimajor axis-which the code uses to generate its surface brightness profile, e.g., 1 from castor_etc.sources import GalaxySource 2 MyGalaxySource = GalaxySource( 3 r_eff=3, # arcsec or astropy.units 4 n=4, # Sérsic index 5 axial_ratio=0.9,# semiminor/semimajor axis 6 rotation=135, # CCW rotation from x-axis 7 ) Next, we will use one of the galaxy spectra available in castor_etc and renormalize it to correspond to a given luminosity and distance.
1 MyGalaxySource.use_galaxy_spectrum("spiral") 2 MyGalaxySource.norm_luminosity_dist( 3 luminosity=2.6e10,# L ⊙ or astropy.units 4 dist=765 # kpc or astropy.units 5 ) The luminosity-distance normalization is accomplished by dividing each spectrum value by the total luminosity of the spectrum, and then multiplying by the desired luminosity.We use Simpson's rule to integrate the spectrum, in units of erg s −1 cm −2 Å −1 , to get the total radiance of the object in units of erg s −1 cm −2 .We assume the object emits radiation isotropically from a distance , meaning the total luminosity of the object is simply the total radiance multiplied by 4 2 .This total luminosity is the denominator within our normalization factor that we multiply with the spectrum, with the desired luminosity as the numerator.

A.4. Photometry Calculations
To execute photometry calculations, we initialize a Photometry object with our Telescope, Source, and Background instances.Below, we select an "optimal" aperture for our point source.FORECASTOR ETC has a built-in method to visualize these sources through their apertures in a given passband, which we invoke with the following code.The plots generated by the ETC are shown in Figure 16.Finally, we can use the following two methods to calculate the S/N achieved over a certain integration time and to calculate the integration time needed to achieve a given S/N.We can optionally supply a value for the reddening associated with the source and the telescope's pointing.The results of these calculations are tabulated in Table 3, along with the AB magnitudes through CASTOR's passbands obtained through MyPointSource.get_AB_mag(MyTelescope) and the encircled energy in each passband.The main step in adapting FORECASTOR ETC to other missions is to create a Telescope instance that represents the physical telescope used in the mission.All other classes and methods are either agnostic to the telescope or directly reference the parameters of the given Telescope instance; we do not assume any CASTOR-specific values in any calculations outside of the default Telescope parameters.
The list of default Telescope parameters is contained in castor_etc's parameters.pyfile.The user should not modify this file directly; instead, all customizations can be accomplished when instantiating a new Telescope object by passing keyword arguments.The parameters.py file should only serve as a tool for determining which parameters need to be modified.
Following is an example showing how to create a new Telescope instance with all parameters relevant for the photometry calculations explicitly listed.Certain arguments may have specific requirements (e.g., the format of the passband response curves), and these are documented in the Telescope object's docstring.

Figure 1 .
Figure1.Filter response curves for the three baseline CASTOR filters (UV, u, g) and the response functions resulting from a proposed broadband filter that splits the UV-and u-bands.

Figure 2 .
Figure 2. Point spread functions for CASTOR's central field of view, in each of its UV-(left), u-(centre), and g-bands (right).The original PSF simulations are sampled at 10× CASTOR's pixel scale, then interpolated to produce a grid which is 20× the telescope's pixel scale.

Figure 3 .
Figure 3.A flowchart describing the workflow associated with castor_etc's photometry functionality.The most important parameters and methods of each class are included.

Figure 4 .
Figure 4.The right side of the graphical user interface, showing plots rendered by the FORECASTOR ETC for synthetic photometry calculations.These photometric calculations and mock aperture renderings update as the user changes and submits different parameters.The panels are resizable and all graphs are interactive (e.g., zoom and pan, show/hide different bands or spectra, obtain the value at a specific position in the graph, download graphs, etc.).

Figure 5 .
Figure 5. Evolution of a 0.6 M ⊙ and a 1.2 M ⊙ hydrogen-atmosphere WD in UV-u vs UV CASTOR magnitude Hertzsprung-Russell diagram.Points along each cooling track are coloured by age of the WD (as shown in the legend), while the horizontal line denotes the CASTOR limiting magnitude (S/N = 5) in the UV-band given a 4200 s exposure.Here the UV magnitude includes  ( − ) = 0.09 for the LMC.

Figure 6 .
Figure 6.Synthetic CASTOR UV-u-g-band light curves for a randomly-selected flare star ( ★ = 0.35 M ⊙ , Pleiades member at 112 Myr; Dahm 2015, { AB,UV = 25.8,  AB,u = 23.2, AB,g = 20.0}).The cadence and photometric precision are based on the results from the FORECASTOR ETC for the fiducial observing strategy envisioned for CASTOR's M star Legacy Survey.Each light curve is offset and normalized by its quiescent flux level.The injected flare was sampled from the GALEX/NUV FFD (Jackman et al. 2023) and is detected at 5.5 in CASTOR's UV-band.The multi-band flare energies are calculated assuming a 9000 K blackbody and likely represent conservative estimates of the u-and g-band flare energies when compared to observations of M star flares with spectroscopic UV instruments such as HST/COS and HST/STIS (e.g.Loyd et al. 2018;Kowalski et al. 2019).

Figure 7 .
Figure 7. Top panel: Expected proper motion errors from CASTOR (in blue) as a function of CASTOR g-band magnitude for different total exposure times per epoch, assuming a maximum time baseline of four years.For comparison, typical proper motion uncertainties from Gaia as a function of magnitude are also shown in red, where we converted from Gaia G-to CASTOR g-band assuming the spectral energy distribution of a turnoff star for an old metal-poor stellar population.Bottom panel: expected plane-of-the-sky velocity precision from CASTOR as a function of CASTOR g-band magnitude for different distances (solid coloured lines), assuming an exposure time of 2200 s per epoch and a maximum time baseline of four years for proper motion measurements.The vertical dotted lines show the approximate magnitude of the main-sequence turnoff at those distances for an old metal-poor stellar population. in a total exposure time of 2200 s per epoch, which is what we assume for the reference survey described below.As part of the CASTOR Galactic Substructures Legacy Sur-

Figure 8 .
Figure 8.The exposure time required to reach S/N = 5 as a function of AB magnitude, assuming a spiral galaxy at  = 1 with   = 0. ′′ 25 and  = 1.

Figure 9 .
Figure9.The locus of the star-forming main sequence and its 1 scatter, for galaxies with two stellar masses as indicated, is compared with the estimated 5 extended source depths of the Deep (black line) and Ultradeep (cyan) curves, neglecting extinction.The main sequence parameterization is taken fromPopesso et al. (2023).

Figure 10 .
Figure 10.The time required to reach S/N = 5 per pixel for a spiral galaxy at  = 1 with uniform surface brightness , for each of the five CASTOR passbands.The top axis shows the corresponding physical star formation rate surface density, valid for  = 1 and ignoring extinction, as described in the text.

Figure 11 .
Figure 11.Left panels show the predicted CASTOR images of a real  = 0.6 galaxy (taken from the Hubble UDF) at depths similar to those of the proposed CASTOR Wide (left), Deep (middle) and Ultradeep (right) surveys.Right panels show representative UDF galaxies, chosen to span a grid of redshift and IR F140W magnitudes (a proxy for stellar mass) in simulated 100-hour CASTOR UV observations.

Figure 12 .Figure 13 .
Figure 12.A simulation of a ∼1.′ 5×1.′ 5 region within the Hubble Ultra Deep Field (UDF) in CASTOR (u, g) and Roman (F184) filters.This shows ∼2.2 arcmin 2 , or just ∼0.06% of the area that will be covered by the proposed CASTOR Ultradeep Survey.The Roman F184W image assumes an exposure time of 1 hour.The galaxy shown in the top left cutout is the same as that in the left panels of Figure 11.While Roman's IR imaging (red) is sensitive to existing stellar mass, CASTOR picks out regions of ongoing star formation.With comparable spatial resolution from the ultraviolet to the nearinfrared, CASTOR and Roman working in concert will map out stellar populations and other physical parameters across galaxies out to the epoch of cosmic noon.background composed of Earthshine, zodiacal light, and average emission from the [Oii] geocoronal line, together with

Figure 14 .
Figure 14.Apparent AB magnitude ( UV ) distribution in the UVband (purple histogram) illustrating number of AGN (left -axis) that can be observed over a range of magnitudes (-axis), over-plotted with individual AGN (black circles) over a range of redshifts (right -axis) and  UV simulated in a sky area of 5 deg 2 with a limiting  UV = 24.0.In the simulated AGN sample, the objects at lower redshifts appear fainter, implying the need for several exposures to achieve desirable S/N values for those targets (see also discussion in the text).

14Figure 16 .
Figure16.A point source (left), extended source (centre), and galaxy (right) as seen through an optimal circular aperture (left), rectangular aperture (centre), and elliptical aperture (right) in the g-band.From left to right, the apertures enclose 80.60%, 58.51%, and 59.01% of the flux from these sources.

1
# Results are tabulated in Table3

Table 1 .
Some default Telescope parameters.

•
Set zodiacal light spectrum, Earthshine spectrum, geocoronal emission lines (specify flux, wavelength, linewidth) • Calculate the AB magnitude per sq.arcsec of the background Telescope Class • See Table 1 for a summary of tunable parameters • Photometric zero-points and pivot wavelengths are automatically calculated from the passband response curves

Table 2 .
Times needed to reach S/N = 5 for a given magnitude in a CASTOR band, assuming a flat continuum,  ( − ) = 0.09 for the LMC, and our default input telescope parameters.
28.2, 28.1, and 27.6in the UV-, u-and g-bands, respectively.This will enable the detection of the hot end of the WD cooling track in young Clouds clusters (for UV ∼ 28.2, down to a WD  eff ∼ 40,000 K).The most promising clusters to constrain the IFMR are those in the 40-80 Myr age range, which is when WDs are expected to have formed but for which we have not yet detected WDs in Milky Way clusters.Promisingly, there are dozens of clusters within this age range in the Clouds NUV / J age sequences for partially convective early M stars (>0.35 M ⊙ ; Shkolnik & Barman 2014) and fully convective mid-to-late M stars (<0.35 M ⊙ ; Schneider & Shkolnik 2018).

Table 3 .
Results of sample PointSource S/N calculations and AB magnitudes.