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

Extract photometric measurements for Tails detections from *sexcat.fits #9

Open
dmitryduev opened this issue Aug 21, 2021 · 0 comments
Assignees

Comments

@dmitryduev
Copy link
Owner

dmitryduev commented Aug 21, 2021

The ZTF Sentinel service should extract photometric measurements for Tails detections from the corresponding *sexcat.fits files and post them to Fritz. This would "activate" the MPC search button under the Surveys tab, potentially saving a lot of time.

For bookkeeping:

from astropy.io import fits
import numpy as np

fits_file = "*sexcat.fits"

with fits.open(fits_file) as hdu:
    data = hdu[1].data

xy = list(zip(data["XWIN_IMAGE"], data["YWIN_IMAGE"]))

det = (2788.15, 1345.99)

distances = []
for x, y in xy:
    distances.append(np.sqrt((det[0] - x)**2 + (det[1] - y)**2))

distances = np.array(distances)
closest = np.argmin(distances)

MAG_ZP = 27.4922460092007

mag = data["MAG_BEST"][closest] + MAG_ZP
@dmitryduev dmitryduev self-assigned this Aug 21, 2021
@dmitryduev dmitryduev changed the title Extract photometric measurements for Tails detections from sexcat.fits Extract photometric measurements for Tails detections from *sexcat.fits Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant