Commit cf5d7a00 authored by EPINAT Benoit's avatar EPINAT Benoit
Browse files

Update string format for logger info

parent 162d6181
...@@ -975,7 +975,7 @@ def buildmaps(conf, cube, hdr, var=None, plot=False, debug=False, free_ratio=Fal ...@@ -975,7 +975,7 @@ def buildmaps(conf, cube, hdr, var=None, plot=False, debug=False, free_ratio=Fal
for i in range(len(parinfo)): for i in range(len(parinfo)):
params[i] = parinfo[i]['value'] params[i] = parinfo[i]['value']
logger.info(' Buildmaps: initial parameters % s' % (str(params))) logger.info(' Buildmaps: initial parameters {}'.format(str(params)))
# Output initialisation to be filled # Output initialisation to be filled
paramscube = np.zeros(np.append(len(params), cube.shape[1:]), dtype='>f4') paramscube = np.zeros(np.append(len(params), cube.shape[1:]), dtype='>f4')
...@@ -1079,7 +1079,7 @@ def buildmaps(conf, cube, hdr, var=None, plot=False, debug=False, free_ratio=Fal ...@@ -1079,7 +1079,7 @@ def buildmaps(conf, cube, hdr, var=None, plot=False, debug=False, free_ratio=Fal
modcube[indok, y, x] = elspectrum(fit.params, wave=wave, lines=linewaves, psf=conf['SPSF'], degc=conf['DGCTNUM'], zind=zind, sigind=sigind, intind=intind, ratioind=ratioind, contind=contind) modcube[indok, y, x] = elspectrum(fit.params, wave=wave, lines=linewaves, psf=conf['SPSF'], degc=conf['DGCTNUM'], zind=zind, sigind=sigind, intind=intind, ratioind=ratioind, contind=contind)
tff = time.time() tff = time.time()
logger.debug('Execution time: %3.1f' % (tff - tii)) logger.debug('Execution time: {:3.1f}'.format(tff - tii))
#print(tt) #print(tt)
#Creating outputs #Creating outputs
...@@ -1400,7 +1400,7 @@ def camel(filename, plot=False, debug=False, free_ratio=False, multi_comp=1, mul ...@@ -1400,7 +1400,7 @@ def camel(filename, plot=False, debug=False, free_ratio=False, multi_comp=1, mul
#Clipping the cube #Clipping the cube
if (conf['SCLIP'] != 0) & (conf['SCLIP'] is not None): if (conf['SCLIP'] != 0) & (conf['SCLIP'] is not None):
logger.info('Performing %3.1f-sigma clipping using box of size %i. Number of pass: %i' % (conf['SCLIP'], conf['XYCLIP'], conf['NCLIP'])) logger.info('Performing {:3.1f}-sigma clipping using box of size {:d}. Number of pass: {:d}'.format(conf['SCLIP'], conf['XYCLIP'], conf['NCLIP']))
cube, hdr = clipcube(cube, hdr, xy=conf['XYCLIP'], sclip=conf['SCLIP'], npass=conf['NCLIP']) cube, hdr = clipcube(cube, hdr, xy=conf['XYCLIP'], sclip=conf['SCLIP'], npass=conf['NCLIP'])
hdr = writedata(cube, hdr, conf['OUTPUT'] + '_cube_cut_clip.fits') hdr = writedata(cube, hdr, conf['OUTPUT'] + '_cube_cut_clip.fits')
wlih = muse_whitelight_image(cube, hdr, conf['OUTPUT'] + '_cut_clip_whitelight.fits') wlih = muse_whitelight_image(cube, hdr, conf['OUTPUT'] + '_cut_clip_whitelight.fits')
...@@ -1409,7 +1409,7 @@ def camel(filename, plot=False, debug=False, free_ratio=False, multi_comp=1, mul ...@@ -1409,7 +1409,7 @@ def camel(filename, plot=False, debug=False, free_ratio=False, multi_comp=1, mul
#Smoothing the cubes #Smoothing the cubes
if (conf['WSMOOTH'] != 0) & (conf['WSMOOTH'] is not None): if (conf['WSMOOTH'] != 0) & (conf['WSMOOTH'] is not None):
logger.info('Performing %3.1f pixels 1D spectral smoothing' % conf['WSMOOTH']) logger.info('Performing {:3.1f} pixels 1D spectral smoothing'.format(conf['WSMOOTH']))
cube, hdr = spectralsmooth(cube, hdr, conf['WSMOOTH']) cube, hdr = spectralsmooth(cube, hdr, conf['WSMOOTH'])
conf['OUTPUT'] = conf['OUTPUT'] + '_wsmooth' conf['OUTPUT'] = conf['OUTPUT'] + '_wsmooth'
hdr = writedata(cube, hdr, conf['OUTPUT'] + '_cube.fits') hdr = writedata(cube, hdr, conf['OUTPUT'] + '_cube.fits')
...@@ -1422,7 +1422,7 @@ def camel(filename, plot=False, debug=False, free_ratio=False, multi_comp=1, mul ...@@ -1422,7 +1422,7 @@ def camel(filename, plot=False, debug=False, free_ratio=False, multi_comp=1, mul
varhdr = writedata(var, varhdr, conf['OUTPUT'] + '_var.fits') varhdr = writedata(var, varhdr, conf['OUTPUT'] + '_var.fits')
if (conf['SSMOOTH'] != 0) & (conf['SSMOOTH'] is not None): if (conf['SSMOOTH'] != 0) & (conf['SSMOOTH'] is not None):
logger.info('Performing %3.1f pixels 2D gaussian spatial smoothing' % conf['SSMOOTH']) logger.info('Performing {:3.1f} pixels 2D gaussian spatial smoothing'.format(conf['SSMOOTH']))
cube, hdr = spatialsmooth(cube, hdr, conf['SSMOOTH']) cube, hdr = spatialsmooth(cube, hdr, conf['SSMOOTH'])
conf['OUTPUT'] = conf['OUTPUT'] + '_ssmooth' conf['OUTPUT'] = conf['OUTPUT'] + '_ssmooth'
hdr = writedata(cube, hdr, conf['OUTPUT'] + '_cube.fits') hdr = writedata(cube, hdr, conf['OUTPUT'] + '_cube.fits')
......
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