compute_grid_weights

beast.physicsmodel.grid_weights.compute_grid_weights(in_x, log=False)[source]

Compute the grid weights. Needed for marginalization (aka integration). The weights are the relative widths of of each x bin.

Parameters:
  • x (numpy array) – centers of each bin

  • log (boolean) – set if values are in log units

Returns:

weights – weights as bin widths divided by the average width

Return type:

numpy array