Skip to content

power_knee_divot function in distributions.py does not work for single slope power laws #19

Description

@rcdorsey

File: SurveySimulator/python/ossssim/distributions.py
Function: power_knee_divot

There are a couple of problems when applying single slope power law input parameters:

  1. The first simple error handling does not work if h_break=None (would should be a valid input for a single slope power law, given the function description)
  2. The value for h_break is changed on line 351 in distributions.py, so the condition on line 257 is always true. However, if h_break is set to H_max, then there is no need to generate the "faint side" of the distribution.
  3. If this is corrected, then the next step to merge the "two sides" of the distribution produces an error since fp_f is empty.

The attached file shows how to fix these issues for a single slope power law input.
distributions.txt

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