Skip to content

Commit

Permalink
Fixes key error after svo_filters dropped the centers attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
hover2pi committed Apr 2, 2021
1 parent 8fd6e46 commit 4c6beab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exoctk/limb_darkening/limb_darkening_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def calculate(self, Teff, logg, FeH, profile, mu_min=0.05, ld_min=0.01,
for n, ldarr in enumerate(scaled_ld):

# Get effective wavelength of bin
wave_eff = bandpass.centers[0, n].round(5)
wave_eff = np.mean(bandpass.wave[0])

try:

Expand All @@ -314,8 +314,8 @@ def calculate(self, Teff, logg, FeH, profile, mu_min=0.05, ld_min=0.01,
# Check the count
result['name'] = name or 'Calculation {}'.format(self.count)
self.count += 1
if len(bandpass.centers[0]) == len(scaled_ld) and name is None:
result['name'] = '{} {}'.format(str(round(bandpass.centers[0][n], 2)), self.model_grid.wave_units)
if bandpass.wave.shape[0] == len(scaled_ld) and name is None:
result['name'] = '{:.3f}'.format(np.mean(bandpass.wave[0]).round(2))

# Set a color if possible
result['color'] = color or self.ld_color[profile]
Expand Down

0 comments on commit 4c6beab

Please sign in to comment.