Commit 97f4dc2a authored by bepinat's avatar bepinat

compteur

parent 448d192a
......@@ -632,10 +632,16 @@ def buildmaps(conf, cube, hdr, var=None, plot=False, debug=False, free_ratio=Fal
#Loop on pixels
counter = 0
number_of_pixels = cube.shape[2] * cube.shape[1]
fac_prev = -1
number_of_pixels = np.float(cube.shape[2] * cube.shape[1])
for x in range(cube.shape[2]):
for y in range(cube.shape[1]):
if (counter / 10.) == np.int(counter / 10.): print('pixel %i / %i'%(counter, number_of_pixels))
if np.int((counter / number_of_pixels) * 100) != fac_prev:
fac_prev = np.int((counter / number_of_pixels) * 100)
sys.stdout.write("Progress => {:3d}%\r".format(fac_prev))
sys.stdout.flush()
#if (counter / 10.) == np.int(counter / 10.): print('pixel %i / %i'%(counter, number_of_pixels))
counter += 1
fa['spectrum'] = cube[indok,y,x] # Spectrum
fa['err'] = np.sqrt(var[indok,y,x]) # Error
......
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