Created
February 24, 2020 17:38
-
-
Save ndevenish/f0f9e624173ee0933a158e8c7c7661bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function | |
import glob | |
import sys | |
import time | |
from dials.command_line.find_spots_server import work | |
FILENAMES = "/path/to/test/files/*.cbf" | |
# parameters = ['filter.d_min=5', 'd_max=40', | |
parameters = ["spotfinder.threshold.algorithm=dispersion_extended"] + sys.argv[1:] | |
files = glob.glob(FILENAMES) | |
count = 0 | |
start = time.time() | |
try: | |
for filename in files: | |
results = work(filename, cl=parameters) | |
# print(results) | |
last_end = time.time() | |
count += 1 | |
print(count, results) | |
except KeyboardInterrupt: | |
print( | |
"\nRate: {:.2f}s {:.2f}/s".format( | |
(last_end - start) / count, count / (last_end - start) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment