def index_and_integrate(self, frames, files, spotfinder_results): self.frames = frames self.files = files self.spotfinder_results = spotfinder_results pd = self.establish_dict_for_refinement(frames, spotfinder_results) #------------------------------------------------------------ ai, P = self.index_and_refine(pd, files, spotfinder_results, 0) self.indexing_ai = ai #------------------------------------------------------------ if labelit_commands.compatibility_allow == False: M = self.best_character_to_IndexPrinter( ai, P, pd, horizons_phil=self.horizons_phil) else: from labelit.diffraction.compatibility import \ best_compatibility_to_IndexPrinter M = best_compatibility_to_IndexPrinter( ai, P, pd, files, spotfinder_results, horizons_phil=self.horizons_phil) #------------------------------------------------------------ if "writer" in labelit_commands.__dict__: labelit_commands.writer.make_image_plots_detail( ai=ai, pd=pd, inframes=files, spotfinder_results=spotfinder_results) if not labelit_commands.index_only: IC = IntegrateCharacters(M, pd) IC.write_mosflm_matrices() IC.find_best() IC.show() return pd
def index_and_integrate(self,frames,files,spotfinder_results): self.frames = frames self.files = files self.spotfinder_results = spotfinder_results pd = self.establish_dict_for_refinement(frames,spotfinder_results) #------------------------------------------------------------ ai,P = self.index_and_refine(pd,files,spotfinder_results,0) self.indexing_ai = ai #------------------------------------------------------------ if labelit_commands.compatibility_allow==False: M = self.best_character_to_IndexPrinter(ai,P,pd,horizons_phil=self.horizons_phil) else: from labelit.diffraction.compatibility import \ best_compatibility_to_IndexPrinter M = best_compatibility_to_IndexPrinter(ai,P,pd,files,spotfinder_results,horizons_phil=self.horizons_phil) #------------------------------------------------------------ if labelit_commands.__dict__.has_key("writer"): labelit_commands.writer.make_image_plots_detail( ai=ai,pd=pd,inframes=files,spotfinder_results=spotfinder_results) if not labelit_commands.index_only: IC = IntegrateCharacters(M,pd) IC.write_mosflm_matrices() IC.find_best() IC.show() return pd
def index_and_integrate(self, frames, files, spotfinder_results): self.pd = establish_dict_for_refinement(frames, spotfinder_results) self.spotfinder_results = spotfinder_results self.frames = frames #------------------------------------------------------------ ai, P = index_and_refine(pd=self.pd, rawframes=files, spotfinder_results=spotfinder_results, verbose=False, horizon_phil=self.horizons_phil) self.indexing_ai = ai #------------------------------------------------------------ if self.horizons_phil.compatibility_allow == False: M = best_character_to_IndexPrinter(ai, P, self.pd, True, self.horizons_phil) else: from labelit.diffraction.compatibility import best_compatibility_to_IndexPrinter M = best_compatibility_to_IndexPrinter(ai, P, self.pd, files, spotfinder_results) #------------------------------------------------------------ if "writer" in self.horizons_phil.__dict__: self.horizons_phil.writer.make_image_plots_detail( ai=ai, pd=self.pd, inframes=files, spotfinder_results=spotfinder_results) if not self.horizons_phil.index_only: if 0: from labelit.dps import IntegrateCharacters IC = IntegrateCharacters(M, self.pd) IC.write_mosflm_matrices() IC.find_best() IC.show() if 1: from rstbx.new_horizons.oscillation_shots import IntegrateCharacters IC = IntegrateCharacters(M, self.pd, self.horizons_phil, files, spotfinder_results) IC.find_best() self.last_saved_best = IC.save_best() IC.show() # Lattice character information added for special UCSF/ LLNL project (5/2014): self.pd["lattice_characters"] = M.best() for item in self.pd["lattice_characters"]: del item["minimizer"] return self.pd
def index_and_integrate(self,frames,files,spotfinder_results): self.pd = establish_dict_for_refinement(frames,spotfinder_results) self.spotfinder_results = spotfinder_results self.frames = frames #------------------------------------------------------------ ai,P = index_and_refine(pd = self.pd, rawframes = files, spotfinder_results = spotfinder_results, verbose = False, horizon_phil = self.horizons_phil) self.indexing_ai = ai #------------------------------------------------------------ if self.horizons_phil.compatibility_allow==False: M = best_character_to_IndexPrinter(ai,P,self.pd,True,self.horizons_phil) else: from labelit.diffraction.compatibility import best_compatibility_to_IndexPrinter M = best_compatibility_to_IndexPrinter(ai,P,self.pd,files, spotfinder_results) #------------------------------------------------------------ if self.horizons_phil.__dict__.has_key("writer"): self.horizons_phil.writer.make_image_plots_detail( ai=ai,pd=self.pd,inframes=files,spotfinder_results=spotfinder_results) if not self.horizons_phil.index_only: if 0: from labelit.dps import IntegrateCharacters IC = IntegrateCharacters(M,self.pd) IC.write_mosflm_matrices() IC.find_best() IC.show() if 1: from rstbx.new_horizons.oscillation_shots import IntegrateCharacters IC = IntegrateCharacters(M,self.pd,self.horizons_phil,files, spotfinder_results) IC.find_best() self.last_saved_best = IC.save_best() IC.show() # Lattice character information added for special UCSF/ LLNL project (5/2014): self.pd["lattice_characters"]=M.best() for item in self.pd["lattice_characters"]: del item["minimizer"] return self.pd