Skip to content

Commit

Permalink
implementation of weighting in matchmaps, .mr
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisbrookner committed Dec 21, 2023
1 parent 784592d commit cf037f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/matchmaps/_compute_mr_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,18 @@ def parse_arguments():
),
)

parser.add_argument(
"--alpha",
required=False,
type=float,
default=0,
help=(
"Alpha to use for error weighting of F-obs prior to Fourier Transform. "
"Weights are computed as: 1 / ((1+(alpha*(SigF^2)) / <SigF>^2). "
"Default value is alpha=0, e.g., no weighting is performed. "
)
)

parser.add_argument(
"--verbose",
"-v",
Expand Down Expand Up @@ -467,6 +479,7 @@ def main():
dmin=args.dmin,
spacing=args.spacing,
radius=args.unmasked_radius,
alpha=args.alpha,
on_as_stationary=args.on_as_stationary,
keep_temp_files=args.keep_temp_files,
no_bss = args.no_bss
Expand Down
1 change: 1 addition & 0 deletions src/matchmaps/_compute_realspace_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def main():
dmin=args.dmin,
spacing=args.spacing,
radius=args.unmasked_radius,
alpha=args.alpha,
on_as_stationary=args.on_as_stationary,
keep_temp_files=args.keep_temp_files,
no_bss = args.no_bss,
Expand Down
2 changes: 1 addition & 1 deletion src/matchmaps/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _subparser(selection):


def make_floatgrid_from_mtz(
mtz, spacing, F, SigF, Phi, spacegroup="P1", dmin=None, alpha=0.2
mtz, spacing, F, SigF, Phi, spacegroup="P1", dmin=None, alpha=0
):
"""
Make a gemmi.FloatGrid from an rs.DataSet.
Expand Down

0 comments on commit cf037f0

Please sign in to comment.