5.3.5 External calibration of the spectra
Author(s): Paolo Montegriffo
As the BP/RP spectra are not published in Gaia EDR3, the detailed description of this process is postponed to the forthcoming DR3 release. However, the externally calibrated mean BP/RP spectra have been used for the calibration of the BP/RP photometry (see Section 5.4.1), hence here a short summary is given on the instrument model used to calibrate the spectra and how it was applied.
The equation that describes the formation of the dispersed image in the focal plane of the BP and RP instruments can be summarised as follow:
$${n}_{p}(u)={\int}_{0}^{\mathrm{\infty}}{n}_{p}(\lambda )L(uD(\lambda ),\lambda )R(\lambda )d\lambda $$  (5.1) 
where:

•
$u$ defines the location in the AL reference system, this is sometimes referred to as pseudowavelength;

•
${n}_{p}(u)$ is the internally calibrated mean source spectrum in units of ${e}^{}{s}^{1}$;

•
${n}_{p}(\lambda )$ is the photon flux of the source SED expressed in units of $photons{s}^{1}{m}^{2}n{m}^{1}$;

•
$L(u,\lambda )$ is the effective monochromatic Line Spread Function (LSF);

•
$D(\lambda )$ is the dispersion function;

•
$R(\lambda )$ is the overall instrument response function;
The LSF model is based on a linear combination of the product of two sets of basis functions modelling respectively the AL and the wavelength dependency; these bases have been derived with the Generalised Principal Component Analysis on a large set of theoretical LSFs, where also the expanded wings are taken into account, and that can also be interpolated to obtain a more continuous representation.
Prelaunch dispersion functions of the BP/RP prisms based on chiefray analysis were derived from fitting a ${6}^{th}$ degree polynomial to the unperturbed EADSAstrium Gaia optical design. For each field of view, dispersion functions are provided for the centre of each CCD in the form of the coefficients ${A}_{i}$ of the expansion
$$AL(\omega )AL({\omega}_{ref})=\sum _{i=0}^{N}{A}_{i}{\omega}^{i},$$  (5.2) 
where

•
$AL=AL(\omega )$ denotes the AL image position in mm (in the direction of Y axis of the Focal Plane Reference System, see Section 3.4.13),

•
$\omega =1/\lambda $ in $n{m}^{1}$ denotes the inverse wavelength, and

•
${\omega}_{ref}=1/440n{m}^{1}$ for BP and $1/800n{m}^{1}$ for RP.
The mean instrument dispersion function model has been defined as
$$D(\lambda )={d}_{0}+{d}_{1}\cdot \left[\frac{1}{{P}_{AL}}\sum _{i=0}^{N}{A}_{i}\frac{1}{{\lambda}^{i}}\right]$$  (5.3) 
where

•
$D(\lambda )$ denotes the AL image position in pixel units;

•
model parameters ${d}_{0}$ and ${d}_{1}$ represent respectively the wavelength zeropoint and scale: the zeropoint is by construction the AL position corresponding to the reference wavelength. The default values assumed are ${d}_{0}=30$ and ${d}_{1}=1.0$ for both XP instruments.
The dispersion function is provided for both BP and RP instruments as a single csv file tabulated for wavelengths ranging from 320 nm to 1100 nm and step 0.5 nm.
The response model is built as a combination between a model for the nominal response with a parametrised cutoff and a distortion model to account for the deviations between this and the current response
$$R(\lambda )={R}_{Nom}(\lambda )\times {R}_{d}(\lambda )$$  (5.4) 
The nominal photonic response for XP instruments is modelled as the product of the following quantities:
$${R}_{Nom}(\lambda )={T}_{0}(\lambda ){\rho}_{att}(\lambda )Q(\lambda ){T}_{p}(\lambda )$$  (5.5) 
where

1.
${T}_{0}(\lambda )$ is the telescope (mirrors) reflectivity;

2.
${\rho}_{att}(\lambda )$ is the attenuation due to rugosity (smallscale variations in smoothness of the surface) and molecular contamination of the mirrors;

3.
$Q(\lambda )$ is the CCD QE;

4.
${T}_{p}(\lambda )$ is the prism (fused silica) transmittance curve which includes filter coating on their surface.
Using standard stars (see Section 5.6), it is finally possible to reconstruct the model that allows to calibrate the mean spectra: Equation 5.1 can be rewritten in a more compact form as
$${n}_{p}(u)=\underset{0}{\overset{\mathrm{\infty}}{\int}}K(u,\lambda )\cdot {n}_{p}(\lambda )d\lambda $$  (5.6) 
where the kernel $K$ is a combination of LSF, dispersion and response models, and ${n}_{p}(\lambda )$ denotes the source SED in unit of $photon{s}^{1}n{m}^{1}{m}^{2}$.
If the source SED is expressed in some parametric form, for instance as a linear combination of basis functions, this equation could in principle be solved. However, Equation 5.6 is a Fredholm integral equation of the first kind and its solution is complicated by the fact that the problem is essentially illconditioned: the observed spectrum ${n}_{p}(u)$ is affected by noise, hence there are many solutions which satisfy exactly an integral solution slightly perturbed from the original.
To overcome this problem, the fact that the left hand term of the equation is written as a linear combination of Hermite functions ${\phi}_{i}$, can be exploited and it can be demonstrated that the source SED itself can be expressed as a linear combination of a special set of basis functions ${\varphi}_{i}$ called inverse bases obtained by solving the integral equations:
$${\phi}_{i}\left(\frac{u{u}_{0}}{a}\right)=\underset{0}{\overset{\mathrm{\infty}}{\int}}K(u,\lambda )\cdot {\varphi}_{i}(\lambda )d\lambda $$  (5.7) 
where ${u}_{0}$ is the AL centre of the Hermite functions and $a$ is a proper scaling factor used in the mean spectra representation. The advantage of this approach is that the left hand terms of Equation 5.7 are analytic functions not affected by noise, and hence numerically stable solutions can be derived for each inverse basis.