Skip to content

Commit

Permalink
Merge pull request #168 from carlgogo/master
Browse files Browse the repository at this point in the history
Fixing recentering with 2d Moffat
  • Loading branch information
carlos-gg authored Apr 16, 2018
2 parents b90a38c + 0a5c86d commit 9a6c001
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vip_hci/preproc/recentering.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,12 +987,14 @@ def _centroid_2dm_frame(cube, frnum, size, pos_y, pos_x, negative, debug,
"""
sub_image, y1, x1 = get_square(cube[frnum], size=size, y=pos_y, x=pos_x,
position=True)
sub_image = sub_image.byteswap().newbyteorder()
# negative fit
if negative:
sub_image = -sub_image + np.abs(np.min(-sub_image))

y_i, x_i = fit_2dmoffat(sub_image, y1, x1, full_output=False)
y_i, x_i = fit_2dmoffat(sub_image, crop=False, fwhm=fwhm, debug=debug,
threshold=threshold, full_output=False)
y_i = y1 + y_i
x_i = x1 + x_i
return y_i, x_i


Expand Down

0 comments on commit 9a6c001

Please sign in to comment.