Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def srr_soiling(aggregated, aggregated_insolation, **kwargs):
if aggregated.index.freq != 'D' or \
aggregated_insolation.index.freq != 'D':
raise ValueError(
'Soiling SRR analysis requires daily aggregation.'
)
sr, sr_ci, soiling_info = soiling.soiling_srr(
aggregated, aggregated_insolation,
**kwargs
)
srr_results = {
'p50_sratio': sr,
'sratio_confidence_interval': sr_ci,
'calc_info': soiling_info
}
return srr_results