csaxs_bec.bec_ipython_client.plugins.omny.omny_general_tools.PtychoReconstructor#

class PtychoReconstructor(folder_name: str = 'reconstruction_queue')[source]#

Bases: object

Writes ptychography reconstruction queue files after each scan projection.

An external reconstruction engine monitors the queue folder and picks up .dat files as they are written.

Usage:

reconstructor = PtychoReconstructor(folder_name=”reconstruction_queue”) reconstructor.write(

scan_list=[1023, 1024], next_scan_number=1025, base_path=”~/data/raw”,

)

Methods

write

Write a reconstruction queue file for the given scan list.

write(scan_list: list, next_scan_number: int, base_path: str = '~/data/raw/analysis/')[source]#

Write a reconstruction queue file for the given scan list.

Parameters:
  • scan_list (list) – Scan numbers belonging to this projection (may contain multiple entries when stitching).

  • next_scan_number (int) – The current next scan number, used to name the queue file.

  • base_path (str) – Root path under which the queue folder lives.