Extending Supernova Spectral Templates for Next-Generation Space Telescope Observations

Empirical models of supernova (SN) spectral energy distributions (SEDs) are widely used for SN survey simulations and photometric classifications. The existing library of SED models has excellent optical templates but limited, poorly constrained coverage of ultraviolet (UV) and infrared (IR) wavelengths. However, both regimes are critical for the design and operation of future SN surveys, particularly at IR wavelengths that will be accessible with the James Webb Space Telescope (JWST) and the Wide-Field Infrared Survey Telescope (WFIRST). We create a public repository of improved empirical SED templates using a sampling of Type Ia and core-collapse (CC) photometric light curves to extend the Type Ia parameterized SALT2 model and a set of SN Ib, SN Ic, and SN II SED templates into the UV and near-IR. We apply this new repository of extrapolated SN SED models to examine how future surveys can discriminate between CC and Type Ia SNe at UV and IR wavelengths, and present an open-source software package written in Python, SNSEDextend, that enables a user to generate their own extrapolated SEDs.


INTRODUCTION
Photometric templates and models of supernova (SN) spectral energy distributions (SEDs) are critical tools for gleaning physical properties of supernovae (SNe) from observations, determining how those properties evolve over time, and performing SN classifications. Many SN analysis tools, such as the widely-used SuperNova ANAlysis (SNANA Kessler et al. 2009) and SNCosmo (Barbary 2014) software packages, utilize a common set of empirically-derived SEDs that represent a variety of core-collapse (CC) and Type Ia SNe. Most existing template SEDs, however, are only constrained by data at optical wavelengths (Blondin & Tonry 2007). Many of the software packages for photometric SN classifica-tion rely on these template SEDs (Kessler et al. 2010;Sako et al. 2011). Extending the SED templates into near-infrared (NIR) wavelengths is necessary for those classification tools to be applicable for the next generation of telescopes-such as the James Web Space Telescope (JWST), the Wide-Field Infrared Survey Telescope (WFIRST), and the Large Synoptic Survey Telescope (LSST)-which will provide a plethora of new SN observations that span wavelengths from the optical to the far-IR (Dahlén & Fransson 1999;Mesinger & Johnson 2006;Ivezic et al. 2008;Spergel et al. 2015).
A preliminary extension of the SN SED library into NIR bands (Pierel et al. 2018) 1 has already been used for the analysis of SN discoveries in the Cosmic Assembly Near-infrared Deep Extragalactic Legacy Survey (CANDELS, Rodney et al. 2014) and the Cluster Lensing And Supernova survey with Hubble (CLASH, Graur et al. 2014). The simplistic modified SN SED templates employed for that work have also been used to explore various survey strategies for the WFIRST SN program (Hounsell et al. 2017).
In this work we provide a more rigorous extension of ultraviolet (UV) and NIR coverage for current SEDs. First, we describe a new open-source software tool, SNSEDextend, that is capable of extrapolating SN SEDs to match photometric observations. The data and methodology for extending CC SN SEDs are presented in Section 2. Extrapolation of the Type Ia model SALT2 (Guy et al. 2010) is described in Section 3. We then provide a new repository of SEDs extrapolated to cover the wavelength range ∼ 1700-25,000Å, and in Section 4 we apply these SEDs to explore photometric SN classifications in IR bands.
As the number of UV and IR observations of SNe increases, the accuracy of the extrapolations will continue to improve and the SNSEDextend package will be available to supplement the repository with updated and new SED templates. Meanwhile, the intention is that these extrapolated SEDs will be used by the wider SN research community for simulations and photometric classifications. We note, however, that our extrapolations of the SALT2 Type Ia SN model to UV and NIR wavelengths are not intended to make SALT2 capable of light-curve fitting in those wavelength regimes for cosmological distance measurements. That would require retraining of the model, which is beyond the scope of this work. Classifications of CC SNe can be broadly grouped into three types, each with their own set of subclasses. Type Ib and Ic SNe are characterized with their early-time spectra first by a lack of hydrogen (Type I), and then by the absence of strong Si II and the presence of He I (Ib), as well as the absence of both strong Si II and He I (Ic) (see, e.g., Filippenko 1997). The classification of Type II is broadly inclusive of SNe containing hydrogen in their spectra, and is then further split based on optical spectral and light-curve properties into II-P, II-L, IIb, and IIn (e.g., Filippenko 1997). The existing CC SN SED library comprises 11 SNe Ib, 8 SNe Ic, 28 SNe II-P, 3 SNe IIn, 1 SN II-L, and 0 SN IIb templates created from observations of 48 objects. Owing to the sparsity of SED templates and existing optical+NIR light curves for SNe IIn, II-L, and IIb, we have excluded them from this analysis. The SNSEDextend code can be used in the future to perform these necessary extrapolations when more data are available. Some SNe included in our analysis have a classification of Type II, but no further subclassification. As these SNe are not clearly SNe IIb, II-L, or IIn, and recent CC SN frequency studies have concluded that 83-95% of SNe II can be classified as Type II-P (e.g., Smartt et al. 2009), we have grouped these SNe together with the SNe II-P and have removed any that the SN II-P optical templates are unable to fit.
The CC SN SED template library was created using light curves with excellent optical data, but only 7 of the 44 objects were observed in the NIR (Kessler et al. 2010;Sako et al. 2011). Our goal is to improve these templates by extending their coverage to NIR wavelengths using a set of SNe observed in the optical and NIR. The steps for these CC SN template SED extrapolations are summarized in Figure 1. Our process begins with a collection of SN light curves that include both optical and NIR photometric data, detailed in Section 2.1. These light curves are then grouped by SN subclass (Type Ib, Ic, II+IIP). For each SN in a given subclass we use the existing templates to fit the well-sampled optical light-curve data (Section 2.2), which enables interpolation over the light curve in the optical bands. The interpolation is necessary as we combine these fits with the discrete observed UV and NIR photometry to derive color-evolution curves for each CC SN subclass (Section 2.3). These optical-NIR colors are then used to constrain the extrapolations for each existing SED template (Sections 2.5 and 2.6).

Core-Collapse Supernova Data
The existing library of CC SN SEDs that we are extending, developed for a photometric classification challenge in 2010 (Kessler et al. 2010)  SNe Ic, and 28 SNe II/II-P. These templates were formed from smoothed spectral time series for SNe of a given subtype, which were then warped to match photometric observations of different SNe of the same subtype (Kessler et al. 2010). None of the SN light curves used to guide the warping of these CC SN SED templates had well-sampled NIR data, so any template extending redward beyond optical wavelengths is poorly constrained. These CC SN templates have reasonable UV constraints, reaching down to 2000Å. We therefore have not modified or extrapolated them on the blue side, but the SNSEDextend package has the capability to do UV extrapolations, following the algorithm outlined in Figure 1 for the IR side. To constrain our SED template extrapolations, we require that the color evolution of each extrapolated template SED matches the best available observed optical and NIR photometry for SNe of the same subtype. This approach requires a set of CC SNe with both well-sampled optical light curves and some NIR photometry. For this purpose we adopt a collection of photometric data from low-redshift CC SNe, taken from Bianco et al. (2014) and Hicken et al. (2017), both collected at the Fred L. Whipple Observatory (FLWO) ( Table A1). The Hicken et al. (2017) data include SNe II and II-P (Figure A1), while the Bianco et al. (2014) data are from stripped-envelope SNe of Types Ib and Ic ( Figure A2). Any SNe in these samples that do not have data in at least one of the U , J, H, or K bands are discarded. This assemblage includes 9 SNe Ib, 1 SN IIb, 7 SNe Ic, 8 SN II, and 2 SNe II-P, for a total of 27 objects, and the SNe II and II-P are combined into a single group for this process. As stated above, extrapolation into the UV is not necessary for this work, but light curves with UV data are included so that the SNSEDextend package is prepared to perform future UV extrapolations.
A particularly well-sampled SN Ib light curve, that of SN 2005hg (Bianco et al. 2014), is shown in Figure 2. The observed data are overlaid with light-curve fits in optical bands, which are described in Section 2.2. Similar light-curve plots for all the CC SNe used in this work are provided in the Appendix.

Light-Curve Fitting
In the SNSEDextend package we use the SNCosmo 2 Python toolkit (Barbary 2014) for light-curve fitting, with the important change that we have added the FLWO PAIRITEL J, H, and K s bands to the SNCosmo bandpass registry. A best-fit optical light-curve model is found for each SN in our photometric dataset by fitting one of the existing spectrophotometric SED models to the observed Bessell B, V , and SDSS r photometric data. More details of the fitting process are given in the Appendix. These optical models are used to obtain r − J, r − H, and r − K colors for use in extrapolation.

Color Table Generation
Measuring, for example, an r − J color over time is called an r − J "color curve." We will use r − {JHK} to refer to the ensemble of r − J, r − H, and r − K color curves. The purpose of fitting the optical SN light curves in Section 2.2 is to generate color curves for each 2 SNCosmo Version 1.6 SN type, which are used to define SED extrapolations into the NIR (Section 2.6). In order to minimize uncertainties that arise from comparing different colors (e.g., r − J and i − J), we have chosen the most prevalent "red" wavelength band in our dataset (SDSS r ) as the optical anchor for all of our NIR color measurements.
The sparsity of the NIR data for each SN type necessitates calculating colors for each SN, and merging SNe of like classification to obtain a well-sampled color curve. The SNSEDextend package does this by creating a merged "color table" for each SN type, which simply defines the discrete set of colors measured for all SNe of that type (Table A2). These data giving observed color over time are fit with a polynomial "color curve." Details of the polynomial fitting are given in the Appendix. An example of deriving a continuous color curve for a single SN subtype is shown in Figure 4. Note that the SN Ib color curve is flat for phases beyond the temporal extent of our dataset, as we have no color constraints in those regions. Previous work suggests that the shape of a SN color curve near peak brightness should not be used to predict the color at phases far from peak (Krisciunas et al. 2009).

Host-Galaxy Extinction and Intrinsic Color Variation
In this work we are grouping SNe of like subtype together to perform extrapolations, which means that intrinsic and extrinsic variability of NIR colors within a SN subtype must be accounted for before defining the extrapolations. Recent work suggests that the majority of SN II color diversity is intrinsic and not due to hostgalaxy extinction (de Jaeger et al. 2018), while similar analyses with stripped-envelope SNe seem to assume the exact opposite (e.g. Taddia et al. 2018). Although further investigation is warranted, it is clear that SNe of all subtypes will suffer from some measure of both intrinsic (e.g., Filippenko 1997) and extrinsic (e.g., Kelly & Kirshner 2012) variability.
To account for extrinsic variation in the SN colors, a correction for host-galaxy extinction is made during the light-curve fitting process. We adopt the dust law defined by Cardelli et al. (1989) with R V = 3.1, and fit for the host-galaxy E(B − V ) using SNCosmo (see Section 2.2 and the Appendix). No color-variation parameter exists in the models capable of accounting for the intrinsic color variation of SNe from the same subclass. Instead, we use the diversity of colors present in the extrapolated SED templates to represent the inherent color variation, for which we account in Section 2.5.

Fixing the Peak Color with Blackbody Fits
After creating an aggregate color curve for each SN subtype in Section 2.3, the intrinsic variation of NIR colors within each SN subtype is addressed. To do this, we use a blackbody fit to each optical template SED at peak. Although a blackbody spectrum is not necessarily an accurate model for SN SEDs at early and late times (Baron et al. 2004;Shussman et al. 2016), it will generally provide a valid approximation close to the time of peak luminosity (Hershkowitz et al. 1986).
To test the assumption of a blackbody approximation at peak brightness, we collected each of the SNe with optical+NIR data that were originally used to create the base template SED repository. As discussed in Section 2, only 7 of these 44 SNe were observed in the NIR, and one of the 7 is discarded owing to insufficient NIR coverage. This leaves 3 SNe Ib and 3 SNe Ic, none of which have sufficient data in the K s band, to be used in the comparison.
The SED template corresponding to each SN at peak brightness is fit with a blackbody spectrum in the optical wavelength range (∼ 4200 − −7500Å). The templates are not fit with a blackbody at UV wavelengths owing to the well-documented effects of line blanketing (e.g., Marion et al. 2014). The best-fit blackbody spectrum defines the fluxes through the J and H bandpasses (∼ 10, 500-18,500Å), which are then used to define r −JH colors. By comparing the observed r − JH color to the r − JH color predicted by the blackbody fit, we conclude that the scatter introduced by the blackbody fitting (Table 1) is ∼ 2-3σ less than the intrinsic scatter for the whole sample in each subtype (∼ 0.5; e.g., Figure  4).
Although none of the template SNe II/II-P were observed in the NIR, we must somehow anchor the color curves to take intrinsic variation into consideration. It would clearly be valuable to check the assumption that the blackbody approximation is also valid for SNe II/II-P with the same test done for SNe Ib and Ic. However, without templates containing NIR data, we are only able to confirm that the blackbody fitting method is as successful for SNe II/II-P as for SNe Ib and Ic ( Figure 3); the SN II/II-P intrinsic variation methodology should be updated as needed when more data become available.
As shown in Figure 4, the aggregate color curve for each SN subtype, derived in Section 2.3, is shifted vertically with the shape remaining intact, such that it intersects with the corresponding peak blackbody color. This means that the change in color over time is the same for all the SN SED extrapolations in a given SN subclass, but each extrapolation is anchored to a different set of   Figure 3. An example of a blackbody spectrum fit to the optical wavelengths of a SN Ib (left) and SN II-P (right) template SED at peak. Although none of the Type II-P template SNe have NIR data available to compare the observed and blackbody-predicted colors directly (as is done in Table 1), the fact that a blackbody can be as successfully fit to a SN II SED as to a SN Ib SED is both encouraging and the only currently obtainable evidence that such an approximation is reasonable. r − JHK colors at peak brightness, derived from the blackbody fits.

SED Extrapolation
For each CC SN Type Ib, Ic, and II/II-P, the SED templates described in Section 2.1 are extrapolated to match the color curves defined in Sections 2.3 and 2.5. From the shifted aggregate color curve (Figure 4), we extract a requirement for the r − JHK color for every epoch defined in the template SED timeseries. We apply a piecewise linear extrapolation to the SED such that the extrapolated SED's colors match these measured colors, as shown in Figure 5. Although our color data extend only to the K band, we continue the extrapolation to even longer wavelengths by arbitrarily setting the flux to be zero at 55,000Å in all phases. Similarly, we extrapolate on the UV side to reach zero at 1200Å. The final result is a set of extrapolated SEDs that cover the full wavelength range of 1200-55,000Å, where the updated SEDs' colors in the NIR correspond to those measured in Sections 2.3 and 2.5. These extrapolated SEDs are available for download from an online repository 3 , and are included in the latest versions of the SNANA and SNCosmo packages.
0.20 ± 0.13 Ic 0.14 ± 0.11 0.11 ± 0.11 a Scatter measured by comparing the observed and blackbody-predicted NIR colors for 3 SNe Ib and 3 SNe Ic at peak brightness. These uncertainties are much less than the intrinsic scatter observable in each subclass (∼ 0.5; e.g., Figure 4), indicating that fitting a blackbody spectrum to a SN SED provides a reasonable approximation of peak-brightness NIR colors for SNe Ib and Ic. Peak Optical Blackbody r -J Median Curve Shifted Curve Figure 4. Example of defining an optical-NIR color curve for SNe Ib. Colored circles show the r − J color from six SNe Ib with well-sampled optical and NIR light curves. For each color data point, the r magnitude is interpolated from the light-curve fit to optical bands and the J magnitude is a directly observed value. The solid line shows a polynomial fit to the aggregate data from all six SNe with NIR light-curve data in this subclass. Black crosses show the r − J color at peak brightness for the 11 existing SN Ib SED templates, derived by fitting a blackbody to the optical wavelength region of each SED in the template library. The dashed line shows an example of the aggregate color curve after shifting to match the peak r − J color of one of those 11 SED templates. This dashed curve is then used to constrain the NIR extrapolation of that SED template at all phases.

SED Spectroscopic Features
Once the linear extrapolations from Section 2.6 are applied, one may wish to add absorption and emission features to the extrapolated regions of the SED. This is implemented in SNSEDextend by drawing from a repository of flattened SN spectra, such as those in the Supernova Identification software package (SNID; Blondin & Tonry 2007). A flattened SNID spectrum is normalized to match the template SED, and then added to the linear SNSEDextend extrapolations. The broad-band colors defined in Sections 2.3-2.6 are maintained, as the mean flux values in the flattened SNID spectra can be normalized to zero for any wavelength bin (Blondin &  Example of a SN Ib SED at peak brightness, with linear extrapolations into the UV and IR. The flux through each bandpass, represented by shaded regions, is constrained to match the color curves generated by the SNSEDextend package for the corresponding SN subtype (see Section 2.3 and Figure 4).

Tonry 2007).
A spectral feature with high equivalent width, such as Hα, would affect broad-band colors despite the normalization. However, there are no features with similarly high equivalent width in NIR CC SN spectra where this method is to be applied. (e.g., Dessart et al. 2012Dessart et al. , 2013 .
For the repository of extrapolated SN SEDs described here, all of the input SED templates were already well constrained at UV wavelengths, and the SNID template library has essentially no information about spectral features in the NIR. Therefore, this capability is not used in this work, but is available for future applications of the SNSEDextend package.

K-Corrections
The "K-correction" allows for the comparison of flux measurements between objects at different redshifts (Humason et al. 1956;Oke & Sandage 1968). With accurate K-corrections at NIR bands, one could use a larger dataset of high-redshift (z 0.1) CC SN light curves to define the color curves that constrain our SED extrap-olations. However, deriving an accurate K-correction requires knowledge of the SED at the wavelength range of interest, which is the goal of the extrapolation. To avoid this circularity, we use exclusively low-redshift SNe (z < 0.04) to guide our SED extrapolations, and assume that the K-corrections are negligible.
After implementing the extrapolations described above, we check the magnitude of the K-correction that each extrapolated CC SN SED would predict. We find that none of these post-hoc K-corrections would be greater than ∼ 0.04 mag, which is much less than the intrinsic scatter in the colors of the CC SN population. If the SNSEDextend package is applied in the future using CC SNe of higher redshift, then the initial NIR extrapolations presented here could be used to define K-corrections for those high-z light curves.

TYPE IA SUPERNOVAE
As our baseline spectrophotometric model for SNe Ia, we adopt SALT2 (Guy et al. 2007), a parametric model for SN light-curve fitting. This model gives the SN Ia flux density F as a function of phase φ and wavelength λ according to (Guy et al. 2007) (1) The core components of the SALT2 model are M 0 , M 1 , and CL, which are fixed components, common for every SN Ia. The free parameters are x 0 , x 1 , and c, which are fit to match the luminosity, light-curve shape, and color of each individual SN Ia.
Our goal is to extend the wavelength range over which the SALT2 model is defined, growing from the current 2000-9200Å to 1700-25,000Å. This extension improves the utility of the SALT2 model for SN survey simulations and photometric classifications. As the original SALT2 training had limited constraints below ∼ 3500Å and above ∼ 8000Å (Guy et al. 2007), we also seek to improve the accuracy of the blue and red ends of the SALT2 model, in the 2000-3500Å and 8000-9200Å wavelength ranges. The original SALT2 model is known to produce negative fluxes, particularly at early UV and late NIR epochs (e.g., Mosher et al. 2014). We do not correct this issue, as the SALT2 model between 3500 and 8000Å and the overall framework are left untouched so as to not disturb its current applications. However, we have ensured that the UV and NIR extrapolations do not produce negative fluxes at any epoch. Figure 6 summarizes the steps for the extrapolation of the SALT2 model to NIR and UV wavelengths. In Section 3.1 we extend the SALT2 model to NIR wave-lengths, first addressing the color law, and then extending the M 0 and M 1 components using constraints derived from a sample of low-redshift SNe Ia. In Section 3.2, we use the parameterized SN Ia light-curve model of Foley et al. (2016) to guide the extrapolation of SALT2 to UV wavelengths. Our extension of the dispersion, variance, and covariance terms of SALT2 is described in Section 3.3.
3.1. Extending SALT2 to Near-Infrared Wavelengths The SALT2 color law incorporates any wavelengthdependent color variations that are independent of epoch, and is defined as a polynomial in wavelength with no time dependence (Guy et al. 2007). For SALT2 the color law was defined over the wavelength range 2800-7000Å, and it extends with a linear extrapolation to any wavelength outside of that range (Guy et al. 2007;Guy et al. 2010). In practice those linear extension regions are much more limited, since the SALT2 model is only defined over the range 2000-9200Å. We have left the SALT2 color law effectively unchanged on the UV side, by maintaining approximately the same slope at the 2800Å left edge of the polynomial. To allow the SALT2 model to apply beyond 9200Å, we have updated the coefficients of the color law polynomial, with a physically motivated constraint.
Our constraint is to make the assumption that the correlation between color and peak luminosity at IR wavelengths is dominated by dust extinction, not by color variation that is intrinsic to the SN. This is similar to the assumptions underpinning the "color excess model" developed by Phillips et al. (1999) and employed by Burns et al. (2011). To encode this assumption in the extrapolated SALT2 model, we want the revised color law to be close to the existing SALT2 color law up to 7000Å, and then at redder wavelengths the model should respond to changes in the color parameter c as if that color change is caused by dust extinction. To enforce this constraint, we set the color law polynomial coefficients such that for a SN with a moderate color parameter c = 0.1 we will get an extinction factor c × CL(λ) that behaves approximately like the Milky Way dust extinction curve from Cardelli et al. (1989) andO'Donnell (1994). Figure 7 shows the final SALT2-IR color law, given by the red curve, and its relationship to the original SALT2 color law (black) and the Milky Way dust extinction curve (blue).
Investigations of the use of NIR light curves for SNe Ia as standardizable candles have adopted other approaches for how to model the color-luminosity relationship (e.g., Mandel et al. 2009Mandel et al. , 2011   2011; Kattner et al. 2012;Dhawan et al. 2018). These studies have not found a strong correlation of NIR colors with peak luminosity that would invalidate our assumption. However, the available datasets are limited, and further work is certainly warranted to explore whether the structure of the SALT2 model should be modified to handle NIR colors in a fundamentally different way.

NIR Type Ia Supernova Data
To constrain the extrapolation of the SALT2 M 0 and M 1 components to IR wavelengths, we use optical and NIR photometric data from a low-z SN Ia sample to construct a set of synthetic SEDs based on the Hsiao et al.  Krisciunas et al. 2004;Valentini et al. 2003;Krisciunas et al. 2003;Pignata et al. 2008;Stanishev et al. 2007;Leloudas et al. 2009;Krisciunas et al. 2007). This sample consists of 86 spectroscopically confirmed SNe Ia in the redshift range 0.0028 < z helio < 0.0390 obtained during the years 1998-2011, and that passed the quality requirements (cuts) 0.8 < ∆m 15 < 1.6 mag, E(B − V ) host < 0.4 mag, E(B − V ) Milky Way < 1 mag, and only normal SNe Ia as identified by SNID. We further restrict the sample to exclude SNe with extreme values of their light-curve shape and color parameters. An ideal but unattainable sample would only contain SNe with fitting parameters x 1 = c = 0. To approximate this, we limit our sample to those SNe with SALT2  Figure 7.
Extrapolation of the SALT2 color law to IR wavelengths. The solid black line and dashed red line show the SALT2 color law multiplied by the SALT2 color parameter c (set to c = 0.1 for this plot), for the input SALT2 model and the modified SALT2-IR model, respectively. The blue dash-dot line shows the color excess A λ − AB as a function of wavelength λ for a dust extinction law with RV = 3.1, following Cardelli et al. (1989) andO'Donnell (1994). The SALT2-IR color law is designed to follow the original SALT2 color law closely until it reaches 7000Å, then approximate the A λ − AB curve at NIR wavelengths (Section 3.1.1). The SALT2-IR color law does not precisely equal the A λ − AB curve at NIR wavelengths as it is defined as a third-order polynomial, which is necessary to maintain the framework of the original SALT2 model . parameters of −1 < x 1 < 1 and −0.1 < c < 0.3. These cuts allow a close approximation to x 1 = c = 0, while maintaining a statistically significant sample of 45 low-z SNe for this analysis from the original 86.
For each SN in this sample, we generate a synthetic SN Ia SED time series that spans the entire wavelength range of interest, 1700-25,000Å, and is defined at every phase in which we have multiband photometric data. Each synthetic SED starts with the Hsiao spectrophotometric model (Hsiao et al. 2007), which is multiplied by a smooth function created with a "tension spline" (Renka 1987) to match the actual observer-frame colors of the SN in our light-curve sample (with appropriate K-corrections applied). These warped SEDs are "dereddened"-meaning that they are corrected for reddening due to dust extinction in the host galaxy and Milky Way dust along the line of sight. The E(B − V ) host-galaxy extinction is derived from the optical and NIR light-curve fits using the SNooPy code (Burns et al. 2011), and the Milky Way extinction is determined from the dust maps of Schlafly & Finkbeiner (2011)  The M 0 component of SALT2 is a reference SN Ia SED at each epoch, with the free parameters x 1 = 0, c = 0. The NIR extrapolation for any given phase is defined as the median flux at each wavelength from the full sample of all the input SN Ia SEDs (Figure 8). This new definition of M 0 is used in the parameterization of the SALT2 model beyond its present extent of 9200Å.
To extend the SALT2 M 1 component, the newlyextended M 0 component is adopted for wavelengths beyond the SALT2 range of 9200Å. For each input SN Ia SED, the best-fit values for the x 0 , x 1 , and c SALT2 fitting parameters, measured by the Pantheon analysis  , are used to solve the SALT2 model (Equation 1) for M 1 . Thus, for the i th input SN SED with known fitting parameters (x 0,i , x 1,i , c i ) and flux density F i (φ, λ), the M 1 component is given by (2) where M (i) 0 (φ, λ) is the parameter measured above and shown in Figure 8. Because the M 0 component is a function of phase and wavelength, we now have a set of M 1 values over a two-dimensional (2D) grid in phase and wavelength space, for each input SN Ia in our light-curve sample. The spacing of the grid in the phase dimension is defined by the spectral sampling of the input low-z SNe Ia, and the spacing in wavelength space is 10Å. A median of the M 1 grid across all 45 input objects is extracted, and a Savitzky-Golay smoothing function is applied with a 100Å smoothing window in wavelength and a 5-day window in time.
To make a smooth join with the existing template, a weighted average of the median curve with the existing SALT2 M 1 component is used, with the fractional weight given to the new median curve smoothly varying from 0 at 8500Å to 1 at 9200Å (Figure 9).

Extending SALT2 to Ultraviolet Wavelengths
For the extrapolation of SALT2 into the UV, we use the spectral model defined by (Foley et al. 2016, hereafter F16), where f 1.1 (0, λ) represents the spectrum of a nominal ∆m 15 = 1.1 mag SN Ia at peak phase, and s(0, λ) is the deviation from that spectrum for a hypothetical ∆m 15 = 2.1 mag SN Ia at peak. These parameters were measured by F16, and a table can be found in their electronic edition. 5 . In order to create a parameterized extrapolation for the SALT2 model (Equation 1), we recast the F16 model using the base SALT2 parameters M 0 , M 1 , x 0 , and x 1 . The F16 model is defined over a wavelength range of 1700-5695Å at peak only, while the SALT2 model extends down to 2000Å at phases of −20 to +50 days from peak. We do not modify the SALT2 color law on the UV side, because we do not have sufficient data about the UV color variation of SNe Ia to guide an informed extrapolation. Instead, we maintain the blueward linear extrapolation of the original SALT2 color law, as described in Section 3.1.1.

Components
We first merge the baseline spectral components of the F16 and SALT2 models using a weighted average of the f 1.1 parameter in F16 and the M 0 component of SALT2. This 2D weighted average is given by (4) Here w φ is the weighting function for the phase φ, and w λ is the weighting function for the wavelength λ. The function w φ varies smoothly from 0 (all original SALT2 M 0 ) at φ = −5, to 1 (all F16-defined M 0 ) at peak (φ = 0), back to 0 at φ = 10. The function w λ is 1 in the range 1700-2000Å where the original SALT2 is not defined, then varies smoothly from 1 at 2000Å to 0 at 3500Å, which marks the region where SALT2 becomes less reliable. The result of using this weighted average to perform the M 0 extrapolation is shown in Figure 10.
To modify the SALT2 M 1 component at UV wavelengths, we first fix the SALT2 color parameter c at zero, then require that the SALT2 model flux F at the time of peak brightness (Equation 1) must be equal to the F16 flux density f λ (Equation 3), for all wavelengths λ. Solving for the M 1 parameter as a scaled version of  Figure 11. Extrapolation of the SALT2 M1 model component to UV wavelengths at various phases from peak using Equation 5, and the weighting function defined by Equation 4. The blue line is the updated M1 component of the SALT2-UV model, and the orange line is the original M1 component of the SALT2 model. Note that for phases lower than −5 or greater than +10, as well as wavelengths greater than 3500Å, the model reverts back to the original SALT2 M1 component.
The same weighting functions over wavelength and phase described above for M 0 are used here for M 1 as well (Figure 11). These new SALT2 parameters can then be combined using Equation 1 to define the resulting flux density as a function of wavelength and phase (see Section 4).

UV and NIR Extrapolation of the SALT2 Dispersion, Variance, and Covariance
Finally, to complete the extrapolation of the SALT2 model into NIR and UV wavelengths, we extend the dispersion, variance, and covariance components of the SALT2 model. To make the model suitable for precision cosmology applications, one would need to execute a full retraining of the SALT2 model with a large sample of UV and NIR SN Ia light curves. That is beyond the scope of this work, since we are only aiming to modify the model for the purposes of simulation and classification. Therefore, we adopt simple linear extrapolations of the dispersion, variance, and covariance tables instead.
The variance and covariance for the M 0 and M 1 components are encoded in SALT2 as 2D arrays, over wavelength and phase. We treat each phase independently, and extrapolate to both UV and IR wavelengths by holding flat at a constant value, matching the value of the existing SALT2 model at 3500Å and 8500Å ( Figure A4). Our extrapolations apply to the variance and covariance components used when applying the SALT2 model to broadband light curves (Guy et al. 2010). The SALT2 model also allows for a separate set of 2D arrays that define the spectral variance and covariance, which can be used for simultaneously fitting an observed SN spectrum alongside the light-curve fitting (Guy et al. 2007). We have not modified the spectral variance and covariance components, because we do not intend for this extension of the SALT2 model to be used for spectral fitting.
The dispersion of the SALT2 model is characterized by a light-curve dispersion scaling array -a 2D grid in phase and wavelength -and also a color dispersion array. The latter accounts for the uncertainty in the model due to limited color information, and also encodes the expected intrinsic scatter in SNe Ia that is color dependent. On the NIR side we apply a linear extrapolation that has both of these dispersion components decreasing toward increasing wavelengths, to reflect the understanding that SNe Ia are better standard candles at NIR wavelengths (e.g., Dhawan et al. 2017). On the UV side, we we use a flat-line extrapolation -holding the value at 3500Å constant over all UV wavelengths down to 1700Å. These extrapolations are shown in Figure A5. When the SALT2 model is used to generate a simulated population of SNe Ia it is necessary to add additional scatter to the simulated light curves, reflecting the intrinsic scatter in SN Ia luminosities of σ int ≈ 0.1 mag (Chotard et al. 2011;Scolnic et al. 2014;Kessler & Scolnic 2017;Zheng et al. 2018). Simulations using our extrapolated SALT2 model should reflect the understanding that the intrinsic scatter in SN Ia luminosities is lower at NIR wavelengths than at visible bands. As a simple way to implement this, we suggest adopting an intrinsic scatter model that is fixed to a specific value at  Figure 12. A representative set of the results produced by the SNSEDextend package, for CC SNe at peak brightness. In each panel the original SED flux density (black) has been normalized, and the shaded regions represent the flux through each bandpass that has been set by the SNSEDextend package to match the broad-band colors measured in Sections 2.3 and 2.5. optical wavelengths (e.g., σ int,opt = 0.1), and decreases linearly to a fixed value at 25,000Å (e.g., σ int,ir = 0.02). 6

RESULTS AND DISCUSSION
The primary output of this work is the open-source SNSEDextend software package, which is written in Python (Pierel et al. 2018) 7 . The package makes extensive use of the SNCosmo Python package for fitting, calculations, its template library, and more. SNSEDextend is fully documented, and gives users the capability to generate color curves as in Section 2.3 with their own data, and use their own SN templates to produce SED extrapolations into the UV and IR. Using the new opensource SNSEDextend package, we have produced an initial set of 47 SEDs for SNe II, Ib, and Ic, plus an extrapolated version of the SALT2 model for SNe Ia (Figures  12, 13). The fully documented and complete repository of these SEDs can be found at an online repository 8 .
Time-domain science is a key driver in the design of the next generation of observatories, including LSST, 6 This capability has been implemented in releases of the SNANA software for v10.61b or later, and is activated by setting multiple values for the SIGCOH variable in the SALT2.INFO file.
JWST, and WFIRST. These telescopes will provide the community with thousands of new SN observations, many of which will include rest-frame UV and NIR photometry. (e.g., Mesinger & Johnson 2006;Oguri & Marshall 2010;Najita et al. 2016;Hounsell et al. 2017). The WFIRST mission, for example, could observe as many as 8,000 SNe at z < 0.8 with filters covering a rest-frame wavelength range of ∼ 7000-20,000Å (Hounsell et al. 2017). The new repository of empirically derived SED extrapolations presented here is immediately useful for simulations of these future SN surveys, which are used to optimize survey strategies.
The huge number of SN discoveries coming in the next decade will necessitate photometric classifications (e.g., Kessler et al. 2010;Sako et al. 2011;Campbell et al. 2013;Jones et al. 2018), as it will not be possible to perform spectroscopic follow-up observations for each object. The extension of the SN SED template library into rest-frame UV and NIR wavelengths may be especially valuable for photometrically isolating SNe Ia because of their distinguishing spectrophotometric features in those regions. At UV wavelengths, SNe Ia exhibit a distinct flux deficit relative to CC SNe (Riess et al. 2004;Milne et al. 2013). In NIR bands, SNe Ia are considered to be excellent standard candles (Dhawan et al. 2017) and exhibit a distinctive secondary maximum in their broadband light curves (e.g., Leibundgut 1988;Ford et al. 1993). A full examination of the accuracy and efficiency of the improvement to photometric classifications is beyond the scope of this work. We have, however, made a preliminary exploration of how the extrapolated SED library will affect color-based classifications with JWST, WFIRST, and LSST (Figures 14, 15, 16). Using UV-NIR colors at peak brightness (an approach similar to the single-epoch classifications of Poznanski et al. (2007)), the next generation of telescopes will now be able to distinguish a SN Ia from a CC SN with 95% confidence over 47% (JWST), 47% (WFIRST), and 44% (LSST) of the redshift ranges shown in Figures 14, 15, and 16, respectively. These rates are a significant improvement upon what was previously possible over the same redshift ranges: 21% (JWST), 25% (WFIRST), and 37% (LSST).
To continue improving the extrapolated SED templates, the most valuable additions will be from wellsampled NIR light curves of CC SNe and UV light curves of SNe Ia. Aided by the publicly available SNSEDextend software package, new photometric time-series data can be easily adopted to update the SED templates. These improvements can propagate into more informative simulations for the optimization of future SN surveys, and more accurate photometric classification tools for the

SNCosmo Fitting
Using the classifications and redshifts provided by the sources of these data, the SNe are separated by subtype, and their light-curve data in magnitudes are converted into fluxes. The SNCosmo package is used to estimate a time of peak luminosity (t 0 ) for each SN by fitting models of matching classification and incorporating that SNs measured redshift from Table A1. For each SN, light-curve points more than 50 days from t 0 are removed, as those are beyond the temporal extent of our SEDs.
Once the initial estimate of t 0 is found, the light curves and initial parameters are provided to the SNSEDextend package, which completes the fitting process. At this point the redshift, SN subtype, and Milky Way E(B − V ) (mag) parameters are all incorporated into the light-curve fitting based on the information provided in the literature for these SNe (Table A1). The R V parameter for both the host and Milky Way galaxies are set to 3.1, and the host E(B − V ) is given reasonable bounds of ±1 (Cardelli et al. 1989;O'Donnell 1994). With all of these parameters in place, the SNSEDextend package chooses the best-fit SNCosmo model from the original set matching the SN classification ( Figure  A3), and uses it to generate color tables for each SN subtype (see Section 2.3). 1. Use the fitted light-curve model from Section 2.2 to interpolate the color reference bands (B or r ) to the epochs where observations exist in the extrapolation anchor bands (U , u , J, H, K).

Color-Table Generation
2. Define a color (e.g., r − J) from the difference of the interpolated magnitude in the reference band and the observed magnitude in the extrapolation anchor band.
3. All SNe of like classification (e.g., all SNe Ic) are collected together to make a merged table of dereddened colors, an example of which is reported in Table A2.
4. First-and second-order polynomials are fit to each discrete, time-dependent color curve (i.e., U − B, r − JHK). The best-fit polynomial is determined by minimizing the Bayesian Information Criterion (BIC), and the median model is extracted from posterior predictive fitting for use in extrapolation (Salvatier et al. 2015). The curve flattens outside the edges of our data points, as we have no constraints in those regions and previous work suggests that the slope of a color curve far from peak diverges from the peak color-curve slope (Krisciunas et al. 2009).    Wavelength (Å)  Color Dispersion Scaling Figure A5. Extrapolation of the SALT2 dispersion tables to UV and IR wavelengths. The top panel shows the light-curve dispersion scaling and the bottom panel shows the color dispersion scaling array. In both panels the pre-existing dispersion arrays are plotted as thick gray lines, and the newly extrapolated versions are shown as thin dashed lines. For the top panel, color-coding indicates the phase being plotted. In both cases, on the NIR side the extrapolation begins at 8500Å and extends with a downward linear extrapolation to 2.5 µm. On the UV side we apply a "flat-line" extrapolation, holding the SALT2 value at 3500Å constant down to 1700Å.