Skip to content

Commit

Permalink
Run the black code formatter locally, try that again...
Browse files Browse the repository at this point in the history
  • Loading branch information
gully committed Aug 9, 2021
1 parent 4bb947c commit c8774f5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions code/intuition.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
reduced_fns = sorted(reduced_fns)
reduced_fns = reduced_fns[slice(0, 8, 2)]
print(reduced_fns)
#reduced_fns = reduced_fns[slice(1, 8, 2)]
# reduced_fns = reduced_fns[slice(1, 8, 2)]

spec1 = (
IGRINSSpectrum(file=reduced_fns[3], order=13).remove_nans().normalize().trim_edges()
Expand Down Expand Up @@ -117,7 +117,6 @@ def load_and_prep_spectrum(fn, wl_low=2.108, wl_high=2.134, downsample=4):
df_nir = df_nir.iloc[::downsample, :]
df_nir = df_nir.dropna()
df_nir = df_nir.reset_index(drop=True)


return df_nir

Expand Down Expand Up @@ -311,15 +310,14 @@ def update_upon_order_change(attr, old, new):
.trim_edges()
)
spec_source_data.data = dict(
wavelength=spec1.wavelength.value / 10_000,
flux=spec1.flux.value
wavelength=spec1.wavelength.value / 10_000, flux=spec1.flux.value
)

fig.x_range.start = np.min(spec_source_data.data["wavelength"]) * 0.9995
fig.x_range.end = np.max(spec_source_data.data["wavelength"]) * 1.0005

# We need to trigger the model update in Teff selection just to get the new model.
teff_slider.value +=1.0e-9 # Hack, but it works!
teff_slider.value += 1.0e-9 # Hack, but it works!

def update_upon_smooth(attr, old, new):
"""Callback to take action when smoothing slider changes"""
Expand Down Expand Up @@ -381,8 +379,9 @@ def update_upon_teff_selection(attr, old, new):

composite = cloud_mixture_model(ff_slider.value)
spec_source_net.data = dict(
wavelength=spec_source.data["wavelength"], flux=composite / np.median(composite)
)
wavelength=spec_source.data["wavelength"],
flux=composite / np.median(composite),
)

def update_upon_logg_selection(attr, old, new):
"""Callback to take action when logg slider changes"""
Expand Down

0 comments on commit c8774f5

Please sign in to comment.