oasislmf.pytools.lec.aggreports.aggreports

Attributes

Classes

LecConfig

Shared per-run configuration passed to output helpers and output_for_summary_idx.

AggReports

Functions

make_output_fn(outmap, output_binary, output_parquet)

Return a callable(data, out_type) that writes data in the correct output format.

output_for_summary_idx(summary_id, outloss_mean_s, ...)

Output all report types for a single summary_id (idx path).

Module Contents

oasislmf.pytools.lec.aggreports.aggreports.logger[source]
class oasislmf.pytools.lec.aggreports.aggreports.LecConfig[source]

Shared per-run configuration passed to output helpers and output_for_summary_idx.

period_weights: numpy.ndarray[source]
max_summary_id: int[source]
sample_size: int[source]
no_of_periods: int[source]
num_sidxs: int[source]
use_return_period: bool[source]
returnperiods: numpy.ndarray[source]
ept_buffer: numpy.ndarray[source]
psept_buffer: numpy.ndarray[source]
oasislmf.pytools.lec.aggreports.aggreports.make_output_fn(outmap, output_binary, output_parquet)[source]

Return a callable(data, out_type) that writes data in the correct output format.

class oasislmf.pytools.lec.aggreports.aggreports.AggReports(outmap, outloss_mean, row_used_mean, outloss_sample, row_used_sample, config, lec_files_folder, output_binary, output_parquet)[source]
outmap[source]
outloss_mean[source]
outloss_sample[source]
lec_files_folder[source]
row_used_indices_mean[source]
row_used_indices_sample[source]
config[source]
output_data[source]
output_mean_damage_ratio(eptype, eptype_tvar, outloss_type)[source]

Output Mean Damage Ratio Mean Damage Losses - This means do the loss calculation for a year using the event mean damage loss computed by numerical integration of the effective damageability distributions.

Parameters:
  • eptype (int) – Exceedance Probability Type

  • eptype_tvar (int) – Exceedance Probability Type (Tail Value at Risk)

  • outloss_type (str) – Which loss to output

output_full_uncertainty(eptype, eptype_tvar, outloss_type)[source]

Output Full Uncertainty Full Uncertainty – this means do the calculation across all samples (treating the samples effectively as repeat years) - this is the most accurate of all the single EP Curves.

Parameters:
  • eptype (int) – Exceedance Probability Type

  • eptype_tvar (int) – Exceedance Probability Type (Tail Value at Risk)

  • outloss_type (str) – Which loss to output

output_wheatsheaf_and_wheatsheafmean(eptype, eptype_tvar, outloss_type, output_wheatsheaf, output_wheatsheaf_mean)[source]

Output Wheatsheaf and Wheatsheaf Mean Wheatsheaf, Per Sample EPT (PSEPT) – this means calculate the EP Curve for each sample and leave it at the sample level of detail, resulting in multiple “curves”. Wheatsheaf Mean, Per Sample mean EPT – this means average the loss at each return period of the Per Sample EPT.

Parameters:
  • eptype (int) – Exceedance Probability Type

  • eptype_tvar (int) – Exceedance Probability Type (Tail Value at Risk)

  • outloss_type (str) – Which loss to output

  • output_wheatsheaf (bool) – Bool to Output Wheatsheaf

  • output_wheatsheaf_mean (bool) – Bool to Output Wheatsheaf Mean

output_sample_mean(eptype, eptype_tvar, outloss_type)[source]

Output Sample Mean Sample Mean Losses – this means do the loss calculation for a year using the statistical sample event mean.

Parameters:
  • eptype (int) – Exceedance Probability Type

  • eptype_tvar (int) – Exceedance Probability Type (Tail Value at Risk)

  • outloss_type (str) – Which loss to output

oasislmf.pytools.lec.aggreports.aggreports.output_for_summary_idx(summary_id, outloss_mean_s, row_used_mean_s, outloss_sample_s, row_used_sample_s, output_flags, hasOCC, hasAGG, outmap, config, output_fn)[source]

Output all report types for a single summary_id (idx path).

Called once per summary_id. config.max_summary_id must be 1; arrays are sized for a single summary. Write generators emit SummaryId=1, corrected here before each write.