Skip to content
Snippets Groups Projects
Commit 02dcbc89 authored by Romain Fetick's avatar Romain Fetick
Browse files

update psffit printer

parent 484fc18d
No related branches found
No related tags found
No related merge requests found
......@@ -129,8 +129,8 @@ def psffit(psf,model,x0,weights=None,dxdy=(0.,0.),flux_bck=(True,True),
def __init__(self):
self.iter = 0
def __call__(self,y):
if (self.iter%3)==0:
print("-",end="")
if (self.iter%5)==0:
print("\rPSFFIT iteration %3u"%self.iter,end="")
self.iter += 1
x, dxdy = mini2input(y)
mm = model(x, dx=dxdy[0], dy=dxdy[1], **kwargs)
......@@ -175,7 +175,8 @@ def psffit(psf,model,x0,weights=None,dxdy=(0.,0.),flux_bck=(True,True),
result = least_squares(cost, input2mini(x0,dxdy), bounds=get_bound(model))
print("") #finish line of "-"
msg = result.message[0:min(len(result.message),12)]
print("\rPSFFIT finished %3u iter, msg:%s..."%(cost.iter,msg))
result.x, result.dxdy = mini2input(result.x) #split output between x and dxdy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment