def for_single_image(cls, info, params, action_code="spotfinding", verbose=False, *args, **kwargs): from iota.components.iota_image import ImageImporter from iota.components.iota_processing import IOTAImageProcessor # Initialize processing parameters cls.info = info cls.params = params cls.action_code = action_code cls.verbose = verbose cls.importer = ImageImporter(info=cls.info, write_output=False) cls.integrator = IOTAImageProcessor( iparams=cls.params, write_pickle=False, write_logs=False, last_stage=action_code, ) return cls(*args, **kwargs)
def __init__( self, parent, data_list=None, term_file=None, proc_params=None, backend="dials", n_proc=0, run_indexing=False, run_integration=False, ): Thread.__init__(self) self.parent = parent self.data_list = data_list self.term_file = term_file self.terminated = False self.backend = backend self.run_indexing = run_indexing self.run_integration = run_integration if n_proc > 0: self.n_proc = n_proc else: self.n_proc = multiprocessing.cpu_count() - 2 if self.backend == "dials": # Modify default DIALS parameters # These parameters will be set no matter what proc_params.output.experiments_filename = None proc_params.output.indexed_filename = None proc_params.output.strong_filename = None proc_params.output.refined_experiments_filename = None proc_params.output.integrated_filename = None proc_params.output.integrated_experiments_filename = None proc_params.output.profile_filename = None proc_params.output.integration_pickle = None from iota.components.iota_processing import IOTAImageProcessor self.processor = IOTAImageProcessor(phil=proc_params)