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 (str) – path to the scan directory or file

  • entry (str | None) – entry on the file. Requested for hdf5 files

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

Return type:

TomoScanBase

Returns:

TomwerScanBase instance fitting the scan folder or scan path

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 | BaseIdentifier) – 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

Return type:

bool

Returns:

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

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

Return type:

bool

Returns:

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

static mock_scan(type_='edf')#

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