diffractem.pre_proc_opts module

class diffractem.pre_proc_opts.PreProcOpts(fn=None)[source]

Bases: object

agg_file_suffix: str

file suffix for aggregated patterns

agg_query: str

query string for aggregation of patterns

aggregate: bool

calculate aggregated patterns (only for real-time analysis)

cam_length: float

Average camera length (in m).

com_threshold: float

minimum counts in a pixel to be considered for the center-of-mass calculation

com_xrng: int

x range (px) around geometric pattern center in which to look for center of mass

com_yrng: int

y range (px) around geometric pattern center in which to look for center of mass

compression: Union[int, str]

gzip, none, 32004 (lz4)

Type

standard HDF5 compression. Suggested values

correct_saturation: bool

Correct for detector saturation using paralyzable model

dead_time: float

Dead time (in ms) for paralyzable detector model

dead_time_gap_factor: float

Factor for dead time in gap-pixels

det_shift_x_path: str

path in HDF5 files to lab frame detector shift (x)

det_shift_y_path: str

path in HDF5 files to lab frame detector shift (y)

ellipse_angle: float

cam length ellipticity angle. (e.g. 0 is x, pi/2 is y,…)

ellipse_ratio: float

ellipticity of camera lentgh along arbitrary axis

find_peaks: bool

apply peakfinder during image analysis

float: bool

Process images as floating-point

friedel_max_radius

maximum radius in pixels of peaks to be considered for Friedel refinement

friedel_refine

perform Friedel-pair center refinement in get_pattern_info

im_exc

default executable for indexamajig, can point to non-standard path

indexing_params: dict

indexamajig parameters for indexing

int_factor: int

Factor to apply to corrected images if float=False

integration_params: dict

indexamajig parameters for integration-only (without indexing)

interpolate_dead: bool

Interpolate dead pixels instead of masking

load(fn=None)[source]
lorentz_maxshift: float

maximum shift (px) of Lorentz fit center from center of mass

lorentz_radius: int

radius (px) around center of mass for Lorentz fit of zero order

mask_gaps: bool

Always mask detector gaps (regardless of dead pixel mask)

max_peaks: int

maximum number of peaks for peak finding

min_peaks

minimum peaks for Friedel refinement (and auto-preproc)

peak_data_path: str

path in HDF5 files to peak data in CXI format

peak_search_params: dict

parameters for peak finding using peakfinder8

peak_sigma

peak blurring for Friedel refinement (increase for sloppy initial center)

pixel_size: float

Pixel size (in m)

proc_dir: str

directory for pre-processed data

pxmask: str

Name of pixelmask TIF image

r_adf1: tuple

inner/outer radii for virtual ADF 1 (px)

r_adf2: tuple

inner/outer radii for virtual ADF 2 (px)

reference: str

Name of reference image for flat-field correction in TIF format

remove_background: bool

Determine and subtract background during image correction

save(fn)[source]
scratch_dir: str

scratch directory for temporary data

select_query: str

query string for selection of shots from raw data

shutter_time: float

Shutter time (in ms) for paralyzable detector model

wavelength: float

Radiation wave length (in A)

xsize: int

x image size (px)

y_scale: float

Scaling of camera length along y. DEPRECATED!

ysize: int

y image size (px)