Skip to content

Commit

Permalink
Blueshift bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SFotopoulou committed Mar 7, 2022
1 parent 4937f4f commit 210eb28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,12 @@ def _update_emlines(self, val):
ylims = self.ax.get_ylim()

old_x = self.lines[0].get_xdata()
z_past = np.abs(self.emlines_wave[0] - old_x[0])/self.emlines_wave[0]

for line, text in zip(self.lines, self.texts):
old_x = line.get_xdata()
(x_text, y_text) = text.get_position()

new_x = x_text*(1+val)/(1+z_past)
new_x = self.emlines_wave*(1+val)
new_y = ylims[1]*(1-self.padding)

line.set_xdata([new_x for x in old_x])
Expand Down

0 comments on commit 210eb28

Please sign in to comment.