tomwer.core.scan.scanfactory.ScanFactory#

class tomwer.core.scan.scanfactory.ScanFactory#

Factory any TomoObject

static create_scan_object(scan_path, entry=None, accept_bliss_scan=False)#
Parameters:
  • scan_path (TextIOWrapper) – path to the scan directory or file

  • entry – entry on the file. Requested for hdf5 files

  • accept_bliss_scan – if True the factory can return some BlissScan But this is only compatible with the Tomomill processing.

Returns:

TomwerScanBase instance fitting the scan folder or scan path

Return type:

tomwer.core.scan.scanbase.TomwerScanBase

Raises:

ValueError if scan_path is not containing a scan

static create_scan_object_frm_dict(_dict)#
static create_scan_objects(scan_path, accept_bliss_scan=True)#
Return type:

tuple

static create_tomo_object_from_identifier(identifier)#

Create an instance of TomoScanBase from his identifier if possible

Parameters:

identifier (str) – identifier of the TomoScanBase

Raises:

TypeError if identifier is not a str

Raises:

ValueError if identifier cannot be converted back to an instance of TomoScanBase

Return type:

TomoObject

static is_edf_tomo(scan_path)#
Parameters:

scan_path (str) – path to the scan directory or file

Returns:

True if given path define a tomo scan based on .edf file

Return type:

bool

static is_hdf5_tomo(scan_path)#
Parameters:

scan_path

Returns:

static is_tomo_scandir(scan_path)#
Parameters:

scan_path (str) – path to the scan directory or file

Returns:

True if the given path / file is a tomo_scandir. For now yes by default

Return type:

bool

static mock_scan(type_='edf')#

Mock a scan structure which is not associated to any real acquistion