Write linear fits

Adding a basic linear fits writer, and adding tests
it should take a spectrum1d object