mario.Database.get_shock_excel#

Database.get_shock_excel(path=None, num_shock=10, clusters=None, **legacy_clusters)#

Write an Excel template for defining shocks.

Parameters:
  • path – Output path for the workbook. When omitted, MARIO writes to the default Excel output directory.

  • num_shock – Number of shock rows to pre-create in the workbook template.

  • clusters – Preferred cluster payload. When omitted, MARIO uses clusters already stored on the database, optionally merged with any legacy keyword clusters.

  • **legacy_clusters – Backward-compatible cluster mappings passed as keyword arguments.

Returns:

The template workbook is written to disk.

Return type:

None

Notes

For SUT databases, the template exposes split block sheets such as u, s, Ya, Yc, va, vc, ea and ec. Sheets whose current block is entirely zero are omitted to keep the workbook compact. shock_calc(...) still accepts the old unified workbook format (z, v, e, Y) for backward compatibility. For both IOT and SUT, the new template uses flat-style column names such as Region_from and Sector_to instead of the legacy explicit level columns.