This commit is contained in:
@@ -41,6 +41,7 @@ import yaml
|
||||
from bec_lib.file_utils import get_full_path
|
||||
from bec_lib.logger import bec_logger
|
||||
from bec_server.scan_server.scans.scan_base import ScanInfo as ScanServerScanInfo
|
||||
from jfjoch_client.models.azim_int_settings import AzimIntSettings
|
||||
from jfjoch_client.models.dataset_settings import DatasetSettings
|
||||
from jfjoch_client.models.detector_settings import DetectorSettings
|
||||
from jfjoch_client.models.detector_state import DetectorState
|
||||
@@ -85,7 +86,12 @@ class Eiger(PSIDeviceBase):
|
||||
**kwargs: Additional keyword arguments.
|
||||
"""
|
||||
|
||||
USER_ACCESS = ["set_detector_distance", "set_beam_center", "print_detector_distance_and_center"]
|
||||
USER_ACCESS = [
|
||||
"set_detector_distance",
|
||||
"set_beam_center",
|
||||
"print_detector_distance_and_center",
|
||||
"set_azi_settings",
|
||||
]
|
||||
|
||||
file_event = Cpt(FileEventSignal, name="file_event")
|
||||
preview_image = Cpt(PreviewSignal, name="preview_image", ndim=2)
|
||||
@@ -164,6 +170,36 @@ class Eiger(PSIDeviceBase):
|
||||
print(f"Detector Distance : {self.detector_distance}")
|
||||
print(f"Beam cetner position (x,y) : {self.beam_center}")
|
||||
|
||||
def set_azi_settings(
|
||||
self,
|
||||
pol_cor: bool,
|
||||
solid_angle_corr: bool,
|
||||
high_q_recip_a: float,
|
||||
low_q_recip_a: float,
|
||||
q_spacing: float,
|
||||
azimuthal_bins: int = 16,
|
||||
) -> None:
|
||||
"""
|
||||
Set the azimuthal integration settings.
|
||||
|
||||
Args:
|
||||
pol_cor (bool): Apply polarization correction for azimuthal integration.
|
||||
solid_angle_corr (bool): Apply solid angle correction for azimuthal integration.
|
||||
high_q_recip_a (float): High q value in reciprocal angstroms.
|
||||
low_q_recip_a (float): Low q value in reciprocal angstroms.
|
||||
q_spacing (float): Q spacing.
|
||||
azimuthal_bins (int): Number of azimuthal (phi) bins; 1 = standard 1D azimuthal integration.
|
||||
"""
|
||||
model = AzimIntSettings(
|
||||
polarization_corr=pol_cor,
|
||||
solid_angle_corr=solid_angle_corr,
|
||||
high_q_recip_a=high_q_recip_a,
|
||||
low_q_recip_a=low_q_recip_a,
|
||||
q_spacing=q_spacing,
|
||||
azimuthal_bins=azimuthal_bins,
|
||||
)
|
||||
self.jfj_client.api.config_azim_int_put(azim_int_settings=model, _request_timeout=5)
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
@property
|
||||
def beam_center(self) -> tuple[float, float]:
|
||||
|
||||
Reference in New Issue
Block a user