Skip to content

Commit

Permalink
Fix mesh not to extend beyond image borders. Re-enable AAVSO comparis…
Browse files Browse the repository at this point in the history
…on stars by default on Colab.
  • Loading branch information
ivenzor committed Nov 26, 2024
1 parent c0ff449 commit 9eb5678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exotic/api/colab.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def make_inits_file(planetary_params, image_dir, output_dir, first_image, targ_c
"Observing Notes": "%s",
"Plate Solution? (y/n)": "y",
"Add Comparison Stars from AAVSO? (y/n)": "n",
"Add Comparison Stars from AAVSO? (y/n)": "y",
"Target Star X & Y Pixel": %s,
"Comparison Star(s) X & Y Pixel": %s,
Expand Down
4 changes: 3 additions & 1 deletion exotic/exotic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,9 @@ def aperPhot(data, starIndex, xc, yc, r=5, dr=5):

def skybg_phot(data, starIndex, xc, yc, r=10, dr=5, ptol=99, debug=False):
# create a crude annulus to mask out bright background pixels
xv, yv = mesh_box([xc, yc], np.round(r + dr))
# the box will not extend beyond the borders of the image
image_height, image_width = data.shape
xv, yv = mesh_box([xc, yc], np.round(r + dr), maxx=image_width, maxy=image_height)
rv = ((xv - xc) ** 2 + (yv - yc) ** 2) ** 0.5
mask = (rv > r) & (rv < (r + dr))
try:
Expand Down

0 comments on commit 9eb5678

Please sign in to comment.