Skip to content

Commit

Permalink
mask_function doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Jan 27, 2025
1 parent c680ab6 commit b9e8a41
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions getdist/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1689,9 +1689,11 @@ def plot_2d(self, roots, param1=None, param2=None, param_pair=None, shaded=False
to add to (defaults to current plot or the first/main plot if none)
:param mask_function: Function that defines regions in the 2D parameter space to exclude from the plot.
Must have signature mask_function(minx, miny, stepx, stepy, mask), where:
- minx, miny: minimum values of x and y parameters
- stepx, stepy: step sizes in x and y directions
- mask: 2D boolean numpy array (modified in-place)
* minx, miny: minimum values of x and y parameters
* stepx, stepy: step sizes in x and y directions
* mask: 2D boolean numpy array (modified in-place)
The function should set mask values to 0 where points should be excluded by the prior.
Useful for implementing non-rectangular prior boundaries not aligned with parameter axes,
- see the example in the plot gallery.
Expand Down

0 comments on commit b9e8a41

Please sign in to comment.