Skip to content

Commit

Permalink
Fix plot scale for photometry
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHls committed Mar 12, 2024
1 parent 5158897 commit 659ba99
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/sccala/interplib/epoch_interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,13 @@ def diagnostic_plot(self, diagnostic, target, flux_interp=False):
ax2.grid(which="minor", axis="both", linestyle="--")

ax2.set_xlim([max([ax2.get_xlim()[0], 0]), max([65.0, max(self.time)])])
lims = ax2.get_xlim()
curr_data = np.where((self.time > lims[0]) & (self.time < lims[1]))[0]
ax2.set_ylim(
(self.data - self.data_error)[curr_data].min() / conv * 0.5,
(self.data - self.data_error)[curr_data].max() / conv * 1.5,
)
if "phot" not in target:
lims = ax2.get_xlim()
curr_data = np.where((self.time > lims[0]) & (self.time < lims[1]))[0]
ax2.set_ylim(
(self.data - self.data_error)[curr_data].min() / conv * 0.5,
(self.data - self.data_error)[curr_data].max() / conv * 1.5,
)

if "phot" in target:
ax2.invert_yaxis()
Expand Down

0 comments on commit 659ba99

Please sign in to comment.