energy_methods.pv_device_reliability#

PV tracker observability, censored survival and component-event scenarios.

Availability is not a hazard rate. Missing telemetry is not a confirmed failure. Weather-station quality checks concern measurement validity, not equipment life.

class energy_methods.pv_device_reliability.AvailabilityEvidence(eligible_hours, available_hours, unavailable_hours, unknown_hours, excluded_hours, unknown_eligibility_hours)[source]#

Bases: object

Time-weighted bounds; unknown intervals are not silently imputed.

Bounds address missing-state uncertainty only, not sampling uncertainty or model error. No eligible/observed hours produces NaN for the relevant ratio.

Parameters:
  • eligible_hours (float)

  • available_hours (float)

  • unavailable_hours (float)

  • unknown_hours (float)

  • excluded_hours (float)

  • unknown_eligibility_hours (float)

eligible_hours: float#
available_hours: float#
unavailable_hours: float#
unknown_hours: float#
excluded_hours: float#
unknown_eligibility_hours: float#
property lower: float#
property upper: float#
property observed: float#
property coverage: float#
to_dict()[source]#

Hours and the four distinct ratios for exports.

Return type:

dict[str, float]

energy_methods.pv_device_reliability.tracker_availability(actual_angle, reference_angle, poa_w_m2, interval_hours, *, expected_stow=None, core_tracking=None, threshold_deg=5)[source]#

Martins (2026) angle KPI with explicit missing-data bounds.

Eligible when POA > 0 and the optional core mask is true. Confirmed expected stows count as available, including missing angles, following the paper. Absolute deviations > threshold are unavailable; equality is available. Inputs must share the same aligned intervals, angle sign convention and geometry. Durations are explicit: never bridge a telemetry gap by carrying the last state forward. Unknown POA is reported separately, outside bounds. A deviation is an operational symptom, not a diagnosed mechanical failure.

Parameters:
  • actual_angle (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • reference_angle (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • poa_w_m2 (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • interval_hours (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • expected_stow (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None)

  • core_tracking (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None)

  • threshold_deg (float)

Return type:

AvailabilityEvidence

energy_methods.pv_device_reliability.sensor_serviceability(readings, interval_hours, *, quality_valid)[source]#

Separate WST channel completeness from externally assessed validity.

Caller supplies QC (reference comparison/calibration/physical checks). Invalid measurements and absent data do not become hardware-failure events. Every scheduled interval must be represented, including missing samples.

Parameters:
  • readings (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • interval_hours (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • quality_valid (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

Return type:

dict[str, float]

energy_methods.pv_device_reliability.kaplan_meier_survival(age, failed, *, confidence=0.95)[source]#

First-event KM table with Greenwood log-log pointwise intervals.

Ages start at commissioning; all surviving devices must be included. Failures precede censoring at ties. No delayed entry, interval censoring, competing-risk model, recurrent events, weighting, or tail extrapolation. Independent censoring is assumed. Boundary CIs at S=0 or S=1 are undefined (NaN), avoiding an impression of certainty in small/zero-failure cohorts.

Parameters:
  • age (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • failed (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • confidence (float)

Return type:

DataFrame

energy_methods.pv_device_reliability.assembly_event_scenario(rates_per_operating_hour, counts, *, operating_hours_per_year)[source]#

Independent constant-rate parts: expected events and any-event probability.

Use disjoint physical parts in one assembly (e.g. CBX fuses, terminals, monitoring unit). A fuse event is NOT assumed to disconnect the whole box. Do not include a parent assembly rate alongside its children or substitute 8760 calendar hours for a source’s operating-hour basis without justification. No repair cost, downtime, or confidence interval is invented.

Parameters:
  • rates_per_operating_hour (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • counts (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • operating_hours_per_year (float)

Return type:

dict[str, float]