tomoscan.esrf.scan.mock.MockEDF#
- class tomoscan.esrf.scan.mock.MockEDF(scan_path, n_radio, n_ini_radio=None, n_extra_radio=0, scan_range=360, n_recons=0, n_pag_recons=0, recons_vol=False, dim=200, scene='noise', dark_n=0, ref_n=0, flat_n=0, rotation_angle_endpoint=False, energy=None, pixel_size=None, distance=None, srcurrent_start=200.0, srcurrent_end=100.0)#
Bases:
ScanMock
Mock a EDF acquisition
- __init__(scan_path, n_radio, n_ini_radio=None, n_extra_radio=0, scan_range=360, n_recons=0, n_pag_recons=0, recons_vol=False, dim=200, scene='noise', dark_n=0, ref_n=0, flat_n=0, rotation_angle_endpoint=False, energy=None, pixel_size=None, distance=None, srcurrent_start=200.0, srcurrent_end=100.0)#
- Parameters
scan_path –
n_radio –
n_ini_radio –
n_extra_radio –
scan_range –
n_recons –
n_pag_recons –
recons_vol –
dim –
ref_n – repalced by flat_n
flat_n –
dark_n –
scene – scene type. * ‘noise’: generate radios from numpy.random * increase value: first frame value will be0, then second 1… * arange: arange through frames * ‘perfect-sphere: generate a sphere which just fit in the detector dimensions
TODO: add some differente scene type.
Methods
__init__
(scan_path, n_radio[, n_ini_radio, ...])- param scan_path
add_dark
(index)add_dark_series
(scan_path, n_elmt, index, ...)add_flat
(index)add_flat_series
(scan_path, n_elmt, index, ...)add_pag_reconstruction
([index])add_radio
([index])add_recons_vol
()add_reconstruction
([index])end_acquisition
()fastMockAcquisition
(folder[, n_radio, ...])Simple function creating an acquisition into the given directory This won't complete data, scan.info of scan.xml files but just create the structure that data watcher is able to detect in edf mode.
get_info_file
()mockReconstruction
(folder[, nRecons, nPagRecons])create reconstruction files into the given folder
mockScan
(scanID[, nRadio, nRecons, ...])Create some random radios and reconstruction in the folder
write_metadata
(n_radio, scan_range, flat_n, ...)Attributes
PIXEL_SIZE
distance
- rtype
float
energy
- rtype
float
pixel_size
- rtype
float
- static fastMockAcquisition(folder, n_radio=20, n_extra_radio=0, scan_range=360)#
Simple function creating an acquisition into the given directory This won’t complete data, scan.info of scan.xml files but just create the structure that data watcher is able to detect in edf mode.
- static mockReconstruction(folder, nRecons=5, nPagRecons=0)#
create reconstruction files into the given folder
- Parameters
folder – the path of the folder where to save the reconstruction
nRecons – the number of reconstruction to mock
nPagRecons – the number of paganin reconstruction to mock
volFile – true if we want to add a volFile with reconstruction
- static mockScan(scanID, nRadio=5, nRecons=1, nPagRecons=0, dim=10, scan_range=360, n_extra_radio=0, start_dark=False, end_dark=False, start_flat=False, end_flat=False, start_dark_data=None, end_dark_data=None, start_flat_data=None, end_flat_data=None)#
Create some random radios and reconstruction in the folder
- Parameters
scanID – the folder where to save the radios and scans
nRadio – The number of radios to create
nRecons – the number of reconstruction to mock
nRecons – the number of paganin reconstruction to mock
dim – dimension of the files (nb row/columns)
scan_range – scan range, usually 180 or 360
n_extra_radio – number of radio run after the full range is made usually used to observe any sample movement during acquisition
start_dark – do we want to create dark series at start
end_dark – do we want to create dark series at end
start_flat – do we want to create flat series at start
end_flat – do we want to create flat series at end
start_dark_data – if start_dark set to True Optional value for the dark series. Else will generate some random values
end_dark_data – if end_dark set to True Optional value for the dark series. Else will generate some random values
start_flat_data – if start_flat set to True Optional value for the flat series. Else will generate some random values
end_flat_data – if end_flat set to True Optional value for the flat series. Else will generate some random values