jason-neal / baraffe_tables

Quickly access the Baraffe 2003/2015 evolutionary tables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type error

jason-neal opened this issue · comments

python BDmass_to_flux_ratio.py HD202206 93 3 -p


Warning: The flux ratio is nan, check that there is the value in Simbad.
/home/jneal/Phd/Codes/baraffe_tables/baraffe_tables/calculations.py:66: UserWarning: Warning: converting a masked element to nan.
  flux_ratios[band] = flux_mag_ratio(float(star_params["FLUX_{0!s}".format(band)]),
Warning: The flux ratio is nan, check that there is the value in Simbad.
Warning: The flux ratio is nan, check that there is the value in Simbad.

Flux ratios:
H band star/companion Flux ratio =  nan,  >>> companion/star Flux ratio = nan
K band star/companion Flux ratio =  nan,  >>> companion/star Flux ratio = nan
J band star/companion Flux ratio =  nan,  >>> companion/star Flux ratio = nan
{'Mi': 12.78493720664016, 'Mj': 10.78602775700605, 'Mh': 10.372141438210313, 'Mv': 17.186642424704118, 'Mk': 10.103364174451166, 'g': 5.289646397715241, 'Mr': 14.994500986493804, 'Teff': 2597.1652357231924, 'Mll': 9.453800394597522, 'M/Ms': 0.08877726375914723, 'L/Ls': -3.2996688686380864, 'Mm': 9.787250493246903, 'R': 0.11165499013506196}
Traceback (most recent call last):
  File "BDmass_to_flux_ratio.py", line 137, in <module>
    sys.exit(main(star_name, companion_mass, age, **opts))
  File "BDmass_to_flux_ratio.py", line 125, in main
    companion_params["Mk"], flux_ratios["K"]))
TypeError: unsupported format string passed to MaskedConstant.__format__

Pretty sure this has been resolved. Returns zeros currently.
-p is not a valid flag anymore.

(py36) ❯ python BDmass_to_flux_ratio.py HD202206 93 3 -f -s

Flux ratios:
J band  companion/star Flux ratio = 0.0000 >>> star/companion Flux ratio = 0.0000
H band  companion/star Flux ratio = 0.0000 >>> star/companion Flux ratio = 0.0000
K band  companion/star Flux ratio = 0.0000 >>> star/companion Flux ratio = 0.0000
{'M/Ms': 0.08877726375914723, 'Teff': 2597.1652357231924, 'L/Ls': -3.2996688686380864, 'g': 5.289646397715241, 'R': 0.11165499013506196, 'Mv': 17.186642424704118, 'Mr': 14.994500986493804, 'Mi': 12.78493720664016, 'Mj': 10.78602775700605, 'Mh': 10.372141438210313, 'Mk': 10.103364174451166, 'Mll': 9.453800394597522, 'Mm': 9.787250493246903}
Host name, star M_K, companion_mass, companion Teff, companion_Mk, K_ratio
HD202206 & 0.00 & 93.0 & 2597 & 10.10 & 0.0\\\\n

Stellar parameters:
 MAIN_ID        RA           DEC      ... Fe_H_CatNo     Fe_H_bibcode   
             "h:m:s"       "d:m:s"    ...                               
--------- ------------- ------------- ... ---------- -------------------
HD 202206 21 14 57.7691 -20 47 21.153 ...            2015A&A...579A..20M