You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove CAV5 in favour of quantile indexed xarray #240
CAV is an intensity measure with a parameter. Currently, that parameter is implicit in the name of the intensity measure, but much like this repo doesn't keep the pSA_1.0s nomenclature of old iterations, it is better if CAV gained a new dimension for the threshold.
Tasks:
Remove the CAV5 IM from the enum,
Introduce CAV with thresholds as an array, return a dataarray with coordinates on threshold,
Patch the original CAV5 and CAV functionality simple wrappers over the generic implementation + squeeze the threshold into an attribute.
This will require a follow-up PR on workflow to incorporate the change.
Skipping issue #240: this is a feature/refactor request, not a bug fix.
The issue ("Remove CAV5 in favour of quantile indexed xarray") explicitly
asks for a design change to the CAV intensity measure API:
Remove the CAV5 entry from the IM enum.
Change cumulative_absolute_velocity to accept an array of thresholds
and return a result with a new threshold dimension/coordinate (like pseudo_spectral_acceleration does for period).
Reimplement the current scalar-threshold CAV/CAV5 behaviour as thin
wrappers over the new array-threshold implementation, squeezing the threshold dimension into an attribute.
There is no described defect, incorrect output, or failing behaviour in the
current CAV/CAV5 code — _cav_kernel/cumulative_absolute_velocity in
IM/ims.py compute CAV and thresholded CAV5 correctly, and the existing tests
(tests/test_ims.py::test_cav5, test_cav_name_depends_on_threshold) pass and
describe the intended, correct output. The issue itself says "This will
require a follow-up PR on workflow to incorporate the change," confirming
it is a deliberate multi-PR API/data-model change rather than a bug report.
Per the task instructions, this falls under "the issue asks for anything
other than a bug fix," so no code changes were made. A reviewer who wants
this feature should scope it as a planned refactor (enum change + public
API/return-shape change across IM/ims.py, IM/im_calculation.py,
IM/scripts/calculate_ims.py, and the dependent workflow repo), not a
regression-test-driven bug fix.
Activity
ucgmsim commentedon Oct 3, 2026
The scheduled fix job gave up on this issue:
The issue ("Remove CAV5 in favour of quantile indexed xarray") explicitly
asks for a design change to the CAV intensity measure API:
IMenum.cumulative_absolute_velocityto accept an array of thresholdsand return a result with a new
thresholddimension/coordinate (likepseudo_spectral_accelerationdoes forperiod).wrappers over the new array-threshold implementation, squeezing the
thresholddimension into an attribute.There is no described defect, incorrect output, or failing behaviour in the
current CAV/CAV5 code —
_cav_kernel/cumulative_absolute_velocityinIM/ims.py compute CAV and thresholded CAV5 correctly, and the existing tests
(tests/test_ims.py::test_cav5, test_cav_name_depends_on_threshold) pass and
describe the intended, correct output. The issue itself says "This will
require a follow-up PR on workflow to incorporate the change," confirming
it is a deliberate multi-PR API/data-model change rather than a bug report.
Per the task instructions, this falls under "the issue asks for anything
other than a bug fix," so no code changes were made. A reviewer who wants
this feature should scope it as a planned refactor (enum change + public
API/return-shape change across IM/ims.py, IM/im_calculation.py,
IM/scripts/calculate_ims.py, and the dependent workflow repo), not a
regression-test-driven bug fix.
Remove
ai-stuckand re-addai-okto retry.