Skip to content

Commit

Permalink
Merge pull request #235 from neutrinoceros/bug/handle_depr_from_astro…
Browse files Browse the repository at this point in the history
…query_0.4.8

BUG: handle deprecation warning from astroquery 0.4.8
  • Loading branch information
DrSoulain authored Jan 23, 2025
2 parents 0ced8fc + 980cd27 commit 513f947
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion amical/oifits.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ def save(
Name of the saved oifits file.
"""
import astroquery
from astropy.io import fits
from astroquery.simbad import Simbad

Expand Down Expand Up @@ -641,7 +642,11 @@ def save(
name_star = dic["info"]["TARGET"]

customSimbad = Simbad()
customSimbad.add_votable_fields("propermotions", "sptype", "parallax")
if astroquery.version.version_info >= (0, 4, 8):
sp_type_name = "sp_type"
else:
sp_type_name = "sptype"
customSimbad.add_votable_fields("propermotions", sp_type_name, "parallax")

# Add information from Simbad:
if fake_obj:
Expand Down

0 comments on commit 513f947

Please sign in to comment.