Skip to content

Commit

Permalink
moved self.err ==None into SpectractorSim
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvielsstfr committed Apr 30, 2018
1 parent 5069127 commit b04d36e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spectroscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def calibrate_spectrum_with_lines(self):

def save_spectrum(self,output_filename,overwrite=False):
hdu = fits.PrimaryHDU()

hdu.data = [self.lambdas,self.data,self.err]
self.header['UNIT1'] = "nanometer"
self.header['UNIT2'] = self.units
Expand All @@ -503,6 +504,7 @@ def load_spectrum(self,input_filename):
if self.header['UNIT2'] != "":
self.units = self.header['UNIT2']
self.my_logger.info('\n\tSpectrum loaded from %s' % input_filename)
hdu.close() # need to free allocation for file descriptor
else:
self.my_logger.info('\n\tSpectrum file %s not found' % input_filename)

Expand Down

0 comments on commit b04d36e

Please sign in to comment.