Skip to content
Merged
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
12 changes: 11 additions & 1 deletion src/riptide/candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,17 @@ def plot_subints(X, T):
T : float
Integration time in seconds
"""
__, nbins = X.shape
__, nbins = X.shape
# Peak-to-Peak normalization
mins = X.min(axis=1).reshape(-1, 1)
maxs = X.max(axis=1).reshape(-1, 1)
ranges = maxs - mins

# Avoid division by zero (flat subints)
ranges[ranges == 0] = 1

# Normalize each subint row to [0, 1]
X = (X - mins) / ranges

X = np.hstack((X, X[:, : nbins // 2]))
__, nbins_ext = X.shape
Expand Down