diff --git a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni_optics_mixin.py b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni_optics_mixin.py index 10915a20..d2dee00b 100644 --- a/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni_optics_mixin.py +++ b/csaxs_bec/bec_ipython_client/plugins/LamNI/lamni_optics_mixin.py @@ -537,19 +537,18 @@ class LamNIOpticsMixin: distance = -loptz_val + 85.6 + 52 print(f"The sample is in a distance of {distance:.1f} mm from the FZP.") + print(f"At the current energy of {mokev_val:.4f} keV we have following options:\n") + + wavelength = 1.2398e-9 / mokev_val + diameters = [80e-6, 100e-6, 120e-6, 150e-6, 170e-6, 200e-6, 220e-6, 250e-6] console = Console() - table = Table( - title=f"At the current energy of {mokev_val:.4f} keV we have following options:", - box=box.SQUARE, - ) + table = Table(title="Outermost zone width \033[1m60 nm\033[0m", box=box.SQUARE) table.add_column("Diameter", justify="center") table.add_column("Focal distance", justify="center") table.add_column("Current beam size", justify="center") - wavelength = 1.2398e-9 / mokev_val - for diameter in diameters: outermost_zonewidth = 60e-9 focal_distance = diameter * outermost_zonewidth / wavelength @@ -562,6 +561,31 @@ class LamNIOpticsMixin: f"{beam_size:.2f} microns", ) + console.print(table) + + # Outermost zone width 30 nm -- diameters match flomni's 30nm FZP + # (ffzp_info(), flomni_optics_mixin.py) now that the zone plate + # mounted in LamNI is the same one mounted in Flomni. + diameters = [140e-6, 170e-6, 200e-6, 250e-6] + + console = Console() + table = Table(title="Outermost zone width \033[1m30 nm\033[0m", box=box.SQUARE) + table.add_column("Diameter", justify="center") + table.add_column("Focal distance", justify="center") + table.add_column("Current beam size", justify="center") + + for diameter in diameters: + outermost_zonewidth = 30e-9 + focal_distance = diameter * outermost_zonewidth / wavelength + beam_size = ( + -diameter / (focal_distance * 1000) * (focal_distance * 1000 - distance) * 1e6 + ) + table.add_row( + f"{diameter*1e6:.2f} microns", + f"{focal_distance*1000:.2f} mm", + f"{beam_size:.2f} microns", + ) + console.print(table) print( "The numbers presented here are for a sample in the plane of the lamni sample holder.\n"