Skip to content

Update broadband simulation to use BA18 + CB14 model from site amplification package - #130

Open
lispandfound wants to merge 9 commits into
pegasusfrom
ba18_bb_sim
Open

Update broadband simulation to use BA18 + CB14 model from site amplification package#130
lispandfound wants to merge 9 commits into
pegasusfrom
ba18_bb_sim

Conversation

@lispandfound

Copy link
Copy Markdown
Contributor

As described, but I took the opportunity to further refactor bb-sim:

  1. bb-sim is now dask powered, so requires less memory on clusters by making use of chunking.
  2. bb-sim now handles mismatched sample rates between low frequency and high frequency via signal resampling.
  3. bb-sim now embeds the vs30 and all the site amplification parameters used into the output.

Copilot AI review requested due to automatic review settings August 4, 2026 01:06
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the broadband simulation pipeline to use the BA2018 + CB2014 site amplification models from the site-calculation package, while refactoring bb-sim to operate lazily with dask/xarray for lower memory usage and adding metadata to outputs.

Changes:

  • Refactors broadband merging to dask/xarray, including station-chunked processing and per-chunk site amplification + filtering.
  • Adds signal resampling to handle LF/HF mismatched sample rates and embeds Vs30 + site amp parameters in output metadata.
  • Introduces SiteAmpModel enum and extends broadband parameter schemas/defaults to support BA2018/CB2014 selection.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
workflow/scripts/bb_sim.py Reworks broadband merge to dask/xarray, adds resampling/alignment, and applies BA2018/CB2014 amplification from site-calculation.
workflow/schemas.py Adds SiteAmpModel and tightens broadband parameter validation (including new taper params).
workflow/realisations.py Updates BroadbandParameters dataclass to include fhightop, fmax, and typed site_amp_version.
workflow/default_parameters/v24_2_2_4/defaults.yaml Removes per-version bb defaults (now inherited from root).
workflow/default_parameters/v24_2_2_2/defaults.yaml Removes per-version bb defaults (now inherited from root).
workflow/default_parameters/v24_2_2_1/defaults.yaml Removes per-version bb defaults (now inherited from root).
workflow/default_parameters/root/defaults.yaml Adds/updates broadband defaults including BA2018 model selection and taper frequencies.
uv.lock Adds site-calculation and updates lock entries accordingly.
pyproject.toml Declares dependency on site-calculation>=2026.7.1.
tests/test_realisation.py Updates broadband parameter serialization test for new fields and enum.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workflow/scripts/bb_sim.py Outdated
Comment thread workflow/scripts/bb_sim.py Outdated
Comment thread workflow/schemas.py
Comment thread workflow/scripts/bb_sim.py Outdated
lispandfound and others added 6 commits August 4, 2026 13:11
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants