Skip to content

Commit 5e2f995

Browse files
committed
Updated type hints and improved default logic for plot_white`
1 parent aa3f531 commit 5e2f995

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

exoiris/exoiris.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,19 +521,19 @@ def fit_white(self, niter: int = 500) -> None:
521521
self.transit_duration = self._wa.transit_duration
522522
self.data.calculate_ootmask(pv[0], pv[1], self.transit_duration)
523523

524-
def plot_white(self, axs=None, figsize=None, ncols=2) -> Figure:
524+
def plot_white(self, axs=None, figsize: tuple[float, float] | None = None, ncols: int | None=None) -> Figure:
525525
"""Plot the white light curve data with the best-fit model.
526526
527527
Parameters
528528
----------
529529
axs : Axes, optional
530530
Matplotlib axis object on which to plot. If None, a new figure and axis will be created.
531-
figsize : tuple of float, optional
532-
Tuple representing the figure size in inches. Default is None.
533-
ncols : int, optional
534-
Number of columns in the plot layout. Default is 2.
531+
figsize
532+
Tuple representing the figure size in inches.
533+
ncols
534+
Number of columns in the plot layout.
535535
"""
536-
return self._wa.plot(axs=axs, figsize=figsize, ncols=ncols)
536+
return self._wa.plot(axs=axs, figsize=figsize, ncols=ncols or min(self.data.size, 2))
537537

538538
def normalize_baseline(self, deg: int = 1) -> None:
539539
"""Normalize the baseline flux for each spectroscopic light curve.

0 commit comments

Comments
 (0)