Finished inverse variance function

Added code to add the sky flux to the error for the generation of the
inverse variance