Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eispac/core/eisfitresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def shift2wave(self, array, wave=195.119):
# FIXME: This function should actually use units
this_wave = self.fit['wave_range'].mean()
disp = np.zeros(len(array.shape))
disp[0] = (ccd_offset(wave*u.Angstrom) - ccd_offset(this_wave*u.Angstrom)).to_value('pixel')
disp[0] = (ccd_offset(wave*u.Angstrom) - ccd_offset(this_wave*u.Angstrom)).to_value('pixel')[0]
array = shift_img(array, disp)
return array

Expand Down
14 changes: 14 additions & 0 deletions scripts/eis_explore_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,10 +1475,24 @@ def event_replot_all_spec(self):

def event_reset_plot(self):
"""Clear and replot a selected raster or spectrum"""
#TO-DO: make a function for clearing objects from the plot
r_ind = int(self.sender().objectName()[1])
plot_type = self.sender().objectName().split('_')[1]

if plot_type.lower().startswith('rast'):
# If there is crosshair on the plot, remove it
if self.rast_crosshair[r_ind] is not None:
self.rast_crosshair[r_ind].remove()
self.rast_crosshair[r_ind] = None

# If there are any lines plotted on the ax, remove them
if self.rast_axhline[r_ind] is not None:
self.rast_axhline[r_ind].remove()
self.rast_axhline[r_ind] = None
if self.rast_axvline[r_ind] is not None:
self.rast_axvline[r_ind].remove()
self.rast_axvline[r_ind] = None

self.rast_ax[r_ind] = None
self.rast_fig[r_ind].clf()
self.rast_lims[r_ind] = None
Expand Down
Loading