Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return amplitude list to allow photometric comparison #12

Merged
merged 2 commits into from
May 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions psfr/psfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def stack_psf(star_list, oversampling=1, mask_list=None, error_map_list=None, sa
else:
mask_list_one_step = None
for j in range(num_iteration):
psf_guess = one_step_psf_estimate(star_list, psf_guess, center_list, mask_list_one_step,
psf_guess, amplitude_list = one_step_psf_estimate(star_list, psf_guess, center_list, mask_list_one_step,
error_map_list=error_map_list, oversampling=oversampling,
**kwargs_psf_stacking, **kwargs_one_step)
if j % n_recenter == 0 and j != 0:
Expand Down Expand Up @@ -145,7 +145,7 @@ def _updatefig(i):
anim.save(animation_options['output_dir'])
plt.close()

return psf_guess, center_list, mask_list
return psf_guess, center_list, mask_list, amplitude_list


def one_step_psf_estimate(star_list, psf_guess, center_list, mask_list=None, error_map_list=None, oversampling=1,
Expand Down Expand Up @@ -297,7 +297,7 @@ def one_step_psf_estimate(star_list, psf_guess, center_list, mask_list=None, err
amplitude_list=amplitude_list, error_map_list=error_map_list_psf,
**psf_stacking_options)
kernel_new = kernel_util.cut_psf(kernel_new, psf_size=len(psf_guess))
return kernel_new
return kernel_new, amplitude_list


def psf_error_map(star_list, psf_kernel, center_list, mask_list=None, error_map_list=None, oversampling=1):
Expand Down