csaxs_bec.bec_ipython_client.plugins.flomni.flomni.Flomni#

class Flomni(client)[source]#

Bases: FlomniInitStagesMixin, FlomniSampleTransferMixin, FlomniAlignmentMixin, FlomniOpticsMixin, cSAXSBeamlineChecks, flomniGuiTools

Methods

add_sample_database

Add a sample to the omny sample database.

axis_id_to_numeric

check_all_axes_of_fomni_referenced

check_position_is_valid

check_sensor_connected

check_tray_in

compute_additional_correction_y

compute_additional_correction_y_2

drive_axis_to_limit

ensure_fheater_up

ensure_gripper_up

ensure_osa_back

feedback_disable

feedback_enable_with_reset

feedback_enable_without_reset

feedback_status

feye_in

feye_out

ffzp_in

move in the flomni zone plate.

ffzp_info

flomni_init_stages

flomni_modify_storage_non_interactive

flomnigui_docs

flomnigui_idle

flomnigui_raise

flomnigui_remove_all_docks

flomnigui_show_cameras

flomnigui_show_gui

flomnigui_show_progress

flomnigui_show_xeyealign

flomnigui_show_xeyealign_fittab

flomnigui_stop_gui

foptics_in

Move in the flomni optics, including the FZP and the OSA.

foptics_out

Move out the flomni optics

fosa_in

fosa_out

ftransfer_confirm

ftransfer_controller_disable_mount_mode

ftransfer_controller_enable_mount_mode

ftransfer_controller_in_mount_mode

ftransfer_flomni_stage_in

ftransfer_flomni_stage_out

ftransfer_get_sample

ftransfer_gripper_close

ftransfer_gripper_is_open

ftransfer_gripper_move

ftransfer_gripper_open

ftransfer_modify_storage

ftransfer_put_sample

ftransfer_sample_change

ftransfer_show_all

get_alignment_offset

Compute the alignment offset for the given angle.

get_beamline_checks_enabled

laser_tracker_off

laser_tracker_on

laser_tracker_show_all

lights_off

lights_on

move_fheater_down

move_fheater_up

read_additional_correction_y

read_additional_correction_y_2

read_alignment_offset

remove_special_angles

Remove the special angles and set the number of repeats to 1

reset_correction

Reset the correction to the default values.

reset_tomo_alignment_fit

rt_off

rt_on

sample_get_name

Get the name of the sample currently in the given position.

set_client

set_limits

set_special_angles

Set the special angles for a tomo

set_web_password

Set the web password for the current BEC account.

show_signal_strength_interferometer

start_x_ray_eye_alignment

sub_tomo_scan

Performs a sub tomogram scan.

tomo_acquire_at_angle

Move fsamroy to angle, then move rtx/rty/rtz to the alignment-corrected scan center (same alignment-offset logic as tomo_scan_projection, but without stitching), and acquire a single frame or a burst via scans.acquire instead of running a fermat scan.

tomo_alignment_scan

Performs a tomogram alignment scan.

tomo_parameters

print and update the tomo parameters

tomo_reconstruct

write the tomo reconstruct file for the reconstruction queue

tomo_scan

start a tomo scan

tomo_scan_projection

write_alignment_scan_numbers

write_pdf_report

create and write the pdf report with the current flomni settings

xrayeye_alignment_start

xrayeye_update_frame

Attributes

beamline_checks_enabled

corridor_size

csaxs_bec_basepath

default_correction_file

default_correction_file_rel

fovx

fovy

frames_per_trigger

Number of burst frames acquired per point/projection.

golden_max_number_of_projections

golden_projections_at_0_deg_for_damage_estimation

golden_ratio_bunch_size

manual_shift_y

progress

Proxy dict backed by the BEC global variable tomo_progress.

ptycho_reconstruct_foldername

sample_name

single_point_instead_of_fermat_scan

If True, tomo_scan acquires a single point (or burst) at each angle via scans.acquire instead of running scans.flomni_fermat_scan.

stitch_x

stitch_y

tomo_angle_range

Total angular sweep in degrees for tomo_type 1 (equally spaced sub-tomograms), inclusive of the upper bound.

tomo_angle_stepsize

tomo_countingtime

tomo_shellstep

tomo_stitch_overlap

tomo_type

add_sample_database(samplename, date, eaccount, scan_number, setup, sample_additional_info, user)[source]#

Add a sample to the omny sample database. This also retrieves the tomo id.

ffzp_in()#

move in the flomni zone plate. This will disable rt feedback, move the FZP and re-enabled the feedback.

foptics_in()#

Move in the flomni optics, including the FZP and the OSA.

foptics_out()#

Move out the flomni optics

property frames_per_trigger#

Number of burst frames acquired per point/projection. Used both by scans.flomni_fermat_scan (via tomo_scan_projection) and by tomo_acquire_at_angle (scans.acquire).

get_alignment_offset(angle: float)#

Compute the alignment offset for the given angle.

Parameters:

angle (float) – The angle to compute the alignment offset for.

Returns:

The alignment offset in x, y and z direction.

Return type:

tuple

property progress: _ProgressProxy#

Proxy dict backed by the BEC global variable tomo_progress.

Readable from any BEC client session via:

client.get_global_var("tomo_progress")

Individual fields can be read and written just like a regular dict:

flomni.progress["projection"]          # read
flomni.progress["projection"] = 42     # write (persists immediately)

To update multiple fields atomically use _ProgressProxy.update():

flomni.progress.update(projection=42, angle=90.0)

To reset all fields to their defaults:

flomni.progress.reset()
remove_special_angles()[source]#

Remove the special angles and set the number of repeats to 1

reset_correction(use_default_correction=True)#

Reset the correction to the default values. If use_default_correction is False, the correction will be set to empty values. Otherwise the default values will be loaded.

Parameters:

use_default_correction (bool, optional) – If set to true, a call reset the correction to the default values. Defaults to True.

sample_get_name(position: int = 0) str#

Get the name of the sample currently in the given position.

set_special_angles(angles: list, repeats: int = 20, tolerance: float = 0.5)[source]#

Set the special angles for a tomo

Parameters:
  • angles (list) – List of special angles

  • repeats (int, optional) – Number of repeats at a special angle. Defaults to 20.

  • tolerance (float, optional) – Number of repeats at a special angle. Defaults to 0.5.

set_web_password(password: str) None[source]#

Set the web password for the current BEC account.

property single_point_instead_of_fermat_scan#

If True, tomo_scan acquires a single point (or burst) at each angle via scans.acquire instead of running scans.flomni_fermat_scan. Applies to all tomo_types, since it only changes how a given angle is acquired, not which angles are visited.

sub_tomo_scan(subtomo_number, start_angle=None)[source]#

Performs a sub tomogram scan. :param subtomo_number: The sub tomogram number. :type subtomo_number: int :param start_angle: The start angle of the scan. Defaults to None. :type start_angle: float, optional

tomo_acquire_at_angle(angle: float, frames_per_trigger: int | None = None)[source]#

Move fsamroy to angle, then move rtx/rty/rtz to the alignment-corrected scan center (same alignment-offset logic as tomo_scan_projection, but without stitching), and acquire a single frame or a burst via scans.acquire instead of running a fermat scan.

This mirrors the positioning sequence used internally by flomni_fermat_scan (rotation, then rtx/rty/rtz with laser-tracker on/check/move-to-region), but executes it as plain blocking client-side calls, since this runs in the BEC client, not on the scan server.

Parameters:
  • angle (float) – rotation angle [deg] to move fsamroy to.

  • frames_per_trigger (int, optional) – number of burst frames for this acquisition. Defaults to self.frames_per_trigger.

tomo_alignment_scan()[source]#

Performs a tomogram alignment scan. Collects all scan numbers acquired during the alignment, prints them at the end, and creates a BEC scilog text entry summarising the alignment scan numbers.

property tomo_angle_range#

Total angular sweep in degrees for tomo_type 1 (equally spaced sub-tomograms), inclusive of the upper bound. Either 180 (default, original behaviour) or 360.

tomo_parameters()[source]#

print and update the tomo parameters

tomo_reconstruct(base_path='~/data/raw/logs/reconstruction_queue')[source]#

write the tomo reconstruct file for the reconstruction queue

tomo_scan(subtomo_start=1, start_angle=None, projection_number=None)[source]#

start a tomo scan

write_pdf_report()[source]#

create and write the pdf report with the current flomni settings