xfel.cxi package

Subpackages

Submodules

xfel.cxi.average_spots module

xfel.cxi.average_spots.ImageFactory(path)
xfel.cxi.average_spots.img_add(path, img_sum, dist_sum, nrg_sum, nmemb)
xfel.cxi.average_spots.main(argv=None)
xfel.cxi.average_spots.spot_add(path, spot_sum, dist_sum, nrg_sum, nmemb)

xfel.cxi.completeness_plot module

xfel.cxi.correction_vector_plot module

class xfel.cxi.correction_vector_plot.lines(params)

Bases: correction_vector_store

literals()
vectors()
class xfel.cxi.correction_vector_plot.manage_sql(params)

Bases: object

get_cursor()
get_frame_dictionary()
initialize_tables_and_insert_command()
insert(run, itile, tokens)
send_insert_command()
xfel.cxi.correction_vector_plot.run_correction_vector_plot(working_phil)

xfel.cxi.cxi_cc module

xfel.cxi.cxi_cc.binned_correlation(self, other, include_negatives=False)
xfel.cxi.cxi_cc.correlation(self, other, include_negatives=False)
xfel.cxi.cxi_cc.load_cc_data(params, reindexing_op, output)
xfel.cxi.cxi_cc.r1_factor(self, other, scale_factor=None, assume_index_matching=False, use_binning=False)

Get the R1 factor according to this formula

\[R1 = \dfrac{\sum{||F| - k|F'||}}{\sum{|F|}}\]

where F is self.data() and F’ is other.data() and k is the factor to put F’ on the same scale as F

xfel.cxi.cxi_cc.r_split(self, other, assume_index_matching=False, use_binning=False)
xfel.cxi.cxi_cc.run_cc(params, reindexing_op, output)
xfel.cxi.cxi_cc.scale_factor(self, other, weights=None, cutoff_factor=None, use_binning=False)

The analytical expression for the least squares scale factor.

K = sum(w * yo * yc) / sum(w * yc^2)

If the optional cutoff_factor argument is provided, only the reflections whose magnitudes are greater than cutoff_factor * max(yo) will be included in the calculation.

xfel.cxi.cxi_cc.split_sigma_test(self, other, scale, use_binning=False, show_plot=False)

Calculates the split sigma ratio test by Peter Zwart: ssr = sum( (Iah-Ibh)^2 ) / sum( sigma_ah^2 + sigma_bh^2)

where Iah and Ibh are merged intensities for a given hkl from two halves of a dataset (a and b). Likewise for sigma_ah and sigma_bh.

ssr (split sigma ratio) should approximately equal 1 if the errors are correctly estimated.

xfel.cxi.display_powder_arcs module

xfel.cxi.display_powder_arcs.apply_gaussian_noise(image, params)
xfel.cxi.display_powder_arcs.get_mmtbx_icalc(code, d_min, anomalous_flag=False)
xfel.cxi.display_powder_arcs.is_pinwheel_region(dx, dy)
xfel.cxi.display_powder_arcs.superimpose_powder_arcs(image, params)

xfel.cxi.display_spots module

xfel.cxi.display_spots.ImageFactory(filename)
class xfel.cxi.display_spots.empty

Bases: object

xfel.cxi.display_spots.run_one(path, *command_line, **kwargs)
xfel.cxi.display_spots.run_one_index(path, *arguments, **kwargs)
xfel.cxi.display_spots.run_one_index_core(horizons_phil)
xfel.cxi.display_spots.view_raw_image(path, *command_line, **kwargs)
class xfel.cxi.display_spots.wrapper_of_callback(info=None)

Bases: object

display(path)
display_with_callback(path)
user_callback(dc, wxpanel, wx)
for spot in self.spotfinder.images[self.frames[0]][“spots_total”]:
for pxl in spot.bodypixels:
x,y = wxpanel._img.image_coords_as_screen_coords(

pxl.y, pxl.x)

dc.SetPen(wx.Pen(‘red’)) dc.SetBrush(wx.RED_BRUSH) dc.DrawCircle(x,y,1)

x,y = wxpanel._img.image_coords_as_screen_coords(

spot.ctr_mass_y(), spot.ctr_mass_x())

dc.SetPen(wx.Pen(‘green’)) dc.SetBrush(wx.GREEN_BRUSH) dc.DrawCircle(x,y,1)

xfel.cxi.integrate_image_api module

xfel.cxi.integrate_image_api.integrate_one_image(data, **kwargs)

xfel.cxi.merging_database module

xfel.cxi.merging_database_fs module

xfel.cxi.merging_database_sqlite3 module

xfel.cxi.strong_zulu module

xfel.cxi.strong_zulu.integrate_one_image(data)

xfel.cxi.util module

xfel.cxi.util.is_odd_numbered(file_name, use_hash=False)

Module contents