feat(devices): add FZP details user parameter to optics stages
Adds a free-text "fzp_details" userParameter (default "manufacturing notes here") to the loptx/foptx/ofzpx optics-stage devices for LamNI, flomni and OMNY, alongside the existing fzp_diameter/ fzp_outermost_zone_width parameters, and prints it in each beamline's tomography-start PDF report. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit was merged in pull request #280.
This commit is contained in:
@@ -2176,6 +2176,10 @@ class LamNI(TomoQueueMixin, LamNIAlignmentMixin, LamNIOpticsMixin, LamniGuiTools
|
||||
fzp_zone_width_nm = self._get_user_param_safe("loptx", "fzp_outermost_zone_width")
|
||||
except Exception:
|
||||
fzp_diameter_um = fzp_zone_width_nm = "N/A"
|
||||
try:
|
||||
fzp_details = self._get_user_param_safe("loptx", "fzp_details")
|
||||
except Exception:
|
||||
fzp_details = "N/A"
|
||||
# FZP focal distance: same formula as lfzp_info(), from the values
|
||||
# above and the current photon energy -- only this needs energy_kev.
|
||||
try:
|
||||
@@ -2220,6 +2224,7 @@ class LamNI(TomoQueueMixin, LamNIAlignmentMixin, LamNIOpticsMixin, LamniGuiTools
|
||||
f"{'Tomo type:':<{padding}}{self.tomo_type}\n",
|
||||
f"{'FZP diameter:':<{padding}}{fzp_diameter_um} microns\n",
|
||||
f"{'FZP outermost zone width:':<{padding}}{fzp_zone_width_nm} nm\n",
|
||||
f"{'FZP details:':<{padding}}{fzp_details}\n",
|
||||
f"{'FZP focal distance:':<{padding}}{focal_distance_str} mm\n",
|
||||
f"{'FZP focus-to-sample distance:':<{padding}}{fzp_sample_distance_str} mm\n",
|
||||
f"{'Sample-to-detector distance:':<{padding}}{detector_distance_str} mm\n",
|
||||
|
||||
@@ -3807,6 +3807,10 @@ class Flomni(
|
||||
fzp_zone_width_nm = self._get_user_param_safe("foptx", "fzp_outermost_zone_width")
|
||||
except Exception:
|
||||
fzp_diameter_um = fzp_zone_width_nm = "N/A"
|
||||
try:
|
||||
fzp_details = self._get_user_param_safe("foptx", "fzp_details")
|
||||
except Exception:
|
||||
fzp_details = "N/A"
|
||||
# FZP focal distance: same formula as ffzp_info(), from the values
|
||||
# above and the current photon energy -- only this needs energy_kev.
|
||||
try:
|
||||
@@ -3849,6 +3853,7 @@ class Flomni(
|
||||
f"{'Angular step within sub-tomogram:':<{padding}}{self.tomo_angle_stepsize:.2f}\n",
|
||||
f"{'FZP diameter:':<{padding}}{fzp_diameter_um} microns\n",
|
||||
f"{'FZP outermost zone width:':<{padding}}{fzp_zone_width_nm} nm\n",
|
||||
f"{'FZP details:':<{padding}}{fzp_details}\n",
|
||||
f"{'FZP focal distance:':<{padding}}{focal_distance_str} mm\n",
|
||||
f"{'FZP focus-to-sample distance:':<{padding}}{fzp_sample_distance_str} mm\n",
|
||||
f"{'Sample-to-detector distance:':<{padding}}{detector_distance_str} mm\n",
|
||||
|
||||
@@ -1456,6 +1456,10 @@ class OMNY(
|
||||
fovxy = f"{self.fovx:.2f}/{self.fovy:.2f}"
|
||||
stitching = f"{self.stitch_x:.2f}/{self.stitch_y:.2f}"
|
||||
dataset_id = str(self.client.queue.next_dataset_number)
|
||||
try:
|
||||
fzp_details = self._get_user_param_safe("ofzpx", "fzp_details")
|
||||
except Exception:
|
||||
fzp_details = "N/A"
|
||||
content = [
|
||||
f"{'Sample Name:':<{padding}}{self.sample_name:>{padding}}\n",
|
||||
f"{'Measurement ID:':<{padding}}{str(self.tomo_id):>{padding}}\n",
|
||||
@@ -1472,6 +1476,7 @@ class OMNY(
|
||||
f"{'Stitching:':<{padding}}{stitching:>{padding}}\n",
|
||||
f"{'Number of individual sub-tomograms:':<{padding}}{8:>{padding}}\n",
|
||||
f"{'Angular step within sub-tomogram:':<{padding}}{self.tomo_angle_stepsize:>{padding}.2f}\n",
|
||||
f"{'FZP details:':<{padding}}{fzp_details}\n",
|
||||
"Add current temperature and pressure status",
|
||||
]
|
||||
content = "".join(content)
|
||||
|
||||
@@ -94,6 +94,7 @@ foptx:
|
||||
fzp_diameter: 170 # microns
|
||||
fzp_outermost_zone_width: 60 # nm
|
||||
detector_distance: -1 # mm, sample-to-detector; unknown for now
|
||||
fzp_details: "manufacturing notes here" # free-text FZP manufacturing notes
|
||||
deviceTags:
|
||||
- ptycho_flomni
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ loptx:
|
||||
fzp_diameter: 170 # microns
|
||||
fzp_outermost_zone_width: 60 # nm
|
||||
detector_distance: -1 # mm, sample-to-detector; unknown for now
|
||||
fzp_details: "manufacturing notes here" # free-text FZP manufacturing notes
|
||||
deviceTags:
|
||||
- ptycho_lamni
|
||||
lopty:
|
||||
|
||||
@@ -216,6 +216,7 @@ ofzpx:
|
||||
connectionTimeout: 20
|
||||
userParameter:
|
||||
in: -0.4317
|
||||
fzp_details: "manufacturing notes here" # free-text FZP manufacturing notes
|
||||
deviceTags:
|
||||
- ptycho_omny
|
||||
ofzpy:
|
||||
|
||||
@@ -133,6 +133,7 @@ foptx:
|
||||
fzp_diameter: 170 # microns
|
||||
fzp_outermost_zone_width: 60 # nm
|
||||
detector_distance: -1 # mm, sample-to-detector; unknown for now
|
||||
fzp_details: "manufacturing notes here" # free-text FZP manufacturing notes
|
||||
deviceTags:
|
||||
- simulated_flomni
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ loptx:
|
||||
fzp_diameter: 170 # microns
|
||||
fzp_outermost_zone_width: 60 # nm
|
||||
detector_distance: -1 # mm, sample-to-detector; unknown for now
|
||||
fzp_details: "manufacturing notes here" # free-text FZP manufacturing notes
|
||||
deviceTags:
|
||||
- simulated_lamni
|
||||
lopty:
|
||||
|
||||
@@ -171,6 +171,7 @@ ofzpx:
|
||||
connectionTimeout: 20
|
||||
userParameter:
|
||||
in: -0.4317
|
||||
fzp_details: "manufacturing notes here" # free-text FZP manufacturing notes
|
||||
deviceTags:
|
||||
- simulated_omny
|
||||
ofzpy:
|
||||
|
||||
Reference in New Issue
Block a user