My question regards the error with which I measure the best redshift (let's call it as $z_{best}$). In fact, MUSE provides also an error for each pixel and for each wavelength, $\sigma_{ij}$ (simplifying the notation, actually it should be written as $\sigma_{S_{ij}}$). I have propagated these error through the cross-correlation relation:
$$X_{ik} = \frac{\sum_j S_{ij}T_{jk}}{\sqrt{\sum_jS_{ij}^2\cdot\sum_jT_{jk}^2}} = \frac{\sum_j S_{ij}T_{jk}}{\sqrt{SSS_i\cdot SST_k}} = \frac{\sum_j S_{ij}T_{jk}}{N_{ik}}$$
where $$X_{ik} = \frac{\sum_j S_{ij}T_{jk}}{\sqrt{\sum_jS_{ij}^2\cdot\sum_jT_{jk}^2}} = \frac{\sum_j S_{ij}T_{jk}}{\sqrt{SSS_i\cdot SST_k}} = \frac{\sum_j S_{ij}T_{jk}}{N_{ik}} $$ where $X_{ik}$ is the cross-correlation related to the pixel $i$, to the redshift $z_k$, $SSS_i$ and $SST_k$ are the sum of the squared of the spectra relate to the pixel $i$ (or template related to the redshift $z_k$), $N_{ik}$ is a normalization coefficient.
Using the error-propagation rules, and assuming the templates without error, I have an error on $X_{ik}$:
$$\sigma_{X_{ik}}^2 = \sum_j \Big(\frac{\partial X_{ik}}{\partial S_{ij}}\Big)^2\sigma_{ij}^2 = \frac{\sum_j\sigma_{ij}^2T_{jk}^2}{N_{ik}^2} + \frac{X_{ik}^2SST_k^2\sum_jS_{ij}\sigma_{ij}^2}{N_{ik}^4} - 2 \frac{X_{ik}SST_k\sum_j(S_{ij}\sigma_{ij}^2)T_{jk}}{N_{ik}^3}$$
The
$$\sigma_{X_{ik}}^2 = \sum_j \Big(\frac{\partial X_{ik}}{\partial S_{ij}}\Big)^2\sigma_{ij}^2 = \frac{\sum_j\sigma_{ij}^2T_{jk}^2}{N_{ik}^2} + \frac{X_{ik}^2SST_k^2\sum_jS_{ij}\sigma_{ij}^2}{N_{ik}^4} - 2 \frac{X_{ik}SST_k\sum_j(S_{ij}\sigma_{ij}^2)T_{jk}}{N_{ik}^3}
$$
The code has been implemented using python
and tensorflow
(tf
) in order to exploit the GPU:
The follow image is the cross-correlation function for a pixel, i.e. $X_{ik}$ for a fixed $i$, $\forall k$, and the area between $\pm3\sigma$ is filled in grey:
What do you think?
Thanks!