Skip to content

Commit

Permalink
plot y label to Flux Density if appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlam committed Aug 15, 2020
1 parent d598c4f commit 23d802c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pypulse/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,11 @@ def plot(self, ax=None, show=True):
ax.plot(np.arange(len(data), dtype=np.float)/len(data), data, 'k')
ax.set_xlim(0, 1)
ax.set_xlabel("Pulse Phase")
ax.set_ylabel("Intensity")
unit = self.getDataUnit()
if unit == "Janksy":
ax.set_ylabel("Flux Density (%s)"%u.unitchanger(unit))
else:
ax.set_ylabel("Intensity")
#if "SCALE" in self.subintheader:
# ax.set_ylabel(self.subintheader["SCALE"]) #this is still off
if show:
Expand Down

0 comments on commit 23d802c

Please sign in to comment.