captest.util.detect_solar_noon
- captest.util.detect_solar_noon(data, ghi_col='ghi_mod_csky', default='12:30')
Estimate a single representative solar-noon clock time from clear-sky GHI.
Groups
data[ghi_col]by the clock time of each timestamp (hour and minute, ignoring date), takes the mean of each clock-time bucket, and returns the bucket with the largest mean formatted as"HH:MM".Used by plotting helpers that split observations into morning and afternoon at solar noon.
- Parameters:
data (pandas.DataFrame) – DataFrame with a
DatetimeIndex. Must containghi_colfor the idxmax-based detection to apply.ghi_col (str, default
"ghi_mod_csky") – Column to use as the clear-sky GHI signal.ghi_mod_cskyis the column added toCapData.databycaptest.io.load_datawhen asitedictionary is provided.default (str, default
"12:30") – Fallback clock-time string returned whenghi_colis absent fromdataor whendatais empty.
- Returns:
Clock time formatted as
"HH:MM".- Return type:
str
- Warns:
UserWarning – Emitted when
ghi_colis missing fromdata.columnsor the index is empty; thedefaultis then returned.