Skip to content

Ranking Mean & Std of Residuals should use nanmean and nanstd #68

@g-weatherill

Description

@g-weatherill

When the flatfile has zeros for the ground motion values for specific records then the ranking metrics mean and std of the residuals return inf owing to the log of the zero values being taken. This is not such an uncommon situation as it can be the case that for Sa at very short or long periods then the Sa may get filtered out depending on the high or low pass filter. Given that these tend to be a minority of records and this doesn't affect the other metrics (e.g. loglikelihood, EDR) then the mean and standard deviation of the residuals should still be calculated with these records discarded. As far as I can see this means changing the lines here (https://github.com/rizac/eGSIM/blob/main/egsim/smtk/ranking.py#L90) from mean and std to nanmean and nanstd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions