Commit d9609639 authored by bepinat's avatar bepinat

bug correction

parent bda825a9
......@@ -492,10 +492,10 @@ def waveindgen(hdr):
if cunit.strip().lower() in {'microns', 'micron', 'micrometers', 'mum'}: lconvfac=1e4
if cunit.strip().lower() in {'angstroms', 'angstrom'}: lconvfac=1
if cunit.strip().lower() in {'nanometers', 'nm'}: lconvfac=1e3
if 'CDELT3' in hdr.keys():
sclp = hdr['CDELT3']
elif 'CD3_3' in hdr.keys():
if 'CD3_3' in hdr.keys():
sclp = hdr['CD3_3']
elif 'CDELT3' in hdr.keys():
sclp = hdr['CDELT3']
wave = lconvfac * (sclp * (np.arange(hdr['NAXIS3']) - hdr['CRPIX3'] + 1) + hdr['CRVAL3'])
return wave, lconvfac, sclp
......@@ -831,7 +831,6 @@ def buildmaps(conf, cube, hdr, var=None, plot=False, debug=False, free_ratio=Fal
fa['spectrum'] = cube[indok,y,x] # Spectrum
fa['err'] = np.sqrt(var[indok,y,x]) # Error
#fa['weight'] = np.sqrt(weight[indok,y,x]) # Weight
if (np.min(fa['spectrum']) == np.max(fa['spectrum'])) & (np.min(fa['spectrum']) == 0): continue # No need for fitting
minfnorm = np.infty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment