Skip to content

Commit

Permalink
Added TYCHO2 magnitudes to output of target_star
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Jun 23, 2024
1 parent 93b0244 commit fce3973
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

|PyPI Status| |Python Versions| |CI Status| |Docs Status| |Code Coverage| |Code Quality| |License|

*calistar* is a tool to search for a single calibration star. For example to be used for reference-star differential imaging or aperture masking interferometry. The package has been released on `PyPI <https://pypi.org/project/calistar/>`_ and is actively developed and maintained on Github.
*calistar* is a tool to search for a calibration star. For example to be used for reference-star differential imaging or aperture masking interferometry. The package has been released on `PyPI <https://pypi.org/project/calistar/>`_ and is actively developed and maintained on Github.

Documentation
-------------
Expand Down
58 changes: 53 additions & 5 deletions calistar/calistar.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ def target_star(
print("\n-> Querying VizieR...\n")

vizier_obj = Vizier(
columns=["*", "+_r"],
catalog=["II/246/out", "II/328/allwise", "II/311/wise"],
columns=["*", "+_r", "BTmag", "e_BTmag", "VTmag", "e_VTmag"],
catalog=["I/259/tyc2", "II/246/out", "II/328/allwise", "II/311/wise"],
timeout=10.0,
row_limit=1,
)
Expand All @@ -568,10 +568,58 @@ def target_star(
f"GAIA {self.gaia_release} {self.gaia_source}", radius=radius
)

# TYCHO data from VizieR

if "I/259/tyc2" in vizier_result.keys():
vizier_tycho = vizier_result["I/259/tyc2"]
else:
vizier_tycho = None

if vizier_tycho is not None:
vizier_tycho = vizier_tycho[0]

print(f"TYCHO source ID = {vizier_tycho['TYC1']}-{vizier_tycho['TYC2']}-{vizier_tycho['TYC3']}")

print(
f"Separation between Gaia and TYCHO source = "
f"{1e3*vizier_tycho['_r']:.1f} mas"
)

if np.ma.is_masked(vizier_tycho["e_BTmag"]):
if not np.ma.is_masked(vizier_tycho["BTmag"]):
print(f"\nTYCHO BT mag = >{vizier_tycho['BTmag']:.3f}")

else:
print(
f"\nTYCHO BT mag = {vizier_tycho['BTmag']:.3f} "
f"+/- {vizier_tycho['e_BTmag']:.3f}"
)

target_dict["TYCHO/TYCHO.B"] = (
float(vizier_tycho["BTmag"]),
float(vizier_tycho["e_BTmag"]),
)

if np.ma.is_masked(vizier_tycho["e_VTmag"]):
if not np.ma.is_masked(vizier_tycho["VTmag"]):
print(f"\nTYCHO VT mag = >{vizier_tycho['VTmag']:.3f}")

else:
print(
f"TYCHO VT mag = {vizier_tycho['VTmag']:.3f} "
f"+/- {vizier_tycho['e_VTmag']:.3f}"
)

target_dict["TYCHO/TYCHO.V"] = (
float(vizier_tycho["VTmag"]),
float(vizier_tycho["e_VTmag"]),
)

else:
print("Target not found in TYCHO catalog")

# 2MASS data from VizieR

print(vizier_result.keys())
print("II/246/out" in vizier_result.keys())
if "II/246/out" in vizier_result.keys():
vizier_2mass = vizier_result["II/246/out"]
else:
Expand All @@ -580,7 +628,7 @@ def target_star(
if vizier_2mass is not None:
vizier_2mass = vizier_2mass[0]

print(f"2MASS source ID = {vizier_2mass['_2MASS']}")
print(f"\n2MASS source ID = {vizier_2mass['_2MASS']}")

print(
f"Separation between Gaia and 2MASS source = "
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Documentation for *calistar*
============================

*calistar* is a tool to search for a single calibration star.
*calistar* is a tool to search for a calibration star.

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit fce3973

Please sign in to comment.