diff --git a/src/geomtools/powder/find_center.py b/src/geomtools/powder/find_center.py index 1df6428374f05921167fc5c966f4bc4b93b6e4f7..e65261d5f3485f2838a49efe5c66e22d1871d57d 100644 --- a/src/geomtools/powder/find_center.py +++ b/src/geomtools/powder/find_center.py @@ -43,6 +43,10 @@ def main(argv=None): help="Detector layout") parser.add_argument("-c", "--calibrant", required=True, choices=CALIBRANTS, help="Calibrant") + parser.add_argument("-s", "--sigma", type=float, default=2, + help="The width of gaussian filter") + parser.add_argument("--snr", type=float, default=1.5, + help="Relative threshold for background removal") parser.add_argument("-o", "--output", default=".", help="Output directory") parser.add_argument("powder_data", @@ -95,8 +99,10 @@ def main(argv=None): rings = get_calibrant(args.calibrant) borders = BORDER_MASK[detector_type](num_modules) - pw = PowderDiffraction(geom, rings, clen, lmd, - border_mask=~borders, make_shadow_mask=True) + pw = PowderDiffraction( + geom, rings, clen, lmd, sigma=args.sigma, snr=args.snr, + border_mask=~borders, make_shadow_mask=True + ) pw.fit(img_mean, mask, num_frames) pw.refinement_info()