Skip to content

Commit

Permalink
BUG: inconsistent _RESULTS_FUNCS and _RESULTS_FUNC_PARS
Browse files Browse the repository at this point in the history
  • Loading branch information
lzkelley committed Apr 13, 2024
1 parent fcc8444 commit cf447b7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cosmopy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from . cosmology import Cosmology
from . import PC, ARCSEC, U_SEC, U_CM

_RESULTS_FUNCS = ['luminosity_distance', 'comoving_distance', 'lookback_time', 'age']
_RESULTS_FUNCS = ['comoving_distance', 'luminosity_distance', 'angular_diameter_distance', 'lookback_time', 'age']
_RESULTS_FUNC_PARS = ['dc', 'dl', 'da', 'tl', 'ta']

_RESULTS_FUNC_PARS = ['dl', 'dc', 'tl', 'ta']
_RESULTS_PARS = ['z', 'a'] + _RESULTS_FUNC_PARS

_COLOR_BASE = "magenta" # "cyan"
_COLOR_CONV = "green" # "yellow"
_COLOR_BASE = "magenta"
_COLOR_CONV = "green"
_COLOR_NAME = "red"

# Enable imperial units (e.g. 'miles')
Expand Down Expand Up @@ -107,7 +107,7 @@ def calc_basic(cosmo, sets):
raise ValueError("No input given!")

# Calculate scale-factor if needed
scale = cosmo.z_to_a(redz) if scale is None else scale
scale = cosmo.z_to_a(redz) if (scale is None) else scale
results['a'] = scale
results['z'] = redz

Expand Down Expand Up @@ -185,6 +185,7 @@ def output_print(results, print_output=True):
outs = []
for kk, ss, tt, nn in zip(keys, symbs, types, names):
vv = results[kk]
# print(f"key={kk}, symb={ss}, type={tt}, name={nn}, results[{kk}]={vv}")
try:
vv = vv.item()
except AttributeError:
Expand Down

0 comments on commit cf447b7

Please sign in to comment.