Skip to content

Commit

Permalink
updated apis
Browse files Browse the repository at this point in the history
  • Loading branch information
drhlxiao committed Oct 6, 2021
1 parent 92edea6 commit 59d260c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Binary file modified stixdcpy/__pycache__/quicklook.cpython-39.pyc
Binary file not shown.
5 changes: 4 additions & 1 deletion stixdcpy/quicklook.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ def peek(self, ax=None, legend_loc='upper right'):
Parameters:
ltc: light time correction flag. The default value is False. Do light time correction if ltc=True
"""
if not self.data:
ax.text(0.5,0.5, 'LC not available!')
return ax

if not ax:
_, ax = plt.subplots()
dt = [datetime.datetime.utcfromtimestamp(t) for t in self.data['unix_time']]
for i in range(5):
plt.plot(dt, self.data['light_curves'][str(i)], label=self.data['energy_bins']['names'][i])
ax.plot(dt, self.data['light_curves'][str(i)], label=self.data['energy_bins']['names'][i])
dlt = self.data['DELTA_LIGHT_TIME']
light_time_corrected = self.data['IS_LIGHT_TIME_CORRECTED']

Expand Down

0 comments on commit 59d260c

Please sign in to comment.