meta_analysis
The purpose of this module is to provide routines for running some pre-processing analysis on the data. This was motivated by the need to work out e.g. reciprocal space bounds on scans in a performant way. The decision was made to move this into the core of the module .
Module Contents
Functions
Takes a requested file size, a start and a stop. Works out the step that will give you a resultant file of your requested filesize. To calculate start and stop you can use Scan.q_bounds, or calculate it yourself. |
|
Takes a scan recorded using i07’s excalibur detector, which is a bit broken. Attempts to work out which frames are broken. Returns a list of image indices corresponding to the frames that we think are broken. |
|
This is the public facing function that can be used to skip all dodgy frames captured by i07’s excalibur detector. |
API
- meta_analysis.get_step_from_filesize(start: numpy.ndarray, stop: numpy.ndarray, file_size: float = 100) numpy.ndarray
Takes a requested file size, a start and a stop. Works out the step that will give you a resultant file of your requested filesize. To calculate start and stop you can use Scan.q_bounds, or calculate it yourself.
- Args:
- start:
array-like [qx_min qy_min qz_min]
- stop:
array-like [qx_max qy_max qz_max]
- file_size:
Requested output filesize in MB. Defaults to 100 MB.
- Returns:
A numpy array of [step step step] (since step_x=step_y=step_z).
- meta_analysis._find_exc_broken_frames(scan: fast_rsm.scan.Scan)
Takes a scan recorded using i07’s excalibur detector, which is a bit broken. Attempts to work out which frames are broken. Returns a list of image indices corresponding to the frames that we think are broken.
For now this simple test relies on the broken frames being much brighter than its preceding frames.
- meta_analysis.skip_i07_exc_broken_frames(experiment: fast_rsm.experiment.Experiment)
This is the public facing function that can be used to skip all dodgy frames captured by i07’s excalibur detector.