Skip to content

Commit

Permalink
Rename some functions and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyizheng1112 authored and James Gillanders committed Aug 20, 2021
1 parent 20669f7 commit 892ab29
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tardis/visualization/widgets/custom_abundance.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def update_abundance_plot(self, index):
y = self.abundance.iloc[index]
self.fig.data[index + 2].y = np.append(y, y.iloc[-1])

def update_front(self):
def update_front_end(self):
"""Update checkbox widgets, input widgets and plot in the front
end when selected shell No. is changed.
"""
Expand All @@ -418,7 +418,7 @@ def update_front(self):

def overwrite_existing_shells(self, v_0, v_1):
"""Judge whether the existing shell(s) will be overwritten when
inserting a new shell within the entered velosity range.
inserting a new shell within the entered velocity range.
Parameters
----------
Expand Down Expand Up @@ -551,7 +551,7 @@ def on_btn_add_shell(self, obj):

self.dpd_shell_no.options = list(range(1, self.no_of_shells + 1))
self.shell_no = start_index + 1
self.update_front()
self.update_front_end()
self.irs_shell_range.max = self.no_of_shells

def tbs_scale_eventhandler(self, obj):
Expand Down Expand Up @@ -643,7 +643,7 @@ def dpd_shell_no_eventhandler(self, obj):
else:
self.btn_next.disabled = False

self.update_front()
self.update_front_end()

def on_btn_prev(self, obj):
"""Move to previous shell.
Expand Down Expand Up @@ -755,14 +755,14 @@ def on_btn_add_element(self, obj):
self.abundance.sort_index(inplace=True)

# Add new BoundedFloatText control and Checkbox control.
_item = ipw.BoundedFloatText(min=0, max=1, step=0.01)
_check = ipw.Checkbox(indent=False, layout=ipw.Layout(width="30px"))
_item.index = self.no_of_elements - 1
_check.index = self.no_of_elements - 1
_item.observe(self.input_item_eventhandler, "value")
_check.observe(self.check_eventhandler, "value")
self.input_items.append(_item)
self.checks.append(_check)
item = ipw.BoundedFloatText(min=0, max=1, step=0.01)
check = ipw.Checkbox(indent=False, layout=ipw.Layout(width="30px"))
item.index = self.no_of_elements - 1
check.index = self.no_of_elements - 1
item.observe(self.input_item_eventhandler, "value")
check.observe(self.check_eventhandler, "value")
self.input_items.append(item)
self.checks.append(check)

# Keep the order of description same with atomic number
self.elements = self.get_symbols()
Expand Down Expand Up @@ -1371,7 +1371,7 @@ def from_simulation(cls, sim):


class DensityEditor:
"""A widget like object to edit density profile.
"""Widget to edit density profile of simulation model.
It provides an interface to allow the user directly change
the density, or calculate the density with given type and
Expand Down

0 comments on commit 892ab29

Please sign in to comment.