Skip to content

Commit

Permalink
Set imposter mag to 20.0 if count rate is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Dec 17, 2018
1 parent 9185a7e commit d5ce279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions proseco/characteristics_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# Add this padding to region checked for bad pixels (in addition to dither)
dither_pix_pad = 0.4

# Minimum imposter mag (if dark current is 0 set explicitly to this value)
min_imposter_mag = 20.0

CCD = {'row_min': -512.0,
'row_max': 512.0,
'col_min': -512.0,
Expand Down
2 changes: 1 addition & 1 deletion proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def get_imposter_mags(cand_stars, dark, dither):
idx = np.unravel_index(np.argmax(bin_image), bin_image.shape)
max_r = rminus + row_off + idx[0] * 2
max_c = cminus + col_off + idx[1] * 2
pixmax_mag = count_rate_to_mag(pixmax)
pixmax_mag = count_rate_to_mag(pixmax) if pixmax > 0 else GUIDE_CHAR.min_imposter_mag
pixmags.append(pixmax_mag)
pix_r.append(max_r)
pix_c.append(max_c)
Expand Down

0 comments on commit d5ce279

Please sign in to comment.