Skip to content

Commit

Permalink
Added allwise_catalog parameter to target_star
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Apr 23, 2024
1 parent 14ff6ca commit 2a2245c
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions calistar/calistar.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def target_star(
self,
write_json: bool = True,
get_gaiaxp: bool = True,
allwise_catalog: bool = True,
) -> Dict[str, Union[str, float]]:
"""
Function for retrieving the the astrometric and
Expand All @@ -190,6 +191,10 @@ def target_star(
If set to ``True``, the spectrum will be written to a data
file and a plot will also be created. The spectrum is not
retrieved when the argument is set to ``False``.
allwise_catalog : bool
Select the WISE magnitudes from the ALLWISE catalog if set
to ``True`` or select the magnitudes from the earlier WISE
catalog if set to ``False``.
Returns
-------
Expand Down Expand Up @@ -536,7 +541,7 @@ def target_star(
print("\n-> Querying VizieR...\n")

vizier_obj = Vizier(
columns=["*", "+_r"], catalog=["II/246/out", "II/328/allwise"]
columns=["*", "+_r"], catalog=["II/246/out", "II/328/allwise", "II/311/wise"]
)

radius = u.Quantity(1.0 * u.arcmin)
Expand Down Expand Up @@ -587,13 +592,21 @@ def target_star(

# WISE data from VizieR

vizier_wise = vizier_result["II/328/allwise"]
if allwise_catalog:
vizier_wise = vizier_result["II/328/allwise"]
else:
vizier_wise = vizier_result["II/311/wise"]

vizier_wise = vizier_wise[0]

print(f"\nALLWISE source ID = {vizier_wise['AllWISE']}")
if allwise_catalog:
print(f"\nALLWISE source ID = {vizier_wise['AllWISE']}")
else:
print(vizier_wise.columns)
print(f"\nWISE source ID = {vizier_wise['WISE']}")

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

Expand Down

0 comments on commit 2a2245c

Please sign in to comment.