Skip to content

T-test does not work for single magnitude bin #140

Closed
@khawajasim

Description

@khawajasim

Hi,
I noticed that T-test does not work for single magnitude bins. E.g. mbins = [5.95].

The error is traced down to "target_event_rates --> get_rates --> get_magnitude_index --> bin1d_vec" to line 75: h = bins[1] - bins[0].

Since there is only one bin, so bins[1] gives error. For now, I manually put h=0.1 in my copy of repo and its working.

Perhaps, as a solution, a check can be put here, that if there size(bin)==1, then default h=0.1. It is already taking last bins as open. So it should work.

Cheers,
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions