.. _book_fig_chapter7_fig_PCA_reconstruction: SDSS Reconstruction from Eigenspectra ------------------------------------- Figure 7.7 The principal component vectors defined for the SDSS spectra can be used to interpolate across or reconstruct missing data. Examples of three masked spectral regions are shown comparing the reconstruction of the input spectrum (black line) using the mean and the first ten eigenspectra (blue line) The gray bands represent the masked region of the spectrum. .. image:: ../images/chapter7/fig_PCA_reconstruction_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_PCA_reconstruction.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_PCA_reconstruction.py :lines: 12- .. raw:: html
:download:`[download source: fig_PCA_reconstruction.py] ` .. raw:: html