diff --git a/pxii_bec/device_configs/pxii-beamline-states.yaml b/pxii_bec/device_configs/pxii-beamline-states.yaml index 2011edf..1f2e19b 100644 --- a/pxii_bec/device_configs/pxii-beamline-states.yaml +++ b/pxii_bec/device_configs/pxii-beamline-states.yaml @@ -16,6 +16,7 @@ states: aerotech_u: mount smargon_x: mount smargon_y: mount + smargon_z: mount smargon_chi: mount smargon_phi: mount xrf_pos: out @@ -32,8 +33,8 @@ states: diag_y: out fl_bright: 'on' aerotech_x: in - aerotech_y: work - aerotech_z: work + # aerotech_y: work + # aerotech_z: work # aerotech_u: mount # smargon_x: mount # smargon_y: mount @@ -53,8 +54,6 @@ states: diag_y: out fl_bright: 'on' aerotech_x: in - aerotech_y: work - aerotech_z: work # aerotech_u: mount # smargon_x: mount # smargon_y: mount @@ -92,6 +91,7 @@ states: coll_y: park cryo_pos: in det_cov: 'close' + det_z: 'mse' diag_y: park fl_bright: 'off' aerotech_x: in @@ -115,9 +115,9 @@ states: diag_y: scint fl_bright: 'off' aerotech_x: out - aerotech_y: mount - aerotech_z: mount - aerotech_u: mount + # aerotech_y: mount + # aerotech_z: mount + # aerotech_u: mount smargon_x: mount smargon_y: mount smargon_chi: mount @@ -135,9 +135,9 @@ states: diag_y: i1 fl_bright: 'off' aerotech_x: out - aerotech_y: mount - aerotech_z: mount - aerotech_u: mount + # aerotech_y: mount + # aerotech_z: mount + # aerotech_u: mount smargon_x: mount smargon_y: mount smargon_chi: mount @@ -155,8 +155,8 @@ states: diag_y: out fl_bright: 'on' aerotech_x: out - aerotech_y: mount - aerotech_z: mount + # aerotech_y: mount + # aerotech_z: mount aerotech_u: mount smargon_x: mount smargon_y: mount diff --git a/pxii_bec/device_configs/pxii-devices.yaml b/pxii_bec/device_configs/pxii-devices.yaml index 6159d25..3358c3a 100644 --- a/pxii_bec/device_configs/pxii-devices.yaml +++ b/pxii_bec/device_configs/pxii-devices.yaml @@ -64,17 +64,16 @@ aerotech: u: mount: 0 work: 0 - work: null x: in: 0 out: -10 safe: -50 y: - mount: 0 - work: 0 + mount: -0.0 + work: -0.031 z: mount: 0 - work: 0 + work: -0.01 bcu_bpm1: description: BCU BPM Channel 1 deviceClass: ophyd.EpicsSignalRO @@ -155,6 +154,17 @@ bcu_bpmsum: onFailure: buffer readOnly: true readoutPriority: monitored +bcu_shutter: + description: Fast Shutter + deviceClass: ophyd_devices.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SHUTTER:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline bcu_sl_xcen: description: BCU Slit X Centre deviceClass: ophyd_devices.EpicsMotor @@ -292,7 +302,7 @@ bs_x: onFailure: buffer readoutPriority: baseline userParameter: - in: 1.64 + in: 0.3 bs_y: description: Beamstop Y deviceClass: ophyd_devices.EpicsMotor @@ -304,7 +314,7 @@ bs_y: onFailure: buffer readoutPriority: baseline userParameter: - in: -0.6 + in: -3.35 bs_z: description: Beamstop Z deviceClass: ophyd_devices.EpicsMotor @@ -320,7 +330,7 @@ bs_z: max_blout: 70 min: 13 safe: 45.1 - samp: 15.3 + samp: 16.408 type: continuous work_min: 20 bsf_f1_y: @@ -433,6 +443,8 @@ coll_x: enabled: true onFailure: buffer readoutPriority: baseline + userParameter: + in: -1.275 coll_y: description: Collimator Y deviceClass: ophyd_devices.EpicsMotor @@ -444,9 +456,9 @@ coll_y: onFailure: buffer readoutPriority: baseline userParameter: - in: 40.9 + in: 39.06 intermediate: 32 - out: 20.0 + out: 20.002 park: 1 tol: 0.05 type: continuous @@ -602,6 +614,9 @@ det_y: enabled: true onFailure: buffer readoutPriority: baseline + userParameter: + work: 70 + xi: 213.601 det_z: description: Detector Z deviceClass: ophyd_devices.EpicsMotor @@ -612,6 +627,9 @@ det_z: enabled: true onFailure: buffer readoutPriority: baseline + userParameter: + mse: 800 + vis: 800 diag_y: description: Scintillator/diode Y deviceClass: ophyd_devices.EpicsMotor @@ -623,10 +641,10 @@ diag_y: onFailure: buffer readoutPriority: baseline userParameter: - i1: 43.4 + i1: 40.696 out: 20.0 park: 1 - scint: 38.0 + scint: 35.74 tol: 0.3 type: continuous diag_z: @@ -1203,6 +1221,26 @@ mag_ref: onFailure: buffer readOnly: true readoutPriority: baseline +microscope_stats: + description: Stats Signal of MS camera + deviceClass: pxii_bec.devices.stats_signal.StatsSignal + deviceConfig: + prefix: 'X10SA-ES-MS:' + enabled: true + readoutPriority: async + softwareTrigger: true +samcam_ecc: + description: Sample Camera Eccentricity + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:Eccentricity_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored samcam_exp: description: Sample Camera Exposure deviceClass: ophyd.EpicsSignal @@ -1237,6 +1275,30 @@ samcam_max: onFailure: buffer readOnly: true readoutPriority: monitored +samcam_mean: + description: Sample Camera Mean + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats1:MeanValue_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_sigma: + description: Sample Camera Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats1:Sigma_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored samcam_x: description: Sample Camera X deviceClass: ophyd.EpicsSignalRO @@ -1248,7 +1310,7 @@ samcam_x: enabled: true onFailure: buffer readOnly: true - readoutPriority: baseline + readoutPriority: monitored samcam_xsig: description: Sample Camera X Sigma deviceClass: ophyd.EpicsSignalRO @@ -1272,7 +1334,7 @@ samcam_y: enabled: true onFailure: buffer readOnly: true - readoutPriority: baseline + readoutPriority: monitored samcam_ysig: description: Sample Camera Y Sigma deviceClass: ophyd.EpicsSignalRO @@ -1285,6 +1347,16 @@ samcam_ysig: onFailure: buffer readOnly: true readoutPriority: monitored +scam: + description: Sample camera image contrast + deviceClass: pxii_bec.devices.contrast.CameraContrast + deviceConfig: + prefix: 'X10SA-ES-MS:Stats1:' + deviceTags: + - detector + enabled: true + readOnly: true + readoutPriority: monitored scam_zoom: description: Sample Camera Zoom deviceClass: ophyd_devices.EpicsMotor @@ -1635,6 +1707,16 @@ ss_xicam_ysig: onFailure: buffer readOnly: true readoutPriority: baseline +transm: + description: Beam Transmission + deviceClass: ophyd_devices.EpicsSignal + deviceConfig: + read_pv: X10SA-ES-SSFI:TRANSM-SET + write_pv: X10SA-ES-SSFI:TRANSM-SET + deviceTags: + - transm + enabled: true + readoutPriority: baseline vfm_bd: description: VFM Downstream Bender deviceClass: ophyd_devices.EpicsMotorEC @@ -1755,6 +1837,48 @@ vfm_yw: enabled: true onFailure: buffer readoutPriority: baseline +xi_focus: + description: Xeye Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:FOCUS + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_x: + description: Xeye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:TRX + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_zoom: + description: Xeye Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:ZOOM + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xidiode: + description: Xeye Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XEYEDI:READOUT + deviceTags: + - xeye + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored xrf_pos: description: XRF Positioner deviceClass: ophyd.EpicsSignal diff --git a/pxii_bec/device_configs/pxii-devices.yaml.broken b/pxii_bec/device_configs/pxii-devices.yaml.broken new file mode 100644 index 0000000..99d2d16 --- /dev/null +++ b/pxii_bec/device_configs/pxii-devices.yaml.broken @@ -0,0 +1,1893 @@ +# BEC Device Configuration File +# +# The device config consists of a mapping of device names to their configurations. +# +# The following fields are required for each device: +# - deviceClass: The class of the device (e.g., ophyd_devices.SimPositioner). +# - enabled: A boolean indicating if the device is enabled. +# - readoutPriority: Determines how the device is read out during a scan. Possible values are ["monitored", "baseline", "async", "on_request", "continuous"]. +# +# Optional fields (defaults shown): +# - connectionTimeout: Connection timeout in seconds. Default is 5. +# - description: A string description of the device. Default is "" (empty string). +# - deviceConfig: A dictionary of configuration parameters specific to the device class. Default is None. +# - deviceTags: A list/set of tags associated with the device. Default is an empty list/set. +# - needs: A list of other device names that this device depends on. Default is []. +# - onFailure: The action to take on failure. Possible values are ["buffer", "retry", "raise"]. Default is "retry". +# - readOnly: A boolean indicating if the device is read-only. Default is false. +# - softwareTrigger: A boolean indicating if the device uses software triggering. Default is false. +# - userParameter: A dictionary of user-defined parameters. Default is {}. +# +# Default values may be omitted for brevity. +########################################################################################################################## + + +# An example device configuration with all fields: + +# device1: +# deviceClass: ophyd_devices.SimPositioner +# description: Sample positioner device +# deviceConfig: +# delay: 1 +# update_frequency: 10 +# deviceTags: +# - frontend +# - motor +# enabled: true +# connectionTimeout: 20 +# readoutPriority: baseline +# needs: +# - device2 +# - device3 +# onFailure: retry +# readOnly: false +# softwareTrigger: false +# userParameter: +# in: 23.1 +# out: -50 + +########################################################################################################################## +optics_shutter: + description: Optics Shutter + deviceClass: ophyd_devices.optics_shutter.OpticsShutter + deviceConfig: {prefix: 'X10SA-EH1-PSYS:SH-A-'} + enabled: true + onFailure: retry + readoutPriority: baseline + softwareTrigger: false + userParameter: +aerotech: + description: REST-based device which connects to AareScan and Aerotech + deviceClass: pxii_bec.devices.aerotech.Aerotech + deviceConfig: + prefix: http://mx-x10sa-queue-01:5234 + deviceTags: + - aerotech + - motors + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + u: + mount: 0 + work: 0 + x: + in: 0 + out: -10 + safe: -50 + y: + mount: -0.0 + work: -0.016 + z: + mount: 0 + work: 0 +bcu_bpm1: + description: BCU BPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm2: + description: BCU BPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm3: + description: BCU BPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm4: + description: BCU BPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm_x: + description: BCU BPM X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCBPM:TRX + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_bpm_y: + description: BCU BPM Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCBPM:TRY + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_bpmsum: + description: BCU BPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_sl_xcen: + description: BCU Slit X Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:CENTER + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_xr: + description: BCU Slit Ring + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:TRXR + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_xsize: + description: BCU Slit X Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:SIZE + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_xw: + description: BCU Slit Wall + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:TRXW + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_yb: + description: BCU Slit Bottom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:TRYB + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_ycen: + description: BCU Slit Y Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:CENTER + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_ysize: + description: BCU Slit Y Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:SIZE + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_yt: + description: BCU Slit Top + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:TRYT + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_shutter: + description: Fast Shutter + deviceClass: ophyd_devices.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SHUTTER:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline +bl_bright: + description: Backlight Brightness + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BL:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + 'off': 0.0 + 'on': 1.3 + tol: 0.01 + type: continuous +bl_pos: + description: Backlight Positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BL:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete +bs_pos: + description: Beamstop Positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BS:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete +bs_x: + description: Beamstop X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BS:TRX + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 0.4 +bs_y: + description: Beamstop Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BS:TRY + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: -2.454 +bs_z: + description: Beamstop Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BS:TRZ + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + max_blin: 45.4 + max_blout: 70 + min: 13 + safe: 45.1 + samp: 16.408 + type: continuous + work_min: 20 +bsf_f1_y: + description: BSF Filter 1 Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFFI1:TRY + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_f2_y: + description: BSF Filter 2 Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFFI2:TRY + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xcen: + description: BSF X Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:CENTER + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xr: + description: BSF Slit Ring + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:TRXR + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xsize: + description: BSF X Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:SIZE + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xw: + description: BSF Slit Wall + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:TRXW + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_yb: + description: BSF Slit Bottom + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:TRYB + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_ycen: + description: BSF Y Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:CENTER + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_ysize: + description: BSF Y Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:SIZE + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_yt: + description: BSF Slit Top + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:TRYT + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +coll_x: + description: Collimator X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-COL:TRX + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: -2.889 +coll_y: + description: Collimator Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-COL:TRY + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 39.139 + intermediate: 32 + out: 20.002 + park: 1 + tol: 0.05 + type: continuous +cryo_pos: + description: Cryo positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-CS:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete +cryo_temp: + description: Cryo Temperature + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-CS:TEMP_RBV + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +cryo_x: + description: Cryo X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-CS:TRX + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_bragg: + description: DCM Bragg Angle + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTY + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_fpitch: + description: DCM 2nd Crystal Fine Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTY-CR2-FINEPITCH + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_froll: + description: DCM 2nd Crystal Fine roll + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTZ-CR2-FINEROLL + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_perp: + description: DCM Perpendicular + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:TRX-CR2 + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_pitch: + description: DCM 2nd Crystal Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTY-CR2-PITCH + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_x: + description: DCM Lateral + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:TRX + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +det_cov: + description: Detector cover + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DETCOV:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + close: 1 + open: 2 + type: discrete +det_xi_focus: + description: X-ray Eye 2 Focus + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:FOCUS + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline +det_xi_x: + description: X-ray Eye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:TRX + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline +det_xi_zoom: + description: X-ray Eye 2 Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:ZOOM + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline +det_y: + description: Detector Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-DET:TRY + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + work: 70 + xi: 213.601 +det_z: + description: Detector Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-DET:TRZ + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + mse: 800 + vis: 800 +diag_y: + description: Scintillator/diode Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SCL:TRY + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + i1: 40.8 + out: 20.0 + park: 1 + scint: 35.74 + tol: 0.3 + type: continuous +diag_z: + description: Scintillator/diode Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SCL:TRZ + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_bpm1: + description: FE XBPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm2: + description: FE XBPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm3: + description: FE XBPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm4: + description: FE XBPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm_x: + description: FE BPM X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-FE-XBPM1:TRX + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_bpm_y: + description: FE BPM Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-FE-XBPM1:TRY + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_bpmsum: + description: FE XBPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_sl_xcen: + description: FE Slit X Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:CENTERX + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_xr: + description: FE Slit X Ring + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRXR + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_xsize: + description: FE Slit X Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:SIZEX + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_xw: + description: FE Slit X Wall + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRXW + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_yb: + description: FE Slit Y Bottom + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRYB + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_ycen: + description: FE Slit Y Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:CENTERY + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_ysize: + description: FE Slit Y Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:SIZEY + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_yt: + description: FE Slit Y Top + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRYT + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fl_bright: + description: Frontlight Brightness + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-FL:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + 'off': 0.0 + 'on': 3.0 + tol: 0.01 + type: continuous +hfm_bd: + description: HFM Downstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:BNDD + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_bu: + description: HFM Upstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:BNDU + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_pitch: + description: HFM Virtual Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:PITCH + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_roll: + description: HFM Virtual Roll + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:ROLL + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_x: + description: HFM Virtual X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRX + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_xd: + description: HFM Downstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRXD + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_xu: + description: HFM Upstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRXU + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_y: + description: HFM Virtual Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRY + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_yaw: + description: HFM Virtual Yaw + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:YAW + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_ydw: + description: HFM Downstream Wall Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRYDW + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_yr: + description: HFM Ring Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRYR + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_yuw: + description: HFM Upstream Wall Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRYUW + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +i1: + description: I1 Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SCLDI:READOUT + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +i2: + description: I2 Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XEYEDI:READOUT + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +id_gap: + description: undulator gap + deviceClass: pxii_bec.devices.undulator.UndulatorGap + deviceConfig: + prefix: 'X10SA-UIND:' + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_bpm1: + description: LU BPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm2: + description: LU BPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm3: + description: LU BPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm4: + description: LU BPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm_x: + description: BPM2 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUBPM:TRX + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_bpm_y: + description: BPM2 Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUBPM:TRY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_bpmsum: + description: LU BPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_pod1_rotx: + description: SmarPod1 RX + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:ROTX + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_roty: + description: SmarPod1 RY + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:ROTY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_rotz: + description: SmarPod1 RZ + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:ROTZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_y: + description: SmarPod1 Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:TRY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_z: + description: SmarPod1 Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_rotx: + description: SmarPod2 RX + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:ROTX + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_roty: + description: SmarPod2 RY + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:ROTY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_rotz: + description: SmarPod2 RZ + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:ROTZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_y: + description: SmarPod2 Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:TRY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_z: + description: SmarPod2 Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_z1: + description: Lens Z1 + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUTRZ1:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_z2: + description: Lens Z2 + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUTRZ2:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +mag_ok: + description: Sample Sensor Check + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DFS:CBOX-CMP1 + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +mag_rbv: + description: Sample Sensor RBV + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DFS:CBOX-USER1 + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +mag_ref: + description: Sample Sensor Reference + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DFS:CBOX-REFVAL1 + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +microscope_stats: + description: Stats Signal of MS camera + deviceClass: pxii_bec.devices.stats_signal.StatsSignal + deviceConfig: + prefix: 'X10SA-ES-MS:' + enabled: true + readoutPriority: async + softwareTrigger: true +samcam_ecc: + description: Sample Camera Eccentricity + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:Eccentricity_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_exp: + description: Sample Camera Exposure + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:cam1:AcquireTime + deviceTags: + - scam + enabled: true + onFailure: buffer + readoutPriority: baseline +samcam_gain: + description: Sample Camera Gain + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:cam1:Gain + deviceTags: + - scam + enabled: true + onFailure: buffer + readoutPriority: baseline +samcam_max: + description: Sample Camera Max + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:MaxValue_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_mean: + description: Sample Camera Mean + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats1:MeanValue_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_sigma: + description: Sample Camera Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats1:Sigma_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_x: + description: Sample Camera X + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:CentroidX_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_xsig: + description: Sample Camera X Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:SigmaX_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_y: + description: Sample Camera Y + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:CentroidY_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_ysig: + description: Sample Camera Y Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:SigmaY_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +scam_zoom: + description: Sample Camera Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-MS:ZOOM + deviceTags: + - scam + enabled: true + onFailure: buffer + readoutPriority: baseline +sls_current: + description: SLS Current + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: ARS07-DPCT-0100:CURR + deviceTags: + - SLS + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +smargon: + description: REST-based device which connects to Smargopolo + deviceClass: pxii_bec.devices.smargopolo_smargon.Smargon + deviceConfig: + prefix: http://x10sa-smargopolo.psi.ch:3000 + deviceTags: + - smargon + - motors + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + chi: + mount: 0 + phi: + mount: 0 + x: + mount: 0 + y: + mount: 0 + z: + mount: 18 +ss_bpm1: + description: SS BPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm2: + description: SS BPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm3: + description: SS BPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm4: + description: SS BPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm_x: + description: SS BPM X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSBPM:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_bpm_y: + description: SS BPM Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSBPM:TRY + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_bpmsum: + description: SS BPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_f1_x: + description: SS Filter 1 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI1:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_f2_x: + description: SS Filter 2 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI2:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_f3_x: + description: SS Filter 2 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI3:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_f4_x: + description: SS Filter 4 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI4:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xcen: + description: SS Slit X Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:CENTER + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xr: + description: SS Slit Ring + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:TRXR + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xsize: + description: SS Slit X Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:SIZE + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xw: + description: SS Slit Wall + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:TRXW + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_yb: + description: SS Slit Bottom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:TRYB + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_ycen: + description: SS Slit Y Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:CENTER + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_ysize: + description: SS Slit Y Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:SIZE + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_yt: + description: SS Slit Top + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:TRYT + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xi_x: + description: SS X-ray Eye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSXI:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 7 + out: -2.1 + type: multi-position +ss_xi_y: + description: SS X-ray Eye Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSXI:TRY + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xicam_exp: + description: SS Camera Exposure + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:cam1:AcquireTime + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xicam_gain: + description: SS Camera Gain + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:cam1:Gain + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xicam_max: + description: SS Cam Max + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:MaxValue_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_xicam_x: + description: SS Camera X + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:CentroidX_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +ss_xicam_xsig: + description: SS Camera X Sigma + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:SigmaX_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +ss_xicam_y: + description: SS Camera Y + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:CentroidY_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +ss_xicam_ysig: + description: SS Camera Y Sigma + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:SigmaY_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +transm: + description: Beam Transmission + deviceClass: ophyd_devices.EpicsSignal + deviceConfig: + read_pv: X10SA-ES-SSFI:TRANSM-SET + write_pv: X10SA-ES-SSFI:TRANSM-SET + deviceTags: + - transm + enabled: true + readoutPriority: baseline +vfm_bd: + description: VFM Downstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:BNDD + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_bu: + description: VFM Upstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:BNDU + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_pitch: + description: VFM Virtual Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:PITCH + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_roll: + description: VFM Virtual Roll + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:ROLL + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_x: + description: VFM Virtual X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRX + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_xd: + description: VFM Downstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRXD + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_xu: + description: VFM Upstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRXU + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_y: + description: VFM Virtual Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRY + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_yaw: + description: VFM Virtual Yaw + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:YAW + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_ydr: + description: VFM Downstream Ring Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRYDR + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_yur: + description: VFM Upstream Ring Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRYUR + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_yw: + description: VFM Wall Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRYW + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_focus: + description: Xeye Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:FOCUS + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_x: + description: Xeye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:TRX + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_zoom: + description: Xeye Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:ZOOM + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xidiode: + description: Xeye Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XEYEDI:READOUT + deviceTags: + - xeye + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +xrf_pos: + description: XRF Positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XRF:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete diff --git a/pxii_bec/device_configs/pxii-devices.yaml.old b/pxii_bec/device_configs/pxii-devices.yaml.old new file mode 100644 index 0000000..48d4d9b --- /dev/null +++ b/pxii_bec/device_configs/pxii-devices.yaml.old @@ -0,0 +1,1875 @@ +# BEC Device Configuration File +# +# The device config consists of a mapping of device names to their configurations. +# +# The following fields are required for each device: +# - deviceClass: The class of the device (e.g., ophyd_devices.SimPositioner). +# - enabled: A boolean indicating if the device is enabled. +# - readoutPriority: Determines how the device is read out during a scan. Possible values are ["monitored", "baseline", "async", "on_request", "continuous"]. +# +# Optional fields (defaults shown): +# - connectionTimeout: Connection timeout in seconds. Default is 5. +# - description: A string description of the device. Default is "" (empty string). +# - deviceConfig: A dictionary of configuration parameters specific to the device class. Default is None. +# - deviceTags: A list/set of tags associated with the device. Default is an empty list/set. +# - needs: A list of other device names that this device depends on. Default is []. +# - onFailure: The action to take on failure. Possible values are ["buffer", "retry", "raise"]. Default is "retry". +# - readOnly: A boolean indicating if the device is read-only. Default is false. +# - softwareTrigger: A boolean indicating if the device uses software triggering. Default is false. +# - userParameter: A dictionary of user-defined parameters. Default is {}. +# +# Default values may be omitted for brevity. +########################################################################################################################## + + +# An example device configuration with all fields: + +# device1: +# deviceClass: ophyd_devices.SimPositioner +# description: Sample positioner device +# deviceConfig: +# delay: 1 +# update_frequency: 10 +# deviceTags: +# - frontend +# - motor +# enabled: true +# connectionTimeout: 20 +# readoutPriority: baseline +# needs: +# - device2 +# - device3 +# onFailure: retry +# readOnly: false +# softwareTrigger: false +# userParameter: +# in: 23.1 +# out: -50 + +########################################################################################################################## + + +aerotech: + description: REST-based device which connects to AareScan and Aerotech + deviceClass: pxii_bec.devices.aerotech.Aerotech + deviceConfig: + prefix: http://mx-x10sa-queue-01:5234 + deviceTags: + - aerotech + - motors + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + u: + mount: 0 + work: 0 + x: + in: 0 + out: -10 + safe: -50 + y: + mount: -0.0 + work: -0.016 + z: + mount: 0 + work: 0 +bcu_bpm1: + description: BCU BPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm2: + description: BCU BPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm3: + description: BCU BPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm4: + description: BCU BPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_bpm_x: + description: BCU BPM X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCBPM:TRX + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_bpm_y: + description: BCU BPM Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCBPM:TRY + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_bpmsum: + description: BCU BPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BCBPM:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +bcu_sl_xcen: + description: BCU Slit X Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:CENTER + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_xr: + description: BCU Slit Ring + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:TRXR + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_xsize: + description: BCU Slit X Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:SIZE + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_xw: + description: BCU Slit Wall + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLH:TRXW + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_yb: + description: BCU Slit Bottom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:TRYB + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_ycen: + description: BCU Slit Y Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:CENTER + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_ysize: + description: BCU Slit Y Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:SIZE + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bcu_sl_yt: + description: BCU Slit Top + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BCSLV:TRYT + deviceTags: + - bcu + enabled: true + onFailure: buffer + readoutPriority: baseline +bl_bright: + description: Backlight Brightness + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BL:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + 'off': 0.0 + 'on': 1.3 + tol: 0.01 + type: continuous +bl_pos: + description: Backlight Positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BL:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete +bs_pos: + description: Beamstop Positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-BS:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete +bs_x: + description: Beamstop X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BS:TRX + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 0.4 +bs_y: + description: Beamstop Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BS:TRY + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: -2.454 +bs_z: + description: Beamstop Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-BS:TRZ + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + max_blin: 45.4 + max_blout: 70 + min: 13 + safe: 45.1 + samp: 16.408 + type: continuous + work_min: 20 +bsf_f1_y: + description: BSF Filter 1 Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFFI1:TRY + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_f2_y: + description: BSF Filter 2 Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFFI2:TRY + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xcen: + description: BSF X Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:CENTER + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xr: + description: BSF Slit Ring + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:TRXR + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xsize: + description: BSF X Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:SIZE + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_xw: + description: BSF Slit Wall + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLH:TRXW + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_yb: + description: BSF Slit Bottom + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:TRYB + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_ycen: + description: BSF Y Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:CENTER + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_ysize: + description: BSF Y Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:SIZE + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +bsf_sl_yt: + description: BSF Slit Top + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-BSFSLV:TRYT + deviceTags: + - bsf + enabled: true + onFailure: buffer + readoutPriority: baseline +coll_x: + description: Collimator X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-COL:TRX + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: -2.889 +coll_y: + description: Collimator Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-COL:TRY + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 39.139 + intermediate: 32 + out: 20.002 + park: 1 + tol: 0.05 + type: continuous +cryo_pos: + description: Cryo positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-CS:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete +cryo_temp: + description: Cryo Temperature + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-CS:TEMP_RBV + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +cryo_x: + description: Cryo X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-CS:TRX + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_bragg: + description: DCM Bragg Angle + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTY + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_fpitch: + description: DCM 2nd Crystal Fine Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTY-CR2-FINEPITCH + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_froll: + description: DCM 2nd Crystal Fine roll + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTZ-CR2-FINEROLL + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_perp: + description: DCM Perpendicular + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:TRX-CR2 + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_pitch: + description: DCM 2nd Crystal Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:ROTY-CR2-PITCH + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +dcm_x: + description: DCM Lateral + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-OP-DCM:TRX + deviceTags: + - dcm + enabled: true + onFailure: buffer + readoutPriority: baseline +det_cov: + description: Detector cover + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DETCOV:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + close: 1 + open: 2 + type: discrete +det_xi_focus: + description: X-ray Eye 2 Focus + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:FOCUS + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline +det_xi_x: + description: X-ray Eye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:TRX + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline +det_xi_zoom: + description: X-ray Eye 2 Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:ZOOM + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline +det_y: + description: Detector Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-DET:TRY + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + work: 70 + xi: 213.601 +det_z: + description: Detector Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-DET:TRZ + deviceTags: + - det + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + mse: 800 + vis: 800 +diag_y: + description: Scintillator/diode Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SCL:TRY + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + i1: 40.8 + out: 20.0 + park: 1 + scint: 35.74 + tol: 0.3 + type: continuous +diag_z: + description: Scintillator/diode Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SCL:TRZ + deviceTags: + - se + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_bpm1: + description: FE XBPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm2: + description: FE XBPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm3: + description: FE XBPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm4: + description: FE XBPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_bpm_x: + description: FE BPM X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-FE-XBPM1:TRX + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_bpm_y: + description: FE BPM Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-FE-XBPM1:TRY + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_bpmsum: + description: FE XBPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-FE-XBPM1:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +fe_sl_xcen: + description: FE Slit X Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:CENTERX + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_xr: + description: FE Slit X Ring + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRXR + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_xsize: + description: FE Slit X Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:SIZEX + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_xw: + description: FE Slit X Wall + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRXW + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_yb: + description: FE Slit Y Bottom + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRYB + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_ycen: + description: FE Slit Y Centre + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:CENTERY + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_ysize: + description: FE Slit Y Size + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:SIZEY + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fe_sl_yt: + description: FE Slit Y Top + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-FE-SL1:TRYT + deviceTags: + - fe + enabled: true + onFailure: buffer + readoutPriority: baseline +fl_bright: + description: Frontlight Brightness + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-FL:SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + 'off': 0.0 + 'on': 3.0 + tol: 0.01 + type: continuous +hfm_bd: + description: HFM Downstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:BNDD + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_bu: + description: HFM Upstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:BNDU + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_pitch: + description: HFM Virtual Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:PITCH + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_roll: + description: HFM Virtual Roll + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:ROLL + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_x: + description: HFM Virtual X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRX + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_xd: + description: HFM Downstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRXD + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_xu: + description: HFM Upstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRXU + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_y: + description: HFM Virtual Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRY + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_yaw: + description: HFM Virtual Yaw + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:YAW + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_ydw: + description: HFM Downstream Wall Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRYDW + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_yr: + description: HFM Ring Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRYR + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +hfm_yuw: + description: HFM Upstream Wall Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-HFM:TRYUW + deviceTags: + - hfm + enabled: true + onFailure: buffer + readoutPriority: baseline +i1: + description: I1 Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SCLDI:READOUT + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +i2: + description: I2 Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XEYEDI:READOUT + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +id_gap: + description: undulator gap + deviceClass: pxii_bec.devices.undulator.UndulatorGap + deviceConfig: + prefix: 'X10SA-UIND:' + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_bpm1: + description: LU BPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm2: + description: LU BPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm3: + description: LU BPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm4: + description: LU BPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_bpm_x: + description: BPM2 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUBPM:TRX + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_bpm_y: + description: BPM2 Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUBPM:TRY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_bpmsum: + description: LU BPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-OP-LUBPM:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +lu_pod1_rotx: + description: SmarPod1 RX + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:ROTX + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_roty: + description: SmarPod1 RY + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:ROTY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_rotz: + description: SmarPod1 RZ + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:ROTZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_y: + description: SmarPod1 Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:TRY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod1_z: + description: SmarPod1 Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD1:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_rotx: + description: SmarPod2 RX + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:ROTX + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_roty: + description: SmarPod2 RY + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:ROTY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_rotz: + description: SmarPod2 RZ + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:ROTZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_y: + description: SmarPod2 Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:TRY + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_pod2_z: + description: SmarPod2 Z + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUPOD2:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_z1: + description: Lens Z1 + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUTRZ1:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +lu_z2: + description: Lens Z2 + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-OP-LUTRZ2:TRZ + deviceTags: + - lu + enabled: true + onFailure: buffer + readoutPriority: baseline +mag_ok: + description: Sample Sensor Check + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DFS:CBOX-CMP1 + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +mag_rbv: + description: Sample Sensor RBV + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DFS:CBOX-USER1 + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +mag_ref: + description: Sample Sensor Reference + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-DFS:CBOX-REFVAL1 + deviceTags: + - se + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +microscope_stats: + description: Stats Signal of MS camera + deviceClass: pxii_bec.devices.stats_signal.StatsSignal + deviceConfig: + prefix: 'X10SA-ES-MS:' + enabled: true + readoutPriority: async + softwareTrigger: true +samcam_ecc: + description: Sample Camera Eccentricity + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:Eccentricity_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_exp: + description: Sample Camera Exposure + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:cam1:AcquireTime + deviceTags: + - scam + enabled: true + onFailure: buffer + readoutPriority: baseline +samcam_gain: + description: Sample Camera Gain + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:cam1:Gain + deviceTags: + - scam + enabled: true + onFailure: buffer + readoutPriority: baseline +samcam_max: + description: Sample Camera Max + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:MaxValue_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_mean: + description: Sample Camera Mean + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats1:MeanValue_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_sigma: + description: Sample Camera Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats1:Sigma_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_x: + description: Sample Camera X + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:CentroidX_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_xsig: + description: Sample Camera X Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:SigmaX_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_y: + description: Sample Camera Y + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:CentroidY_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +samcam_ysig: + description: Sample Camera Y Sigma + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-MS:Stats5:SigmaY_RBV + deviceTags: + - scam + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +scam_zoom: + description: Sample Camera Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-MS:ZOOM + deviceTags: + - scam + enabled: true + onFailure: buffer + readoutPriority: baseline +sls_current: + description: SLS Current + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: ARS07-DPCT-0100:CURR + deviceTags: + - SLS + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +smargon: + description: REST-based device which connects to Smargopolo + deviceClass: pxii_bec.devices.smargopolo_smargon.Smargon + deviceConfig: + prefix: http://x10sa-smargopolo.psi.ch:3000 + deviceTags: + - smargon + - motors + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + chi: + mount: 0 + phi: + mount: 0 + x: + mount: 0 + y: + mount: 0 + z: + mount: 18 +ss_bpm1: + description: SS BPM Channel 1 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current1:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm2: + description: SS BPM Channel 2 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current2:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm3: + description: SS BPM Channel 3 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current3:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm4: + description: SS BPM Channel 4 + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:Current4:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_bpm_x: + description: SS BPM X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSBPM:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_bpm_y: + description: SS BPM Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSBPM:TRY + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_bpmsum: + description: SS BPM Summed + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSBPM:SumAll:MeanValue_RBV + deviceTags: + - bpm + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_f1_x: + description: SS Filter 1 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI1:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_f2_x: + description: SS Filter 2 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI2:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_f3_x: + description: SS Filter 2 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI3:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_f4_x: + description: SS Filter 4 X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSFI4:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xcen: + description: SS Slit X Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:CENTER + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xr: + description: SS Slit Ring + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:TRXR + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xsize: + description: SS Slit X Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:SIZE + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_xw: + description: SS Slit Wall + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLH:TRXW + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_yb: + description: SS Slit Bottom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:TRYB + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_ycen: + description: SS Slit Y Centre + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:CENTER + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_ysize: + description: SS Slit Y Size + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:SIZE + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_sl_yt: + description: SS Slit Top + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSSLV:TRYT + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xi_x: + description: SS X-ray Eye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSXI:TRX + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 7 + out: -2.1 + type: multi-position +ss_xi_y: + description: SS X-ray Eye Y + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-SSXI:TRY + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xicam_exp: + description: SS Camera Exposure + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:cam1:AcquireTime + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xicam_gain: + description: SS Camera Gain + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:cam1:Gain + deviceTags: + - ss + enabled: true + onFailure: buffer + readoutPriority: baseline +ss_xicam_max: + description: SS Cam Max + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:MaxValue_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +ss_xicam_x: + description: SS Camera X + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:CentroidX_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +ss_xicam_xsig: + description: SS Camera X Sigma + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:SigmaX_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +ss_xicam_y: + description: SS Camera Y + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:CentroidY_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +ss_xicam_ysig: + description: SS Camera Y Sigma + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-SSCAM:Stats5:SigmaY_RBV + deviceTags: + - ss + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: baseline +transm: + description: Beam Transmission + deviceClass: ophyd_devices.EpicsSignal + deviceConfig: + read_pv: X10SA-ES-SSFI:TRANSM-SET + write_pv: X10SA-ES-SSFI:TRANSM-SET + deviceTags: + - transm + enabled: true + readoutPriority: baseline +vfm_bd: + description: VFM Downstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:BNDD + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_bu: + description: VFM Upstream Bender + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:BNDU + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_pitch: + description: VFM Virtual Pitch + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:PITCH + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_roll: + description: VFM Virtual Roll + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:ROLL + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_x: + description: VFM Virtual X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRX + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_xd: + description: VFM Downstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRXD + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_xu: + description: VFM Upstream X + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRXU + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_y: + description: VFM Virtual Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRY + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_yaw: + description: VFM Virtual Yaw + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:YAW + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_ydr: + description: VFM Downstream Ring Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRYDR + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_yur: + description: VFM Upstream Ring Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRYUR + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +vfm_yw: + description: VFM Wall Y + deviceClass: ophyd_devices.EpicsMotorEC + deviceConfig: + prefix: X10SA-ES-VFM:TRYW + deviceTags: + - vfm + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_focus: + description: Xeye Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:FOCUS + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_x: + description: Xeye X + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:TRX + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xi_zoom: + description: Xeye Zoom + deviceClass: ophyd_devices.EpicsMotor + deviceConfig: + prefix: X10SA-ES-XEYE:ZOOM + deviceTags: + - xeye + enabled: true + onFailure: buffer + readoutPriority: baseline +xidiode: + description: Xeye Diode + deviceClass: ophyd.EpicsSignalRO + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XEYEDI:READOUT + deviceTags: + - xeye + enabled: true + onFailure: buffer + readOnly: true + readoutPriority: monitored +xrf_pos: + description: XRF Positioner + deviceClass: ophyd.EpicsSignal + deviceConfig: + auto_monitor: true + read_pv: X10SA-ES-XRF:POS-SET + deviceTags: + - state + enabled: true + onFailure: buffer + readoutPriority: baseline + userParameter: + in: 1 + out: 0 + type: discrete diff --git a/pxii_bec/device_configs/x10sa_device_config.yaml b/pxii_bec/device_configs/x10sa_device_config.yaml index 8e54df4..6778a92 100644 --- a/pxii_bec/device_configs/x10sa_device_config.yaml +++ b/pxii_bec/device_configs/x10sa_device_config.yaml @@ -1,5 +1,17 @@ base_config: - !include ./pxii-devices.yaml + +microscope_stats: + readoutPriority: async + description: Stats Signal of MS camera + deviceClass: pxii_bec.devices.stats_signal.StatsSignal + deviceConfig: + prefix: 'X10SA-ES-MS:' + onFailure: retry + enabled: true + readOnly: false + softwareTrigger: true + # sample_env: # - !include ./pxii-state-devices.yaml # id_gap: diff --git a/pxii_bec/devices/contrast.py b/pxii_bec/devices/contrast.py new file mode 100644 index 0000000..270a04a --- /dev/null +++ b/pxii_bec/devices/contrast.py @@ -0,0 +1,75 @@ +import math +import time + +from ophyd import Component as Cpt +from ophyd import EpicsSignalRO, Kind, SignalRO +from ophyd_devices.interfaces.base_classes.psi_device_base import PSIDeviceBase + + +class ContrastSignal(SignalRO): + """Read-only signal calculated as sigma / mean.""" + + def __init__( + self, + *args, + minimum_mean: float = 1e-12, + **kwargs, + ): + super().__init__(*args, **kwargs) + self.minimum_mean = minimum_mean + + def get(self, **kwargs) -> float: + mean = float(self.parent.mean.get()) + sigma = float(self.parent.sigma.get()) + + if ( + not math.isfinite(mean) + or not math.isfinite(sigma) + or abs(mean) <= self.minimum_mean + ): + return math.nan + + return sigma / mean + + def read(self): + return { + self.name: { + "value": self.get(), + "timestamp": time.time(), + } + } + + def describe(self): + return { + self.name: { + "source": ( + f"calculated:{self.parent.sigma.pvname}/" + f"{self.parent.mean.pvname}" + ), + "dtype": "number", + "shape": [], + "units": "", + } + } + + +class CameraContrast(PSIDeviceBase): + """Camera statistics and calculated contrast.""" + + mean = Cpt( + EpicsSignalRO, + "MeanValue_RBV", + kind=Kind.normal, + ) + + sigma = Cpt( + EpicsSignalRO, + "Sigma_RBV", + kind=Kind.normal, + ) + + contrast = Cpt( + ContrastSignal, + kind=Kind.hinted, + ) + diff --git a/pxii_bec/devices/optics_shutter.py b/pxii_bec/devices/optics_shutter.py new file mode 100644 index 0000000..8e33e06 --- /dev/null +++ b/pxii_bec/devices/optics_shutter.py @@ -0,0 +1,107 @@ +""" +Module for the optics shutter device at PSI beamlines. + +Example config: +shutter: + description: Optics Shutter A + deviceClass: ophyd_devices.optics_shutter.OpticsShutter + deviceConfig: {prefix: 'X10SA-EH1-PSYS:SH-A-'} + enabled: true + onFailure: retry + readOnly: false + readoutPriority: baseline + softwareTrigger: false + userParameter: {} +""" + +from enum import IntEnum + +from ophyd import Component as Cpt +from ophyd import Device, EpicsSignal, EpicsSignalRO, Kind, Signal + +from ophyd_devices import CompareStatus + + +class ShutterOpenState(IntEnum): + """Enum for shutter open state.""" + + OPEN = 1 + CLOSED = 0 + + +class ShutterEnabled(IntEnum): + """Enum for shutter enabled state.""" + + ENABLED = 1 + DISABLED = 0 + + +class ShutterControl(Device): + """Control interface for the PVs related to the shutter.""" + + is_open = Cpt(EpicsSignalRO, "OPEN", kind=Kind.config, auto_monitor=True) + is_closed = Cpt(EpicsSignalRO, "CLOSE", kind=Kind.omitted) + is_enabled = Cpt(EpicsSignalRO, "ENABLE", kind=Kind.config, auto_monitor=True) + is_ok = Cpt(EpicsSignalRO, "OK", kind=Kind.omitted, auto_monitor=True) + alarm = Cpt(EpicsSignalRO, "ALARM", kind=Kind.omitted, auto_monitor=True) + set_open = Cpt(EpicsSignal, "OPEN-SET", kind=Kind.omitted) + set_closed = Cpt(EpicsSignal, "CLOSE-SET", kind=Kind.omitted) + + +class ShutterOpenSignal(Signal): + """ + ShutterOpenSignal. When called with 1, it will try to open the shutter. + If called with 0, it will try to close the shutter. + """ + + def enabled(self) -> ShutterEnabled: + """Check if the shutter is enabled.""" + return ShutterEnabled(self.parent.epics_control.is_enabled.get()) + + def _check_enabled(self): + if self.enabled() != ShutterEnabled.ENABLED: + dev_name = self.parent.name if self.parent else "unknown" + raise RuntimeError(f"The shutter {dev_name} is disabled!") + + def get(self) -> int: + return self.parent.epics_control.is_open.get() + + def put(self, value: int, **kwargs) -> None: + self._check_enabled() + if value == ShutterOpenState.OPEN: + self.parent.epics_control.set_open.put(1, **kwargs) + elif value == ShutterOpenState.CLOSED: + self.parent.epics_control.set_closed.put(1, **kwargs) + else: + raise ValueError("Invalid value for ShutterOpenSignal. Use 0 (CLOSED) or 1 (OPEN).") + + def set(self, value: int, **kwargs) -> CompareStatus: + self.put(value, **kwargs) + return CompareStatus(self.parent.epics_control.is_open, value) + + +class OpticsShutter(Device): + """A shutter device with shutter open signal, and sub-device with full control PVs of the Epics implementation.""" + + set_open = Cpt( + ShutterOpenSignal, + name="open", + kind=Kind.omitted, + doc="Signal to open/close the shutter. Use 0 (CLOSED) or 1 (OPEN).", + ) + is_open = Cpt( + EpicsSignalRO, + "OPEN", + kind=Kind.normal, + auto_monitor=True, + doc="Readback of the shutter open state. 0 (CLOSED) or 1 (OPEN).", + ) + epics_control = Cpt(ShutterControl, suffix="", name="epics_control", kind=Kind.omitted) + + +if __name__ == "__main__": + prefix = "X10SA-EH1-PSYS:SH-A-" + print(f"Testing shutter device with prefix {prefix}") + shutter = OpticsShutter(name="shutter", prefix=prefix) + shutter.wait_for_connection() + print(shutter.read()) diff --git a/pxii_bec/devices/stats_signal.py b/pxii_bec/devices/stats_signal.py new file mode 100644 index 0000000..f9ac6da --- /dev/null +++ b/pxii_bec/devices/stats_signal.py @@ -0,0 +1,84 @@ +import time +from collections import defaultdict +from threading import RLock + +import numpy as np +from bec_lib.logger import bec_logger +from ophyd import Component as Cpt +from ophyd import EpicsSignalRO, Kind, Signal +from ophyd_devices import AsyncMultiSignal, StatusBase, TransitionStatus +from ophyd_devices.interfaces.base_classes.psi_device_base import PSIDeviceBase + +logger = bec_logger.logger + + +class StatsSignal(PSIDeviceBase): + + data = Cpt( + AsyncMultiSignal, + name="data", + signals=["sigma_x", "sigma_y", "eccentricity"], + ndim=1, + async_update={"type": "add", "max_shape": [None]}, + max_size=1000, + kind=Kind.normal, + doc="Stats data signal containing sigma_x, sigma_y, and eccentricity values", + ) + + sigma_x_raw = Cpt(EpicsSignalRO, "Stats1:SigmaX_RBV", kind=Kind.omitted) + sigma_y_raw = Cpt(EpicsSignalRO, "Stats1:SigmaY_RBV", kind=Kind.omitted) + eccentricity_raw = Cpt(EpicsSignalRO, "Stats1:Eccentricity_RBV", kind=Kind.omitted) + + def on_init(self): + self._rlock = RLock() + self._cached_average_data = defaultdict(list) + + def on_connected(self): + self._cached_average_data.clear() + for sig in (self.sigma_x_raw, self.sigma_y_raw, self.eccentricity_raw): + sig.subscribe(self._update_average_data, run=False) + + def _update_average_data(self, value, obj, **kwargs): + if value is None: + return + if self.scan_info.msg is None: + return + if self.scan_info.msg.status != "open": + return + + sig_name = obj.name + logger.info(f"Received update from signal {sig_name} with value{ value}") + + with self._rlock: + self._cached_average_data[sig_name].append(value) + + def on_trigger(self): + with self._rlock: + self._cached_average_data.clear() + status = StatusBase(obj=self) # TransitionStatus(self.acquiring, transitions=[1, 0]) + status.add_callback(self._publish_data) + time.sleep(self.scan_info.msg.scan_parameters.get("exp_time", 0)) + status.set_finished() + return status + + def _publish_data(self, status, **kwargs): + if status.done: + with self._rlock: + + sigma_x = float( + np.average(self._cached_average_data.get(self.sigma_x_raw.name, [0])) + ) + sigma_y = float( + np.average(self._cached_average_data.get(self.sigma_y_raw.name, [0])) + ) + eccentricity = float( + np.average(self._cached_average_data.get(self.eccentricity_raw.name, [0])) + ) + + ret = { + "sigma_x": {"value": sigma_x}, + "sigma_y": {"value": sigma_y}, + "eccentricity": {"value": eccentricity}, + } + logger.info(f"Setting data for {self.name} data signal to {ret}.") + self.data.put(ret) diff --git a/pxii_bec/macros/.nfs000000000001101900000001 b/pxii_bec/macros/.nfs000000000001101900000001 new file mode 100644 index 0000000..1b30d5e Binary files /dev/null and b/pxii_bec/macros/.nfs000000000001101900000001 differ diff --git a/pxii_bec/macros/APscripts.py b/pxii_bec/macros/APscripts.py index 53378c8..94a7d59 100644 --- a/pxii_bec/macros/APscripts.py +++ b/pxii_bec/macros/APscripts.py @@ -9,7 +9,8 @@ import numpy as np import math import matplotlib.pyplot as plt - +import sys +import time, datetime ################################ ### BASIC BL PROGRAMS @@ -240,11 +241,8 @@ def rock(**kwargs): - - - ################################ -### Help PROGRAMS +### Helper PROGRAMS ############################# ### just reconfigure beaml @@ -254,8 +252,16 @@ def loadmac(): bec.macros.load_all_user_macros() # d, planner = init_beamline_environment() - +############################# +### plotenv +############################# +def plotset(y): + import matplotlib.pyplot as plt + plt.ion() + plt.figure() + plt.plot(y) + ################################ ### FITTING PROGRAMS @@ -276,53 +282,49 @@ def justfit(data_x, data_y, model="gauss", ibg=0): from lmfit.models import LinearModel, GaussianModel, VoigtModel, QuadraticModel, LorentzianModel import matplotlib.pyplot as plt - peak = GaussianModel() + peak = GaussianModel(prefix = 'g_') + pre='g' if model == "voigt": - peak = VoigtModel() + peak = VoigtModel(prefix = 'v_') + pre='v' if model == "lorentz": - peak = LorentzianModel() - model = peak + peak = LorentzianModel(prefix = 'l_') + pre='l' + model = peak + ypeak = data_y + pars = model.guess(data_y, x = data_x) + indmax = np.argmax(ypeak) + xm = data_x[indmax] + if ibg: - # add a BG - background = LinearModel() - if ibg > 1: - background = QuadraticModel() + background = LinearModel(prefix = 'bg_') model = peak + background - ### define data_x and data_y: - maxy = max(data_y) - indmax = np.argmax(data_y) - xm = data_x[indmax] - sigma = 1.0 - gamma = 0.2 # blurring/widening of the sigma ; the larger, the more of a Lorentzian profile + ### estimate initial params separately for both parts of the model + # 1) BG + n = len(data_x) + edge= n//10 + idx=np.r_[0:edge, n-edge:n] # first and last part of the range + #m0, b0 = np.polyfit(data_x[idx], data_y[idx],1) + #ypeak= data_y - (m0*data_x + b0) # subtract linear part - ## possible, but not necessarily better ... : - # sl = 0.00001 * (data_y[-2]-data_y[2])/(data_x[-2]-data_x[2]) # small slope - # ic = min(data_y) - # print(f'slope and intercept initial conds= {sl, ic}') - ## - print("maxy, indmax, xm = ", maxy, indmax, xm) + pars = background.guess(data_y[idx], x = data_x[idx]) + + # 2) Function - BG + ypeak= data_y - (pars['bg_slope']*data_x + pars['bg_intercept'])# subtract linear part + pars.update( peak.guess(ypeak, x= data_x) ) + - p = model.make_params(amplitude=maxy, center=xm) - # other possibilities ... : - # p = model.make_params(amplitude = maxy, center=xm , slope=0, intercept = ic) - # p = model.make_params(amplitude = max(data_y), center=xm, slope=0, intercept = min(data_y)) - - p["center"].set(min=min(data_x), max=max(data_x)) - p["sigma"].set(min=0, max=(max(data_x) - min(data_x)) / 2.0) - # other possibilities ... : - # p['amplitude'].set(min=min(data_y), max=max(data_y)) - # p['intercept'].set(max=(max(data_y)-min(data_y))/2.) - - g = model.fit(data_y, p, x=data_x) + g = model.fit(data_y, pars, x=data_x) # diagnostics # print(f'Gfit: {g.params}') - print(f'Center of {model} fit: {g.params["center"].value:.5f}') - print(f'Sigma: {g.params["sigma"].value:.5f}') - print(f'FWHM: {g.params["fwhm"].value:.5f}') + #print(f'Center of {model} fit: {g.pars["center"].value:.5f}') + #print(f'Sigma: {g.pars["sigma"].value:.5f}') + #print(f'FWHM: {g.pars["fwhm"].value:.5f}') + print(g.fit_report()) print(f"Position of maximum: {xm}") return g, xm @@ -345,13 +347,21 @@ def fit_plothist(hindex: int, signal_name: str, model="gauss", ibg=0): from lmfit.models import LinearModel, GaussianModel, VoigtModel, QuadraticModel, LorentzianModel import matplotlib.pyplot as plt - h = bec.history[hindex] + if hindex < 0: + h = bec.history[hindex] + print('by scan number') + else: + h = bec.history.get_by_scan_number(hindex) + print('by scan number') md = h.metadata["bec"] scanvar = list(md["args"].keys())[0] # string, returns the variable of the last performed scan # data = h.devices[device_name][signal].read()["value"] # data_x = h.devices.dcm_pitch.dcm_pitch.read()["value"] # data_y = h.devices.lu_bpmsum.lu_bpmsum.read()["value"] - # data_x = h.devices[device_name][device_name].read()["value"] + + ## that should work in any case: + device_name = scanvar + #data_x = h.devices[device_name][device_name].read()["value"] data_xd = md["positions"] # last scan knows which device ... however, double array data_x = data_xd.flatten() @@ -359,6 +369,10 @@ def fit_plothist(hindex: int, signal_name: str, model="gauss", ibg=0): data_y = h.devices[signal_name][signal_name].read()["value"] print("dy = ", data_y) + prefix='v_' + if model == 'gauss': + prefix='g_' + g, xm = justfit(data_x, data_y, model=model, ibg=ibg) plt.ion() @@ -369,7 +383,9 @@ def fit_plothist(hindex: int, signal_name: str, model="gauss", ibg=0): plt.ylabel(signal_name) plt.show() - gcen = g.params["center"].value + # g.params + returncenvar = prefix+"center" + gcen = g.params[returncenvar].value return gcen, xm, data_x, data_y @@ -421,39 +437,41 @@ def fit_plot(data_x, data_y, model="gauss", ibg=1, fitrange=0, fitclick=0): print("dy=", data_y) ##### - peak = GaussianModel() + peak = GaussianModel(prefix = 'g_') + pre='g_' if model == "voigt": - peak = VoigtModel() + peak = VoigtModel(prefix = 'v_') + pre='v_' if model == "lorentz": - peak = LorentzianModel() + peak = LorentzianModel(prefix = 'l_') + pre='l_' + model = peak + ypeak = data_y + pars = model.guess(data_y, x = data_x) + indmax = np.argmax(ypeak) + xm = data_x[indmax] + if ibg: - background = LinearModel() + background = LinearModel(prefix = 'bg_') model = peak + background - ### define data_x and data_y: - maxy = max(data_y) - indmax = np.argmax(data_y) - xm = data_x[indmax] - sigma = 1.0 - gamma = 0.2 # blurring/widening of the sigma ; the larger, the more of a Lorentzian profile - print("maxy, indmax, xm = ", maxy, indmax, xm) - # p = model.make_params( - # amplitude=max(data_y), center=xm, slope=0, intercept=min(data_y) - # ) - p = model.make_params(amplitude=maxy, center=xm) - p["center"].set(min=min(data_x), max=max(data_x)) - p["sigma"].set(min=0, max=(max(data_x) - min(data_x)) / 2.0) + ### estimate initial params separately for both parts of the model + # 1) BG + n = len(data_x) + edge= n//10 + idx=np.r_[0:edge, n-edge:n] # first and last part of the range + #m0, b0 = np.polyfit(data_x[idx], data_y[idx],1) + #ypeak= data_y - (m0*data_x + b0) # subtract linear part - g = model.fit(data_y, p, x=data_x) + pars = background.guess(data_y[idx], x = data_x[idx]) + + # 2) Function - BG + ypeak= data_y - (pars['bg_slope']*data_x + pars['bg_intercept'])# subtract linear part + pars.update( peak.guess(ypeak, x= data_x) ) + - # diagnostics - # print(f'Gfit: {g.params}') - - print(f'Center of {model} fit: {g.params["center"].value:.5f}') - print(f'Sigma: {g.params["sigma"].value:.5f}') - print(f'FWHM: {g.params["fwhm"].value:.5f}') - print(f"Position of maximum: {xm}") + g = model.fit(data_y, pars, x=data_x) ##### @@ -499,15 +517,24 @@ def fit_plot(data_x, data_y, model="gauss", ibg=1, fitrange=0, fitclick=0): plt.ylabel("signal") plt.show() - gcen = g.params["center"].value - return gcen, xm + # g.params + returncenvar = pre+"center" + gcen = g.params[returncenvar].value + + print('gcen =', gcen) + print(g.fit_report()) + + # fit_id = pre+'_center' + + #center = g.pars[fit_id].value + return gcen, xm #################################### ### just SAVE DATA #################################### -def save_data(hindex: int, device_name: str, signal_name: str): +def save_data(hindex: int, device_name: str, signal_name: str, isave = 1): """ Get data for a completed scan from the BEC history, and plot all the results, store in a CSV file @@ -534,15 +561,16 @@ def save_data(hindex: int, device_name: str, signal_name: str): plt.ylabel(f"{signal_name} / AU") plt.show() - ans = "n" - ans = input("Store data in csv file? y/n ") - if ans == "y": - dirname = "/sls/x10sa/config/commissioning/Data/" - # writing output to simple data file for later analysis: - combined = np.column_stack((data_x, data_y)) - filename = dirname + "Scan" + str(hindex) + device_name + ".txt" - with open(filename, "w") as f: - np.savetxt(f, combined, delimiter=",", fmt="%5f") + if isave: + ans = "n" + ans = input("Store data in csv file? y/n ") + if ans == "y": + dirname = "/sls/x10sa/config/commissioning/Data/" + # writing output to simple data file for later analysis: + combined = np.column_stack((data_x, data_y)) + filename = dirname + "Scan" + str(hindex) + device_name + ".txt" + with open(filename, "w") as f: + np.savetxt(f, combined, delimiter=",", fmt="%5f") return data_x, data_y @@ -550,7 +578,7 @@ def save_data(hindex: int, device_name: str, signal_name: str): ######################################### ### just retrieve the saved data from csv ######################################## -def read_data(filename: str): +def read_data_csv(filename: str): """ Get data stored in a CSV file @@ -677,7 +705,7 @@ def getdiodepos(diode="i1"): diode_in = 0 # sys.exit(0) if diode == "i2": - detpos_diode = 214.5 + detpos_diode = 213.6 detpos_rb = dev.det_z.user_readback.get() print("using Det diode requires det up and close and beamstop out") if abs(detpos_diode - detpos_rb) > 0.5: @@ -688,10 +716,10 @@ def getdiodepos(diode="i1"): def read_mon(): - from datetime import datetime + #from datetime import datetime e = getenergy() - fesum = dev.fe_bpmsum.read()["fe_bpmsum"]["value"] + #fesum = dev.fe_bpmsum.read()["fe_bpmsum"]["value"] lusum = dev.lu_bpmsum.read()["lu_bpmsum"]["value"] sssum = dev.ss_bpmsum.read()["ss_bpmsum"]["value"] @@ -710,28 +738,30 @@ def read_mon(): vbpitch = dev.vfm_pitch.read()["vfm_pitch"]["value"] vbyaw = dev.vfm_yaw.read()["vfm_yaw"]["value"] vbroll = dev.vfm_roll.read()["vfm_roll"]["value"] - vblat = dev.vfm_lat.read()["vfm_lat"]["value"] - vbvert = dev.vfm_vert.read()["vfm_vert"]["value"] + vfm_x= dev.vfm_x.read()["vfm_x"]["value"] + vfm_y= dev.vfm_y.read()["vfm_y"]["value"] + # KB H hbu = dev.hfm_bu.read()["hfm_bu"]["value"] hbd = dev.hfm_bd.read()["hfm_bd"]["value"] hbpitch = dev.hfm_pitch.read()["hfm_pitch"]["value"] hbyaw = dev.hfm_yaw.read()["hfm_yaw"]["value"] hbroll = dev.hfm_roll.read()["hfm_roll"]["value"] - hblat = dev.hfm_lat.read()["hfm_lat"]["value"] - hbvert = dev.hfm_vert.read()["hfm_vert"]["value"] + hfm_x= dev.hfm_x.read()["hfm_x"]["value"] + hfm_y= dev.hfm_y.read()["hfm_y"]["value"] + ## FE slits centre and size - fe_sx_cen = dev.fe_sxcen.read()["fe_sxcen"]["value"] - fe_sx_size = dev.fe_sxsize.read()["fe_sxsize"]["value"] - fe_sy_cen = dev.fe_sycen.read()["fe_sycen"]["value"] - fe_sy_size = dev.fe_sysize.read()["fe_sysize"]["value"] + fe_sl_xcen = dev.fe_sl_xcen.read()["fe_sl_xcen"]["value"] + fe_sl_xsize = dev.fe_sl_xsize.read()["fe_sl_xsize"]["value"] + fe_sl_ycen = dev.fe_sl_ycen.read()["fe_sl_ycen"]["value"] + fe_sl_ysize = dev.fe_sl_ysize.read()["fe_sl_ysize"]["value"] ## BSF slits centre and size - bsf_xcen = dev.bsf_sl_xcen.read()["bsf_sl_xcen"]["value"] - bsf_xsize = dev.bsf_sl_xsize.read()["bsf_sl_xsize"]["value"] - bsf_ycen = dev.bsf_sl_ycen.read()["bsf_sl_ycen"]["value"] - bsf_ysize = dev.bsf_sl_ysize.read()["bsf_sl_ysize"]["value"] + bsf_sl_xcen = dev.bsf_sl_xcen.read()["bsf_sl_xcen"]["value"] + bsf_sl_xsize = dev.bsf_sl_xsize.read()["bsf_sl_xsize"]["value"] + bsf_sl_ycen = dev.bsf_sl_ycen.read()["bsf_sl_ycen"]["value"] + bsf_sl_ysize = dev.bsf_sl_ysize.read()["bsf_sl_ysize"]["value"] ## SS slits centre and size ss_sl_xcen = dev.ss_sl_xcen.read()["ss_sl_xcen"]["value"] @@ -761,30 +791,31 @@ def read_mon(): ## move out again - xeye_x_pos = dev.xeye_x.read()["xeye_x"]["value"] + xeye_x_pos = dev.xi_x.read()["xi_x"]["value"] bcusum = 0 i1signal = 0 - if xeye_x_pos < 0: - bcusum = dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"] - i1signal = dev.i1.read()["i1"]["value"] + #if xeye_x_pos < 0: + bcusum = dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"] + i1signal = dev.i1.read()["i1"]["value"] print("Energy = ", e, " keV") - print(f"fesum,lusum,sssum,bcusum,i1signal = {fesum,lusum,sssum,bcusum,i1signal}") + #print(f"fesum,lusum,sssum,bcusum,i1signal = {fesum,lusum,sssum,bcusum,i1signal}") + print(f"lusum,sssum,bcusum,i1signal = {lusum,sssum,bcusum,i1signal}") print(f"bragg, pitch, perp, fpitch, froll, gap = {bragg, pitch,perp, fpitch, froll, gap}") # return e, fesum,lusum,sssum,bcusum,i1signal print("KB VERT") print( - f"vbu, vbd, vbpitch,vbyaw,vbroll,vblat,vbvert = {vbu, vbd, vbpitch,vbyaw,vbroll,vblat,vbvert}" + f"vbu, vbd, vbpitch,vbyaw,vbroll,vbvert = {vbu, vbd, vbpitch,vbyaw,vbroll,vfm_x, vfm_y}" ) # return vbu, vbd, vbpitch,vbyaw,vbroll,vblat,vbvert print("KB HORI") print( - f"hbu, hbd, hbpitch,hbyaw,hbroll,hblat,hbvert = {hbu, hbd, hbpitch,hbyaw,hbroll,hblat,hbvert}" + f"hbu, hbd, hbpitch,hbyaw,hbroll,hblat,hbvert = {hbu, hbd, hbpitch,hbyaw,hbroll,hfm_x, hfm_y}" ) # return hbu, hbd, hbpitch,hbyaw,hbroll,hblat,hbvert ## dump status in CSV - timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") + timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") dirname = "/sls/x10sa/config/commissioning/Data/" filename = dirname + f"BLstatus_{timestamp}.txt" with open(filename, "w") as f: @@ -796,16 +827,16 @@ def read_mon(): combined = np.column_stack((bragg, pitch, perp, fpitch, froll)) np.savetxt(f, combined, delimiter=",", fmt="%5f") - f.write("vbu, vbd, vbpitch,vbyaw,vbroll,vblat,vbvert\n") - combined = np.column_stack((vbu, vbd, vbpitch, vbyaw, vbroll, vblat, vbvert)) + f.write("vbu, vbd, vbpitch,vbyaw,vbroll,vbvert\n") + combined = np.column_stack((vbu, vbd, vbpitch, vbyaw, vbroll, vfm_x, vfm_y)) np.savetxt(f, combined, delimiter=",", fmt="%5f") f.write("hbu, hbd, hbpitch,hbyaw,hbroll,hblat,hbvert\n") - combined = np.column_stack((hbu, hbd, hbpitch, hbyaw, hbroll, hblat, hbvert)) + combined = np.column_stack((hbu, hbd, hbpitch, hbyaw, hbroll, hfm_x, hfm_y)) np.savetxt(f, combined, delimiter=",", fmt="%5f") f.write("FE slits\n") - combined = np.column_stack((fe_sx_cen, fe_sx_size, fe_sy_cen, fe_sy_size)) + combined = np.column_stack((fe_sl_xcen, fe_sl_xsize, fe_sl_ycen, fe_sl_ysize)) np.savetxt(f, combined, delimiter=",", fmt="%5f") f.write("BSF slits\n") @@ -820,8 +851,10 @@ def read_mon(): combined = np.column_stack((bcu_sl_xcen, bcu_sl_xsize, bcu_sl_ycen, bcu_sl_ysize)) np.savetxt(f, combined, delimiter=",", fmt="%5f") - f.write("fesum,lusum,sssum,bcusum,i1signal\n") - combined = np.column_stack((fesum, lusum, sssum, bcusum, i1signal)) + #f.write("fesum,lusum,sssum,bcusum,i1signal\n") + #combined = np.column_stack((fesum, lusum, sssum, bcusum, i1signal)) + f.write("lusum,sssum,bcusum,i1signal\n") + combined = np.column_stack((lusum, sssum, bcusum, i1signal)) np.savetxt(f, combined, delimiter=",", fmt="%5f") return @@ -873,7 +906,7 @@ def colliscan(direction: str, range=0.3, nsteps=30, stime=0.5, centre=1): settling time: default = 0.5 move to centre or not [0/1] - Example: colliscan("h", centre=1) + Example: colliscan("h", range=0.2, nsteps=30, stime=0.5,centre=1) """ import sys @@ -972,14 +1005,15 @@ def slitscan(device_location: str, direction: str, range: 1, nsteps=50, centre=0 default_h = 1.0 ## 1.4 or 0.4 or ??? default_v = 1.0 ## 1.2 det = dev.lu_bpmsum - if direction == "h": - mot = dev.fe_sxcen - size = dev.fe_sxsize + if direction in ["x","h"]: + mot = dev.fe_sl_xcen + size = dev.fe_sl_xsize s_closed = 0.1 s_open = default_h else: - mot = dev.fe_sycen - size = dev.fe_sysize + mot = dev.fe_sl_ycen + size = dev.fe_sl_ysize + s_closed = 0.1 s_open = default_v @@ -989,7 +1023,7 @@ def slitscan(device_location: str, direction: str, range: 1, nsteps=50, centre=0 default_v = 3.0 # ??? close more ???? # 8149.8 det = dev.lu_bpmsum # det = dev.ss_bpmsum or #det = dev.bcu_bpmsum would also work - if direction == "h": + if direction in ["x", "h"]: mot = dev.bsf_sl_xcen size = dev.bsf_sl_xsize s_closed = 0.1 @@ -1006,7 +1040,7 @@ def slitscan(device_location: str, direction: str, range: 1, nsteps=50, centre=0 default_h = 6.0 # ??? default_v = 5.0 # ??? close more ???? # 8149.8 det = dev.bcu_bpmsum - if direction == "h": + if direction in ["x", "h"]: mot = dev.ss_sl_xcen size = dev.ss_sl_xsize s_closed = 0.1 @@ -1030,7 +1064,7 @@ def slitscan(device_location: str, direction: str, range: 1, nsteps=50, centre=0 # print("moving diode i1 in") # umv(dev.scin_y, dposm) - if direction == "h": + if direction in ["x", "h"]: mot = dev.bcu_sl_xcen size = dev.bcu_sl_xsize s_closed = 3.0 ## very large, else does not work ! @@ -1073,9 +1107,9 @@ def slitscan(device_location: str, direction: str, range: 1, nsteps=50, centre=0 # FE slits ================================ data_y = s.scan.live_data.lu_bpmsum.lu_bpmsum.val - if mot.name == "fe_sxcen": + if mot.name == "fe_sl_xcen": data_x = s.scan.live_data.fe_sxcen.fe_sxcen.val - if mot.name == "fe_sycen": + if mot.name == "fe_sl_ycen": data_x = s.scan.live_data.fe_sycen.fe_sycen.val # BSF slits ================================ if mot.name == "bsf_sl_xcen": @@ -1204,42 +1238,6 @@ def kbfocus(sizex, sizey): return -##### ====================== -##### goto several energies with about the right gap opening - - -def goto7(): - perp_dist = 0.0389 - umv(dev.dcm_perp, perp_dist) - gap = 6.9 # 3rd harm - umv(dev.id_gap, gap) - sete(7) - - -def goto20(): - perp_dist = 0.0389 - umv(dev.dcm_perp, perp_dist) - gap = 4.736 # 13th harm - umv(dev.id_gap, gap) - sete(20) - - -def goto27(): - perp_dist = 0.0389 - umv(dev.dcm_perp, perp_dist) - gap = 4.86 # 17th harm - umv(dev.id_gap, gap) - sete(27) - - -def goto30(): - perp_dist = 0.0389 - umv(dev.dcm_perp, perp_dist) - gap = 4.842 # 19th harm - umv(dev.id_gap, gap) - sete(30) - - ######################### ### Status of the BEC ######################### @@ -1263,22 +1261,23 @@ def bstatus(): ########################### -def detxeye_in(): +def detxeye_in(setdetzpos = 200, setdetypos = 213.6): """ moves in the Xray eye and the Diode below detector """ # setfoc = 1.0 setzoom = 0.1 - setxrpos = 2.0 + setxrpos = 0.0 - setdetzpos = 260 # 200 better? - setdetypos = 214.5 + #setdetzpos = 200 # 200 better? + #setdetypos = 213.6 detzpos = dev.det_z.user_readback.get() detypos = dev.det_y.user_readback.get() print(f"detector position now: z = {detzpos}, y = {detypos}") + print(f"... moving to detector position: z = {setdetzpos}, y = {setdetypos}") ans = "n" ans = input("Is it ok to move detector in and up? y/n ") @@ -1293,15 +1292,15 @@ def detxeye_in(): print("moving X-ray eye below Eiger in") - xrpos = dev.det_xi_x.user_readback.get() - if abs(setxrpos - xrpos) > 1: - umv(dev.det_xi_x, setxrpos) - zoompos = dev.det_xi_zoom.user_readback.get() - if abs(setzoom - zoompos) > 1: - umv(dev.det_xi_zoom, setzoom) - focpos = dev.det_xi_focus.user_readback.get() - if abs(setfoc - focpos) > 1: - umv(dev.det_xi_focus, setfoc) + #xrpos = dev.det_xi_x.user_readback.get() + #if abs(setxrpos - xrpos) > 1: + # umv(dev.det_xi_x, setxrpos) + #zoompos = dev.det_xi_zoom.user_readback.get() + #if abs(setzoom - zoompos) > 1: + # umv(dev.det_xi_zoom, setzoom) + #focpos = dev.det_xi_focus.user_readback.get() + #if abs(setfoc - focpos) > 1: + # umv(dev.det_xi_focus, setfoc) def detxeye_out(): @@ -1309,7 +1308,7 @@ def detxeye_out(): moves det back and down """ setdetzpos = 500 - setdetypos = 0 + setdetypos = 70 umv(dev.det_z, setdetzpos) detzpos = dev.det_z.user_readback.get() if detzpos > 300: @@ -1322,7 +1321,8 @@ def detxeye_out(): def measure_samcam(zoom=1000): - scinti_inpos = 38.6 # mm + import sys + scinti_inpos = 36.4 # mm sc_rb = dev.diag_y.user_readback.get() if abs(scinti_inpos - sc_rb) > 0.3: print("Scinti not in, please move") @@ -1486,7 +1486,7 @@ def scan_eg(erange, nsteps=50, fit=True): data_e = energy_data data_y = bpm_data - dirname = "/home/gac-x10sa/Data/" + dirname = "/sls/x10sa/config/commissioning/Data" # writing output to simple data file for later analysis: combined = np.column_stack((data_x, data_e, data_y)) tname = f"Scan_{timestamp}.txt" @@ -1533,3 +1533,169 @@ def scan_window(wname="Scan", fit=True): ### if done, remove #w2.remove() +################################################ +### beam centre on detector with distance +################################################ + +#/sls/x10sa/config/commissioning/Data + +def readdist(filename): + with open(filename, "r") as f: + combined_data = np.loadtxt(f, delimiter=",") + + ind1 = 0 + ind2 = 1 + ind3 = 2 + detdist = combined_data[:, ind1] + bposx = combined_data[:, ind2] + bposy = combined_data[:, ind3] + + plt.ion() + plt.figure(1) + plt.plot(detdist,bposx, ".") + plt.title("Bpos X vs Detectordist") + plt.xlabel("dist / mm") + plt.ylabel("bpos X in det pix ") + + plt.figure(2) + plt.plot(detdist,bposy, ".") + plt.title("Bpos Y vs Detectordist") + plt.xlabel("dist / mm") + plt.ylabel("bpos Y in det pix ") + plt.show() + + return + +################################################ +### flux cal +################################################ + +def read_av(signal, avlen): + #signal = dev.lu_bpmsum + + buf = [] + count =0 + while count < avlen: + new_value = signal.read()[signal.name]['value'] + #new_value = dev.lu_bpmsum.read()['lu_bpmsum']["value"] + buf.append(new_value) + count+=1 + return sum(buf) / len(buf) + + + +def fitpoly(x,y, order): + from scipy.optimize import curve_fit + + coeff = np.polyfit(x, y, order) + polynomial = np.poly1d(coeff) + + print("Polynomial coefficients of the fit fct: ", order, coeff) + x_fit = np.linspace(min(x), max(x), 100) + y_fit = polynomial(x_fit) + + plt.ion() + plt.figure() + plt.title("X10SA Fl cal") + plt.ylabel("fl/bcubpmsum") + plt.title("E / keV") + + plt.plot(x, y, "*") + plt.plot(x_fit, y_fit, color="blue") + + + +def prepare_fluxmeas(): +# check all slits + read_mon() +# + print("preparing devices ...") + ans = "n" + ans = input("Is it safe to move det in and up and BS down? y/n ") + if ans == "y": + detxeye_in() + bs_in = d["bs_y"].positions["in"] + #umv(dev.bs_y, bs_in +1) + return + +def fluxcal(start_en=13, stop_en=14, step =1): + import time + # + tstart = time.perf_counter() # time logging + avlen= 10 + + dat_en=[] + dat_lubpm=[] + dat_ssbpm=[] + dat_bcubpm=[] + dat_xi=[] + dat_fluxi=[] + dat_quot_flbsum=[] + dat_i1=[] + + diode_inpos = dev.diag_y.user_parameter["i1"] + diode_outpos = dev.diag_y.user_parameter["out"] + for ei in range(start_en,stop_en+1, step): + bl_energy(ei*1000, plot = False) # in ev + time.sleep(0.5) + #lusum = dev.lu_bpmsum.read()["lu_bpmsum"]["value"] + signal = dev.lu_bpmsum # "lu_bpmsum" + lusum = read_av(signal, avlen) + + #sssum = dev.ss_bpmsum.read()["ss_bpmsum"]["value"] + signal = dev.ss_bpmsum # "ss_bpmsum" + sssum = read_av(signal, avlen) + + #bcusum = dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"] + signal = dev.bcu_bpmsum #"bcu_bpmsum" + bcusum = read_av(signal, avlen) + + + #xi = dev.xidiode.read()["xidiode"]["value"] + signal = dev.xidiode + xi = read_av(signal, avlen) + + fluxi = flux_x10sa(xi, ei, silent =1) + quot = fluxi/bcusum + + + #i1diode = dev.i1.read()["i1"]["value"] + umv(dev.diag_y,diode_inpos) + signal = dev.i1 + i1diode = read_av(signal, avlen) + umv(dev.diag_y,diode_outpos) + + print(f'En {ei}, BCUSUM {bcusum}, xi {xi}, flux {fluxi}') + + dat_en.append(ei) + dat_lubpm.append(lusum) + dat_ssbpm.append(sssum) + dat_bcubpm.append(bcusum) + dat_xi.append(xi) + dat_fluxi.append(fluxi) + dat_quot_flbsum.append(quot) + dat_i1.append(i1diode) + + combined = np.column_stack((dat_en, dat_lubpm,dat_ssbpm,dat_bcubpm,dat_xi,dat_fluxi,dat_quot_flbsum, dat_i1)) + + # open file for output + timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + dirname = "/sls/x10sa/config/commissioning/Data/" + filename = dirname + f"FLUX_x10sa_{timestamp}.txt" + + with open(filename, "w") as f: + np.savetxt(f, combined, delimiter=",", fmt="%.9f") # fmt for savetxt + + + elapsed_time = time.perf_counter()-tstart + print(f"Runtime: {elapsed_time: .6f} seconds, i.e., {elapsed_time/60: .6f} min") + # CLOSE AND MOVE BACK ############ + # close shutter ! + + print("close the shutter !") + dev.bcu_shutter.put(0) + + # move beamstop back ! + #umv(dev.bs_y, bs_in) + + fitpoly(dat_en, dat_quot_flbsum, 3) diff --git a/pxii_bec/macros/EvalFlux.py b/pxii_bec/macros/EvalFlux.py new file mode 100644 index 0000000..c8df98a --- /dev/null +++ b/pxii_bec/macros/EvalFlux.py @@ -0,0 +1,69 @@ +def evalflux(): + + from APscripts import read_data_csv, fitpoly + + data=read_data_csv('FLUX_x10sa_20260709_174259.txt') + + einv=data[:, 0] + fcalfinv = data[:, 6] # if energy top down + + + e = einv[::-1] + flcf = fcalfinv[::-1] + + # omit the last values (>= 27 keV) + + len(e) # = 25 + e = e[0:21] + flcf =flcf[0:21]/1.e9 ## divide by 1e9 for better readability + + fitpoly(e, flcf, 3) + + # Polynomial coefficients of the fit fct: 3 [-0.00026213 0.01171065 -0.05379571 0.04478851] + + +def csplinex(x,y,en): + from scipy.interpolate import CubicSpline + + # Create spline + cs = CubicSpline(x, y) + y_cs = cs(en) + return y_cs + + +def flux_bcu(): + e = get_current_energy()/1000. + bcusum = read_av(dev.bcu_bpmsum,10) + flux = fl_bcubpm(e,bcusum) + return f"{flux:.2e}" + +def flux_i1(): + e = get_current_energy()/1000 + i1 = read_av(dev.i1,10) + flux = fl_i1(e, i1) + return f"{flux:.2e}" + +def fl_bcubpm(e,bcusum): + import numpy as np + fact = 1.e9 + coeff = [-0.00026213, 0.01171065, -0.05379571, 0.04478851] + if e > 24 : + coeff = [4.83704287e-05, -3.17174523e-03, 7.33131161e-02, -5.91926617e-01, 1.66572494e+00] + polynomial = np.poly1d(coeff) + fl = polynomial(e) * bcusum * fact + #print(f'flux from {bcusum} with en {e} is {fl:.2e} ph/s') + + return fl + +def fl_i1(e,i1): + import pandas as pd + + file = "luts/I1flcalf.csv" + df = pd.read_csv(file) + a = df["En"] + b = df["Fl/I1"] + + fl_i1 = csplinex(a,b,e) *i1 + print(f'flux from {i1} with en {e} is {fl_i1:.2} ph/s ') + + return fl_i1 diff --git a/pxii_bec/macros/KB_Class.py b/pxii_bec/macros/KB_Class.py index 5e3bbda..51e2c7f 100644 --- a/pxii_bec/macros/KB_Class.py +++ b/pxii_bec/macros/KB_Class.py @@ -13,10 +13,10 @@ class KBMirror: self.P2 = 0.583490 self.P3 = -0.372950 self.L1 = -0.955798 - self.curv_approx_fact = 1.0121 - self.s1 = 24.15 #24.35 + self.curv_approx_fact = 0.9550 # 0.9550 # origin: 1.0121 + self.s1 = 24.15 self.s2 = 1.45 - self.asym0 = 0.08 + self.asym0 = 0.114 ## origin: 0.0.08 + 0.034 # user asymm, eg 0.4750, will be added ( - sign) elif self.mirror_type == "PXII_HFM": self.C0 = 0.060453 @@ -24,10 +24,10 @@ class KBMirror: self.P2 = 0.586057 self.P3 = -0.088093 self.L1 = -0.999445 - self.curv_approx_fact = 0.995 - self.s1 = 24.90 #25.10 + self.curv_approx_fact = 0.8810 # origin: # 0.995 + self.s1 = 24.90 self.s2 = 0.7 - self.asym0 = -0.0107 + self.asym0 = 0.06455 ## origin: -0.0107 + 0.07525 # added user asymm 2.75 (-sign) else: raise ValueError(f"Unknown mirror type: {self.mirror_type}") @@ -56,23 +56,24 @@ class KBMirror: curv0 = curv / self.curv_approx_fact / 1000 R = 1 / curv0 s2 = self.s1 / (2 * self.s1 / (R * np.sin(th_mrad / 1000)) - 1) - return s2 + return s2, R - def get_benders(self, th=2.0, defocus_mm=0.0, user_asymmetry=0.0): - asym = self.asym0 + user_asymmetry + def get_benders(self, th=3.0, defocus_mm=0.0, user_asymmetry=0.0): + asym = self.asym0 - user_asymmetry #### sign is important! s2_target = self.s2 + defocus_mm / 1000 curv = self.ellipse_to_curvature(s2_target, th) BU, BD = self.curvature_to_bend(curv, asym) return BU, BD - def readback(self, BU, BD, th=2.0): + def readback(self, BU, BD, th=3.0): curv, asym = self.bend_to_curvature(BU, BD) - s2_rb = self.curvature_to_ellipse(curv, th) + s2_rb, R0 = self.curvature_to_ellipse(curv, th) defocus_mm = (s2_rb - self.s2) * 1000 bend_rad_m = 1/curv *1000 return { "curvature": curv, - "bend_rad_m": bend_rad_m, + "bend_rad_m": bend_rad_m, + "bend_rad0_m": R0, "asymmetry": asym, "s2": s2_rb, "defocus_mm": defocus_mm diff --git a/pxii_bec/macros/Undu_Helpers.py b/pxii_bec/macros/Undu_Helpers.py index eaf056c..baf31a1 100755 --- a/pxii_bec/macros/Undu_Helpers.py +++ b/pxii_bec/macros/Undu_Helpers.py @@ -214,19 +214,22 @@ def gap_harm(e=12.4): # test with estart = 6, end_en = 7.5 # should be 3 files , estimated time: 90 min -def long_gscan(estart=7, end_en=20.5, g_low=4.5, g_high=9.0, nsteps=1500): +def long_gscan(estart=6, end_en=30.5, g_low=4.5, g_high=9.0, nsteps=1500): import time import numpy as np dirname = "/sls/x10sa/config/commissioning/Data/" - enstep = 0.5 + enstep = 1.0 print( f"scanning the U19 gap from {estart} keV to {end_en} keV, for a gapsize from {g_low} to {g_high} in {enstep} keV energy intervals" ) - resol = (g_high - g_low) / nsteps - print(f"nsteps = {nsteps}; resolution is {resol} mm") + fe_h_size0 = dev.fe_sl_xsize.user_readback.get() + fe_v_size0 = dev.fe_sl_ysize.user_readback.get() + umv(dev.fe_sl_xsize, 0.5) + umv(dev.fe_sl_ysize, 0.3) + dock_area = bec.gui.new("LongGapScan", geometry = [4000, 900, 1200, 700]) wr = dock_area.new(bec.gui.available_widgets.Waveform) mot = dev.id_gap @@ -248,10 +251,16 @@ def long_gscan(estart=7, end_en=20.5, g_low=4.5, g_high=9.0, nsteps=1500): en = estart while en < end_en: + if en >= 17: + nsteps = 1000 + g_high = 7.5 #sete(en) #time.sleep(0.2) #rock() # maybe use + resol = (g_high - g_low) / nsteps + print(f"nsteps = {nsteps}; resolution is {resol} mm") + bl_energy(en, move_gap = False, plot = False) print(f"setting energy to {en}") @@ -288,6 +297,12 @@ def long_gscan(estart=7, end_en=20.5, g_low=4.5, g_high=9.0, nsteps=1500): elapsed_time = time.perf_counter()-tstart print(f"Runtime: {elapsed_time: .6f} seconds, i.e., {elapsed_time: .6f}/60 min") + # moving slits back + umv(dev.fe_sl_xsize, fe_h_size0) + umv(dev.fe_sl_ysize, fe_v_size0) + # move back to standard En + bl_energy(12400) + return diff --git a/pxii_bec/macros/beamline_planner.py b/pxii_bec/macros/beamline_planner.py index aa99268..e96f01d 100755 --- a/pxii_bec/macros/beamline_planner.py +++ b/pxii_bec/macros/beamline_planner.py @@ -95,20 +95,81 @@ class StateChangePlanner: def available_states(self): """Return a list of available states""" return list(self.states.keys()) + + def state_devices(self): + """Return the set of devices that participate in + beamline state definitions""" + + devices = set() + + for state in self.states.values(): + devices.update(state.keys()) + + return sorted(devices) def get_positions(self): - """Return current positions of all SE devices""" - return {name: dev.pos for name, dev in self.devices.items()} + """Return current positions of devices that are used + in state transitions""" + return {name: self.devices[name].pos + for name in self.state_devices()} def print_positions(self): """Return current state of all devices""" - for name, device in self.devices.items(): - print(f"{name:10s} : {device.pos:10s} value: {device.actual}") + for name in self.state_devices(): + device = self.devices[name] + + print(f"{name:10s} : {device.pos:10s} value: {device.actual:.5g}") def diff_states(self, before): """Return a dict of {device: (before, after)} pairs for devices that changed state""" after = self.get_positions() return {k: (before[k], after[k]) for k in before if before[k] != after[k]} + + def __get_closest_states(self): + """ + Return states ordered by number of mismatches. + """ + + results = [] + + for state in self.states: + + config = self._merged_state(state, None) + + mismatches = [] + + for dev, expected in config.items(): + + if not self.devices[dev].is_at(expected): + mismatches.append( + ( + dev, + self.devices[dev].pos, + expected, + ) + ) + + results.append( + ( + state.name, + len(mismatches), + mismatches, + ) + ) + + return sorted(results, key=lambda x: x[1]) + + def closest_states(self, n=5): + + for state, count, mismatches in self.__get_closest_states()[:n]: + + print(f"\n{state}: {count} mismatch(es)") + + for dev, actual, expected in mismatches: + print( + f" {dev:15s} " + f"{actual:10s} -> {expected}" + ) def current_state(self): """Return all current matching BeamlineState and TemperatureMode combinations, diff --git a/pxii_bec/macros/beampos_with_en.py b/pxii_bec/macros/beampos_with_en.py new file mode 100644 index 0000000..39da1dd --- /dev/null +++ b/pxii_bec/macros/beampos_with_en.py @@ -0,0 +1,19 @@ +def beampos_with_en(planner): + deltat = 2 + record_beampos_until("23:00",planner,interval_minutes=deltat) + bl_energy(6000) + record_beampos_until("00:00",planner,interval_minutes=deltat) + bl_energy(8000) + record_beampos_until("01:00",planner,interval_minutes=deltat) + bl_energy(10000) + record_beampos_until("02:00",planner,interval_minutes=deltat) + bl_energy(12000) + record_beampos_until("03:00",planner,interval_minutes=deltat) + bl_energy(12400) + record_beampos_until("04:00",planner,interval_minutes=deltat) + bl_energy(14000) + record_beampos_until("05:00",planner,interval_minutes=deltat) + bl_energy(16000) + record_beampos_until("06:00",planner,interval_minutes=deltat) + bl_energy(18000) + record_beampos_until("07:00",planner,interval_minutes=deltat) diff --git a/pxii_bec/macros/beampos_with_en.py~ b/pxii_bec/macros/beampos_with_en.py~ new file mode 100644 index 0000000..6d89248 --- /dev/null +++ b/pxii_bec/macros/beampos_with_en.py~ @@ -0,0 +1,9 @@ +def beampos_with_en(planner): + deltat = 5 + record_beampos_until("23:00",planner,interval_minutes=deltat) + bl_energy(16000) + record_beampos_until("05:00",planner,interval_minutes=deltat) + bl_energy(12400) + record_beampos_until("11:00",planner,interval_minutes=deltat) + + diff --git a/pxii_bec/macros/build_devices.py b/pxii_bec/macros/build_devices.py index 12bb5fd..f731107 100755 --- a/pxii_bec/macros/build_devices.py +++ b/pxii_bec/macros/build_devices.py @@ -87,58 +87,276 @@ def build_devices(yaml_file, mock_devices): return state_devices -# def update_position(device, position, value, axis=None): -# """Update the user parameter saved positions for a device""" -# params = device.user_parameter -# if axis is None: -# # Is this a nested structure? -# nested_keys = [k for k, v in params.items() if isinstance(v, dict)] +def update_position( + device, + position, + value, + axis=None, + force=False, + max_delta=0.5, +): + """ + Update a single saved position in memory. -# if nested_keys: -# raise ValueError( -# f"{device.name} has nested parameters " -# f"({nested_keys}); specify axis=..." -# ) + Does NOT save or reload. Use save_and_reload() or + update_positions() afterwards. + """ -# device.update_user_parameter({position: value}) -# return - -# axis_params = params[axis].copy() -# axis_params[position] = value -# device.update_user_parameter({axis: axis_params}) - - -# # Save the updated values to the device yaml file -# # and re-initialise -# beamline = os.environ["BEAMLINE"] -# env = Environment(beamline = beamline) -# bec.config.save_current_session(env.devices_file) -# return init_beamline_environment() - - -def update_position(device, position, value, axis=None): - """Update the user parameter saved positions for a device""" params = device.user_parameter - if axis is None: - nested_keys = [k for k, v in params.items() if isinstance(v, dict)] + # ------------------------------------------------------------------ + # Nested device (e.g. aerotech.x.in) + # ------------------------------------------------------------------ + if axis is not None: - if nested_keys: - raise ValueError( - f"{device.name} has nested parameters " f"({nested_keys}); specify axis=..." + if axis not in params: + raise KeyError( + f"Unknown axis '{axis}'. " + f"Valid axes: {list(params.keys())}" ) - device.update_user_parameter({position: value}) - - else: axis_params = params[axis].copy() - axis_params[position] = value - device.update_user_parameter({axis: axis_params}) - # Save the updated values to the device yaml file + if position not in axis_params: + raise KeyError( + f"Unknown position '{position}'. " + f"Valid positions: {list(axis_params.keys())}" + ) + + old_value = axis_params[position] + + delta = abs(value - old_value) + + if delta > max_delta and not force: + raise ValueError( + f"Refusing to change " + f"{device.name}.{axis}.{position} " + f"from {old_value} to {value} " + f"(Δ={delta:.3f} > {max_delta}). " + f"Use force=True if intentional." + ) + + axis_params[position] = value + + device.update_user_parameter( + {axis: axis_params} + ) + + print( + f"Updated {device.name}.{axis}.{position}: " + f"{old_value} -> {value}" + ) + + return + + # ------------------------------------------------------------------ + # Flat device (e.g. bs_z) + # ------------------------------------------------------------------ + nested_keys = [ + k for k, v in params.items() + if isinstance(v, dict) + ] + + if nested_keys: + raise ValueError( + f"{device.name} has nested parameters " + f"({nested_keys}); specify axis=..." + ) + + if position not in params: + raise KeyError( + f"Unknown position '{position}'. " + f"Valid positions: {list(params.keys())}" + ) + + old_value = params[position] + + delta = abs(value - old_value) + + if delta > max_delta and not force: + raise ValueError( + f"Refusing to change " + f"{device.name}.{position} " + f"from {old_value} to {value} " + f"(Δ={delta:.3f} > {max_delta}). " + f"Use force=True if intentional." + ) + + device.update_user_parameter( + {position: value} + ) + + print( + f"Updated {device.name}.{position}: " + f"{old_value} -> {value}" + ) + + +def save_and_reload(): + """ + Save current configuration to YAML and rebuild + the beamline environment. + """ + beamline = os.environ["BEAMLINE"] + env = Environment(beamline=beamline) + + print(f"(saving changes to {env.devices_file})") + bec.config.save_current_session(env.devices_file) return init_beamline_environment() + + +def update_positions(updates): + """ + Apply many updates, then save and reload once. + + updates = [ + { + "device": dev.aerotech, + "axis": "x", + "position": "in", + "value": 0, + }, + { + "device": dev.bs_z, + "position": "max_blout", + "value": 68, + }, + ] + """ + + for update in updates: + + update_position( + device=update["device"], + position=update["position"], + value=update["value"], + axis=update.get("axis"), + force=update.get("force", False), + max_delta=update.get("max_delta", 0.5), + ) + + return save_and_reload() + + +def save_current_position( + device, + position, + axis=None, + force=False, + max_delta=0.5, +): + """ + Save the current motor position as a named position. + """ + print(f"Saving current postion for {device}") + + params = device.user_parameter + + if axis is not None: + + if axis not in params: + raise KeyError( + f"Unknown axis '{axis}'. " + f"Valid axes: {list(params.keys())}" + ) + + axis_params = params[axis].copy() + + if position not in axis_params: + raise KeyError( + f"Unknown position '{position}'. " + f"Valid positions: {list(axis_params.keys())}" + ) + + old_value = axis_params[position] + print(f"Old value is {old_value}") + + current_value = get_current_value(device, axis=None) + + delta = abs(current_value - old_value) + + if delta > max_delta and not force: + raise ValueError( + f"Current position differs from saved value:\n" + f" saved = {old_value}\n" + f" current = {current_value}\n" + f" delta = {delta:.3f}\n" + f"Use force=True if intentional." + ) + + axis_params[position] = current_value + + device.update_user_parameter( + {axis: axis_params} + ) + + print( + f"Updated {device.name}.{axis}.{position}: " + f"{old_value} -> {current_value}" + ) + + return + # ------------------------------------------------------------------ + # Flat device (e.g. bs_z) + # ------------------------------------------------------------------ + nested_keys = [ + k for k, v in params.items() + if isinstance(v, dict) + ] + + if nested_keys: + raise ValueError( + f"{device.name} has nested parameters " + f"({nested_keys}); specify axis=..." + ) + + if position not in params: + raise KeyError( + f"Unknown position '{position}'. " + f"Valid positions: {list(params.keys())}" + ) + + old_value = params[position] + current_value = get_current_value(device, axis=None) + + delta = abs(current_value - old_value) + + if delta > max_delta and not force: + raise ValueError( + f"Refusing to change " + f"{device.name}.{position} " + f"from {old_value} to {current_value} " + f"(Δ={delta:.3f} > {max_delta}). " + f"Use force=True if intentional." + ) + + device.update_user_parameter( + {position: current_value} + ) + + print( + f"Updated {device.name}.{position}: " + f"{old_value} -> {current_value}" + ) + + +def get_current_value(device, axis=None): + """ + Return current motor position. + """ + + if axis is not None: + motor = getattr(device, axis) + else: + motor = device + + data = motor.read() + + signal_name = next(iter(data)) + + return round(data[signal_name]["value"],3) \ No newline at end of file diff --git a/pxii_bec/macros/calculator.py b/pxii_bec/macros/calculator.py index b10a22a..c988c7e 100755 --- a/pxii_bec/macros/calculator.py +++ b/pxii_bec/macros/calculator.py @@ -17,6 +17,10 @@ class Constants: # d-spacings d_spacing = {120: 3.13481, 298: 3.13562} + # offset + # bragg_offset = -0.1457 + bragg_offset = 0 + def speed_of_light_ang(): """ @@ -116,7 +120,9 @@ def calculate_wavelength_from_angle(bragg_angle_mrad: float, temp=120) -> float: The calculated wavelength as a float value. """ d = Constants.d_spacing[temp] - return 2 * d * np.sin(bragg_angle_mrad / 1000) + fudge = bragg_angle_mrad + Constants.bragg_offset + # return 2 * d * np.sin((bragg_angle_mrad / 1000) + return 2 * d * np.sin(fudge / 1000) def calculate_energy_from_wavelength(wavelength: float) -> float: @@ -349,7 +355,7 @@ def calc_scam_microns(pixels, zoom=1000): """Convert pixels to microns for the sample camera""" return float(pixels / (CamConversion.a * np.exp(CamConversion.b * zoom))) -def calc_bsccam_microns(pixels): - """Convert pixels to microns for the BSC camera""" +def calc_sscam_microns(pixels): + """Convert pixels to microns for the ss camera""" return pixels*20 diff --git a/pxii_bec/macros/calibrate_bpm.py b/pxii_bec/macros/calibrate_bpm.py new file mode 100644 index 0000000..ff6c2dc --- /dev/null +++ b/pxii_bec/macros/calibrate_bpm.py @@ -0,0 +1,142 @@ +""" +BPM calibration using inverse PCHIP spline. + +Calibration concept: + BPM signal -> beam position relative to BPM + +Final beam position: + beam_absolute = bpm_motor_position + local_beam_position + beam_relative_to_camera_crosshair = beam_absolute - camera_crosshair_position +""" + +import time +import os +from datetime import datetime, timedelta +from pathlib import Path +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +from pyparsing import results +from scipy.optimize import curve_fit +import scipy.special as special +from scipy.interpolate import PchipInterpolator, CubicSpline + + +def read_currents(): + """Read the individual bpm channels""" + vals_bpm1 = [] + vals_bpm2 = [] + vals_bpm3 = [] + vals_bpm4 = [] + + for _ in range(5): + vals_bpm1.append(dev.bcu_bpm1.read()["bcu_bpm1"]["value"]) + time.sleep(0.1) + for _ in range(5): + vals_bpm2.append(dev.bcu_bpm2.read()["bcu_bpm2"]["value"]) + time.sleep(0.1) + for _ in range(5): + vals_bpm3.append(dev.bcu_bpm3.read()["bcu_bpm3"]["value"]) + time.sleep(0.1) + for _ in range(5): + vals_bpm4.append(dev.bcu_bpm4.read()["bcu_bpm4"]["value"]) + time.sleep(0.1) + bpm1 = np.mean(vals_bpm1) + bpm2 = np.mean(vals_bpm2) + bpm3 = np.mean(vals_bpm3) + bpm4 = np.mean(vals_bpm4) + + return {"bpm1": bpm1, "bpm2": bpm2, "bpm3": bpm3, "bpm4": bpm4} + + +def compute_norm(): + """Compute normalised x and y positions""" + readings = read_currents() + total = readings["bpm1"] + readings["bpm2"] + readings["bpm3"] + readings["bpm4"] + # print(f"Sum is {total:.2f}") + xn = ( + (readings["bpm1"] + readings["bpm2"]) - (readings["bpm3"] + readings["bpm4"]) + ) / total + yn = ( + (readings["bpm1"] + readings["bpm3"]) - (readings["bpm2"] + readings["bpm4"]) + ) / total + # return xn, yn, readings["bpm1"], readings["bpm2"], readings["bpm3"], readings["bpm4"] + return float(xn), float(yn) + + +# def compute_pos(): +# """Compute the beam x and y positions""" +# cal = { +# "bcu_bpm": { +# "x_slope": 7.778, +# "x_off": -1.019, +# "y_slope": -8.625, +# "y_off": -1.935, +# } +# } +# xn, yn, bpm1, bpm2, bpm3, bpm4 = compute_norm() +# # print(f"Normalised positions are {xn}, {yn}") +# x_pos = (xn - cal["bcu_bpm"]["x_off"]) / cal["bcu_bpm"]["x_slope"] +# y_pos = (yn - cal["bcu_bpm"]["y_off"]) / cal["bcu_bpm"]["y_slope"] +# return x_pos, y_pos + + +def run_calibration(): + """Scan bpm in x and y and record normalised x and y positions""" + print(f"moving bpm to {centred_x}, {centred_y}") + umv(dev.bcu_bpm_y, centred_y) + umv(dev.bcu_bpm_x, centred_x) + + # # Calibrate in X + umv(dev.ss_sl_xsize,0.02) + umv(dev.ss_sl_xsize, 3.0) + filename = f"luts/bpm_calib/{fnow}_bcu_bpm_x.csv" + xn_data = [] + x_positions = np.linspace(centred_x - 0.6, centred_x + 0.6, 101) + with open(filename, "w", encoding="utf-8") as f: + f.write(f"Xpos,Xnorm,BPM1,BPM2,BPM3,BPM4\n") + for x in x_positions: + umv(dev.bcu_bpm_x, x) + print(f"Moving BPM to {x} mm") + time.sleep(0.2) + xn, yn, bpm1, bpm2, bpm3, bpm4 = compute_norm() + xn_data.append(xn) + with open(filename, "a", encoding="utf-8") as f: + f.write(f"{x},{xn},{bpm1},{bpm2},{bpm3},{bpm4}\n") + + # Calibrate in Y + umv(dev.bcu_bpm_x, centred_x) + umv(dev.ss_sl_xsize, 3.0) + umv(dev.ss_sl_ysize, 0.03) + filename = f"luts/bpm_calib/{fnow}_bcu_bpm_y.csv" + y_positions = np.linspace(centred_y - 0.1, centred_y + 0.1, 251) + yn_data = [] + with open(filename, "w", encoding="utf-8") as f: + f.write(f"Ypos,Ynorm,BPM1,BPM2,BPM3,BPM4\n") + for y in y_positions: + umv(dev.bcu_bpm_y, y) + print(f"Moving BPM to {y} mm") + time.sleep(0.2) + xn, yn, bpm1, bpm2, bpm3, bpm4 = compute_norm() + yn_data.append(yn) + with open(filename, "a", encoding="utf-8") as f: + f.write(f"{y},{yn},{bpm1},{bpm2},{bpm3},{bpm4}\n") + + umv(dev.bcu_bpm_x, centred_x) + umv(dev.bcu_bpm_y, centred_y) + umv(dev.ss_sl_ysize, 3.0) + + + +def fit_bpm_data(x_y, rundate="02072130_", bpm_name="bcu_bpm"): + CALIB_DIR = "luts/bpm_calib/" + filename = os.path.join(CALIB_DIR, f"{rundate}{bpm_name}_{x_y}.csv") + data = np.loadtxt(filename, delimiter=",", skiprows=1) + + xdata = data[:, 0] # scan / motor position + ydata = data[:, 1] # normalised BPM signal + + return xdata, ydata + + + diff --git a/pxii_bec/macros/calibrate_bpm.py.bak b/pxii_bec/macros/calibrate_bpm.py.bak new file mode 100644 index 0000000..7ad0ad5 --- /dev/null +++ b/pxii_bec/macros/calibrate_bpm.py.bak @@ -0,0 +1,670 @@ +""" +BPM calibration using inverse PCHIP spline. + +Calibration concept: + BPM signal -> beam position relative to BPM + +Final beam position: + beam_absolute = bpm_motor_position + local_beam_position + beam_relative_to_camera_crosshair = beam_absolute - camera_crosshair_position +""" + +import time +import os +from datetime import datetime, timedelta +from pathlib import Path +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +from pyparsing import results +from scipy.optimize import curve_fit +import scipy.special as special +from scipy.interpolate import PchipInterpolator, CubicSpline + + +def read_currents(): + """Read the individual bpm channels""" + vals_bpm1 = [] + vals_bpm2 = [] + vals_bpm3 = [] + vals_bpm4 = [] + + for _ in range(5): + vals_bpm1.append(dev.bcu_bpm1.read()["bcu_bpm1"]["value"]) + time.sleep(0.1) + for _ in range(5): + vals_bpm2.append(dev.bcu_bpm2.read()["bcu_bpm2"]["value"]) + time.sleep(0.1) + for _ in range(5): + vals_bpm3.append(dev.bcu_bpm3.read()["bcu_bpm3"]["value"]) + time.sleep(0.1) + for _ in range(5): + vals_bpm4.append(dev.bcu_bpm4.read()["bcu_bpm4"]["value"]) + time.sleep(0.1) + bpm1 = np.mean(vals_bpm1) + bpm2 = np.mean(vals_bpm2) + bpm3 = np.mean(vals_bpm3) + bpm4 = np.mean(vals_bpm4) + + return {"bpm1": bpm1, "bpm2": bpm2, "bpm3": bpm3, "bpm4": bpm4} + + +def compute_norm(): + """Compute normalised x and y positions""" + readings = read_currents() + total = readings["bpm1"] + readings["bpm2"] + readings["bpm3"] + readings["bpm4"] + # print(f"Sum is {total:.2f}") + xn = ( + (readings["bpm1"] + readings["bpm2"]) - (readings["bpm3"] + readings["bpm4"]) + ) / total + yn = ( + (readings["bpm1"] + readings["bpm3"]) - (readings["bpm2"] + readings["bpm4"]) + ) / total + # return xn, yn, readings["bpm1"], readings["bpm2"], readings["bpm3"], readings["bpm4"] + return float(xn), float(yn) + + +# def compute_pos(): +# """Compute the beam x and y positions""" +# cal = { +# "bcu_bpm": { +# "x_slope": 7.778, +# "x_off": -1.019, +# "y_slope": -8.625, +# "y_off": -1.935, +# } +# } +# xn, yn, bpm1, bpm2, bpm3, bpm4 = compute_norm() +# # print(f"Normalised positions are {xn}, {yn}") +# x_pos = (xn - cal["bcu_bpm"]["x_off"]) / cal["bcu_bpm"]["x_slope"] +# y_pos = (yn - cal["bcu_bpm"]["y_off"]) / cal["bcu_bpm"]["y_slope"] +# return x_pos, y_pos + + +def run_calibration(): + """Scan bpm in x and y and record normalised x and y positions""" + # centred_x = 0.749 + # centred_y = -0.660 + now = datetime.now() + fnow = now.strftime("%d%m%H%M") + centred_x = 0.46 + centred_y = -1.51 + print(f"moving bpm to {centred_x}, {centred_y}") + umv(dev.bcu_bpm_y, centred_y) + umv(dev.bcu_bpm_x, centred_x) + + # # Calibrate in X + umv(dev.ss_sl_xsize,0.02) + umv(dev.ss_sl_xsize, 3.0) + filename = f"luts/bpm_calib/{fnow}_bcu_bpm_x.csv" + xn_data = [] + x_positions = np.linspace(centred_x - 0.6, centred_x + 0.6, 101) + with open(filename, "w", encoding="utf-8") as f: + f.write(f"Xpos,Xnorm,BPM1,BPM2,BPM3,BPM4\n") + for x in x_positions: + umv(dev.bcu_bpm_x, x) + print(f"Moving BPM to {x} mm") + time.sleep(0.2) + xn, yn, bpm1, bpm2, bpm3, bpm4 = compute_norm() + xn_data.append(xn) + with open(filename, "a", encoding="utf-8") as f: + f.write(f"{x},{xn},{bpm1},{bpm2},{bpm3},{bpm4}\n") + + # Calibrate in Y + umv(dev.bcu_bpm_x, centred_x) + umv(dev.ss_sl_xsize, 3.0) + umv(dev.ss_sl_ysize, 0.03) + filename = f"luts/bpm_calib/{fnow}_bcu_bpm_y.csv" + y_positions = np.linspace(centred_y - 0.1, centred_y + 0.1, 251) + yn_data = [] + with open(filename, "w", encoding="utf-8") as f: + f.write(f"Ypos,Ynorm,BPM1,BPM2,BPM3,BPM4\n") + for y in y_positions: + umv(dev.bcu_bpm_y, y) + print(f"Moving BPM to {y} mm") + time.sleep(0.2) + xn, yn, bpm1, bpm2, bpm3, bpm4 = compute_norm() + yn_data.append(yn) + with open(filename, "a", encoding="utf-8") as f: + f.write(f"{y},{yn},{bpm1},{bpm2},{bpm3},{bpm4}\n") + + umv(dev.bcu_bpm_x, centred_x) + umv(dev.bcu_bpm_y, centred_y) + umv(dev.ss_sl_ysize, 3.0) + + + +def fit_bpm_data(x_y, rundate="02072130_", bpm_name="bcu_bpm"): + CALIB_DIR = "luts/bpm_calib/" + filename = os.path.join(CALIB_DIR, f"{rundate}{bpm_name}_{x_y}.csv") + data = np.loadtxt(filename, delimiter=",", skiprows=1) + + xdata = data[:, 0] # scan / motor position + ydata = data[:, 1] # normalised BPM signal + + return xdata, ydata + +def linear_calibration( + x_y, + bpm_motor_position, + crosshair_bpm_signal, + rundate = "05071923_", + bpm_name = "bcu_bpm", + sanity_limit = 0.2, + plot = True +): + calib_dir = "luts/bpm_calib" + xdata, ydata = fit_bpm_data(x_y, rundate = rundate, bpm_name = bpm_name) + # Remove non-linear region + if x_y == 'x': + mask_limit = 0.59 + else: + mask_limit = 0.9 + mask = np.abs(ydata) < mask_limit + xdata = xdata[mask] + ydata = ydata[mask] + + m, c = np.polyfit(xdata, ydata, 1) + + # --- Plot --- + plt.figure(figsize=(7, 5)) + plt.scatter(xdata, ydata, color="red", label=f"BPM {x_y} data") + + x_fit = np.linspace(min(xdata), max(xdata), 100) + plt.plot(x_fit, m * x_fit + c, "r--", label=f"Fit: Linear") + + plt.xlabel("label") + plt.ylabel("label") + plt.title("title") + plt.legend() + plt.grid(True) + plt.tight_layout() + plt.show() + +def make_inverse_spline_calibration( + x_y, + bpm_motor_position, + crosshair_bpm_signal, + rundate="05071923_", + bpm_name="bcu_bpm", + sanity_limit=0.2, + plot=True, +): + """ + Create and save inverse BPM calibration. + + Parameters + ---------- + x_y : str + "x" or "y" + bpm_motor_position : float + Current physical BPM motor position during calibration. + crosshair_bpm_signal : float + Normalised BPM reading when the beam is on the sample-camera crosshair. + mask_limit : float + Ignore saturated BPM readings outside +/- mask_limit. + sanity_limit : float + Warn later if BPM motor has moved by more than this. + """ + CALIB_DIR = "luts/bpm_calib/" + xdata, ydata = fit_bpm_data(x_y, rundate=rundate, bpm_name=bpm_name) + + # Remove saturated BPM response + if x_y == 'x': + mask_limit = 0.98 + else: + mask_limit = 0.91 + mask = np.abs(ydata) < mask_limit + xdata = xdata[mask] + ydata = ydata[mask] + + # For inverse calibration: BPM signal -> beam position + order = np.argsort(ydata) + bpm_signal = ydata[order] + local_position = xdata[order] + + # Remove duplicate BPM signal values + bpm_signal, unique_idx = np.unique(bpm_signal, return_index=True) + local_position = local_position[unique_idx] + + spline = PchipInterpolator(bpm_signal, local_position) + + # Local beam position when beam is visually on camera crosshair + crosshair_local_position = float(spline(crosshair_bpm_signal)) + + # Absolute beamline coordinate of camera crosshair + crosshair_absolute_position = bpm_motor_position + crosshair_local_position + + save_file = os.path.join(CALIB_DIR, f"{bpm_name}_{x_y}_inverse_spline.npz") + + np.savez( + save_file, + bpm_signal=bpm_signal, + local_position=local_position, + bpm_motor_position=bpm_motor_position, + crosshair_bpm_signal=crosshair_bpm_signal, + crosshair_local_position=crosshair_local_position, + crosshair_absolute_position=crosshair_absolute_position, + mask_limit=mask_limit, + sanity_limit=sanity_limit, + ) + + print(f"Saved {x_y} BPM calibration to:") + print(save_file) + print() + print(f"Calibration BPM motor position: {bpm_motor_position:.6f}") + print(f"Crosshair BPM signal: {crosshair_bpm_signal:.6f}") + print(f"Crosshair local position: {crosshair_local_position:.6f}") + print(f"Crosshair absolute position: {crosshair_absolute_position:.6f}") + + if plot: + signal_fit = np.linspace(np.min(bpm_signal), np.max(bpm_signal), 1000) + pos_fit = spline(signal_fit) + + plt.figure() + plt.scatter(ydata, xdata, label="calibration data") + plt.plot(signal_fit, pos_fit, label="inverse PCHIP spline", color='red') + plt.axvline(crosshair_bpm_signal, linestyle="--", label="camera crosshair") + plt.xlabel(f"{bpm_name}_{x_y} normalised signal") + plt.ylabel(f"{x_y} local beam position") + plt.title(f"{bpm_name}_{x_y} inverse calibration") + plt.grid(True) + plt.legend() + plt.show() + + return save_file + +class BPMCalibration: + def __init__(self, filename): + data = np.load(filename) + + self.bpm_signal = data["bpm_signal"] + self.local_position = data["local_position"] + + self.bpm_motor_position_calib = float(data["bpm_motor_position"]) + self.crosshair_absolute_position = float(data["crosshair_absolute_position"]) + self.sanity_limit = float(data["sanity_limit"]) + + self.spline = PchipInterpolator( + self.bpm_signal, + self.local_position, + ) + + def beam_position(self, bpm_signal, bpm_motor_position, warn=True): + """ + Return beam position relative to the sample-camera crosshair. + """ + + motor_shift = bpm_motor_position - self.bpm_motor_position_calib + + if warn and abs(motor_shift) > self.sanity_limit: + print( + "Warning: BPM motor has moved since calibration: " + f"delta = {motor_shift:.3f} mm" + ) + + local_beam_position = float(self.spline(bpm_signal)) + absolute_beam_position = bpm_motor_position + local_beam_position + + relative_to_crosshair = ( + absolute_beam_position - self.crosshair_absolute_position + ) + + return relative_to_crosshair + +def get_beampos(): + x_cal = BPMCalibration("luts/bpm_calib/bcu_bpm_x_inverse_spline.npz") + y_cal = BPMCalibration("luts/bpm_calib/bcu_bpm_y_inverse_spline.npz") + + bpm_x_signal, bpm_y_signal = compute_norm() + + beam_x = x_cal.beam_position( + bpm_signal=bpm_x_signal, + bpm_motor_position=dev.bcu_bpm_x.position, + ) + + beam_y = y_cal.beam_position( + bpm_signal=bpm_y_signal, + bpm_motor_position=dev.bcu_bpm_y.position, + ) + + beam_x_mic = 1000 * beam_x + beam_y_mic = 1000 * beam_y + + print(f"Beam relative to camera crosshair:") + print(f"X = {beam_x_mic:.4f} um") + print(f"Y = {beam_y_mic:.4f} um") + + return beam_x_mic, beam_y_mic + +#!/usr/bin/env python +"""Calculate photon flux from a Si diode current.""" + +import math +from dataclasses import dataclass + +import numpy as np + + +@dataclass +class PXIIDiodeConfig: + """Diode/beamline-specific constants.""" + + si_thickness_um: float = 12.0 + al_thickness_um: float = 20.0 + diode_offset_mm: float = 15.0 + + si_density: float = 2.33 # g/cm^3 + al_density: float = 2.699 # g/cm^3 + air_density: float = 1.205e-3 # g/cm^3 + + eps_si: float = 3.62 # eV per electron-hole pair + + +def flux( + current_a: float, + energy_kev: float | None = None, + det_z: float | None = None, + config = PXIIDiodeConfig, +) -> float: + """ + Calculate photon flux from Si diode current. + + Parameters + ---------- + current_a: + Diode current in A. + energy_kev: + Beam energy in keV. Will use the current energy if + not specified. + det_z: + Detector distance (dev.det_z) (mm). Will use the current + detector distance if not specified. + config: + DiodeConfig containing Si/Al thicknesses and material constants. + + Returns + ------- + float + Flux in photons/s. + """ + if energy_kev is None: + energy_kev = get_current_energy() / 1000 + + if det_z is None: + det_z = dev.det_z.position + + air_path_mm = det_z + config.diode_offset_mm + + si_thickness_cm = config.si_thickness_um / 10_000.0 + al_thickness_cm = config.al_thickness_um / 10_000.0 + + log_energy = math.log10(energy_kev) + + # Photoelectric mass attenuation coefficient fits + si_poly = np.poly1d([0.0789, -0.477, -2.238, 4.158]) + al_poly = np.poly1d([0.0638, -0.413, -2.349, 4.106]) + air_poly = np.poly1d([0.928, -2.348, -1.026, 3.153]) + + a_si = 10 ** si_poly(log_energy) + a_al = 10 ** al_poly(log_energy) + a_air = 10 ** air_poly(log_energy) + + # Fraction of beam absorbed in active Si layer + si_absorbed_fraction = -np.expm1( + -a_si * config.si_density * si_thickness_cm + ) + + if si_absorbed_fraction <= 0: + raise ValueError("Calculated Si absorption fraction is zero or negative.") + + # Flux before Al/air correction + flux = ( + 1000.0 + * current_a + * config.eps_si + / 1.602 + / energy_kev + / si_absorbed_fraction + * 1.0e13 + ) + + # Transmission through Al and air + al_transmission = np.exp( + -a_al * config.al_density * al_thickness_cm + ) + + air_transmission = np.exp( + -a_air * config.air_density * air_path_mm / 10.0 + ) + + flux /= al_transmission + flux /= air_transmission + + + print(f"Flux = {flux: .3g} ph/s") + + return float(flux) + +def calibrate_bpm_flux(ave = 5): + # d['det_z'].move('mse') + # d['det_y'].move('xi') + # d['det_z'].move(200) + + dir = "luts/bpm_calib/" + filename = dir + "bpm_flux_20260708b.csv" + with open(filename, 'w', encoding="utf-8") as f: + f.write("Energy,Transmission,BPMSum,Flux\n") + print("Energy,Transmission,BPMSum,Flux\n") + energies = [12400,7000,8000,9000,10000,11000,13000,14000,15000,16000,18000,20000,25000] + transmissions = [1, 0.9, 0.8, 0.7, 0.6, 0.5,0.4,0.3,0.2,0.1] + + for energy in energies: + print(f"Moving to energy {energy}") + bl_energy(energy) + + for set_trans in transmissions: + print(f"Setting transmission to {set_trans}") + dev.transm.put(set_trans) + time.sleep(5) + + flux_values = [] + bpm_values = [] + + print(f"Measuring flux and bpmsum") + for _ in range(ave): + diode_current = dev.xidiode.read()['xidiode']['value'] + fl = flux(diode_current) + bpmsum = dev.bcu_bpmsum.read()['bcu_bpmsum']['value'] + flux_values.append(fl) + bpm_values. append(bpmsum) + + actual_trans = dev.transm.read()['transm']['value'] + flux_ave = np.mean(flux_values) + bpmsum_ave = np.mean(bpm_values) + print(f"{energy:.5g},{actual_trans:.3g},{bpmsum_ave:.4g},{flux_ave:.4f}\n") + + with open(filename, 'a') as f: + f.write(f"{energy:.5g},{actual_trans:.3g},{bpmsum_ave:.4g},{flux_ave:.4f}\n") + bl_energy(12400) + umv(dev.det_y, 70) + umv(dev.id_gap, 20) + +def analyse_bpm_flux_calibration( + filename="luts/bpm_calib/bpm_flux_20260708b.csv", + force_zero_intercept=False, +): + data = pd.read_csv(filename) + + results = [] + with open("luts/bpm_calib/bpm_flux_fits.csv", "w") as f: + f.write("Energy,Slope,Intercept\n") + for energy, group in data.groupby("Energy"): + x = group["BPMSum"].to_numpy(dtype=float) + print(f"x is {x}") + y = group["Flux"].to_numpy(dtype=float) + + if force_zero_intercept: + # y = m*x + slope = np.sum(x * y) / np.sum(x * x) + intercept = 0.0 + else: + # y = m*x + c + slope, intercept = np.polyfit(x, y, deg=1) + + y_fit = slope * x + intercept + + # --- Plot --- + plt.figure(figsize=(7, 5)) + plt.scatter(x, y, color="red") + + x_fit = np.linspace(min(x), max(x), 100) + plt.plot(x_fit, slope * x_fit + intercept, + "r--", label=f"Fit: Slope = {slope:.5g}, Intercept = {intercept:.5g}") + + plt.xlabel("BPMSUm") + plt.ylabel("Flux") + plt.title(f"{energy} eV") + plt.legend() + plt.grid(True) + plt.tight_layout() + plt.savefig(f"luts/bpm_calib/{energy}_bpm_flux") + # plt.show() + + residuals = y - y_fit + ss_res = np.sum(residuals**2) + ss_tot = np.sum((y - np.mean(y))**2) + + r2 = 1 - ss_res / ss_tot if ss_tot > 0 else np.nan + + results.append( + { + "Energy": energy, + "Slope": f"{slope:.5g}", + "Intercept": f"{intercept:.5g}", + "R2": f"{r2:.3g}", + # "N": len(group), + } + ) + + results = pd.DataFrame(results) + + results.to_csv("luts/bpm_calib/bpm_flux_fits.csv", index=False) + dict = results.to_dict() + print(dict) + return results + +def linear_bpm_flux_calib(): + filename = 'luts/bpm_calib/fits-25.csv' + df = pd.read_csv(filename) + energies = df["Energy"].to_numpy() + intercepts = df["Intercept"].to_numpy() + slopes = df["Slope"].to_numpy() + # --- Plot --- + plt.figure(figsize=(7, 5)) + plt.scatter(energies, slopes, color="red") + + x_fit = np.linspace(min(energies), max(energies), 100) + coeffs = np.polyfit(energies, slopes,1) + y_fit = np.poly1d(coeffs) + plt.plot(x_fit, y_fit(x_fit)), + plt.xlabel("Energy eV") + plt.ylabel("Slope") + plt.title(f"Energies vs slopes, coeffs = {coeffs}") + # plt.legend() + plt.grid(True) + plt.tight_layout() + plt.savefig(f"luts/bpm_calib/slopes_vs_energy") + plt.show() + return coeffs + + +# def get_flux_calibration(energy): +# # filename = "luts/bpm_calib/bpm_flux_fits.csv" +# filename = 'luts/bpm_calib/fits-25.csv' +# default_slope = 4.42e8 +# default_intercept = -1.66e11 + +# try: +# df = pd.read_csv(filename) +# energies = df["Energy"].to_numpy() +# intercepts = df["Intercept"].to_numpy() +# slopes = df["Slope"].to_numpy() +# slope_interp = CubicSpline(energies, slopes) +# intercept_interp = CubicSpline(energies, intercepts) +# slope = slope_interp(energy) +# intercept = intercept_interp(energy) +# print(f"Using data from calibration file") +# # --- Plot --- +# plt.figure(figsize=(7, 5)) +# plt.scatter(energies, slopes, color="red") + +# x_fit = np.linspace(min(energies), max(energies), 100) +# coeffs = np.polyfit(energies, slopes,1) +# print("linear co-efficients: ", coeffs) +# y_fit = np.poly1d(coeffs) +# plt.plot(x_fit, y_fit(x_fit)), +# # "r--", label=f"Fit: Slope = {slope:.5g}, Intercept = {intercept:.5g}") + +# plt.xlabel("Energy") +# plt.ylabel("Slope") +# plt.title(f"{energy} eV") +# # plt.legend() +# plt.grid(True) +# plt.tight_layout() +# plt.show() +# except FileNotFoundError: +# print("Cannot access calibration file, using default parameters") +# slope = default_slope +# intercept = default_intercept + +# return coeffs + + +def bpm2flux(energy=None, bpmsum=None, transm=None): + """ + Calculate the flux from BCU BPM reading. + Option to provide energy, bpmsum reading and transmission. + If these are not given, the current values are used. + + Returns the flux at the sample (after attenuators) and a calculated + value of the full flux if attenuation was 0. + + """ + calibration_min_energy = 6500 + calibration_max_energy = 21000 + + if energy is None: + energy = get_current_energy() + + if bpmsum is None: + bpmsum = dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"] + + if transm is None: + transm = dev.transm.read()['transm']['value'] + + if not calibration_min_energy <= energy <= calibration_max_energy: + raise ValueError( + f"Energy {energy:.0f} eV is outside the calibrated range " + f"{calibration_min_energy:.0f}–" + f"{calibration_max_energy:.0f} eV" + ) + + coeffs = [ + 1.06436277e5, + -6.38943746e8, + ] + + calibration_factor = np.polyval(coeffs, energy) + flux = calibration_factor * bpmsum + full_flux = flux/transm + if transm == 1: + print(f"Transmission = {transm*100:.5g} %, Flux = {flux: .3g} ph/s,\n") + else: + print(f"Transmission = {transm*100: .5g} %, Flux = {flux: .3g} ph/s,\n" + f"Flux with 100 % transmission would be {full_flux: .3g} ph/s") + + return float(flux), float(full_flux) + + + diff --git a/pxii_bec/macros/chmirrh.py b/pxii_bec/macros/chmirrh.py new file mode 100644 index 0000000..94b58ce --- /dev/null +++ b/pxii_bec/macros/chmirrh.py @@ -0,0 +1,136 @@ +import numpy as np +import math, time +import matplotlib.pyplot as plt +import scipy +######################################################## +### scan FE slits and check BPMs before and after mirror +######################################################## + +def gaussfit(x,y,p): +# define a gaussian fitting function where +# p[0] = amplitude +# p[1] = mean +# p[2] = sigma +# p[3] = const offset + + fitfct = lambda p, x0: p[0]*np.exp(-(x0-p[1])**2/(2.0*p[2]**2))+p[3] + #fitfct = lambda p, x0: p[0]*np.exp(-(x0-p[1])**2/(2.0*p[2]**2)) + errfct = lambda p, x0,y0: fitfct(p,x0)-y0 + + # guess fit parameters + ind0 = np.where(y==max(y))[0] + p0=np.c_[max(y), x[ind0], np.std(y), np.mean(y[0:5])] + #p0=scipy.c_[max(y), np.where(y==max(y))[0], np.std(y)] + # array generation [[]], and taking only one dimens + # fit a gaussian to the correlation function + + #print('p0 = ' , p0) + p1, success = scipy.optimize.leastsq(errfct, p0.copy()[0], + args=(x,y)) + + #plt.figure() + bestfit=fitfct(p1,x) + #print('************************', x,y) + plt.plot(x,y,'r*') + plt.plot(x,bestfit,'r-') + + # different fit fct + #popt, pcov = curve_fit(fitfct, x, y) + #newfit=fitfct(popt,x) + #plt.plot(x,newfit,'g+') + + + plt.show() + + return bestfit, p1 + +def scan_fe_sl(dir = "y"): + if dir in ["y","v"]: + sdir ="vertical" + fe_size0 = dev.fe_sl_ysize.user_readback.get() + print('Closing vertical FE slits to 0.1') + umv(dev.fe_sl_ysize, 0.1) + s = scans.line_scan(dev.fe_sl_ycen,-1,1, exp_time=02., steps=21, relative=True) + time.sleep(0.1) + umv(dev.fe_sl_ysize, fe_size0) + print(f'Opening {sdir} FE slits to {fe_size0}') + if dir in ["x","h"]: + sdir ="horizontal" + fe_size0 = dev.fe_sl_xsize.user_readback.get() + print('Closing horizontal FE slits to 0.1') + umv(dev.fe_sl_xsize, 0.1) + s = scans.line_scan(dev.fe_sl_xcen,-1,1, exp_time=02., steps=21, relative=True) + time.sleep(0.1) + umv(dev.fe_sl_xsize, fe_size0) + print(f'Opening {sdir} FE slits to {fe_size0}') + else: + print('no valid direction, doing nothing') + +def mirrh(dir='y'): + + #dat_ss = read_data_csv("/home/anuschka/SS_pitch2p94.csv") + #dat_bcu = read_data_csv("/home/anuschka/BCU_pitch2p94.csv") + + scan_fe_sl(dir=dir) + ind = -1 + if dir in ["x","h"]: + slitmot = 'fe_sl_xcen' + if dir in ["y","v"]: + slitmot = 'fe_sl_ycen' + + dat_ss = save_data(ind, slitmot, 'ss_bpmsum', isave = 0) + dat_bcu = save_data(ind, slitmot, 'bcu_bpmsum', isave = 0) + + + data_xs = dat_ss[0] # csv would be: dat_ss[:, 0] + data_ys = dat_ss[1] + + data_xb = dat_bcu[0] + data_yb = dat_bcu[1] + + #plt.figure() + + #plt.plot(data_xs, data_ys, "*") + #plt.plot(data_xb, data_yb, "+") + + data_ys_norm = data_ys/max(data_ys) # looks better than data_ys/sum(data_ys) + data_yb_norm = data_yb/max(data_yb) + + plt.figure() + + plt.plot(data_xs, data_ys_norm, "*") + plt.plot(data_xb, data_yb_norm, "+") + + + y= data_ys_norm + xm = np.where(y==max(y))[0] + xmi = data_xs[xm] + #print('xm, xmi', xm, xmi) + + pf1 = [1, xmi , np.std(data_ys_norm), np.mean(y[0:5])] # bg = 0 + fit_s, ps = gaussfit(data_xs,data_ys_norm, pf1) + + y= data_yb_norm + xm = np.where(y==max(y))[0] + xmi = data_xb[xm] + #print('xm, xmi', xm, xmi) + + pf2 = [1, xmi, np.std(data_yb_norm), np.mean(y[0:5])] # bg = -11 + fit_b, pb = gaussfit(data_xb,data_yb_norm, pf2) + + + plt.figure() + + plt.plot(data_xs, fit_s-ps[3], "*") + plt.plot(data_xs, fit_s-ps[3]) + plt.plot(data_xb, fit_b-pb[3], "+") + plt.plot(data_xb, fit_b-pb[3]) + + print('Fit Params of First BPM, SS, ps', ps) + print('Fit Params of Second BPM, BCU, pb', pb) + print() + if abs(ps[1]-pb[1]) > 0.05: + print('***** WARNING ******, mirror height not ok') + if abs(ps[2]-pb[2]) > 0.05: + print('***** WARNING ******, mirror not catching full beam') + diff --git a/pxii_bec/macros/devices_manager.py b/pxii_bec/macros/devices_manager.py index 47dddaf..cc201db 100755 --- a/pxii_bec/macros/devices_manager.py +++ b/pxii_bec/macros/devices_manager.py @@ -1,9 +1,9 @@ """ This module manages the initialization of devices.""" -# from guards import attach_guards -# from policies import attach_policies -# from build_devices import build_devices +#from guards import attach_guards +#from policies import attach_policies +#from build_devices import build_devices class DeviceManager: diff --git a/pxii_bec/macros/enScan.py b/pxii_bec/macros/enScan.py new file mode 100644 index 0000000..e81b00d --- /dev/null +++ b/pxii_bec/macros/enScan.py @@ -0,0 +1,83 @@ +def en_plothist(hindex: int, signal_name: str, isave=1): + """ + Get data for a completed scan from the BEC history, + and plot all the results. + + Args: + history_index (int): scan to fetch, e.g. -1 for the most recent scan + signal_name (str): the monitor + + Example: + s=scans.line_scan(dev.dcm_bragg, 178.5, 179.5, steps=240, relative=False + data_x, data_y = en_plothist(-1,"bcu_bpmsum") + + scanned with + scans.line_scan(dev.aerotech.y,-0.05,0.05, steps=101, settling_time=0.5, relative=True) + """ + + from lmfit.models import LinearModel, GaussianModel, VoigtModel, QuadraticModel, LorentzianModel + import matplotlib.pyplot as plt + import numpy as np + + if hindex < 0: + h = bec.history[hindex] + print('by scan number') + else: + h = bec.history.get_by_scan_number(hindex) + print('by scan number') + + md = h.metadata["bec"] + sno = md['dataset_number'] + print(f"number of scan = {sno}") + scanvar = list(md["args"].keys())[0] # string, returns the variable of the last performed scan + # data = h.devices[device_name][signal].read()["value"] + # data_x = h.devices.dcm_pitch.dcm_pitch.read()["value"] + # data_y = h.devices.lu_bpmsum.lu_bpmsum.read()["value"] + # data_x = h.devices[device_name][device_name].read()["value"] + + # that works ... + #print(list(md['args'].keys())) + val = list(md['args'].keys()) + #val[0] = 'aerotech.x' + devicenam = val[0] + print('device = ', devicenam) + data_xd = md["positions"] # last scan knows which device ... however, double array + data_x = data_xd.flatten() + print("dx = ", data_x) + #data_y = h.devices[signal_name][signal_name].read()["value"] + data_y1 = h.devices["bcu_bpmsum"]["bcu_bpmsum"].read()["value"] + data_y2 = h.devices["ss_bpmsum"]["ss_bpmsum"].read()["value"] + + #print("dy = ", data_y) + + data_y = data_y1/data_y2 + rev = 0 + #if val[0][9] == 'x': + # rev = 1 + smoothplotgrad(data_x, data_y, reverse = rev) + # g, xm = justfit(data_x, data_y, model=model, ibg=ibg) + +# plt.ion() +# plt.figure() +# plt.plot(data_x, data_y, "*") +# plt.plot(data_x, g.best_fit) +# plt.xlabel(scanvar) +# plt.ylabel(signal_name) +# plt.show() + +# gcen = g.pars["center"].value + + + if isave: + ans = "n" + ans = input("Store data in csv file? y/n ") + if ans == "y": + dirname = "/sls/x10sa/config/commissioning/Data/" + # writing output to simple data file for later analysis: + combined = np.column_stack((data_x, data_y)) + filename = dirname + "Scan" + str(sno) + devicenam + ".txt" + with open(filename, "w") as f: + np.savetxt(f, combined, delimiter=",", fmt="%.9e") + + + return data_x, data_y diff --git a/pxii_bec/macros/flux_di.py b/pxii_bec/macros/flux_di.py index a22a174..7d39470 100755 --- a/pxii_bec/macros/flux_di.py +++ b/pxii_bec/macros/flux_di.py @@ -89,38 +89,43 @@ def fluxcalc(curr, en, t_air, t_si, t_al): # Main # -def flux_x10sa(): - curr = input('Please enter the current [in A] ') +def flux_x10sa(curr, en, silent = 0): + # curr = input('Please enter the current [in A] ') curr = float(curr) - print('Current = ', curr) - en = input('Please enter the energy [in keV] ') - en = float(en) - print('Energy = ', en) + if not silent: + print('Current = ', curr) + # en = input('Please enter the energy [in keV] ') + en = float(en) + if not silent: + print('Energy = ', en) ## d_det = input('Please enter the detector distance [in mm] ') d_det = dev.det_z.user_readback.get() d_off = 15 ## at X10SA ### input('Please enter the OFFSET of the diode to det surface [in mm] ') t_air = float(d_det) + float(d_off) - print('Air path length (CARE ! add det distance and offset of diode) = ', t_air) # include additional diode distance - # t_si = input('Please enter the Si thickness of diode [in um] ') - # t_si = float(t_si) / 10000. # to cm - - t_si = 12 # um ## at X10SA - # t_al = input('Please enter the Al thickness of diode [in um] ') - # t_al = float(t_al) / 10000. # to cm + t_si = 12 # um ## at X10SA + # t_si = input('Please enter the Si thickness of diode [in um] ') # if not silent: + t_si = float(t_si) / 10000. # to cm t_al = 20 # um ## at X10SA + # t_al = input('Please enter the Al thickness of diode [in um] ') + t_al = float(t_al) / 10000. # to cm + + if not silent: + print('Air path length (CARE ! add det distance and offset of diode) = ', t_air) # include additional diode distance + + fl = fluxcalc(curr, en, t_air,t_si, t_al) + if not silent: + print( " Diode Current = %.6f A " % curr) + print( " Energy = %.4f keV " % en ) - print( " Diode Current = %.6f A " % curr) - print( " Energy = %.4f keV " % en ) + #print( " Thickness of active Si layer = %.4f\t cm " % t_si) #*10000. + #print( " Thickness of Al layer in front of diode = %.4f\t cm " % t_al) #*10000. + print( " Length of path of air in front of diode = %.4f\t mm " % t_air) #*10000. - print( " Thickness of active Si layer = %.4f\t cm " % t_si) #*10000. - print( " Thickness of Al layer in front of diode = %.4f\t cm " % t_al) #*10000. - print( " Length of path of air in front of diode = %.4f\t mm " % t_air) #*10000. - - print (" Flux = %6.2e\t ph/s " % fl) + print (" Flux = %6.2e\t ph/s " % fl) return fl diff --git a/pxii_bec/macros/init_beamline.py b/pxii_bec/macros/init_beamline.py index cae0630..edf1a33 100755 --- a/pxii_bec/macros/init_beamline.py +++ b/pxii_bec/macros/init_beamline.py @@ -30,8 +30,7 @@ class Environment: }, "x06da": { "devdir": "/sls/x06da/config/bec/production/pxiii_bec/pxiii_bec/device_configs/", - "state": "pxiii-state-devices.yaml", - "rest": "pxiii-rest-devices.yaml", + "state": "pxiii-devices.yaml", "states": "pxiii-beamline-states.yaml", }, } @@ -85,7 +84,7 @@ class Environment: "aerotech_u": "mount", "bl_bright": "off", "bl_pos": "out", - "bs_pos": "out", + "bs_pos": "in", "bs_z": "safe", "coll_y": "park", "cryo_pos": "in", diff --git a/pxii_bec/macros/katscripts.py b/pxii_bec/macros/katscripts.py index 3d36c69..451fb84 100755 --- a/pxii_bec/macros/katscripts.py +++ b/pxii_bec/macros/katscripts.py @@ -1,7 +1,7 @@ """Some simple scripts for commissioning""" import time, os -from datetime import datetime +from datetime import datetime, timedelta from dataclasses import dataclass import numpy as np import matplotlib.pyplot as plt @@ -10,15 +10,6 @@ import pandas as pd from scipy.optimize import linear_sum_assignment -def goto1a(): - """Set beamline to 1A position""" - bragg_angle = 160.117 - perp_dist = 0.0389 - gap = 5.319 - umv(dev.dcm_bragg, bragg_angle) - umv(dev.dcm_perp, perp_dist) - umv(dev.id_gap, gap) - def bragg_scan(): """Energy scans from 6 to 18 keV at various gap positions""" @@ -59,26 +50,10 @@ def energy_checks(start_energy=8000, end_energy=20000): """Check gap, pitch and intensities at different energies""" f = open("luts/test.csv", "a", encoding="utf-8") - gaps = { - 8000: 8.04, - 9000: 9.55, - 10000: 7.45, - 11000: 8.46, - 12000: 7.09, - 13000: 7.77, - 14000: 8.61, - 15000: 9.57, - 16000: 8.09, - 17000: 7.18, - 18000: 7.67, - 19000: 8.24, - 20000: 7.52, - } for energy in range(start_energy, end_energy, 1000): f = open("luts/test.csv", "a", encoding="utf-8") print(f"Moving to {energy} eV") - umv(dev.id_gap, gaps[energy]) - move_and_set_dcm(energy) + bl_energy if energy < 16000: close_fe_slits(True) go_to_peak( @@ -117,11 +92,11 @@ def energy_checks(start_energy=8000, end_energy=20000): fe_x = dev.fe_sxcen.read()["fe_sxcen"]["value"] fe_y = dev.fe_sycen.read()["fe_sycen"]["value"] lu_read = dev.lu_bpmsum.read()["lu_bpmsum"]["value"] - bsc_read = dev.bsc_bpmsum.read()["bsc_bpmsum"]["value"] + ss_read = dev.ss_bpmsum.read()["ss_bpmsum"]["value"] bcu_read = dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"] f.write( f"{energy}, {gap: .5g}, {pitch: .5g}, {lu_read: .5g}, " - f"{bsc_read: .5g}, {bcu_read: .5g}, " + f"{ss_read: .5g}, {bcu_read: .5g}, " f"{fe_x: .5g}, {fe_y: .5g}\n" ) @@ -184,8 +159,8 @@ def record_perp(): f.close() -def beam_centre_from_bsc(): - """Compute the beam centre from the bsc_cam""" +def beam_centre_from_ss(): + """Compute the beam centre from the ss_cam""" y = dev.ss_xicam_x.read()["ss_xicam_x"]["value"] x = dev.ss_xicam_y.read()["ss_xicam_y"]["value"] beampos = {"xpos": x, "ypos": y} @@ -193,18 +168,24 @@ def beam_centre_from_bsc(): return beampos -def generate_dcm_lut(start_energy=26500, end_energy=30500, step=500): +def generate_dcm_lut(start_energy=6000, end_energy=30000, step=300): """Generate a lookup table for the dcm from start_energy to end_energy in steps of step""" now = datetime.now() fnow = now.strftime("%d%m%H%M") filename = f"luts/{fnow}_lut.csv" + zoom = dev.scam_zoom.read()['scam_zoom']['value'] with open(filename, "w", encoding="utf-8") as f: - f.write("energy,harmonic,gap,pitch,roll,perp,ss_xicam_x,ss_xicam_y\n") + f.write(f"energy,harmonic,gap,pitch,roll,perp,samcam_x,samcam_y,zoom={zoom}\n") for energy in range(start_energy, end_energy, step): print(f"Moving to {energy: .0f}eV") bl_energy(energy, mono_scan=False) - scan_gap() + try: + scan_gap() + except Exception as exc: + print(f"Gap scan failed at {energy:.0f} eV: {exc}") + set_gap(energy) # set fallback gap here + mono_pitch_scan() gap = dev.id_gap.read()["id_gap"]["value"] harm = Gap() @@ -212,13 +193,17 @@ def generate_dcm_lut(start_energy=26500, end_energy=30500, step=500): pitch = dev.dcm_pitch.read()["dcm_pitch"]["value"] roll = dev.dcm_froll.read()["dcm_froll"]["value"] perp = dev.dcm_perp.read()["dcm_perp"]["value"] - auto_exposure(cam="ss_xicam", max_iter=25) - x = dev.ss_xicam_x.read()["ss_xicam_x"]["value"] - y = dev.ss_xicam_y.read()["ss_xicam_y"]["value"] + # auto_exposure(cam="ss_xicam", max_iter=25) + # x = dev.ss_xicam_x.read()["ss_xicam_x"]["value"] + # y = dev.ss_xicam_y.read()["ss_xicam_y"]["value"] + auto_exposure(cam="samcam", max_iter=20) + x = dev.samcam_x.read()['samcam_x']['value'] + y = dev.samcam_y.read()['samcam_y']['value'] with open(filename, "a", encoding="utf-8") as f: f.write( f"{energy:.0f},{h},{gap:.5g},{pitch:.5g},{roll:.4g},{perp:.5g},{x:.4g},{y:.4g}\n" ) + bl_energy(12400) umv(dev.id_gap, 20.0) @@ -267,128 +252,123 @@ def write_beamsize(): f.write(f"{lens_config},{sx:.4g},{sy:.4g},{i1_reading:.4g}\n") -def beamsize(size): - """WIP to dial up different beam sizes""" - # Set mirror trans and pitch to default settings for 12.4 keV - # vlaues from a 2025 - # umv(dev.vfm_vert,2.136) - # umv(dev.vfm_pitch, 2.695) - # umv(dev.hfm_lat, 1.64) - # umv(dev.hfm_pitch, 2.9844) - umv(dev.vfm_vert, 2.5301) - umv(dev.vfm_pitch, 2.60) - umv(dev.hfm_lat, 1.6586) - umv(dev.hfm_pitch, 2.9964) - print(f"changing beam size to {size}") - - # values = {"xs": {"vbu": -0.9095, "vbd": -1.246, "hbu": -2.9375, "hbd": -5.698}, - # "s": {"vbu": -0.8365, "vbd": -1.22, "hbu": -2.804, "hbd": -5.473}, - # "m": {"vbu": -0.7865, "vbd": -1.17, "hbu": -2.604, "hbd": -5.273}, - # "l": {"vbu": -0.7459, "vbd": -1.13, "hbu": -2.504, "hbd": -5.173}} - # values = {"xs": {"vbu": -0.9095, "vbd": -1.246, "hbu": -2.8075, "hbd": -5.668}, - # "s": {"vbu": -0.8606, "vbd": -1.195, "hbu": -2.6975, "hbd": -5.5585}, - # "m": {"vbu": -0.8410, "vbd": -1.465, "hbu": -2.5575, "hbd": -5.418}, - # "l": {"vbu": -0.762, "vbd": -1.094, "hbu": -2.4582, "hbd": -5.3187}} - values = { - "xs": {"vbu": -0.741, "vbd": -1.206, "hbu": -2.869, "hbd": -5.819}, - "s": {"vbu": -0.7101, "vbd": -1.176, "hbu": -2.7133, "hbd": -5.5535}, - "m": {"vbu": -0.6601, "vbd": -1.126, "hbu": -2.5133, "hbd": -5.3535}, - "l": {"vbu": -0.6196, "vbd": -1.086, "hbu": -2.4133, "hbd": -5.2535}, - } - umv( - dev.vfm_bu, - values[size]["vbu"], - dev.vfm_bd, - values[size]["vbd"], - dev.hfm_bu, - values[size]["hbu"], - dev.hfm_bd, - values[size]["hbd"], - ) - print("Setting camera exposure time") - auto_exposure() - xsig = dev.samcam_xsig.read()["samcam_xsig"]["value"] - ysig = dev.samcam_ysig.read()["samcam_ysig"]["value"] - print(f"Beam has Xsigma = {xsig:.3g}, Ysigma = {ysig:.3g}") - - # if size == 'm': - # move_to_x() - # print(f"Beam has Xsigma = {xsig:.3g}, Ysigma = {ysig:.3g}") - # return - # if size == 'l': - # move_to_x() - # move_to_y() - # umv(dev.hfm_pitch, 2.9684) - # print(f"Beam has Xsigma = {xsig:.3g}, Ysigma = {ysig:.3g}") - # return - # else: - # move_to_x() - # move_to_y() - # print(f"Beam has Xsigma = {xsig:.3g}, Ysigma = {ysig:.3g}") - def scan_Ge(): scanbefore = 30 # eV scanafter = 30 # eV - stepsize = 0.5 # eV - edge_Ge = 11103.1 # eV - - scanstart = edge_Ge + scanafter - scanend = edge_Ge - scanbefore - bragg_start = convert_from_energy(scanstart)["bragg_angle_mrad"] - bragg_end = convert_from_energy(scanend)["bragg_angle_mrad"] - stepnumber = abs(int((scanend - scanstart) / stepsize)) - - print(f"Changing energy to {scanstart}") + stepsize = 0.2 # eV + # Edge sgould be at 11103.1 + actual_edge_Ge = 11103.1 # eV + actual_bragg = convert_from_energy(actual_edge_Ge)["bragg_angle_mrad"] + current_edge = 11095 + current_bragg = convert_from_energy(current_edge)["bragg_angle_mrad"] + print(f"Ge edge should be at a bragg angle of {actual_bragg:.5g} mrad\n") + print(f"Current estimate of edge is {current_bragg:.5g} mrad\n") + xdata = [] + ydata = [] + filedir, fname = fnow() + filename = f"{filedir}{fname}_ge_edge.csv" + print(filename) + with open(filename, 'w') as f: + f.write(f"Energy,Bragg,bcu_bpmsum\n") + + # scanstart = edge_Ge + scanafter + # scanend = edge_Ge - scanbefore + # bragg_start = convert_from_energy(scanstart)["bragg_angle_mrad"] + # bragg_end = convert_from_energy(scanend)["bragg_angle_mrad"] + # stepnumber = abs(int((scanend - scanstart) / stepsize)) + # print(f"Changing energy to {scanstart}") # bl_energy(scanstart) - # scan_gap() - umv(dev.bsc_f4_x, 6) # Put Ge filter in place - print(f"scanning from {bragg_start} to {bragg_end} with {stepnumber} steps") - s = scans.line_scan(dev.dcm_bragg, bragg_start, bragg_end, steps=stepnumber, relative=False) - print(s) - umv(dev.bsc_f4_x, 2) + # # scan_gap() + # umv(dev.ss_f4_x, 6) # Put Ge filter in place + # print(f"scanning from {bragg_start} to {bragg_end} with {stepnumber} steps") + # s = scans.line_scan(dev.dcm_bragg, bragg_start, bragg_end, steps=stepnumber, relative=False) + # print(s) + # umv(dev.ss_f4_x, 2) + + plot_live_data_bec(dev.dcm_bragg,dev.bcu_bpmsum) + scanpoints = np.linspace(current_bragg - 0.5, current_bragg + 0.5, 300) + start_energy = convert_from_bragg(current_bragg+0.5)["energy_ev"] + bl_energy(start_energy) + umv(dev.ss_f4_x, 6) # Put Ge filter in place + + for bragg in scanpoints: + scans.umv(dev.dcm_bragg, bragg, relative=False) + energy = convert_from_bragg(bragg)["energy_ev"] + inten = average_inten() + xdata.append(energy) + ydata.append(inten) + with open(filename, 'a') as f: + f.write(f"{energy:.2f},{bragg:.2f},{inten:.2f}\n") + data = { + "x_data": np.array(xdata), + "y_data": np.array(ydata), + "motor_name": "dcm_bragg", + "signal_name": "bcu_bpmsum", + "motor_device": dev.dcm_bragg, + "scan_number": "Current", + } + + # Define and fit model to scan data + fit_params = create_fit_parameters(deriv = True, + negative = False, + model = FitDefaults.MODEL, + baseline = FitDefaults.BASELINE) + fit_result = fit(data, fit_params) + + # Plot the fitted data if plot = True + + plot_fitted_data_bec(data, fit_result) + + def cal_samcam_fixed_x(): - lat = dev.hfm_lat.read()["hfm_lat"]["value"] - pitch = dev.hfm_pitch.read()["hfm_pitch"]["value"] - scanpoints = np.linspace(lat - 0.1, lat + 0.1, 7) + # lat = dev.hfm_x.read()["hfm_x"]["value"] + # pitch = dev.hfm_pitch.read()["hfm_pitch"]["value"] + fpitch = dev.dcm_fpitch.read()['dcm_fpitch']['value'] + scanpoints = np.linspace(3.75, 4.75, 7) zoom_high = 800 zoom_low = 200 highs, lows = [], [] - high_lat, low_lat = [], [] + high_fpitch, low_fpitch = [], [] + av_high = [] + av_low = [] # high zoom umv(dev.scam_zoom, zoom_high) auto_exposure("samcam") for i in scanpoints: - umv(dev.hfm_lat, i) - umv(dev.hfm_pitch, pitch) + umv(dev.dcm_fpitch, i) time.sleep(0.2) - high_y = dev.samcam_x.read()["samcam_x"]["value"] - high_x = dev.hfm_lat.read()["hfm_lat"]["value"] + for _ in range(5): + reading = dev.samcam_x.read()["samcam_x"]["value"] + av_high.append(reading) + high_y = np.mean(av_high) + high_x = dev.dcm_fpitch.read()["dcm_fpitch"]["value"] print(f"Xpos at zoom {zoom_high} is {high_y}") highs.append(high_y) - high_lat.append(high_x) + high_fpitch.append(high_x) umv(dev.scam_zoom, zoom_low) auto_exposure("samcam") for i in scanpoints: - umv(dev.hfm_lat, i) - umv(dev.hfm_pitch, pitch) + umv(dev.dcm_fpitch, i) time.sleep(0.2) - low_y = dev.samcam_x.read()["samcam_x"]["value"] - low_x = dev.hfm_lat.read()["hfm_lat"]["value"] + for i in range(5): + reading = dev.samcam_x.read()["samcam_x"]["value"] + av_low.append(reading) + low_y = np.mean(av_low) + low_x = dev.dcm_fpitch.read()["dcm_fpitch"]["value"] print(f"Xpos at zoom {zoom_low} is {low_y}") lows.append(low_y) - low_lat.append(low_x) + low_fpitch.append(low_x) - umv(dev.hfm_lat, lat) - umv(dev.hfm_pitch, 2.9844) + umv(dev.dcm_fpitch, 5) # Convert to numpy arrays - x_high = np.array(high_lat) - x_low = np.array(low_lat) + x_high = np.array(high_fpitch) + x_low = np.array(low_fpitch) y_high = np.array(highs) y_low = np.array(lows) @@ -401,7 +381,7 @@ def cal_samcam_fixed_x(): y_intersect = m_high * x_intersect + b_high print(f"\nIntersection at:") - print(f" HFM_lat = {x_intersect:.5f}") + print(f" dcm_fpitch = {x_intersect:.5f}") print(f" SamCam_x = {y_intersect:.2f}") # --- Plot --- @@ -415,7 +395,7 @@ def cal_samcam_fixed_x(): plt.scatter(x_intersect, y_intersect, color="green", s=80, zorder=5, label="Intersection") - plt.xlabel("HFM Lat Position") + plt.xlabel("DCM Fine Pitch Position") plt.ylabel("SamCam X") plt.title("Zoom Calibration") plt.legend() @@ -425,7 +405,7 @@ def cal_samcam_fixed_x(): def cal_samcam_fixed_y(): - vert = dev.vfm_vert.read()["vfm_vert"]["value"] + vert = dev.vfm_y.read()["vfm_y"]["value"] pitch = dev.vfm_pitch.read()["vfm_pitch"]["value"] scanpoints = np.linspace(vert - 0.1, vert + 0.1, 7) zoom_high = 800 @@ -437,11 +417,11 @@ def cal_samcam_fixed_y(): umv(dev.scam_zoom, zoom_high) auto_exposure("samcam") for i in scanpoints: - umv(dev.vfm_vert, i) + umv(dev.vfm_y, i) umv(dev.vfm_pitch, pitch) time.sleep(0.2) high_y = dev.samcam_y.read()["samcam_y"]["value"] - high_x = dev.vfm_vert.read()["vfm_vert"]["value"] + high_x = dev.vfm_y.read()["vfm_y"]["value"] print(f"Ypos at zoom {zoom_high} is {high_y}") highs.append(high_y) high_vert.append(high_x) @@ -449,16 +429,16 @@ def cal_samcam_fixed_y(): umv(dev.scam_zoom, zoom_low) auto_exposure("samcam") for i in scanpoints: - umv(dev.vfm_vert, i) + umv(dev.vfm_y, i) umv(dev.vfm_pitch, pitch) time.sleep(0.2) low_y = dev.samcam_y.read()["samcam_y"]["value"] - low_x = dev.vfm_vert.read()["vfm_vert"]["value"] + low_x = dev.vfm_y.read()["vfm_y"]["value"] print(f"Ypos at zoom {zoom_low} is {low_y}") lows.append(low_y) low_vert.append(low_x) - umv(dev.vfm_vert, vert) + umv(dev.vfm_y, vert) umv(dev.vfm_pitch, pitch) # Convert to numpy arrays @@ -476,7 +456,7 @@ def cal_samcam_fixed_y(): y_intersect = m_high * x_intersect + b_high print(f"\nIntersection at:") - print(f" VFM_vert = {x_intersect:.5f}") + print(f" vfm_y = {x_intersect:.5f}") print(f" SamCam_y = {y_intersect:.2f}") # --- Plot --- @@ -577,15 +557,15 @@ def correlate_fpitch(): plt.show() -def correlate_hfm_lat(): +def correlate_hfm_x(): x_correlation = [] - lat = dev.hfm_lat.read()["hfm_lat"]["value"] + lat = dev.hfm_x.read()["hfm_x"]["value"] scanpoints = np.linspace(lat - 0.1, lat + 0.1, 10) for pos in scanpoints: - umv(dev.hfm_lat, pos) + umv(dev.hfm_x, pos) xpos, ypos = compute_pos() x_correlation.append(xpos) - umv(dev.hfm_lat, lat) + umv(dev.hfm_x, lat) x = np.array(scanpoints) y1 = np.array(x_correlation) @@ -610,37 +590,37 @@ def correlate_hfm_lat(): plt.show() -def correlate_vfm_vert(): - y_correlation = [] - vert = dev.vfm_vert.read()["vfm_vert"]["value"] - scanpoints = np.linspace(vert - 0.06, vert + 0.06, 10) - for pos in scanpoints: - umv(dev.vfm_vert, pos) - xpos, ypos = compute_pos() - y_correlation.append(ypos) - umv(dev.vfm_vert, vert) +# def correlate_vfm_y(): +# y_correlation = [] +# vert = dev.vfm_y.read()["vfm_y"]["value"] +# scanpoints = np.linspace(vert - 0.06, vert + 0.06, 10) +# for pos in scanpoints: +# umv(dev.vfm_y, pos) +# xpos, ypos = compute_pos() +# y_correlation.append(ypos) +# umv(dev.vfm_y, vert) - x = np.array(scanpoints) - y1 = np.array(y_correlation) +# x = np.array(scanpoints) +# y1 = np.array(y_correlation) - yslope, yint = np.polyfit(x, y1, 1) +# yslope, yint = np.polyfit(x, y1, 1) - print(f"Fit for xpos is: y = {yslope}.x + {yint}") - plt.figure(figsize=(7, 5)) - # plt.scatter(x, y1, label='xpos') - plt.scatter(x, y1, label="beam y position", color="rebeccapurple") +# print(f"Fit for xpos is: y = {yslope}.x + {yint}") +# plt.figure(figsize=(7, 5)) +# # plt.scatter(x, y1, label='xpos') +# plt.scatter(x, y1, label="beam y position", color="rebeccapurple") - x_fit = np.linspace(min(x), max(x), 100) - # plt.plot(x_fit, xslope*x_fit + xint, 'r--', label=f'y = {xslope}*x + {xint}') - plt.plot( - x_fit, yslope * x_fit + yint, label=f"y = {yslope:.5g}*x + ({yint:.5g})", color="lightcoral" - ) - plt.xlabel("VFM vertical (mm)") - plt.ylabel("beam Y(from BCU BPM)") - plt.legend() - plt.grid(True) - plt.tight_layout() - plt.show() +# x_fit = np.linspace(min(x), max(x), 100) +# # plt.plot(x_fit, xslope*x_fit + xint, 'r--', label=f'y = {xslope}*x + {xint}') +# plt.plot( +# x_fit, yslope * x_fit + yint, label=f"y = {yslope:.5g}*x + ({yint:.5g})", color="lightcoral" +# ) +# plt.xlabel("VFM vertical (mm)") +# plt.ylabel("beam Y(from BCU BPM)") +# plt.legend() +# plt.grid(True) +# plt.tight_layout() +# plt.show() def correlate_hfm_pitch(): @@ -685,29 +665,29 @@ def move_to_x(targetx=0.13): xpos, ypos = compute_pos() beam_drift = xpos - targetx # beam moved +0.1 mm (100 µm) - mot_current = dev.hfm_lat.read()["hfm_lat"]["value"] # current motor position (example) + mot_current = dev.hfm_x.read()["hfm_x"]["value"] # current motor position (example) # Compute correction delta = -beam_drift / slope mot_new = mot_current + delta - umv(dev.hfm_lat, mot_new) + umv(dev.hfm_x, mot_new) -def move_to_y(targety=-0.033): - # Calibration and drift compensation - # target from previous run = -0.283 - slope = -1.2779 - intercept = 2.4374 +# def move_to_y(targety=-0.033): +# # Calibration and drift compensation +# # target from previous run = -0.283 +# slope = -1.2779 +# intercept = 2.4374 - xpos, ypos = compute_pos() +# xpos, ypos = compute_pos() - beam_drift = ypos - targety # beam moved +0.1 mm (100 µm) - mot_current = dev.vfm_vert.read()["vfm_vert"]["value"] # current motor position (example) +# beam_drift = ypos - targety # beam moved +0.1 mm (100 µm) +# mot_current = dev.vfm_y.read()["vfm_y"]["value"] # current motor position (example) - # Compute correction - delta = -beam_drift / slope - mot_new = mot_current + delta - umv(dev.vfm_vert, mot_new) +# # Compute correction +# delta = -beam_drift / slope +# mot_new = mot_current + delta +# umv(dev.vfm_y, mot_new) from epics import caget, caput @@ -782,46 +762,51 @@ def auto_exposure( return exposure -def get_new_beamsizes(mirror): - filename = f"luts/{mirror}_size.csv" - if mirror == "hfm": - bu = dev.hfm_bu - bd = dev.hfm_bd - step = 0.2 - else: - bu = dev.vfm_bu - bd = dev.vfm_bd - step = 0.05 - beamsize("xs") - move_targetx_with_hfm_lat() - move_targety_with_vfm_vert() - with open(filename, "w") as f: - for _ in range(4): - curr_bu = bu.user_readback.get() - curr_bd = bd.user_readback.get() - auto_exposure() - umv(bu, curr_bu + step) - umv(bd, curr_bd + step) - move_targetx_with_hfm_lat() - move_targety_with_vfm_vert() - xpos = dev.samcam_x.read()["samcam_x"]["value"] - ypos = dev.samcam_y.read()["samcam_y"]["value"] - xsig = dev.samcam_xsig.read()["samcam_xsig"]["value"] - ysig = dev.samcam_ysig.read()["samcam_ysig"]["value"] - f.write(f"{curr_bu}, {curr_bd}, {xpos}, {ypos}, {xsig}, {ysig}\n") - print(f"{curr_bu}, {curr_bd}, {xpos}, {ypos}, {xsig}, {ysig}") +# def get_new_beamsizes(mirror): +# filename = f"luts/{mirror}_size.csv" +# if mirror == "hfm": +# bu = dev.hfm_bu +# bd = dev.hfm_bd +# step = 0.2 +# else: +# bu = dev.vfm_bu +# bd = dev.vfm_bd +# step = 0.05 +# beamsize("xs") +# move_targetx_with_hfm_x() +# move_targety_with_vfm_y() +# with open(filename, "w") as f: +# for _ in range(4): +# curr_bu = bu.user_readback.get() +# curr_bd = bd.user_readback.get() +# auto_exposure() +# umv(bu, curr_bu + step) +# umv(bd, curr_bd + step) +# move_targetx_with_hfm_x() +# move_targety_with_vfm_y() +# xpos = dev.samcam_x.read()["samcam_x"]["value"] +# ypos = dev.samcam_y.read()["samcam_y"]["value"] +# xsig = dev.samcam_xsig.read()["samcam_xsig"]["value"] +# ysig = dev.samcam_ysig.read()["samcam_ysig"]["value"] +# f.write(f"{curr_bu}, {curr_bd}, {xpos}, {ypos}, {xsig}, {ysig}\n") +# print(f"{curr_bu}, {curr_bd}, {xpos}, {ypos}, {xsig}, {ysig}") def filters(pos="out"): if pos == "out": - umv(dev.bsc_f1_x, 2.0, dev.bsc_f2_x, 2.0, dev.bsc_f3_x, 12.0, dev.bsc_f4_x, 8.0) + umv(dev.ss_f1_x, 2.0, dev.ss_f2_x, 2.0, dev.ss_f3_x, 12.0, dev.ss_f4_x, 8.0) if SE.scin.checkpos(): auto_exposure(cam="samcam", max_iter=20) else: - umv(dev.bsc_f1_x, 2.0, dev.bsc_f2_x, 2.0, dev.bsc_f3_x, 8.0, dev.bsc_f4_x, 8.0) + umv(dev.ss_f1_x, 2.0, dev.ss_f2_x, 2.0, dev.ss_f3_x, 8.0, dev.ss_f4_x, 8.0) if SE.scin.checkpos(): auto_exposure(cam="samcam", max_iter=20) +def fnow(): + now = datetime.now() + fnow = now.strftime("%Y%m%d-%H%M") + filedir = "luts/" + return filedir, fnow def energy_vs_height(start_energy=11000, end_energy=25000, step=1000): """Correlate beam height with energy from start_energy to end_energy in steps of step""" @@ -857,111 +842,6 @@ def energy_vs_height(start_energy=11000, end_energy=25000, step=1000): # umv(dev.id_gap, 20.0) -@dataclass -class SlitParameters: - small: float - large: float - scanwidth: float - steps: any - x_size: any - x_cen: any - y_size: any - y_cen: any - mon: any - - -# Generic scan function -def scan_slits(name="s1", x=True, y=True): - # Define parameters for all slits - s1_params = SlitParameters( - small=0.075, - large=2.5, - scanwidth=2.5, - steps=40, - x_size=dev.s1_xsize, - y_size=dev.s1_ysize, - x_cen=dev.s1_xcen, - y_cen=dev.s1_ycen, - mon=dev.lu_bpmsum, - ) - s2_params = SlitParameters( - small=0.075, - large=3.0, - scanwidth=2.5, - steps=50, - x_size=dev.s2_xsize, - y_size=dev.s2_ysize, - x_cen=dev.s2_xcen, - y_cen=dev.s2_ycen, - mon=dev.bcu_bpmsum, - ) - s3_params = SlitParameters( - small=0.05, - large=0.5, - scanwidth=0.7, - steps=50, - x_size=dev.s3_xsize, - y_size=dev.s3_ysize, - x_cen=dev.s3_xcen, - y_cen=dev.s3_ycen, - mon=dev.i1, - ) - - # Map slit names to their parameters - slit_parameters = {"s1": s1_params, "s2": s2_params, "s3": s3_params} - - if name not in slit_parameters: - raise ValueError(f"Unknown slit name: {name}") - - params = slit_parameters[name] - print("Moving filters out") - filters("out") - - print("Moving i1 diode into position") - SE.i1.mvin() - - if x and y: - scan_in_x( - xsize=params.x_size, - xcen=params.x_cen, - mon=params.mon, - small=params.small, - large=params.large, - width=params.scanwidth, - steps=params.steps, - ) - scan_in_y( - ysize=params.y_size, - ycen=params.y_cen, - mon=params.mon, - small=params.small, - large=params.large, - width=params.scanwidth, - steps=params.steps, - ) - if x and not y: - scan_in_x( - xsize=params.x_size, - xcen=params.x_cen, - mon=params.mon, - small=params.small, - large=params.large, - width=params.scanwidth, - steps=params.steps, - ) - else: - scan_in_y( - ysize=params.y_size, - ycen=params.y_cen, - mon=params.mon, - small=params.small, - large=params.large, - width=params.scanwidth, - steps=params.steps, - ) - - filters("in") - def scan_in_x(xsize, xcen, mon, small, large, width, steps): umv(xsize, small) @@ -976,18 +856,18 @@ def scan_in_y(ysize, ycen, mon, small, large, width, steps): def trans_fils(inc): - x1 = dev.bsc_f1_x.read()["bsc_f1_x"]["value"] - x2 = dev.bsc_f2_x.read()["bsc_f2_x"]["value"] - x3 = dev.bsc_f3_x.read()["bsc_f3_x"]["value"] - x4 = dev.bsc_f4_x.read()["bsc_f4_x"]["value"] + x1 = dev.ss_f1_x.read()["ss_f1_x"]["value"] + x2 = dev.ss_f2_x.read()["ss_f2_x"]["value"] + x3 = dev.ss_f3_x.read()["ss_f3_x"]["value"] + x4 = dev.ss_f4_x.read()["ss_f4_x"]["value"] umv( - dev.bsc_f1_x, + dev.ss_f1_x, x1 + inc, - dev.bsc_f2_x, + dev.ss_f2_x, x2 + inc, - dev.bsc_f3_x, + dev.ss_f3_x, x3 + inc, - dev.bsc_f4_x, + dev.ss_f4_x, x4 + inc, ) @@ -1005,516 +885,138 @@ def calc_from_centre(cam="samcam"): return read, diff_px -def get_cam(): - umv(dev.scam_zoom, 100) +def get_cam(low_zoom, high_zoom): + umv(dev.scam_zoom, low_zoom) x = dev.samcam_x.read()["samcam_x"]["value"] y = dev.samcam_y.read()["samcam_y"]["value"] print(f"Low zoom: x = {x}, y = {y}") - umv(dev.scam_zoom, 500) + umv(dev.scam_zoom, high_zoom) x = dev.samcam_x.read()["samcam_x"]["value"] y = dev.samcam_y.read()["samcam_y"]["value"] print(f"High zoom: x = {x}, y = {y}") -def read_currents(): - """Read the individual bpm channels""" - bpm1 = dev.bcu_bpm1.read()["bcu_bpm1"]["value"] - bpm2 = dev.bcu_bpm2.read()["bcu_bpm2"]["value"] - bpm3 = dev.bcu_bpm3.read()["bcu_bpm3"]["value"] - bpm4 = dev.bcu_bpm4.read()["bcu_bpm4"]["value"] - # print(f"bpm1 = {bpm1:.3f}, bpm2 = {bpm2:.3f}, bpm3 = {bpm3:.3f}, bpm4 = {bpm4:.3f}") - return {"bpm1": bpm1, "bpm2": bpm2, "bpm3": bpm3, "bpm4": bpm4} - - -def compute_norm(): - """Compute normalised x and y positions""" - readings = read_currents() - total = readings["bpm1"] + readings["bpm2"] + readings["bpm3"] + readings["bpm4"] - # print(f"Sum is {total:.2f}") - xn = ((readings["bpm1"] + readings["bpm2"]) - (readings["bpm3"] + readings["bpm4"])) / total - yn = ((readings["bpm1"] + readings["bpm3"]) - (readings["bpm2"] + readings["bpm4"])) / total - return xn, yn - - -# def vfm_pscan(): -# start_pitch = 3.0 -# scan_width = 0.03 -# start_vfm_y = -0.7 -# vfm_y = dev.vfm_y.read()['vfm_y']['value'] -# name = f"VFM-{vfm_y:.3g}" -# bpmsum, y = [], [] - -# scanpoints = np.linspace((start_pitch-scan_width), (start_pitch+scan_width), 20) -# umv(dev.vfm_y, start_vfm_y) -# for repeat in range(0,8): -# filename = f"./luts/pitch{name}.csv" -# with open(filename, "w") as f: -# f.write("BCUsum, BCU-Y\n") -# for i in scanpoints: -# umv(dev.vfm_pitch,i) -# time.sleep(0.2) -# bcu = dev.bcu_bpmsum.read()['bcu_bpmsum']['value'] -# xn, yn = compute_norm() -# bpmsum.append(bcu) -# ypos = y.append(yn) -# with open(filename, "a") as f: -# f.write(f"{i:.4g},{bcu:.4g},{yn:.4g}\n") -# umv(dev.vfm_pitch,start_pitch) -# sum_array = np.array(bpmsum) -# y_array = np.array(y) -# # --- Plot --- -# plt.figure(figsize=(7,5)) -# plt.plot(scanpoints, sum_array, color='red', label=f'BCU bpmsum') -# plt.xlabel('VFM pitch') -# plt.ylabel('BCU') -# plt.title(f"{name}") -# plt.legend() -# plt.grid(True) -# plt.tight_layout() -# plt.savefig(f"luts/{name}_sum.png") -# # plt.show() -# plt.figure(figsize=(7,5)) -# plt.plot(scanpoints, y_array, color='blue', label=f'BCU Y') -# plt.xlabel('VFM pitch') -# plt.ylabel('BCU') -# plt.title(f"{name}") -# plt.legend() -# plt.grid(True) -# plt.tight_layout() -# plt.savefig(f"luts/{name}_y.png") -# # plt.show() - - -def hfm_pscan2(): - - # ----------------------- - # Settings - # ----------------------- - start_pitch = 3.0 - pitch_width = 0.03 - n_pitch = 15 - - start_hfm_x = 1.5 - hfm_x_width = 0.2 - n_hfm_x = 7 - - settle = 0.2 - - output_dir = "./luts" - os.makedirs(output_dir, exist_ok=True) - - # ----------------------- - # Save initial positions - # ----------------------- - initial_pitch = dev.hfm_pitch.read()["hfm_pitch"]["value"] - initial_hfmx = dev.hfm_x.read()["hfm_x"]["value"] - - # ----------------------- - # Scan points - # ----------------------- - pitch_points = np.linspace(start_pitch - pitch_width, start_pitch + pitch_width, n_pitch) - - hfmx_points = np.linspace(start_hfm_x - hfm_x_width, start_hfm_x + hfm_x_width, n_hfm_x) - - summary = [] - - # ----------------------- - # Loop over hFM X - # ----------------------- - for hfmx in hfmx_points: - - print(f"\nScanning HFM X = {hfmx:.4f}") - - umv(dev.hfm_x, hfmx) - time.sleep(settle) - - bpmsum = [] - - name = f"HFMX_{hfmx:.4f}" - - csvfile = os.path.join(output_dir, f"{name}.csv") - - with open(csvfile, "w") as f: - - f.write("pitch,bpmsum,bpmsum_std\n") - - for pitch in pitch_points: - - umv(dev.hfm_pitch, pitch) - time.sleep(settle) - - # Average several BPM readings - vals = [] - for _ in range(5): - vals.append(dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"]) - time.sleep(0.1) - - bcu = np.mean(vals) - bcu_std = np.std(vals) - - bpmsum.append(bcu) - - f.write(f"{pitch:.6f},{bcu:.6f}, {bcu_std:.6f}\n") - - # Return pitch to nominal - umv(dev.hfm_pitch, start_pitch) - - bpmsum = np.array(bpmsum) - - # Find maximum transmission - imax = np.argmax(bpmsum) - - pitch_peak = pitch_points[imax] - sum_peak = bpmsum[imax] - - summary.append([hfmx, pitch_peak, sum_peak]) - - print(f"Peak pitch = {pitch_peak:.5f}, " f"Max BPM sum = {sum_peak:.1f}") - - # Plot this pitch scan - plt.figure(figsize=(7, 5)) - - plt.plot(pitch_points, bpmsum, marker="o") - - plt.axvline(pitch_peak, linestyle="--", label=f"Peak = {pitch_peak:.5f}") - - plt.xlabel("HFM pitch") - plt.ylabel("BPM sum") - plt.title(name) - - plt.grid(True) - plt.legend() - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, f"{name}.png")) - - plt.close() - - # ----------------------- - # Summary analysis - # ----------------------- - summary = np.array(summary) - - hfmx = summary[:, 0] - pitch_peak = summary[:, 1] - sum_peak = summary[:, 2] - - # Save summary CSV - summary_file = os.path.join(output_dir, "hfm_summary.csv") - - with open(summary_file, "w") as f: - - f.write("hfmx,pitch_peak,sum_peak\n") - - for row in summary: - f.write(",".join(f"{x:.6f}" for x in row) + "\n") - - # ----------------------- - # Summary plots - # ----------------------- - - plt.figure(figsize=(7, 5)) - - plt.plot(hfmx, sum_peak, marker="o") - - plt.xlabel("HFM X") - plt.ylabel("Maximum BPM sum") - plt.title("Transmission vs HFM X") - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, "summary_sum_vs_hfmx.png")) - - plt.close() - - plt.figure(figsize=(7, 5)) - - plt.plot(hfmx, pitch_peak, marker="o") - - plt.xlabel("HFM X") - plt.ylabel("Pitch at maximum transmission") - plt.title("Optimum pitch vs HFM X") - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, "summary_pitch_vs_hfmx.png")) - - plt.close() - - # ----------------------- - # Find best HFM X - # ----------------------- - ibest = np.argmax(sum_peak) - - best_vfmy = hfmx[ibest] - best_pitch = pitch_peak[ibest] - - print("\nBest alignment:") - print(f"HFM X = {best_hfmx:.5f}") - print(f"HFM pitch = {best_pitch:.5f}") - - # Move to optimum - umv(dev.hfm_x, best_hfmx) - umv(dev.hfm_pitch, best_pitch) - - print("\nMoved mirrors to optimum values.") - - return summary - - -def vfm_pscan(): - - # ------------------------------- - # User settings - # ------------------------------- - start_pitch = 3.0 # nominal pitch - pitch_width = 0.03 # +/- pitch scan range - n_pitch = 20 - - start_vfm_y = -0.900 # nominal VFM Y - vfm_y_width = 0.05 # +/- VFM Y scan range - n_vfm_y = 8 - - settle_time = 0.2 - - output_dir = "./luts" - os.makedirs(output_dir, exist_ok=True) - - # ------------------------------- - # Save initial positions - # ------------------------------- - initial_pitch = dev.vfm_pitch.read()["vfm_pitch"]["value"] - initial_vfm_y = dev.vfm_y.read()["vfm_y"]["value"] - - # ------------------------------- - # Generate scan points - # ------------------------------- - pitch_points = np.linspace(start_pitch - pitch_width, start_pitch + pitch_width, n_pitch) - - vfm_y_points = np.linspace(start_vfm_y - vfm_y_width, start_vfm_y + vfm_y_width, n_vfm_y) - - summary = [] - - # ------------------------------- - # Loop over VFM Y - # ------------------------------- - for vfm_y in vfm_y_points: - - print(f"\nScanning VFM Y = {vfm_y:.4f}") - - umv(dev.vfm_y, vfm_y) - time.sleep(settle_time) - - bpmsum = [] - bpm_y = [] - - name = f"VFMY_{vfm_y:.4f}" - - csvfile = os.path.join(output_dir, f"{name}.csv") - - with open(csvfile, "w") as f: - - f.write("pitch,bpmsum,bpm_y\n") - - # ------------------------------- - # Pitch scan - # ------------------------------- - for pitch in pitch_points: - - umv(dev.vfm_pitch, pitch) - time.sleep(settle_time) - - bcu = dev.bcu_bpmsum.read()["bcu_bpmsum"]["value"] - - xn, yn = compute_norm() - - bpmsum.append(bcu) - bpm_y.append(yn) - - f.write(f"{pitch:.6f},{bcu:.6f},{yn:.6f}\n") - - # Return pitch to nominal - umv(dev.vfm_pitch, start_pitch) - - # Convert to arrays - bpmsum = np.array(bpmsum) - bpm_y = np.array(bpm_y) - - # ------------------------------- - # Find optimum pitch - # ------------------------------- - imax = np.argmax(bpmsum) - - pitch_peak = pitch_points[imax] - sum_peak = bpmsum[imax] - y_peak = bpm_y[imax] - - summary.append([vfm_y, pitch_peak, sum_peak, y_peak]) - - print(f"Peak at pitch={pitch_peak:.5f}, " f"BPM sum={sum_peak:.1f}, " f"BPM Y={y_peak:.4f}") - - # ------------------------------- - # Plot BPM sum - # ------------------------------- - plt.figure(figsize=(7, 5)) - - plt.plot(pitch_points, bpmsum, marker="o") - - plt.axvline(pitch_peak, linestyle="--") - - plt.xlabel("VFM pitch") - plt.ylabel("BCU BPM sum") - plt.title(name) - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, f"{name}_sum.png")) - - plt.close() - - # ------------------------------- - # Plot BPM Y - # ------------------------------- - plt.figure(figsize=(7, 5)) - - plt.plot(pitch_points, bpm_y, marker="o") - - plt.axvline(pitch_peak, linestyle="--") - - plt.xlabel("VFM pitch") - plt.ylabel("BCU BPM Y") - plt.title(name) - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, f"{name}_y.png")) - - plt.close() - - # ------------------------------- - # Summary arrays - # ------------------------------- - summary = np.array(summary) - - vfm_y_vals = summary[:, 0] - pitch_peaks = summary[:, 1] - sum_peaks = summary[:, 2] - y_peaks = summary[:, 3] - - # Save summary CSV - summary_file = os.path.join(output_dir, "vfm_summary.csv") - - with open(summary_file, "w") as f: - - f.write("vfm_y,pitch_peak,sum_peak,bpm_y_peak\n") - - for row in summary: - f.write(",".join(f"{x:.6f}" for x in row) + "\n") - - # ------------------------------- - # Summary plots - # ------------------------------- - - plt.figure(figsize=(7, 5)) - plt.plot(vfm_y_vals, pitch_peaks, marker="o") - - plt.xlabel("VFM Y") - plt.ylabel("Pitch at max BPM sum") - plt.title("Optimum pitch vs VFM Y") - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, "summary_pitch_vs_vfmy.png")) - - plt.close() - - plt.figure(figsize=(7, 5)) - plt.plot(vfm_y_vals, sum_peaks, marker="o") - - plt.xlabel("VFM Y") - plt.ylabel("Maximum BPM sum") - plt.title("Maximum transmission vs VFM Y") - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, "summary_sum_vs_vfmy.png")) - - plt.close() - - plt.figure(figsize=(7, 5)) - plt.plot(vfm_y_vals, y_peaks, marker="o") - - plt.xlabel("VFM Y") - plt.ylabel("BPM Y at optimum pitch") - plt.title("Beam position vs VFM Y") - - plt.grid(True) - plt.tight_layout() - - plt.savefig(os.path.join(output_dir, "summary_bpmy_vs_vfmy.png")) - - plt.close() - - # ------------------------------- - # Restore original positions - # ------------------------------- - umv(dev.vfm_pitch, initial_pitch) - umv(dev.vfm_y, initial_vfm_y) - - print("\nScan complete.") - print(f"Summary written to {summary_file}") - - return summary - - -def find_best_roll(low=6000, high=20000): - low_scanpoints = np.linspace(0.5, 5.5, 11) - high_scanpoints = np.linspace(1.0, 9.0, 9) +# def read_currents(): +# """Read the individual bpm channels""" +# bpm1 = dev.bcu_bpm1.read()["bcu_bpm1"]["value"] +# bpm2 = dev.bcu_bpm2.read()["bcu_bpm2"]["value"] +# bpm3 = dev.bcu_bpm3.read()["bcu_bpm3"]["value"] +# bpm4 = dev.bcu_bpm4.read()["bcu_bpm4"]["value"] +# # print(f"bpm1 = {bpm1:.3f}, bpm2 = {bpm2:.3f}, bpm3 = {bpm3:.3f}, bpm4 = {bpm4:.3f}") +# return {"bpm1": bpm1, "bpm2": bpm2, "bpm3": bpm3, "bpm4": bpm4} + + +# def compute_norm(): +# """Compute normalised x and y positions""" +# readings = read_currents() +# total = readings["bpm1"] + readings["bpm2"] + readings["bpm3"] + readings["bpm4"] +# # print(f"Sum is {total:.2f}") +# xn = ((readings["bpm1"] + readings["bpm2"]) - (readings["bpm3"] + readings["bpm4"])) / total +# yn = ((readings["bpm1"] + readings["bpm3"]) - (readings["bpm2"] + readings["bpm4"])) / total +# return xn, yn + +def average_inten(): + vals_inten = [] + for _ in range(5): + vals_inten.append(dev.bcu_bpmsum.read()['bcu_bpmsum']['value']) + time.sleep(0.1) + inten = np.mean(vals_inten) + return inten + +def mirror_pitch(mirror = 'vfm'): + + if mirror == 'vfm': + pitch = dev.vfm_pitch.position + mot = dev.vfm_pitch + start = 2.94 + else: + pitch = dev.hfm_pitch.position + mot = dev.hfm_pitch + start = 3.3 + print(f"Scanning {mirror}_pitch from 10-29 keV") + pitch_range = [start - 0.25, start - 0.2, start -0.15, start - 0.1, start -0.05] + + umv(mot,start) + + results = [] + now = datetime.now() + fnow = now.strftime("%d%m%H%M") + csvfile = f"luts/{fnow}_{mirror}_pitch_energy.csv" + + with open(csvfile, "w") as f: + f.write("energy,pitch,diode\n") + + # for p in pitch_range: + for energy in range(17, 26): + bl_energy(energy) + time.sleep(1) + + for p in pitch_range: + umv(mot, p) + print(f"{mirror}_pitch = {p}") + time.sleep(0.2) + vals_diode = [] + + for _ in range(5): + vals_diode.append(dev.xidiode.read()['xidiode']['value']) + time.sleep(0.1) + + diode = np.mean(vals_diode) + + results.append([ + energy, + p, + diode, + ]) + + with open(csvfile, "a") as f: + f.write( + f"{energy:.2f},{p:.5f},{diode:.5g}\n" + ) + umv(mot,start) + bl_energy(12400) + results = np.array(results) + +def find_best_roll(low = 6000, high = 20000): + low_scanpoints = np.linspace(2.0, 7.0, 11) + high_scanpoints = np.linspace(1.0, 9.0,9) highs_y, lows_y = [], [] - # low energy - bl_energy(low) - energy = get_current_energy() - filename = f"./luts/roll_{energy:.0f}.csv" - with open(filename, "w", encoding="utf-8") as f: - f.write("Roll, Y pos\n") - auto_exposure("bsccam", max_iter=25) - for i in low_scanpoints: - umv(dev.dcm_froll, i) - time.sleep(0.2) - low_y = dev.bsccam_y.read()["bsccam_y"]["value"] - print(f"Ypos at BSC cam is {low_y}") - lows_y.append(low_y) - with open(filename, "a", encoding="utf-8") as f: - f.write(f"{i:.4g},{low_y:.4g} \n") - # high energy bl_energy(high) - energy = get_current_energy() - if 19999 < energy < 200001: - umv(dev.id_gap, 4.718) - filename = f"./luts/roll_{energy:.0f}.csv" + filename = f"./luts/roll_{high:.0f}.csv" with open(filename, "w", encoding="utf-8") as f: - f.write("Roll, Y pos\n") - auto_exposure("bsccam", max_iter=25) + f.write("Roll, Y pos\n") + auto_exposure("samcam", max_iter=25) for i in high_scanpoints: umv(dev.dcm_froll, i) time.sleep(0.2) - high_y = dev.bsccam_y.read()["bsccam_y"]["value"] - print(f"Ypos at BSC cam is {high_y}") + high_y = dev.samcam_y.read()['samcam_y']['value'] + print(f"Ypos at sample cam is {high_y}") highs_y.append(high_y) with open(filename, "a", encoding="utf-8") as f: - f.write(f"{i:.4g},{low_y:4g.} \n") + f.write(f"{i:.4g},{high_y:.4g} \n") + # low energy + bl_energy(low) + filename = f"./luts/roll_{low:.0f}.csv" + with open(filename, "w", encoding="utf-8") as f: + f.write("Roll, Y pos\n") + auto_exposure("samcam", max_iter=25) + for i in low_scanpoints: + umv(dev.dcm_froll, i) + time.sleep(0.2) + low_y = dev.samcam_y.read()['samcam_y']['value'] + print(f"Ypos at sample cam is {low_y}") + lows_y.append(low_y) + with open(filename, "a", encoding="utf-8") as f: + f.write(f"{i:.4g},{low_y:.4g} \n") + + y_high = np.array(highs_y) y_low = np.array(lows_y) + # # Fit linear models: y = m*x + b m_high, b_high = np.polyfit(high_scanpoints, y_high, 1) m_low, b_low = np.polyfit(low_scanpoints, y_low, 1) @@ -1525,23 +1027,510 @@ def find_best_roll(low=6000, high=20000): print(f"\nIntersection at:") print(f" DCM Roll = {x_intersect:.5f}") - print(f" BSCcam Y = {y_intersect:.2f}") + print(f" samcam Y = {y_intersect:.2f}") # # --- Plot --- - plt.figure(figsize=(7, 5)) - plt.scatter(high_scanpoints, y_high, color="red", label=f"High energy") - plt.scatter(low_scanpoints, y_low, color="blue", label=f"Low energy") + plt.figure(figsize=(7,5)) + plt.scatter(high_scanpoints, y_high, color='red', label=f'High energy') + plt.scatter(low_scanpoints, y_low, color='blue', label=f'Low energy') x_fit = np.linspace(min(high_scanpoints), max(high_scanpoints), 100) - plt.plot(x_fit, m_high * x_fit + b_high, "r--", label=f"High energy") - plt.plot(x_fit, m_low * x_fit + b_low, "b--", label=f"Low energy") + plt.plot(x_fit, m_high*x_fit + b_high, 'r--', label=f'High energy') + plt.plot(x_fit, m_low*x_fit + b_low, 'b--', label=f'Low energy') - plt.scatter(x_intersect, y_intersect, color="green", s=80, zorder=5, label="Intersection") + plt.scatter(x_intersect, y_intersect, color='green', s=80, zorder=5, label='Intersection') - plt.xlabel("DCM fine roll") - plt.ylabel("BSCcam Y pos") - plt.title("Roll Calibration") + plt.xlabel('DCM fine roll') + plt.ylabel('samcam Y pos') + plt.title('Roll Calibration') plt.legend() plt.grid(True) plt.tight_layout() plt.show() + +def vfm_yaw_check(): + slit_size = 0.02 + slit_point1 = -1.2 + slit_point2 = -0.12 + mirror_start = 0.5 + mirror_end = -5 + yaw_values = [-1.5, -0.5, 0, 0.5, 1] + point1 = [] + point2 = [] + + umv(dev.ss_sl_ysize, slit_size) + + for yaw in yaw_values: + print(f"Moving VFM yaw to {yaw}") + umv(dev.vfm_yaw, yaw) + # Point 1 + print(f"Moving slits to position 1") + umv(dev.ss_sl_ycen, slit_point1) + scans.line_scan(dev.vfm_x, mirror_start, mirror_end, steps = 20, relative=False) + fit_result = fit_history(-1, "xidiode", deriv=True) + centre = fit_result['centre'] + print(f'Yaw = {yaw}, position = {slit_point1}, centre = {centre}') + point1.append(centre) + # Point 2 + print(f"Moving slits to position 2") + umv(dev.ss_sl_ycen, slit_point2) + scans.line_scan(dev.vfm_x, mirror_start, mirror_end, steps = 20, relative=False) + fit_result = fit_history(-1, "xidiode", deriv=True) + centre = fit_result['centre'] + print(f'Yaw = {yaw}, position = {slit_point2}, centre = {centre}') + point2.append(centre) + print(f"Point 1 values are {point1}") + print(f"Point 2 values are {point2}") + go_to_peak(dev.ss_sl_ycen, dev.xidiode, -2, 2, 100) + umv(dev.ss_sl_ysize, 2) + y_point1 = np.array(point1) + y_point2 = np.array(point2) + + + # # Fit linear models: y = m*x + b + m_point1, b_point1 = np.polyfit(yaw_values, y_point1, 1) + m_point2, b_point2 = np.polyfit(yaw_values, y_point2, 1) + + # # Intersection point + x_intersect = (b_point2 - b_point1) / (m_point1 - m_point1) + y_intersect = m_point1 * x_intersect + b_point1 + + print(f"\nIntersection at:") + print(f" Mirror yaw = {x_intersect:.5f}") + print(f" Y = {y_intersect:.2f}") + + # # --- Plot --- + plt.figure(figsize=(7,5)) + plt.scatter(yaw_values, y_point1, color='red', label=f'point1') + plt.scatter(yaw_values, y_point2, color='blue', label=f'point2') + + x_fit = np.linspace(min(yaw_values), max(yaw_values), 100) + plt.plot(x_fit, m_point1*x_fit + b_point1, 'r--', label=f'point1') + plt.plot(x_fit, m_point2*x_fit + b_point2, 'b--', label=f'point2') + + plt.scatter(x_intersect, y_intersect, color='green', s=80, zorder=5, label='Intersection') + + plt.xlabel('VFM yaw') + plt.ylabel('Edge') + plt.title('VFM Yaw Calibration') + plt.legend() + plt.grid(True) + plt.tight_layout() + plt.show() + +from dataclasses import dataclass +import time + + +@dataclass +class SlitAxis: + name: str + centre_motor: object # e.g. dev.slit1_x + size_motor: object # e.g. dev.slit1_xsize + scan_func: callable # your existing peak scan function + scan_range: float = 2.0 + open_size: float = 2.0 + min_size: float = -0.4 + max_size: float = 5.0 + + +@dataclass +class Slit: + name: str + x: SlitAxis + y: SlitAxis + + +def read_intensity(detector, n=5, delay=0.1): + values = [] + for _ in range(n): + values.append(detector.read()[detector.name]["value"]) + time.sleep(delay) + return sum(values) / len(values) + + + +def reduce_to_transmission(axis, detector, baseline, target=0.15, step=0.05): + """ + Close slit size until intensity is around target * baseline. + """ + size = axis.size_motor.position + + while size > axis.min_size: + intensity = read_intensity(detector) + transmission = intensity / baseline + + print( + f"{axis.name}: size={size:.4f}, " + f"I={intensity:.3g}, transmission={transmission:.3f}" + ) + + if transmission <= target: + return size, intensity + + size -= step + umv(axis.size_motor, size) + + raise RuntimeError(f"{axis.name}: reached minimum slit size without reaching target") + + +def open_to_transmission(axis, detector, baseline, target=0.99, step=0.05): + """ + Open slit until intensity is close to the original baseline. + """ + size = axis.size_motor.position + + while size < axis.max_size: + intensity = read_intensity(detector) + transmission = intensity / baseline + + print( + f"{axis.name}: size={size:.4f}, " + f"I={intensity:.3g}, transmission={transmission:.3f}" + ) + + if transmission >= target: + return size, intensity + + size += step + umv(axis.size_motor, size) + # final_size = axis.size.motor.position + # fudge = 0.5 + # umv(axis.size_motor,final_size + fudge) + + raise RuntimeError(f"{axis.name}: reached maximum slit size without restoring intensity") + +# def approx_centre_axis(axis, detector, slitsize=0.5): +# umv(axis.size_motor, slitsize) +# go_to_peak(axis.centre_motor, detector, -4, 4, 50, confirm=False) + + +def centre_axis(axis, detector, close_fraction=0.10, open_fraction=0.95): + print(f"\nAligning {axis.name}") + + # approx_centre_axis(axis, detector, slitsize=0.5) + + umv(axis.size_motor, axis.open_size) + + baseline = read_intensity(detector) + print(f"{axis.name}: baseline intensity = {baseline:.3g}") + + # if baseline <= 0: + # raise RuntimeError(f"{axis.name}: invalid baseline intensity") + + reduce_to_transmission( + axis, + detector, + baseline, + target=close_fraction, + ) + + go_to_peak(axis.centre_motor, detector, axis.centre_motor.position - axis.scan_range, + axis.centre_motor.position + axis.scan_range, + 50, + confirm=False) + print(f"{axis.name}: moving centre to peak position") + + open_to_transmission( + axis, + detector, + baseline, + target=open_fraction, + ) + + final_intensity = read_intensity(detector) + print( + f"{axis.name}: final intensity = {final_intensity:.3g}, " + f"transmission = {final_intensity / baseline:.3f}" + ) + +def open_slits(size=3): + slits = define_slits() + for slit in slits: + umv(slit.x.size_motor, size) + umv(slit.y.size_motor, size) + + +def centre_slit(slit, detector): + print(f"\n=== Aligning {slit.name} ===") + + centre_axis(slit.x, detector) + centre_axis(slit.y, detector) + + print(f"=== Finished {slit.name} ===") + + +def centre_all_slits(slits, detector): + for slit in slits: + try: + centre_slit(slit, detector) + except Exception as exc: + print(f"WARNING: failed to align {slit.name}: {exc}") + print("Continuing with next slit.") + +def centre_one(name, detector): + slits = define_slits() + for slit in slits: + if slit.name == name: + centre_slit(slit, detector) + +def define_slits(): + slits = [ + Slit( + name="bsf", + x=SlitAxis( + name="bsf_sl_x", + centre_motor=dev.bsf_sl_xcen, + size_motor=dev.bsf_sl_xsize, + scan_func=go_to_peak, + ), + y=SlitAxis( + name="bsf_sl_y", + centre_motor=dev.bsf_sl_ycen, + size_motor=dev.bsf_sl_ysize, + scan_func=go_to_peak, + ), + ), + Slit( + name="ss", + x=SlitAxis( + name="ss_sl_x", + centre_motor=dev.ss_sl_xcen, + size_motor=dev.ss_sl_xsize, + scan_func=go_to_peak, + ), + y=SlitAxis( + name="ss_sl_y", + centre_motor=dev.ss_sl_ycen, + size_motor=dev.ss_sl_ysize, + scan_func=go_to_peak, + ), + ), + Slit( + name="bcu", + x=SlitAxis( + name="bcu_sl_x", + centre_motor=dev.bcu_sl_xcen, + size_motor=dev.bcu_sl_xsize, + scan_func=go_to_peak, + ), + y=SlitAxis( + name="ss_sl_y", + centre_motor=dev.bcu_sl_ycen, + size_motor=dev.bcu_sl_ysize, + scan_func=go_to_peak, + ), + ), + ] + return slits + +def get_mirror_data(history_index: int): + """Read data from the BEC history and return the X and Y data as arrays.""" + motor1 = "vfm_bu" + motor2 = "vfm_bd" + + scan = bec.history[history_index] + md = scan.metadata["bec"] + x1_data = scan.devices[motor1][motor1].read()["value"] + x2_data = scan.devices[motor2][motor2].read()["value"] + y1_data = scan.devices['microscope_stats']['microscope_stats_data_sigma_y'].read()['value'] + y2_data = scan.devices['microscope_stats']['microscope_stats_data_eccentricity'].read()['value'] + np.savetxt("luts/x1_data", x1_data) + np.savetxt("luts/x2_data", x2_data) + np.savetxt("luts/y1_data", y1_data) + np.savetxt("luts/y2_data", y2_data) + + + # plt.imshow(y1_data, cmap="hot") + # plt.clf + # return { + # "signal_name": signal_name, + # "x_data": x_data, + # "y_data": y_data, + # "motor_name": motor_name, + # "scan_number": scan_number, + # } + + +def record_beampos_until(stop_time_str, planner, interval_minutes=10): + """ + Runs `record_beam()` every `interval_minutes` minutes + until the next occurrence of the given stop time (HH:MM). + """ + + # Prepare the file + now = datetime.now() + fnow = now.strftime("%d%m%H%M") + fdir = "/sls/x10sa/config/bec/production/pxii_bec/pxii_bec/macros/" + fname = f"luts/beampos/beampos_{fnow}.csv" + filename = fdir + fname + scam_zoom = dev.scam_zoom.read()['scam_zoom']['value'] + umv(dev.scam_zoom, 1000) + dev.transm.put(0.1) + beam_size = "25 x 25" + + energy = get_current_energy() + + + # Write the header to the file + with open(filename, "w", encoding="utf-8") as f: + f.write(f"Beam size: {beam_size}, Energy: {energy:.0f} eV, Zoom: {scam_zoom}\n") + # f.write("Time,BPM_x,BPM_y,Scin_x,Scin_y,BPM_x,BPM_y\n") + f.write("Time,Scin_x,Scin_y,BPM_x,BPM_y\n") + + + # Parse the stop time (HH:MM) + stop_hour, stop_minute = map(int, stop_time_str.split(":")) + end_time = now.replace(hour=stop_hour, minute=stop_minute, second=0, microsecond=0) + + # If that time already passed today, set it for tomorrow + if end_time <= now: + end_time += timedelta(days=1) + + # Change to beam visualisation state, ensure shutter is closed first + dev.bcu_shutter.put(0) + planner.move_to(BeamlineState.BEAM_VISUALISATION) + + # Start recording beam position + print(f"Starting now ({now:%Y-%m-%d %H:%M}), running until {end_time:%Y-%m-%d %H:%M}") + print(f"Interval: {interval_minutes} minutes\n") + + while datetime.now() < end_time: + record_beam(filename) + next_run = datetime.now() + timedelta(minutes=interval_minutes) + if next_run > end_time: + break + print(f"Next run at {next_run:%H:%M:%S}") + time.sleep(interval_minutes * 60) + + print(f"Finished — reached {end_time:%H:%M}.") + planner.move_to(BeamlineState.MANUAL_SAMPLE_EXCHANGE) + + + + +def record_beam(filename): + """ + Record the beam position to file. + """ + # Set transmission and bpm position + dev.transm.put(0.1) + umv(dev.bcu_bpm_x, 0.43) + umv(dev.bcu_bpm_y, -1.543 ) + + # Open shutter and record positions + dev.bcu_shutter.put(1) + auto_exposure(cam="samcam") + time.sleep(2) + now = datetime.now() + + # Append data to the file + with open(filename, "a", encoding="utf-8") as f: + fnow = now.strftime("%H:%M:%S") + xpos_cam = dev.samcam_x.read()["samcam_x"]["value"] + ypos_cam = dev.samcam_y.read()["samcam_y"]["value"] + # x_bpm, y_bpm = get_beampos() + print(f"Time is {fnow}, X position is {xpos_cam:.5g}, Y position is {ypos_cam:.5g}") + x_bpm, y_bpm = compute_norm() + f.write( + # f"{fnow}, {xpos: .5g}, {ypos: .4g}, {xpos_cam: .5g}, {ypos_cam: .4g}\n" + f"{fnow},{xpos_cam: .5g},{ypos_cam: .4g},{x_bpm: .5g},{y_bpm: .5g}\n" + ) + # Close shutter + dev.bcu_shutter.put(0) + + +def analyse_beampos(file): + """Plot the recorded beam position data""" + # Load the CSV file into a Pandas DataFrame + filedir = "/sls/x10sa/config/bec/production/pxii_bec/pxii_bec/macros/luts/beampos/" + filename = filedir + file + data = pd.read_csv(filename, skiprows=1) + print(data.head()) + + # ref_bpmx = 0.110 + # ref_bmpy = -0.175 + ref_scinx = 1024 + ref_sciny = 980 + scam_zoom = 1000 + + # Extract the first column (time) as the x-axis + meas_time = data["Time"] + + # subtract the reference positions from the measures position + # data["bpm_x"] = data["bpm_x"] - ref_bpmx + # data["bpm_y"] = data["bpm_y"] - ref_bmpy + data["Scin_x"] = (data["Scin_x"] - ref_scinx) * calc_scam_microns(1) + data["Scin_y"] = (data["Scin_y"] - ref_sciny) * calc_scam_microns(1) + + + # Extract Y-position columns (all columns except the first column) + y_positions = data.iloc[:, 1:] # Exclude the first column + + fig, axs = plt.subplots( + 2, 2, figsize=(12, 8), layout="constrained" + ) # Create a 2x2 grid for subplots + # Flatten axs for easy iteration (if axs is a 2D array of axes) + axs = axs.flatten() + # Specify which columns to color differently + red_columns = ["bpm_x", "scin_x"] + + for idx, column in enumerate(y_positions.columns): + ax = axs[idx] # Select the current subplot + + # Determine the color based on the column name + color = "red" if column in red_columns else "blue" + + # Plot the line and scatter with the chosen color + ax.plot(meas_time, y_positions[column], color=color, linewidth=0.5) # Line plot + ax.scatter( + meas_time, y_positions[column], color=color, label=column + ) # Scatter plot + + # Set x-axis tick positions and labels + tick_positions = range(0, len(meas_time), 7) # Adjust the step size as needed + ax.set_xticks(tick_positions) + ax.set_xticklabels([meas_time[i] for i in tick_positions], rotation=45) + + # Add labels, title, legend, and grid to each subplot + ax.set_xlabel("Time") + ax.set_ylabel("beam displacement (microns)") + ax.set_title(f"Beam position at {column}") + ax.legend() + ax.grid(True) + + # Show the resulting figure + plt.show() + +import time +import numpy as np +import matplotlib.pyplot as plt +from epics import caget + + + +def scan_scin_focus(planner, type = 'fine'): + dev.bcu_shutter.put(0) + planner.move_to(BeamlineState.BEAM_VISUALISATION) + dev.bcu_shutter.put(1) + z0 = dev.diag_z.position + + min = 0.1 + max = 9.9 + + + if type == 'fine': + steps = 100 + elif type == 'coarse': + steps = 30 + else: + steps = 60 + + umv(dev.scam_zoom, 1000) + dev.transm.put(0.1) + + auto_exposure("samcam", target=200, max_iter=20) + time.sleep(0.2) + + go_to_peak(dev.diag_z, dev.scam, min, max, steps, relative=True, gomax=True, confirm=False) + dev.bcu_shutter.put(0) diff --git a/pxii_bec/macros/knifehist.py b/pxii_bec/macros/knifehist.py new file mode 100644 index 0000000..bea8744 --- /dev/null +++ b/pxii_bec/macros/knifehist.py @@ -0,0 +1,79 @@ +def knife_plothist(hindex: int, signal_name: str, isave=1): + """ + Get data for a completed scan from the BEC history, + and plot all the results. + + Args: + history_index (int): scan to fetch, e.g. -1 for the most recent scan + signal_name (str): the monitor + + Example: + data_x, data_y = knife_plothist(-1,"xidode") + + scanned with + scans.line_scan(dev.aerotech.y,-0.05,0.05, steps=101, settling_time=0.5, relative=True) + """ + + from lmfit.models import LinearModel, GaussianModel, VoigtModel, QuadraticModel, LorentzianModel + import matplotlib.pyplot as plt + import numpy as np + + if hindex < 0: + h = bec.history[hindex] + print('by scan number') + else: + h = bec.history.get_by_scan_number(hindex) + print('by scan number') + + md = h.metadata["bec"] + sno = md['dataset_number'] + print(f"number of scan = {sno}") + scanvar = list(md["args"].keys())[0] # string, returns the variable of the last performed scan + # data = h.devices[device_name][signal].read()["value"] + # data_x = h.devices.dcm_pitch.dcm_pitch.read()["value"] + # data_y = h.devices.lu_bpmsum.lu_bpmsum.read()["value"] + # data_x = h.devices[device_name][device_name].read()["value"] + + # that works ... + #print(list(md['args'].keys())) + val = list(md['args'].keys()) + #val[0] = 'aerotech.x' + devicenam = val[0] + print('device = ', devicenam) + data_xd = md["positions"] # last scan knows which device ... however, double array + data_x = data_xd.flatten() + print("dx = ", data_x) + #data_y = h.devices[signal_name][signal_name].read()["value"] + data_y = h.devices["xidiode"]["xidiode"].read()["value"] + print("dy = ", data_y) + + rev = 0 + if val[0][9] == 'x': + rev = 1 + smoothplotgrad(data_x, data_y, reverse = rev) + # g, xm = justfit(data_x, data_y, model=model, ibg=ibg) + +# plt.ion() +# plt.figure() +# plt.plot(data_x, data_y, "*") +# plt.plot(data_x, g.best_fit) +# plt.xlabel(scanvar) +# plt.ylabel(signal_name) +# plt.show() + +# gcen = g.pars["center"].value + + + if isave: + ans = "n" + ans = input("Store data in csv file? y/n ") + if ans == "y": + dirname = "/sls/x10sa/config/commissioning/Data/" + # writing output to simple data file for later analysis: + combined = np.column_stack((data_x, data_y)) + filename = dirname + "Scan" + str(sno) + devicenam + ".txt" + with open(filename, "w") as f: + np.savetxt(f, combined, delimiter=",", fmt="%.9e") + + + return data_x, data_y diff --git a/pxii_bec/macros/luts/20260704-1508_ge_edge.csv b/pxii_bec/macros/luts/20260704-1508_ge_edge.csv new file mode 100644 index 0000000..b3dc9f1 --- /dev/null +++ b/pxii_bec/macros/luts/20260704-1508_ge_edge.csv @@ -0,0 +1,6 @@ +Energy,bcu_bpmsum +11125.712083383152,25032.909677419353 +11125.50607729644,25067.271582181264 +11125.300078962937,25072.67158218126 +11125.094088382204,25096.84485407066 +11124.888105553806,25110.599078341016 diff --git a/pxii_bec/macros/luts/20260704-1509_ge_edge.csv b/pxii_bec/macros/luts/20260704-1509_ge_edge.csv new file mode 100644 index 0000000..cdbf09b --- /dev/null +++ b/pxii_bec/macros/luts/20260704-1509_ge_edge.csv @@ -0,0 +1,301 @@ +Energy,bcu_bpmsum +11125.712083383152,24961.620890937025 +11125.50607729644,24981.217204301076 +11125.300078962937,25013.287557603682 +11125.094088382204,24953.832258064514 +11124.888105553806,24968.10261136713 +11124.682130477306,24990.521351766514 +11124.476163152269,25005.63993855607 +11124.270203578264,25063.171121351766 +11124.064251754857,25083.887864823348 +11123.858307681605,25034.484178187406 +11123.652371358077,25157.456528417817 +11123.44644278384,25144.93886328725 +11123.240521958456,25170.029185867897 +11123.034608881491,25149.173271889398 +11122.828703552512,25147.52995391705 +11122.622805971081,25149.71213517665 +11122.416916136766,25137.73179723502 +11122.211034049127,25144.390783410137 +11122.005159707736,25135.905683563746 +11121.799293112155,25120.55483870968 +11121.593434261951,25120.90721966206 +11121.387583156686,25113.126267281106 +11121.181739795926,25118.79569892473 +11120.97590417924,25090.185560675884 +11120.770076306191,25087.841167434715 +11120.564256176345,25096.89216589862 +11120.358443789264,25089.46850998464 +11120.152639144519,25089.52841781874 +11119.94684224167,25083.528725038406 +11119.74105308029,25073.67465437788 +11119.535271659937,25073.420583717358 +11119.329497980181,25054.83686635945 +11119.123732040585,25056.012596006145 +11118.917973840717,25045.988632872504 +11118.71222338014,25045.18986175115 +11118.506480658425,25016.631643625187 +11118.300745675135,25002.86850998464 +11118.095018429833,24996.630721966205 +11117.889298922086,24984.850998463902 +11117.683587151465,24961.41075268817 +11117.477883117528,24945.807680491554 +11117.272186819848,24942.026113671272 +11117.066498257986,24904.69155145929 +11116.86081743151,24881.899539170507 +11116.655144339988,24854.092165898615 +11116.44947898298,24841.642703533023 +11116.243821360062,24813.291858678953 +11116.038171470791,24788.921044546852 +11115.832529314735,24756.357296466977 +11115.626894891466,24730.055913978496 +11115.421268200545,24695.38371735791 +11115.215649241538,24672.803993855607 +11115.010038014014,24645.320122887864 +11114.804434517539,24609.837173579108 +11114.598838751675,24570.704454685103 +11114.393250715995,24540.299539170508 +11114.187670410061,24512.862365591398 +11113.98209783344,24481.463594470042 +11113.776532985701,24439.637788018434 +11113.570975866407,24422.38801843318 +11113.365426475126,24386.79385560676 +11113.159884811428,24343.7490015361 +11112.954350874874,24314.71766513057 +11112.748824665035,24270.78033794163 +11112.543306181473,24226.929032258064 +11112.337795423762,24210.717972350227 +11112.132292391467,24173.96221198157 +11111.926797084147,24127.41904761905 +11111.721309501376,24086.8623655914 +11111.51582964272,24052.819662058373 +11111.310357507742,24007.22488479263 +11111.104893096015,23978.518586789556 +11110.899436407102,23937.069431643624 +11110.69398744057,23899.32073732719 +11110.48854619599,23866.146850998462 +11110.283112672922,23825.924423963133 +11110.077686870938,23772.336098310294 +11109.872268789606,23744.446082949307 +11109.66685842849,23700.824270353303 +11109.461455787161,23664.30261136713 +11109.256060865184,23605.98617511521 +11109.050673662123,23567.78371735791 +11108.84529417755,23519.990476190476 +11108.63992241103,23482.546850998464 +11108.434558362133,23440.4777265745 +11108.229202030421,23395.72995391705 +11108.023853415469,23352.320737327187 +11107.818512516837,23301.611367127498 +11107.613179334096,23238.146543778807 +11107.407853866816,23187.311520737327 +11107.20253611456,23136.582795698923 +11106.997226076897,23094.012903225805 +11106.791923753395,23042.810752688172 +11106.586629143627,22982.24178187404 +11106.381342247152,22935.69677419355 +11106.17606306354,22877.125652841783 +11105.970791592361,22833.17757296467 +11105.765527833179,22774.91490015361 +11105.560271785567,22723.342242703533 +11105.35502344909,22676.00768049155 +11105.149782823313,22625.849462365593 +11104.94454990781,22568.53425499232 +11104.739324702148,22524.754531490013 +11104.534107205889,22470.708448540707 +11104.328897418609,22409.773886328723 +11104.123695339871,22340.58586789555 +11103.918500969243,22287.800307219662 +11103.7133143063,22235.65806451613 +11103.508135350598,22183.634715821812 +11103.302964101713,22136.050076804917 +11103.097800559211,22079.589247311826 +11102.892644722659,22030.722273425497 +11102.68749659163,21976.06451612903 +11102.482356165689,21925.1757296467 +11102.277223444404,21860.220583717357 +11102.072098427347,21797.601228878648 +11101.86698111408,21735.278648233485 +11101.661871504177,21669.325960061444 +11101.456769597204,21605.887250384025 +11101.25167539273,21537.3133640553 +11101.046588890322,21468.863901689707 +11100.841510089553,21406.59385560676 +11100.63643898999,21343.04915514593 +11100.431375591197,21285.82980030722 +11100.226319892747,21227.479877112135 +11100.021271894206,21169.571428571428 +11099.816231595145,21105.507219662057 +11099.61119899513,21048.31397849462 +11099.406174093734,20998.815053763443 +11099.201156890525,20949.363133640552 +11098.996147385067,20881.60460829493 +11098.791145576935,20814.03256528418 +11098.586151465694,20760.72258064516 +11098.381165050916,20693.347772657453 +11098.176186332168,20627.89861751152 +11097.971215309017,20562.247004608296 +11097.766251981036,20511.227342549922 +11097.561296347792,20441.706912442394 +11097.356348408854,20377.72596006144 +11097.15140816379,20314.96712749616 +11096.946475612174,20254.152995391705 +11096.741550753568,20193.33456221198 +11096.536633587546,20144.413824884792 +11096.331724113677,20077.50967741936 +11096.126822331531,20008.412288786483 +11095.921928240674,19947.427035330264 +11095.717041840675,19876.160061443934 +11095.512163131112,19804.747158218124 +11095.307292111545,19742.05407066052 +11095.102428781545,19680.705990783412 +11094.897573140684,19619.92165898617 +11094.692725188532,19553.37296466974 +11094.487884924658,19492.235330261137 +11094.283052348626,19420.636251920125 +11094.078227460015,19350.31182795699 +11093.873410258386,19277.65560675883 +11093.668600743315,19214.026420890936 +11093.463798914368,19148.83010752688 +11093.259004771118,19077.906605222735 +11093.054218313131,19008.508141321046 +11092.849439539978,18938.75207373272 +11092.644668451232,18875.631950844858 +11092.439905046458,18810.22549923195 +11092.235149325232,18742.97726574501 +11092.030401287118,18675.09585253456 +11091.825660931689,18619.70875576037 +11091.620928258511,18552.845468509982 +11091.41620326716,18476.046697388632 +11091.211485957203,18415.681720430108 +11091.006776328208,18351.75483870968 +11090.80207437975,18285.768356374807 +11090.597380111396,18222.803379416284 +11090.392693522715,18161.50015360983 +11090.188014613283,18094.434715821808 +11089.983343382662,18031.838402457757 +11089.77867983043,17980.873118279567 +11089.574023956155,17916.964362519204 +11089.369375759405,17851.590476190475 +11089.16473523975,17793.384024577572 +11088.960102396763,17731.770814132105 +11088.755477230014,17665.738556067587 +11088.55085973907,17520.424577572965 +11088.346249923507,17459.977880184335 +11088.141647782893,17435.752995391704 +11087.9370533168,17330.449462365592 +11087.732466524796,17303.65560675883 +11087.527887406453,17200.102918586792 +11087.323315961341,17137.39385560676 +11087.11875218903,17119.217204301076 +11086.914196089094,17019.40614439324 +11086.7096476611,17000.34746543779 +11086.505106904624,16892.53640552995 +11086.30057381923,16877.686328725038 +11086.096048404497,16832.635637480802 +11085.891530659987,16743.092473118282 +11085.687020585274,16697.56651305683 +11085.482518179933,16640.899231950847 +11085.27802344353,16601.66113671275 +11085.07353637564,16589.250384024577 +11084.869056975831,16498.01935483871 +11084.664585243674,16441.842089093705 +11084.460121178743,16443.15330261137 +11084.255664780607,16393.89400921659 +11084.05121604884,16308.20307219662 +11083.846774983007,16296.853456221197 +11083.642341582687,16274.386789554532 +11083.437915847444,16226.037788018433 +11083.233497776855,16156.294316436251 +11083.029087370489,16101.73241167435 +11082.824684627914,16029.325038402458 +11082.62028954871,15956.540399385562 +11082.415902132438,15896.660215053762 +11082.211522378679,15839.601228878648 +11082.007150286998,15779.243625192012 +11081.80278585697,15706.726267281105 +11081.598429088164,15646.545622119816 +11081.394079980157,15589.870353302613 +11081.189738532512,15530.167741935486 +11080.985404744806,15474.692165898616 +11080.78107861661,15419.292473118277 +11080.576760147496,15361.777265745006 +11080.372449337041,15306.882949308754 +11080.168146184806,15246.281105990784 +11079.963850690367,15194.35821812596 +11079.759562853296,15138.713056835637 +11079.55528267317,15083.790476190476 +11079.351010149554,15032.803993855608 +11079.146745282025,14971.027342549922 +11078.94248807015,14909.13456221198 +11078.738238513504,14853.784024577573 +11078.53399661166,14785.384639016896 +11078.32976236419,14732.271274961598 +11078.125535770665,14669.355145929341 +11077.921316830652,14611.881105990784 +11077.717105543732,14553.368970814132 +11077.512901909475,14498.884485407067 +11077.30870592745,14437.40122887865 +11077.104517597232,14386.752688172044 +11076.900336918388,14324.829185867897 +11076.6961638905,14276.689708141323 +11076.491998513131,14218.912442396313 +11076.287840785859,14165.363133640552 +11076.083690708254,14099.826420890939 +11075.879548279892,14046.362826420891 +11075.675413500341,13996.261751152075 +11075.471286369175,13935.55975422427 +11075.267166885968,13883.652841781874 +11075.063055050288,13827.098003072195 +11074.858950861715,13767.941935483872 +11074.654854319815,13715.851920122888 +11074.450765424166,13658.257450076804 +11074.246684174335,13605.813824884792 +11074.0426105699,13559.395391705068 +11073.838544610431,13502.741628264212 +11073.634486295503,13445.49062980031 +11073.430435624683,13397.154531490014 +11073.226392597553,13350.433486943166 +11073.022357213678,13300.770199692779 +11072.818329472635,13239.17726574501 +11072.614309373996,13200.020890937021 +11072.410296917333,13152.479877112137 +11072.206292102223,13092.494316436252 +11072.002294928232,13044.951459293396 +11071.798305394937,13004.251612903225 +11071.594323501917,12956.027035330262 +11071.390349248735,12899.447004608295 +11071.186382634969,12856.325038402458 +11070.982423660193,12790.753302611367 +11070.778472323978,12740.55821812596 +11070.574528625899,12694.003379416283 +11070.37059256553,12629.975422427036 +11070.166664142442,12595.487250384025 +11069.96274335621,12535.743164362519 +11069.758830206405,12492.46267281106 +11069.5549246926,12443.222734254992 +11069.351026814378,12390.796620583718 +11069.1471365713,12335.095852534561 +11068.943253962947,12279.6777265745 +11068.73937898889,12236.273732718893 +11068.535511648703,12190.829185867895 +11068.331651941962,12147.52534562212 +11068.127799868234,12092.882642089095 +11067.9239554271,12042.002150537633 +11067.72011861813,12000.626420890938 +11067.516289440899,11955.539170506912 +11067.31246789498,11911.956067588326 +11067.108653979947,11875.755453149002 +11066.904847695374,11817.003072196621 +11066.701049040837,11777.791090629802 +11066.497258015903,11729.952995391704 +11066.293474620155,11679.727496159754 +11066.089698853162,11632.814746543778 +11065.885930714501,11592.792933947772 +11065.68217020374,11555.847311827956 +11065.47841732046,11496.157603686635 +11065.27467206423,11453.51950844854 +11065.070934434627,11411.927188940092 +11064.867204431224,11361.943471582183 +11064.663482053596,11323.37910906298 +11064.459767301316,11278.171121351766 diff --git a/pxii_bec/macros/luts/20260704-1520_ge_edge.csv b/pxii_bec/macros/luts/20260704-1520_ge_edge.csv new file mode 100644 index 0000000..724c610 --- /dev/null +++ b/pxii_bec/macros/luts/20260704-1520_ge_edge.csv @@ -0,0 +1,301 @@ +Energy,bcu_bpmsum +11064.46,2897.81 +11064.66,2896.50 +11064.87,2894.71 +11065.07,2896.02 +11065.27,2900.33 +11065.48,2904.01 +11065.68,2912.61 +11065.89,2918.20 +11066.09,2909.84 +11066.29,2923.48 +11066.50,2922.04 +11066.70,2927.25 +11066.90,2941.69 +11067.11,2942.27 +11067.31,2956.41 +11067.52,2958.01 +11067.72,2973.48 +11067.92,2982.97 +11068.13,2986.73 +11068.33,3003.69 +11068.54,3008.42 +11068.74,3026.35 +11068.94,3030.74 +11069.15,3043.02 +11069.35,3052.27 +11069.55,3072.51 +11069.76,3084.80 +11069.96,3090.84 +11070.17,3101.38 +11070.37,3119.29 +11070.57,3124.13 +11070.78,3134.87 +11070.98,3147.15 +11071.19,3166.17 +11071.39,3184.50 +11071.59,3190.73 +11071.80,3201.91 +11072.00,3210.77 +11072.21,3221.14 +11072.41,3232.82 +11072.61,3240.12 +11072.82,3250.71 +11073.02,3260.58 +11073.23,3270.65 +11073.43,3281.65 +11073.63,3291.68 +11073.84,3301.08 +11074.04,3311.16 +11074.25,3320.93 +11074.45,3331.94 +11074.65,3342.25 +11074.86,3350.51 +11075.06,3358.85 +11075.27,3367.26 +11075.47,3377.53 +11075.68,3386.17 +11075.88,3394.92 +11076.08,3403.03 +11076.29,3411.25 +11076.49,3417.66 +11076.70,3426.54 +11076.90,3432.92 +11077.10,3440.91 +11077.31,3446.72 +11077.51,3453.68 +11077.72,3461.62 +11077.92,3467.82 +11078.13,3474.07 +11078.33,3479.91 +11078.53,3487.37 +11078.74,3494.45 +11078.94,3500.53 +11079.15,3505.75 +11079.35,3510.20 +11079.56,3515.00 +11079.76,3520.72 +11079.96,3525.45 +11080.17,3529.48 +11080.37,3532.28 +11080.58,3537.22 +11080.78,3541.03 +11080.99,3542.33 +11081.19,3546.71 +11081.39,3548.56 +11081.60,3549.09 +11081.80,3550.41 +11082.01,3547.99 +11082.21,3544.12 +11082.42,3538.71 +11082.62,3532.49 +11082.82,3526.98 +11083.03,3517.45 +11083.23,3510.66 +11083.44,3506.55 +11083.64,3504.35 +11083.85,3505.10 +11084.05,3505.04 +11084.26,3504.01 +11084.46,3503.11 +11084.66,3500.16 +11084.87,3496.80 +11085.07,3490.23 +11085.28,3482.80 +11085.48,3475.13 +11085.69,3465.94 +11085.89,3457.79 +11086.10,3449.43 +11086.30,3439.50 +11086.51,3432.11 +11086.71,3419.52 +11086.91,3405.64 +11087.12,3390.66 +11087.32,3375.07 +11087.53,3358.38 +11087.73,3342.76 +11087.94,3321.23 +11088.14,3299.54 +11088.35,3277.19 +11088.55,3254.78 +11088.76,3230.88 +11088.96,3204.79 +11089.16,3177.80 +11089.37,3145.85 +11089.57,3114.52 +11089.78,3078.40 +11089.98,3039.81 +11090.19,2998.05 +11090.39,2954.85 +11090.60,2908.30 +11090.80,2859.42 +11091.01,2809.61 +11091.21,2752.69 +11091.42,2692.73 +11091.62,2630.09 +11091.83,2563.42 +11092.03,2491.06 +11092.24,2413.64 +11092.44,2332.69 +11092.64,2247.11 +11092.85,2156.08 +11093.05,2060.02 +11093.26,1957.93 +11093.46,1849.54 +11093.67,1733.77 +11093.87,1614.56 +11094.08,1491.44 +11094.28,1357.39 +11094.49,1233.96 +11094.69,1104.59 +11094.90,977.21 +11095.10,856.60 +11095.31,737.75 +11095.51,624.13 +11095.72,518.62 +11095.92,423.13 +11096.13,340.15 +11096.33,265.78 +11096.54,203.49 +11096.74,151.53 +11096.95,111.34 +11097.15,78.72 +11097.36,54.76 +11097.56,36.50 +11097.77,24.18 +11097.97,15.86 +11098.18,10.17 +11098.38,6.81 +11098.59,4.61 +11098.79,3.60 +11099.00,2.97 +11099.20,2.51 +11099.41,2.40 +11099.61,2.19 +11099.82,2.07 +11100.02,1.91 +11100.23,1.78 +11100.43,1.62 +11100.64,1.54 +11100.84,1.51 +11101.05,1.36 +11101.25,1.26 +11101.46,1.25 +11101.66,1.17 +11101.87,1.12 +11102.07,1.27 +11102.28,1.23 +11102.48,1.23 +11102.69,1.23 +11102.89,1.14 +11103.10,1.11 +11103.30,1.00 +11103.51,1.13 +11103.71,1.08 +11103.92,0.94 +11104.12,0.88 +11104.33,0.81 +11104.53,0.78 +11104.74,0.69 +11104.94,0.75 +11105.15,0.75 +11105.36,0.68 +11105.56,0.59 +11105.77,0.66 +11105.97,0.72 +11106.18,0.64 +11106.38,0.69 +11106.59,0.59 +11106.79,0.65 +11107.00,0.66 +11107.20,0.60 +11107.41,0.57 +11107.61,0.59 +11107.82,0.57 +11108.02,0.63 +11108.23,0.55 +11108.43,0.48 +11108.64,0.57 +11108.85,0.51 +11109.05,0.60 +11109.26,0.64 +11109.46,0.68 +11109.67,0.76 +11109.87,0.84 +11110.08,0.90 +11110.28,1.03 +11110.49,1.10 +11110.69,1.21 +11110.90,1.36 +11111.10,1.41 +11111.31,1.43 +11111.52,1.39 +11111.72,1.52 +11111.93,1.49 +11112.13,1.62 +11112.34,1.45 +11112.54,1.69 +11112.75,1.74 +11112.95,1.73 +11113.16,1.80 +11113.37,1.82 +11113.57,1.79 +11113.78,1.80 +11113.98,1.71 +11114.19,1.67 +11114.39,1.60 +11114.60,1.53 +11114.80,1.57 +11115.01,1.43 +11115.22,1.48 +11115.42,1.55 +11115.63,1.45 +11115.83,1.49 +11116.04,1.41 +11116.24,1.52 +11116.45,1.50 +11116.66,1.41 +11116.86,1.42 +11117.07,1.41 +11117.27,1.49 +11117.48,1.46 +11117.68,1.46 +11117.89,1.38 +11118.10,1.43 +11118.30,1.42 +11118.51,1.43 +11118.71,1.36 +11118.92,1.34 +11119.12,1.36 +11119.33,1.33 +11119.54,1.29 +11119.74,1.27 +11119.95,1.25 +11120.15,1.30 +11120.36,1.30 +11120.56,1.28 +11120.77,1.29 +11120.98,1.20 +11121.18,1.22 +11121.39,1.28 +11121.59,1.17 +11121.80,1.18 +11122.01,1.18 +11122.21,1.16 +11122.42,1.15 +11122.62,1.14 +11122.83,1.25 +11123.03,1.28 +11123.24,1.36 +11123.45,1.42 +11123.65,1.37 +11123.86,1.21 +11124.06,1.44 +11124.27,1.48 +11124.48,1.36 +11124.68,1.12 +11124.89,1.16 +11125.09,1.25 +11125.30,1.31 +11125.51,1.28 +11125.71,1.31 diff --git a/pxii_bec/macros/luts/20260704-1531_ge_edge.csv b/pxii_bec/macros/luts/20260704-1531_ge_edge.csv new file mode 100644 index 0000000..67eafd2 --- /dev/null +++ b/pxii_bec/macros/luts/20260704-1531_ge_edge.csv @@ -0,0 +1,301 @@ +Energy,Bragg,bcu_bpmsum +11064.46,179.69,6338.84 +11064.66,179.69,6315.93 +11064.87,179.69,6314.91 +11065.07,179.68,6308.85 +11065.27,179.68,6286.39 +11065.48,179.68,6262.82 +11065.68,179.67,6242.13 +11065.89,179.67,6221.71 +11066.09,179.67,6204.17 +11066.29,179.66,6187.03 +11066.50,179.66,6171.42 +11066.70,179.66,6155.21 +11066.90,179.65,6140.00 +11067.11,179.65,6119.68 +11067.31,179.65,6101.24 +11067.52,179.64,6080.76 +11067.72,179.64,6064.97 +11067.92,179.64,6047.24 +11068.13,179.63,6026.49 +11068.33,179.63,6007.70 +11068.54,179.63,5988.31 +11068.74,179.62,5964.32 +11068.94,179.62,5941.86 +11069.15,179.62,5917.88 +11069.35,179.61,5889.14 +11069.55,179.61,5860.76 +11069.76,179.61,5828.84 +11069.96,179.60,5797.76 +11070.17,179.60,5768.76 +11070.37,179.60,5744.78 +11070.57,179.59,5721.05 +11070.78,179.59,5696.69 +11070.98,179.59,5681.88 +11071.19,179.58,5667.07 +11071.39,179.58,5652.59 +11071.59,179.58,5639.00 +11071.80,179.57,5627.42 +11072.00,179.57,5620.14 +11072.21,179.57,5610.42 +11072.41,179.56,5600.85 +11072.61,179.56,5590.35 +11072.82,179.56,5575.33 +11073.02,179.55,5560.40 +11073.23,179.55,5545.10 +11073.43,179.55,5528.90 +11073.63,179.54,5512.11 +11073.84,179.54,5496.70 +11074.04,179.54,5480.03 +11074.25,179.53,5464.12 +11074.45,179.53,5445.84 +11074.65,179.53,5427.15 +11074.86,179.52,5410.26 +11075.06,179.52,5392.25 +11075.27,179.52,5368.51 +11075.47,179.51,5349.75 +11075.68,179.51,5333.24 +11075.88,179.51,5312.39 +11076.08,179.50,5293.59 +11076.29,179.50,5272.28 +11076.49,179.50,5254.44 +11076.70,179.49,5233.09 +11076.90,179.49,5209.18 +11077.10,179.49,5188.50 +11077.31,179.48,5161.29 +11077.51,179.48,5142.19 +11077.72,179.48,5119.16 +11077.92,179.47,5099.02 +11078.13,179.47,5074.12 +11078.33,179.47,5049.41 +11078.53,179.46,5024.90 +11078.74,179.46,4998.89 +11078.94,179.46,4975.46 +11079.15,179.45,4951.22 +11079.35,179.45,4924.91 +11079.56,179.45,4895.95 +11079.76,179.44,4868.90 +11079.96,179.44,4840.06 +11080.17,179.44,4810.41 +11080.37,179.43,4779.62 +11080.58,179.43,4750.45 +11080.78,179.43,4714.91 +11080.99,179.42,4686.31 +11081.19,179.42,4652.54 +11081.39,179.42,4620.98 +11081.60,179.41,4591.66 +11081.80,179.41,4559.03 +11082.01,179.41,4526.56 +11082.21,179.40,4495.77 +11082.42,179.40,4463.20 +11082.62,179.40,4429.03 +11082.82,179.39,4394.22 +11083.03,179.39,4361.12 +11083.23,179.39,4326.11 +11083.44,179.38,4290.80 +11083.64,179.38,4257.57 +11083.85,179.38,4220.73 +11084.05,179.37,4183.46 +11084.26,179.37,4145.25 +11084.46,179.37,4110.61 +11084.66,179.36,4069.91 +11084.87,179.36,4029.76 +11085.07,179.36,3984.08 +11085.28,179.35,3943.96 +11085.48,179.35,3901.39 +11085.69,179.35,3858.28 +11085.89,179.34,3817.69 +11086.10,179.34,3775.01 +11086.30,179.34,3731.37 +11086.51,179.33,3690.29 +11086.71,179.33,3647.42 +11086.91,179.33,3603.98 +11087.12,179.32,3560.13 +11087.32,179.32,3514.08 +11087.53,179.32,3467.54 +11087.73,179.31,3417.80 +11087.94,179.31,3370.47 +11088.14,179.31,3321.76 +11088.35,179.30,3272.59 +11088.55,179.30,3220.68 +11088.76,179.30,3167.67 +11088.96,179.29,3113.14 +11089.16,179.29,3059.07 +11089.37,179.29,3002.97 +11089.57,179.28,2944.78 +11089.78,179.28,2886.59 +11089.98,179.28,2825.41 +11090.19,179.27,2764.63 +11090.39,179.27,2699.15 +11090.60,179.27,2636.67 +11090.80,179.26,2568.71 +11091.01,179.26,2500.84 +11091.21,179.26,2430.58 +11091.42,179.25,2356.01 +11091.62,179.25,2279.98 +11091.83,179.25,2200.14 +11092.03,179.24,2119.91 +11092.24,179.24,2039.42 +11092.44,179.24,1949.58 +11092.64,179.23,1863.21 +11092.85,179.23,1767.06 +11093.05,179.23,1675.31 +11093.26,179.22,1574.66 +11093.46,179.22,1473.24 +11093.67,179.22,1373.95 +11093.87,179.21,1267.36 +11094.08,179.21,1161.16 +11094.28,179.21,1055.16 +11094.49,179.20,944.31 +11094.69,179.20,839.72 +11094.90,179.20,733.85 +11095.10,179.19,634.54 +11095.31,179.19,537.95 +11095.51,179.19,447.37 +11095.72,179.18,366.14 +11095.92,179.18,292.72 +11096.13,179.18,229.37 +11096.33,179.17,175.79 +11096.54,179.17,130.77 +11096.74,179.17,94.72 +11096.95,179.16,66.02 +11097.15,179.16,45.88 +11097.36,179.16,30.84 +11097.56,179.15,20.47 +11097.77,179.15,13.23 +11097.97,179.15,9.07 +11098.18,179.14,6.11 +11098.38,179.14,4.50 +11098.59,179.14,3.44 +11098.79,179.13,2.70 +11099.00,179.13,2.18 +11099.20,179.13,2.00 +11099.41,179.12,1.83 +11099.61,179.12,1.76 +11099.82,179.12,1.58 +11100.02,179.11,1.49 +11100.23,179.11,1.50 +11100.43,179.11,1.28 +11100.64,179.10,1.23 +11100.84,179.10,0.93 +11101.05,179.10,0.90 +11101.25,179.09,0.75 +11101.46,179.09,0.72 +11101.66,179.09,0.71 +11101.87,179.08,0.69 +11102.07,179.08,0.61 +11102.28,179.08,0.58 +11102.48,179.07,0.80 +11102.69,179.07,0.77 +11102.89,179.07,0.74 +11103.10,179.06,0.64 +11103.30,179.06,0.61 +11103.51,179.06,0.67 +11103.71,179.05,0.61 +11103.92,179.05,0.57 +11104.12,179.05,0.60 +11104.33,179.04,0.51 +11104.53,179.04,0.44 +11104.74,179.04,0.50 +11104.94,179.03,0.48 +11105.15,179.03,0.49 +11105.36,179.03,0.48 +11105.56,179.02,0.46 +11105.77,179.02,0.54 +11105.97,179.02,0.48 +11106.18,179.01,0.51 +11106.38,179.01,0.53 +11106.59,179.01,0.50 +11106.79,179.00,0.52 +11107.00,179.00,0.58 +11107.20,179.00,0.50 +11107.41,178.99,0.40 +11107.61,178.99,0.54 +11107.82,178.99,0.59 +11108.02,178.98,0.61 +11108.23,178.98,0.52 +11108.43,178.98,0.49 +11108.64,178.97,0.33 +11108.85,178.97,0.41 +11109.05,178.97,0.40 +11109.26,178.96,0.37 +11109.46,178.96,0.38 +11109.67,178.96,0.36 +11109.87,178.95,0.38 +11110.08,178.95,0.45 +11110.28,178.95,0.52 +11110.49,178.94,0.54 +11110.69,178.94,0.66 +11110.90,178.94,0.48 +11111.10,178.93,0.40 +11111.31,178.93,0.19 +11111.52,178.93,0.37 +11111.72,178.92,0.14 +11111.93,178.92,0.47 +11112.13,178.92,0.63 +11112.34,178.91,0.57 +11112.54,178.91,0.65 +11112.75,178.91,0.50 +11112.95,178.90,0.65 +11113.16,178.90,0.67 +11113.37,178.90,0.81 +11113.57,178.89,0.74 +11113.78,178.89,0.95 +11113.98,178.89,0.98 +11114.19,178.88,0.80 +11114.39,178.88,0.46 +11114.60,178.88,0.51 +11114.80,178.87,0.45 +11115.01,178.87,0.48 +11115.22,178.87,0.51 +11115.42,178.86,0.48 +11115.63,178.86,0.44 +11115.83,178.85,0.18 +11116.04,178.85,-0.21 +11116.24,178.85,-0.17 +11116.45,178.84,-0.15 +11116.66,178.84,0.41 +11116.86,178.84,0.41 +11117.07,178.83,0.43 +11117.27,178.83,0.37 +11117.48,178.83,0.36 +11117.68,178.82,0.43 +11117.89,178.82,0.54 +11118.10,178.82,0.97 +11118.30,178.81,0.84 +11118.51,178.81,0.84 +11118.71,178.81,0.26 +11118.92,178.80,0.25 +11119.12,178.80,0.27 +11119.33,178.80,0.38 +11119.54,178.79,0.24 +11119.74,178.79,0.32 +11119.95,178.79,0.08 +11120.15,178.78,0.04 +11120.36,178.78,-0.23 +11120.56,178.78,-0.33 +11120.77,178.77,-0.14 +11120.98,178.77,0.12 +11121.18,178.77,0.10 +11121.39,178.76,0.12 +11121.59,178.76,0.10 +11121.80,178.76,0.05 +11122.01,178.75,0.15 +11122.21,178.75,0.26 +11122.42,178.75,0.57 +11122.62,178.74,0.59 +11122.83,178.74,0.50 +11123.03,178.74,0.04 +11123.24,178.73,0.02 +11123.45,178.73,0.03 +11123.65,178.73,0.06 +11123.86,178.72,0.10 +11124.06,178.72,0.07 +11124.27,178.72,0.06 +11124.48,178.71,0.02 +11124.68,178.71,-0.11 +11124.89,178.71,-0.15 +11125.09,178.70,-0.19 +11125.30,178.70,-0.43 +11125.51,178.70,-0.37 +11125.71,178.69,-0.41 diff --git a/pxii_bec/macros/luts/27061952_vfm_pitch_energy.csv b/pxii_bec/macros/luts/27061952_vfm_pitch_energy.csv new file mode 100644 index 0000000..37b4f12 --- /dev/null +++ b/pxii_bec/macros/luts/27061952_vfm_pitch_energy.csv @@ -0,0 +1,96 @@ +energy,pitch,diode +10.00,2.79003,2.5101e-05 +10.00,2.86503,2.7481e-05 +10.00,2.94003,2.7441e-05 +10.00,3.01503,2.7531e-05 +10.00,3.09003,2.7429e-05 +11.00,2.79003,6.7964e-05 +11.00,2.86503,7.9833e-05 +11.00,2.94003,7.9545e-05 +11.00,3.01503,7.9683e-05 +11.00,3.09003,7.9548e-05 +12.00,2.79003,6.4495e-05 +12.00,2.86503,7.3507e-05 +12.00,2.94003,7.3534e-05 +12.00,3.01503,7.3641e-05 +12.00,3.09003,7.292e-05 +13.00,2.79003,5.1657e-05 +13.00,2.86503,5.6129e-05 +13.00,2.94003,5.5938e-05 +13.00,3.01503,5.5935e-05 +13.00,3.09003,5.5824e-05 +14.00,2.79003,5.0019e-05 +14.00,2.86503,5.4959e-05 +14.00,2.94003,5.4717e-05 +14.00,3.01503,5.4711e-05 +14.00,3.09003,5.4572e-05 +15.00,2.79003,3.8514e-05 +15.00,2.86503,4.2182e-05 +15.00,2.94003,4.2072e-05 +15.00,3.01503,4.2056e-05 +15.00,3.09003,4.1897e-05 +16.00,2.79003,2.6391e-05 +16.00,2.86503,2.8237e-05 +16.00,2.94003,2.8187e-05 +16.00,3.01503,2.8078e-05 +16.00,3.09003,2.7934e-05 +17.00,2.79003,1.9654e-05 +17.00,2.86503,2.0669e-05 +17.00,2.94003,2.0592e-05 +17.00,3.01503,2.0495e-05 +17.00,3.09003,2.0409e-05 +18.00,2.79003,1.6418e-05 +18.00,2.86503,1.7321e-05 +18.00,2.94003,1.7276e-05 +18.00,3.01503,1.7201e-05 +18.00,3.09003,1.7058e-05 +19.00,2.79003,1.1114e-05 +19.00,2.86503,1.1688e-05 +19.00,2.94003,1.1616e-05 +19.00,3.01503,1.1486e-05 +19.00,3.09003,1.1229e-05 +20.00,2.79003,1.0067e-05 +20.00,2.86503,1.0474e-05 +20.00,2.94003,1.0233e-05 +20.00,3.01503,9.7442e-06 +20.00,3.09003,8.7702e-06 +21.00,2.79003,6.6035e-06 +21.00,2.86503,6.4392e-06 +21.00,2.94003,5.6891e-06 +21.00,3.01503,4.6277e-06 +21.00,3.09003,3.4547e-06 +22.00,2.79003,3.4235e-06 +22.00,2.86503,2.8148e-06 +22.00,2.94003,2.0854e-06 +22.00,3.01503,1.413e-06 +22.00,3.09003,1.0058e-06 +23.00,2.79003,1.3978e-06 +23.00,2.86503,9.5583e-07 +23.00,2.94003,6.9829e-07 +23.00,3.01503,5.3073e-07 +23.00,3.09003,4.8376e-07 +24.00,2.79003,5.5859e-07 +24.00,2.86503,4.3102e-07 +24.00,2.94003,3.3977e-07 +24.00,3.01503,2.7979e-07 +24.00,3.09003,2.2912e-07 +25.00,2.79003,2.3919e-07 +25.00,2.86503,1.9166e-07 +25.00,2.94003,1.5672e-07 +25.00,3.01503,1.2674e-07 +25.00,3.09003,9.9158e-08 +26.00,2.79003,1.7634e-07 +26.00,2.86503,1.4523e-07 +26.00,2.94003,1.1948e-07 +26.00,3.01503,9.6605e-08 +26.00,3.09003,8.3358e-08 +27.00,2.79003,7.4085e-08 +27.00,2.86503,6.2851e-08 +27.00,2.94003,5.1639e-08 +27.00,3.01503,4.5493e-08 +27.00,3.09003,4.1044e-08 +28.00,2.79003,4.757e-08 +28.00,2.86503,4.0306e-08 +28.00,2.94003,3.6045e-08 +28.00,3.01503,3.1936e-08 +28.00,3.09003,2.5395e-08 diff --git a/pxii_bec/macros/luts/27062057_vfm_pitch_energy.csv b/pxii_bec/macros/luts/27062057_vfm_pitch_energy.csv new file mode 100644 index 0000000..6849861 --- /dev/null +++ b/pxii_bec/macros/luts/27062057_vfm_pitch_energy.csv @@ -0,0 +1,51 @@ +energy,pitch,diode +17.00,2.49006,6.9998e-08 +17.00,2.54006,8.0892e-08 +17.00,2.59006,9.3759e-08 +17.00,2.64006,1.1324e-07 +17.00,2.69006,1.4562e-07 +18.00,2.49006,6.122e-08 +18.00,2.54006,7.1592e-08 +18.00,2.59006,8.4016e-08 +18.00,2.64006,1.0291e-07 +18.00,2.69006,1.3362e-07 +19.00,2.49006,3.8423e-08 +19.00,2.54006,4.5515e-08 +19.00,2.59006,5.3896e-08 +19.00,2.64006,6.6516e-08 +19.00,2.69006,8.8274e-08 +20.00,2.49006,2.9234e-08 +20.00,2.54006,3.5421e-08 +20.00,2.59006,4.3305e-08 +20.00,2.64006,5.5004e-08 +20.00,2.69006,7.3772e-08 +21.00,2.49006,1.7361e-08 +21.00,2.54006,2.0553e-08 +21.00,2.59006,2.5132e-08 +21.00,2.64006,3.2485e-08 +21.00,2.69006,4.5865e-08 +22.00,2.49006,1.0198e-08 +22.00,2.54006,1.1792e-08 +22.00,2.59006,1.4037e-08 +22.00,2.64006,1.7411e-08 +22.00,2.69006,2.4266e-08 +23.00,2.49006,7.7011e-09 +23.00,2.54006,8.4929e-09 +23.00,2.59006,9.5513e-09 +23.00,2.64006,1.1054e-08 +23.00,2.69006,1.4002e-08 +24.00,2.49006,5.3858e-09 +24.00,2.54006,5.698e-09 +24.00,2.59006,6.161e-09 +24.00,2.64006,6.804e-09 +24.00,2.69006,8.1435e-09 +25.00,2.49006,4.2137e-09 +25.00,2.54006,4.3605e-09 +25.00,2.59006,4.5837e-09 +25.00,2.64006,4.8794e-09 +25.00,2.69006,5.3341e-09 +26.00,2.49006,4.1207e-09 +26.00,2.54006,4.2034e-09 +26.00,2.59006,4.3481e-09 +26.00,2.64006,4.4824e-09 +26.00,2.69006,4.9786e-09 diff --git a/pxii_bec/macros/luts/27062107_vfm_pitch_energy.csv b/pxii_bec/macros/luts/27062107_vfm_pitch_energy.csv new file mode 100644 index 0000000..f5c08e6 --- /dev/null +++ b/pxii_bec/macros/luts/27062107_vfm_pitch_energy.csv @@ -0,0 +1,46 @@ +energy,pitch,diode +17.00,2.69000,1.5377e-07 +17.00,2.74000,5.5058e-07 +17.00,2.79000,2.8742e-05 +17.00,2.84000,2.992e-05 +17.00,2.89000,2.9921e-05 +18.00,2.69000,1.3257e-07 +18.00,2.74000,6.2784e-07 +18.00,2.79000,2.3012e-05 +18.00,2.84000,2.4082e-05 +18.00,2.89000,2.3995e-05 +19.00,2.69000,8.7067e-08 +19.00,2.74000,5.28e-07 +19.00,2.79000,1.4786e-05 +19.00,2.84000,1.5433e-05 +19.00,2.89000,1.5369e-05 +20.00,2.69000,7.5571e-08 +20.00,2.74000,5.949e-07 +20.00,2.79000,1.3098e-05 +20.00,2.84000,1.3572e-05 +20.00,2.89000,1.3423e-05 +21.00,2.69000,4.5569e-08 +21.00,2.74000,4.6722e-07 +21.00,2.79000,8.2723e-06 +21.00,2.84000,8.1305e-06 +21.00,2.89000,7.7839e-06 +22.00,2.69000,2.4394e-08 +22.00,2.74000,3.137e-07 +22.00,2.79000,4.103e-06 +22.00,2.84000,3.6481e-06 +22.00,2.89000,3.0803e-06 +23.00,2.69000,1.4056e-08 +23.00,2.74000,2.2905e-07 +23.00,2.79000,1.6164e-06 +23.00,2.84000,1.2537e-06 +23.00,2.89000,9.8993e-07 +24.00,2.69000,8.1539e-09 +24.00,2.74000,8.9029e-08 +24.00,2.79000,6.3203e-07 +24.00,2.84000,5.3339e-07 +24.00,2.89000,4.4881e-07 +25.00,2.69000,5.483e-09 +25.00,2.74000,4.3057e-08 +25.00,2.79000,2.6918e-07 +25.00,2.84000,2.318e-07 +25.00,2.89000,2.0125e-07 diff --git a/pxii_bec/macros/luts/27062148_lut.csv b/pxii_bec/macros/luts/27062148_lut.csv new file mode 100644 index 0000000..21e7b3f --- /dev/null +++ b/pxii_bec/macros/luts/27062148_lut.csv @@ -0,0 +1,5 @@ +energy,harmonic,gap,pitch,roll,perp,samcam_x,samcam_y,zoom=501.0 +6000,H3,5.9369,-5.5214,4.651,0.178,1091,483.8 +6300,H3,6.2143,-5.5161,4.648,0.15925,1091,484.7 +6600,H3,6.5006,-5.513,4.651,0.14414,1089,482.2 +6900,H3,6.8005,-5.5102,4.65,0.1312,1089,482.3 diff --git a/pxii_bec/macros/luts/27062203_lut.csv b/pxii_bec/macros/luts/27062203_lut.csv new file mode 100644 index 0000000..4d82a61 --- /dev/null +++ b/pxii_bec/macros/luts/27062203_lut.csv @@ -0,0 +1,78 @@ +energy,harmonic,gap,pitch,roll,perp,samcam_x,samcam_y,zoom=501.0 +7000,H3,6.9059,-5.5096,4.651,0.12717,1089,480.7 +7300,H5,4.551,-5.5071,4.649,0.11594,1088,479.5 +7600,H5,4.697,-5.5057,4.647,0.10671,1087,478.8 +7900,H5,4.8454,-5.5028,4.65,0.09833,1084,478.9 +8200,H5,4.9952,-5.5026,4.649,0.09104,1085,481.3 +8500,H5,5.1461,-5.5018,4.648,0.084215,1086,481.8 +8800,H5,5.2989,-5.5,4.649,0.07845,1086,480.4 +9100,H5,5.4534,-5.5001,4.649,0.0732,1089,479.5 +9400,H5,5.6102,-5.4982,4.651,0.068385,1086,478.2 +9700,H5,5.7706,-5.497,4.651,0.064125,1086,477.8 +10000,H5,5.9309,-5.4964,4.651,0.06021,1085,475.8 +10300,H7,4.5766,-5.4954,4.651,0.056655,1086,474.8 +10600,H7,4.6797,-5.4945,4.651,0.0534,1085,474.5 +10900,H7,4.7853,-5.4938,4.651,0.050445,1085,473.1 +11200,H7,4.8916,-5.4933,4.651,0.04773,1084,472.4 +11500,H7,4.9984,-5.4927,4.651,0.04519,1084,471.9 +11800,H7,5.106,-5.4923,4.648,0.042885,1084,471.5 +12100,H7,5.2144,-5.4917,4.65,0.04069,1084,471.1 +12400,H7,5.3238,-5.491,4.65,0.03866,1083,469.9 +12700,H7,5.434,-5.4907,4.65,0.0369,1084,470 +13000,H7,5.5453,-5.4902,4.65,0.035145,1083,469 +13300,H9,4.5975,-5.4899,4.651,0.033575,1083,470.3 +13600,H9,4.6739,-5.4896,4.65,0.03209,1083,468.8 +13900,H9,4.7564,-5.4892,4.648,0.03027,1083,468.6 +14200,H9,4.8387,-5.4888,4.646,0.0302,1083,467.8 +14500,H9,4.9214,-5.4885,4.651,0.02818,1083,467.8 +14800,H9,5.0041,-5.4885,4.649,0.02704,1085,467.4 +15100,H9,5.0875,-5.488,4.651,0.02703,1084,466.9 +15400,H9,5.1711,-5.4876,4.649,0.024565,1083,466.7 +15700,H9,5.2554,-5.487,4.65,0.024555,1083,466.5 +16000,H9,5.3397,-5.4871,4.648,0.023035,1083,466.1 +16300,H11,4.6154,-5.4868,4.648,0.023025,1083,467.3 +16600,H11,4.6825,-5.4866,4.649,0.021305,1083,467.6 +16900,H11,4.7494,-5.4858,4.649,0.02127,1082,466.9 +17200,H11,4.8184,-5.4858,4.649,0.01983,1083,468.4 +17500,H11,4.8873,-5.4856,4.648,0.01976,1082,467.8 +17800,H11,4.9557,-5.4854,4.65,0.018535,1082,467.9 +18100,H11,5.0243,-5.4853,4.65,0.01849,1083,467.2 +18400,H11,5.0929,-5.4846,4.649,0.017295,1083,466.8 +18700,H11,5.1629,-5.4847,4.648,0.017285,1083,466.9 +19000,H11,5.2347,-5.4846,4.65,0.017285,1083,466.1 +19300,H13,4.6243,-5.4842,4.65,0.015695,1082,465.7 +19600,H13,4.6808,-5.484,4.651,0.01564,1082,465.4 +19900,H13,4.7387,-5.4838,4.649,0.015625,1082,465 +20200,H13,4.7961,-5.4836,4.648,0.0144,1083,464.9 +20500,H13,4.8537,-5.4833,4.649,0.01437,1083,464.2 +20800,H13,4.9126,-5.4829,4.648,0.01436,1083,463.6 +21100,H13,4.971,-5.4833,4.649,0.01317,1082,464.1 +21400,H13,5.0299,-5.4823,4.651,0.01313,1082,464.2 +21700,H13,5.0894,-5.4829,4.649,0.013145,1081,463.8 +22000,H13,5.1481,-5.4828,4.65,0.013135,1083,463.6 +22300,H15,4.6281,-5.4829,4.649,0.01175,1083,463.9 +22600,H15,4.6771,-5.4826,4.651,0.011735,1083,464.4 +22900,H15,4.7273,-5.4825,4.65,0.01174,1082,463.7 +23200,H15,4.7774,-5.4824,4.648,0.01174,1083,463.7 +23500,H15,4.8264,-5.4822,4.649,0.010605,1082,463.8 +23800,H15,4.8783,-5.4821,4.65,0.010585,1082,463.6 +24100,H15,4.9262,-5.482,4.649,0.01058,1082,463.8 +24400,H15,4.9759,-5.4818,4.649,0.010585,1082,463.4 +24700,H15,5.0255,-5.4818,4.649,0.010595,1082,463.4 +25000,H15,5.078,-5.4818,4.648,0.0094,1082,463 +25300,H17,4.6289,-5.482,4.649,0.00939,1082,462.7 +25600,H17,4.6718,-5.4819,4.648,0.009385,1082,462.9 +25900,H17,4.7168,-5.4819,4.649,0.00939,1080,463.4 +26200,H17,4.7603,-5.4819,4.649,0.009385,1082,463.2 +26500,H17,4.803,-5.4817,4.649,0.0094,1081,463.5 +26800,H17,4.8495,-5.4814,4.651,0.00814,1082,463.7 +27100,H17,4.8965,-5.4815,4.649,0.008145,1080,464.1 +27400,H17,4.9377,-5.4816,4.65,0.008145,1081,463.1 +27700,H19,4.5375,-5.4817,4.649,0.008155,1081,461.8 +28000,H19,4.5909,-5.4818,4.65,0.008135,1082,462 +28300,H19,4.6433,-5.4815,4.649,0.00815,1081,463.5 +28600,H19,4.677,-5.4813,4.649,0.008155,1081,462.6 +28900,H19,4.7062,-5.4813,4.651,0.007025,1081,461.5 +29200,H19,4.7429,-5.4812,4.649,0.00701,1081,461.8 +29500,H19,4.7828,-5.4811,4.65,0.00702,1080,461.9 +29800,H19,4.822,-5.4814,4.651,0.007015,1081,462.6 diff --git a/pxii_bec/macros/luts/2706_dcm_lut.csv b/pxii_bec/macros/luts/2706_dcm_lut.csv new file mode 100644 index 0000000..a1d612c --- /dev/null +++ b/pxii_bec/macros/luts/2706_dcm_lut.csv @@ -0,0 +1,83 @@ +energy,harmonic,gap,pitch,roll,perp,samcam_x,samcam_y,zoom=501.0 +6000,H3,5.9369,-5.5214,4.651,0.178,1091,483.8 +6300,H3,6.2143,-5.5161,4.648,0.15925,1091,484.7 +6600,H3,6.5006,-5.513,4.651,0.14414,1089,482.2 +6900,H3,6.8005,-5.5102,4.65,0.1312,1089,482.3 +energy,harmonic,gap,pitch,roll,perp,samcam_x,samcam_y,zoom=501.0 +7000,H3,6.9059,-5.5096,4.651,0.12717,1089,480.7 +7300,H5,4.551,-5.5071,4.649,0.11594,1088,479.5 +7600,H5,4.697,-5.5057,4.647,0.10671,1087,478.8 +7900,H5,4.8454,-5.5028,4.65,0.09833,1084,478.9 +8200,H5,4.9952,-5.5026,4.649,0.09104,1085,481.3 +8500,H5,5.1461,-5.5018,4.648,0.084215,1086,481.8 +8800,H5,5.2989,-5.5,4.649,0.07845,1086,480.4 +9100,H5,5.4534,-5.5001,4.649,0.0732,1089,479.5 +9400,H5,5.6102,-5.4982,4.651,0.068385,1086,478.2 +9700,H5,5.7706,-5.497,4.651,0.064125,1086,477.8 +10000,H5,5.9309,-5.4964,4.651,0.06021,1085,475.8 +10300,H7,4.5766,-5.4954,4.651,0.056655,1086,474.8 +10600,H7,4.6797,-5.4945,4.651,0.0534,1085,474.5 +10900,H7,4.7853,-5.4938,4.651,0.050445,1085,473.1 +11200,H7,4.8916,-5.4933,4.651,0.04773,1084,472.4 +11500,H7,4.9984,-5.4927,4.651,0.04519,1084,471.9 +11800,H7,5.106,-5.4923,4.648,0.042885,1084,471.5 +12100,H7,5.2144,-5.4917,4.65,0.04069,1084,471.1 +12400,H7,5.3238,-5.491,4.65,0.03866,1083,469.9 +12700,H7,5.434,-5.4907,4.65,0.0369,1084,470 +13000,H7,5.5453,-5.4902,4.65,0.035145,1083,469 +13300,H9,4.5975,-5.4899,4.651,0.033575,1083,470.3 +13600,H9,4.6739,-5.4896,4.65,0.03209,1083,468.8 +13900,H9,4.7564,-5.4892,4.648,0.03027,1083,468.6 +14200,H9,4.8387,-5.4888,4.646,0.0302,1083,467.8 +14500,H9,4.9214,-5.4885,4.651,0.02818,1083,467.8 +14800,H9,5.0041,-5.4885,4.649,0.02704,1085,467.4 +15100,H9,5.0875,-5.488,4.651,0.02703,1084,466.9 +15400,H9,5.1711,-5.4876,4.649,0.024565,1083,466.7 +15700,H9,5.2554,-5.487,4.65,0.024555,1083,466.5 +16000,H9,5.3397,-5.4871,4.648,0.023035,1083,466.1 +16300,H11,4.6154,-5.4868,4.648,0.023025,1083,467.3 +16600,H11,4.6825,-5.4866,4.649,0.021305,1083,467.6 +16900,H11,4.7494,-5.4858,4.649,0.02127,1082,466.9 +17200,H11,4.8184,-5.4858,4.649,0.01983,1083,468.4 +17500,H11,4.8873,-5.4856,4.648,0.01976,1082,467.8 +17800,H11,4.9557,-5.4854,4.65,0.018535,1082,467.9 +18100,H11,5.0243,-5.4853,4.65,0.01849,1083,467.2 +18400,H11,5.0929,-5.4846,4.649,0.017295,1083,466.8 +18700,H11,5.1629,-5.4847,4.648,0.017285,1083,466.9 +19000,H11,5.2347,-5.4846,4.65,0.017285,1083,466.1 +19300,H13,4.6243,-5.4842,4.65,0.015695,1082,465.7 +19600,H13,4.6808,-5.484,4.651,0.01564,1082,465.4 +19900,H13,4.7387,-5.4838,4.649,0.015625,1082,465 +20200,H13,4.7961,-5.4836,4.648,0.0144,1083,464.9 +20500,H13,4.8537,-5.4833,4.649,0.01437,1083,464.2 +20800,H13,4.9126,-5.4829,4.648,0.01436,1083,463.6 +21100,H13,4.971,-5.4833,4.649,0.01317,1082,464.1 +21400,H13,5.0299,-5.4823,4.651,0.01313,1082,464.2 +21700,H13,5.0894,-5.4829,4.649,0.013145,1081,463.8 +22000,H13,5.1481,-5.4828,4.65,0.013135,1083,463.6 +22300,H15,4.6281,-5.4829,4.649,0.01175,1083,463.9 +22600,H15,4.6771,-5.4826,4.651,0.011735,1083,464.4 +22900,H15,4.7273,-5.4825,4.65,0.01174,1082,463.7 +23200,H15,4.7774,-5.4824,4.648,0.01174,1083,463.7 +23500,H15,4.8264,-5.4822,4.649,0.010605,1082,463.8 +23800,H15,4.8783,-5.4821,4.65,0.010585,1082,463.6 +24100,H15,4.9262,-5.482,4.649,0.01058,1082,463.8 +24400,H15,4.9759,-5.4818,4.649,0.010585,1082,463.4 +24700,H15,5.0255,-5.4818,4.649,0.010595,1082,463.4 +25000,H15,5.078,-5.4818,4.648,0.0094,1082,463 +25300,H17,4.6289,-5.482,4.649,0.00939,1082,462.7 +25600,H17,4.6718,-5.4819,4.648,0.009385,1082,462.9 +25900,H17,4.7168,-5.4819,4.649,0.00939,1080,463.4 +26200,H17,4.7603,-5.4819,4.649,0.009385,1082,463.2 +26500,H17,4.803,-5.4817,4.649,0.0094,1081,463.5 +26800,H17,4.8495,-5.4814,4.651,0.00814,1082,463.7 +27100,H17,4.8965,-5.4815,4.649,0.008145,1080,464.1 +27400,H17,4.9377,-5.4816,4.65,0.008145,1081,463.1 +27700,H19,4.5375,-5.4817,4.649,0.008155,1081,461.8 +28000,H19,4.5909,-5.4818,4.65,0.008135,1082,462 +28300,H19,4.6433,-5.4815,4.649,0.00815,1081,463.5 +28600,H19,4.677,-5.4813,4.649,0.008155,1081,462.6 +28900,H19,4.7062,-5.4813,4.651,0.007025,1081,461.5 +29200,H19,4.7429,-5.4812,4.649,0.00701,1081,461.8 +29500,H19,4.7828,-5.4811,4.65,0.00702,1080,461.9 +29800,H19,4.822,-5.4814,4.651,0.007015,1081,462.6 diff --git a/pxii_bec/macros/luts/I1flcalf.csv b/pxii_bec/macros/luts/I1flcalf.csv new file mode 100644 index 0000000..ee9d3b4 --- /dev/null +++ b/pxii_bec/macros/luts/I1flcalf.csv @@ -0,0 +1,22 @@ +En,Fl/I1 +8.0,2.8080492027877764e+16 +9.0,1.4927860624483272e+16 +10.0,8417877926653679.0 +12.0,7019853850369172.0 +14.0,7386772914557876.0 +15.0,6750736409573591.0 +16.0,6297543245612219.0 +17.0,5735864463671363.0 +18.0,5573419238195645.0 +19.0,5194271286110376.0 +20.0,5117190891126464.0 +21.0,5255398865151842.0 +22.0,5322717678656602.0 +23.0,5341775365764245.0 +24.0,5666291945190874.0 +25.0,5921432928105373.0 +26.0,6205608339975513.0 +27.0,6811217757122517.0 +28.0,7298249384420157.0 +29.0,7974072533533950.0 +30.0,8936735941779119.0 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_0107.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_0107.csv new file mode 100644 index 0000000..3cc7ec4 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_0107.csv @@ -0,0 +1,10 @@ +Beam size: focus, Energy: 12400 eV, Zoom: 1000.0 +Time, Scin_x, Scin_y +22:44:24, 1047.8, 984.4 +22:54:27, 1042.3, 990.1 +23:04:31, 1039.3, 993.6 +23:14:34, 1036, 996.9 +23:24:38, 1033.6, 998.3 +23:34:41, 1033.2, 998.5 +23:44:44, 1032.5, 1000 +23:54:48, 1030.5, 1001 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_0207.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_0207.csv new file mode 100644 index 0000000..7f079c8 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_0207.csv @@ -0,0 +1,12 @@ +Beam size: focus, Energy: 12400 eV, Zoom: 116.0 +Time,Scin_x,Scin_y +22:42:33, 1004.4, 975.1 +22:47:51, 1004.2, 974.9 +22:49:25, 1004, 975.1 +22:59:29, 1004.3, 974.9 +23:09:32, 1004, 974.9 +23:19:35, 1004, 975 +23:29:40, 1003.8, 975 +23:39:43, 1004, 975.1 +23:49:46, 1003.8, 975.1 +23:59:50, 1003.9, 975 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_02072247.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_02072247.csv new file mode 100644 index 0000000..9de9b28 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_02072247.csv @@ -0,0 +1,2 @@ +Beam size: focus, Energy: 12400 eV, Zoom: 116.0 +Time,Scin_x,Scin_y diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_02072249.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_02072249.csv new file mode 100644 index 0000000..9de9b28 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_02072249.csv @@ -0,0 +1,2 @@ +Beam size: focus, Energy: 12400 eV, Zoom: 116.0 +Time,Scin_x,Scin_y diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_0307.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_0307.csv new file mode 100644 index 0000000..104b64a --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_0307.csv @@ -0,0 +1,38 @@ +00:09:53, 1004.1, 974.8 +00:19:56, 1004.1, 975.4 +00:29:59, 1003.8, 975.2 +00:40:02, 1003.7, 975 +00:50:06, 1003.9, 975.1 +01:00:09, 1003.7, 975 +01:10:13, 1003.9, 975.4 +01:20:17, 1003.8, 975.2 +01:30:20, 1003.5, 975.2 +01:40:24, 1003.6, 975.4 +01:50:27, 1003.6, 975.5 +02:00:30, 1003.6, 975.3 +02:10:34, 1003.6, 975.3 +02:20:37, 1003.4, 975.1 +02:30:40, 1003.3, 975 +02:40:43, 1003.6, 975.5 +02:50:46, 1003.4, 975.4 +03:00:50, 1003.6, 975.7 +03:10:53, 1003.4, 975.3 +03:20:56, 1003.3, 975.5 +03:30:59, 1003.3, 975.6 +03:41:03, 1003.1, 975.4 +03:51:06, 1003.2, 975.5 +04:01:09, 1003.3, 975.8 +04:11:12, 1003.2, 975.4 +04:21:17, 1003.2, 976.1 +04:31:20, 1003.1, 975.8 +04:41:24, 1003.3, 975.7 +04:51:27, 1003.1, 975.8 +05:01:30, 1003.3, 975.7 +05:11:33, 1003.1, 975.9 +05:21:37, 1003.5, 975.7 +05:31:40, 1003, 975.9 +05:41:44, 1003, 975.9 +05:51:47, 1003, 975.9 +06:01:51, 1002.8, 975.8 +06:11:54, 1002.9, 976 +06:21:58, 1002.9, 976 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_05072309.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_05072309.csv new file mode 100644 index 0000000..d247544 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_05072309.csv @@ -0,0 +1,3 @@ +Beam size: 25 x 25, Energy: 12411 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +23:09:51, 996.26, 969.7 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_05072312.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_05072312.csv new file mode 100644 index 0000000..45df2e2 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_05072312.csv @@ -0,0 +1,54 @@ +Beam size: 25 x 25, Energy: 12411 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +23:12:35, 995.39, 971.2, 0.0014257, 0.00020213 +23:22:43, 994.25, 969.4,-0.00056244, 4.803e-05 +23:32:50, 996.45, 969.9, 0.0019919, 0.00012447 +23:42:57, 994.51, 968.8, 0.0023343, 0.00015683 +23:53:04, 995.05, 968.3, 0.0015905,-8.5494e-05 +00:03:11, 995.28, 968.7, 0.0020666, 5.3318e-05 +00:13:18, 992.49, 967.4, 0.0018273, 1.0159e-05 +00:23:25, 993.87, 968.1, 0.0026699, 0.00014545 +00:33:32, 993.18, 967.1, 0.0021102, 0.00016397 +00:43:39, 989.84, 964.4, 0.0019726, 6.7481e-05 +00:53:46, 992.51, 964.3, 0.0025941,-7.7352e-05 +01:03:53, 990.62, 964.3, 0.0019351,-0.00018901 +01:14:00, 990.84, 963.9, 0.00034531,-7.0021e-05 +01:24:07, 990.38, 964.8, 0.0028551,-1.0148e-05 +01:34:14, 989.93, 963.9, 0.00096758,-8.6709e-05 +01:44:22, 989.6, 962.5, 0.00083318, 7.822e-05 +01:54:29, 988.24, 962.7, 0.0021182, 2.3366e-06 +02:04:36, 990.03, 961.3, 0.0034334,-9.2628e-05 +02:14:43, 992.94, 961.8, 0.0035394, 3.7763e-05 +02:24:50, 988.24, 963.2, 0.0020132,-3.7238e-05 +02:34:57, 988.7, 960.8, 0.0026131, 0.00013091 +02:45:04, 987.48, 962.2, 0.0019253,-4.9263e-05 +02:55:12, 989.1, 959.2, 0.0026772,-0.00010874 +03:05:19, 990.06, 960.4, 0.0029965,-6.3675e-05 +03:15:25, 989.04, 960.9, 0.001467, 7.606e-05 +03:25:32, 988.1, 958.4, 0.0029762,-6.4314e-05 +03:35:40, 987.12, 960.3, 0.0023346, 1.2619e-05 +03:45:47, 987.53, 958.1, 0.0019049,-9.9284e-05 +03:55:54, 988.66, 957.7, 0.0023903,-0.00017489 +04:06:01, 989.69, 957.7, 0.0031516,-2.9577e-05 +04:16:08, 988.28, 959.3, 0.0018509,-0.00016916 +04:26:15, 989.55, 961.4, 0.0042292,-7.6532e-05 +04:36:22, 990.65, 960, 0.0032345,-0.00024955 +04:46:29, 986.18, 958.9, 0.0018287,-0.00011167 +04:56:36, 990.08, 958, 0.0029748,-0.00014368 +05:06:43, 988.35, 959.3, 0.0027624,-7.6409e-05 +05:16:51, 989.79, 959.2, 0.0034944,-0.00016686 +05:26:58, 988.99, 959.5, 0.0011134,-0.00010152 +05:37:06, 988.61, 956.7, 0.0021961,-0.00012383 +05:47:13, 991.01, 959.1, 0.0031364,-0.00015889 +05:57:20, 986.32, 957, 0.0023368,-4.4888e-05 +06:07:27, 985.51, 957,-3.7126e-05,-0.0001149 +06:17:34, 987.44, 955.2, 0.0021771,-0.0002745 +06:27:42, 985.5, 952.4, 0.0002006,-0.00031063 +06:37:48, 986.71, 955, 0.00048996,-0.00024164 +06:47:55, 986.27, 952.7, 0.00035522,-0.00030352 +06:58:02, 986.41, 953.1, 0.0014466,-0.00024274 +07:08:09, 987.99, 953.3, 0.0017522,-0.00020756 +07:18:17, 983.72, 952, 0.00073741,-0.00034075 +07:28:25, 984.45, 952.7, 0.0022291,-0.00026963 +07:38:32, 985.52, 952.8, 0.00060054,-0.00021836 +07:48:39, 984.86, 953.4, 0.00070529,-0.00021755 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_10072258.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_10072258.csv new file mode 100644 index 0000000..9b2375c --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_10072258.csv @@ -0,0 +1,3 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +22:58:50, 901.07, 932.5,-135.46,-33.566 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_10072259.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_10072259.csv new file mode 100644 index 0000000..e7e1187 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_10072259.csv @@ -0,0 +1,65 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +22:59:30, 900.3, 932.4,-135.68,-33.54 +23:09:36, 899.46, 935.9,-135.67,-33.426 +23:19:42, 903.28, 939.3,-136.19,-33.427 +23:29:47, 906.99, 939.6,-134.18,-33.394 +23:39:53, 904.28, 939.3,-134.4,-33.401 +23:49:59, 908.28, 942.9,-133.11,-33.27 +00:00:05, 907.44, 942.7,-133.88,-33.317 +00:10:11, 909.51, 946.1,-133.69,-33.263 +00:20:16, 908.09, 946.6,-134.91,-33.245 +00:30:22, 907.67, 946.4,-133.5,-33.199 +00:40:27, 910.28, 948.7,-133.62,-33.194 +00:50:33, 910.87, 947.3,-133.73,-33.238 +01:00:39, 910.72, 951.6,-133.14,-33.176 +01:10:45, 916.55, 954.1,-131.75,-33.078 +01:20:50, 914.82, 955.5,-133.03,-33.043 +01:30:56, 915.33, 954.3,-132.77,-33.046 +01:41:02, 916.54, 956.1,-131.25,-33.013 +01:51:07, 914.7, 954.1,-134.45,-33.303 +02:01:13, 915.45, 957.5,-132.93,-32.918 +02:11:22, 822.1, 1182,-131.95,-32.936 +02:21:32, 914.39, 963.1,-132.37,-32.873 +02:31:40, 918.37, 960.1,-130.84,-32.881 +02:41:46, 913.44, 961.6,-133.11,-32.841 +02:51:52, 917.49, 961.6,-132.04,-32.873 +03:01:57, 919.4, 959.6,-130.23,-32.912 +03:12:03, 914.79, 960.1,-133.3,-32.864 +03:22:09, 921.98, 963.7,-130.45,-32.799 +03:32:14, 919.15, 962.6,-131.58,-32.889 +03:42:20, 920.76, 963.4,-131.93,-32.822 +03:52:25, 921.81, 963.9,-131.49,-32.856 +04:02:31, 922.4, 965.7,-130.76,-32.751 +04:12:37, 922.48, 965.7,-131.37,-32.79 +04:22:42, 920.98, 966.2,-131.43,-32.776 +04:32:48, 921.29, 968.2,-131.39,-32.645 +04:42:54, 921.63, 968.6,-130.67,-32.693 +04:52:59, 919.05, 968.9,-131.49,-32.698 +05:03:05, 918.8, 969.1,-131.46,-32.654 +05:13:11, 923.71, 970.4,-131.43,-32.673 +05:23:17, 921.72, 971.2,-131.18,-32.652 +05:33:24, 924.3, 973.8,-130.42,-32.543 +05:43:30, 921.72, 973.5,-131.78,-32.553 +05:53:39, 918.24, 972.7,-132.13,-32.617 +06:03:45, 923.67, 972.5,-130.48,-32.604 +06:13:52, 918.82, 975.2,-132.09,-32.525 +06:23:57, 921.6, 976,-131.13,-32.515 +06:34:03, 923.18, 971.2,-131.09,-32.595 +06:44:08, 923.42, 974.4,-131.62,-32.586 +06:54:14, 921.03, 974.3,-131.22,-32.576 +07:04:20, 922.16, 973.7,-131.06,-32.528 +07:14:25, 920.54, 975.6,-131.66,-32.506 +07:24:31, 921.7, 973.4,-131.76,-32.51 +07:34:36, 922.2, 973.6,-131.19,-32.527 +07:44:42, 921.8, 974.2,-131.18,-32.569 +07:54:48, 921.01, 976.9,-131.15,-32.462 +08:04:53, 919.45, 978.1,-131.82,-32.442 +08:14:59, 924.14, 978.6,-130.17,-32.435 +08:25:04, 925.78, 978.5,-130.74,-32.45 +08:35:10, 925.13, 982.2,-130.34,-32.358 +08:45:16, 925.54, 980.5,-131.56,-32.412 +08:55:21, 925.67, 979.4,-131.03,-32.429 +09:05:27, 921.16, 981,-131.76,-32.395 +09:15:33, 926.87, 982.5,-130.06,-32.37 +09:25:39, 923.88, 983.4,-131.8,-32.344 diff --git a/pxii_bec/macros/luts/beampos/beam_pos_record_11072251.csv b/pxii_bec/macros/luts/beampos/beam_pos_record_11072251.csv new file mode 100644 index 0000000..43fdaf2 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beam_pos_record_11072251.csv @@ -0,0 +1,66 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 94.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +22:51:07, 986.29, 876.8,-47.074,-35.425 +23:01:13, 991.37, 878.3,-45.402,-35.493 +23:11:19, 995.69, 878.9,-44.623,-35.533 +23:21:24, 1000.4, 880.2,-43.2,-35.545 +23:31:30, 1003.1, 883.6,-40.409,-35.466 +23:41:36, 1001.2, 883.5,-42.882,-35.435 +23:51:41, 1006.7, 885.6,-40.094,-35.418 +00:01:47, 1004.9, 888.9,-42.943,-35.231 +00:11:53, 1009.1, 887.6,-40.042,-35.311 +00:21:58, 1007.9, 888.4,-41.53,-35.283 +00:32:04, 1008.5, 888.4,-41.989,-35.212 +00:42:10, 1012.2, 891.2,-40.149,-35.148 +00:52:16, 1014.8, 889.6,-37.801,-35.275 +01:02:21, 1011.1, 889.2,-37.705,-35.241 +01:12:27, 1011.8, 888.9,-37.258,-35.237 +01:22:33, 1012.6, 890.5,-36.993,-35.113 +01:32:38, 1012, 887.7,-38.477,-35.231 +01:42:44, 1012.9, 888,-36.955,-35.338 +01:52:50, 1010.9, 887.2,-38.356,-35.322 +02:02:55, 1012.9, 887.9,-38.797,-35.219 +02:13:01, 1010.9, 884.9,-38.837,-35.37 +02:23:06, 1012.1, 884.9,-38.442,-35.442 +02:33:12, 1011.5, 883.5,-38.277,-35.494 +02:43:18, 1011.5, 882.7,-40.89,-35.484 +02:53:24, 1010.2, 882.2,-38.828,-35.452 +03:03:31, 1009.4, 882.3,-40.958,-35.474 +03:13:37, 1009.3, 882.1,-41.712,-35.514 +03:23:42, 1007.8, 879.8,-40.447,-35.54 +03:33:48, 1007.9, 881.4,-41.661,-35.474 +03:43:53, 1009.3, 881.3,-42.593,-35.556 +03:53:59, 1011.3, 883.2,-39.725,-35.429 +04:04:05, 1009.1, 881.3,-42.053,-35.438 +04:14:10, 1007.9, 878.6,-40.73,-35.686 +04:24:16, 1007.7, 877.4,-42.042,-35.619 +04:34:21, 1005.4, 878.9,-41.025,-35.617 +04:44:27, 1009.1, 876.7,-43.857,-35.628 +04:54:32, 1009.2, 875.6,-42.432,-35.566 +05:04:38, 1005.9, 874.2,-43.239,-35.754 +05:14:44, 1006.9, 876,-41.49,-35.704 +05:24:50, 1008.6, 873.3,-41.177,-35.812 +05:34:56, 1008.6, 878,-42.466,-35.584 +05:45:01, 1010.5, 876.7,-40.377,-35.582 +05:55:07, 1005.8, 875.5,-42.045,-35.707 +06:05:13, 1009.8, 875,-41.514,-35.707 +06:15:18, 1006.9, 874.5,-44.042,-35.713 +06:25:24, 1009.8, 873.4,-41.465,-35.758 +06:35:30, 1006.2, 874.8,-44.756,-35.694 +06:45:36, 1010.3, 852.9,-37.377,-36.678 +06:55:42, 1000.7, 872.6,-46.719,-35.754 +07:05:47, 1000.9, 872.3,-46.029,-35.767 +07:15:53, 1002.1, 869.5,-45.783,-35.829 +07:25:59, 1003.5, 870.2,-45.012,-35.827 +07:36:05, 1002.7, 868.8,-45.994,-35.83 +07:46:14, 1001.5, 870.7,-44.573,-35.802 +07:56:20, 1002.7, 869.2,-44.488,-35.91 +08:06:28, 999.99, 868.7,-46.775,-35.785 +08:16:35, 1002.5, 867.4,-44.101,-35.951 +08:26:40, 1001.9, 867.5,-45.003,-35.914 +08:36:48, 999.38, 864.3,-46.274,-35.987 +08:46:54, 1000.8, 867.3,-46.094,-35.836 +08:57:00, 1000.8, 867,-46.843,-35.864 +09:07:05, 1001.5, 866.2,-45.95,-35.854 +09:17:11, 1002, 868.7,-45.469,-35.84 +09:27:16, 1002.6, 867.5,-43.781,-35.9 diff --git a/pxii_bec/macros/luts/beampos/beampos17_18Jul12p4_16_12p4.csv b/pxii_bec/macros/luts/beampos/beampos17_18Jul12p4_16_12p4.csv new file mode 100644 index 0000000..3236d6c --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos17_18Jul12p4_16_12p4.csv @@ -0,0 +1,214 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +17:07:55, 1081.5, 865.8,-0.10403, 0.046367 +17:13:03, 1082.7, 866.4,-0.11939, 0.050761 +17:18:09, 1085.1, 870.1,-0.11518, 0.046755 +17:23:14, 1087.3, 871.1,-0.094016, 0.046281 +17:28:20, 1085.3, 872,-0.10154, 0.043894 +17:33:27, 1086.7, 871.3,-0.098555, 0.048176 +17:38:32, 1090.3, 874.1,-0.091664, 0.043092 +17:43:40, 1087.9, 873,-0.11371, 0.043823 +17:48:46, 1087.3, 874.7,-0.095203, 0.040304 +17:53:55, 1087.9, 875.3,-0.08925, 0.044265 +17:59:04, 1061.6, 872.7,-0.10805, 0.037891 +18:04:14, 1091.5, 876.4,-0.093787, 0.043133 +18:09:20, 1088.4, 877.4,-0.096473, 0.041942 +18:14:27, 1090.8, 877.3,-0.11096, 0.0401 +18:19:37, 1090.5, 880.1,-0.099086, 0.038092 +18:24:43, 1090.9, 879.8,-0.11313, 0.036666 +18:29:50, 1091.5, 881.2,-0.096125, 0.03569 +18:34:56, 1089.2, 880.3,-0.10161, 0.038647 +18:40:02, 1091.5, 883.7,-0.096326, 0.03126 +18:45:08, 1091.5, 882,-0.093638, 0.037376 +18:50:15, 1093.6, 883.5,-0.10822, 0.03282 +18:55:22, 1092.2, 880.7,-0.097546, 0.036702 +19:00:28, 1091.7, 882.1,-0.099781, 0.038295 +19:05:34, 1091.1, 882.5,-0.10108, 0.036448 +19:10:40, 1091.8, 884.3,-0.098202, 0.032866 +19:15:46, 1091.8, 883.2,-0.096186, 0.032321 +19:20:53, 1092.8, 883.4,-0.11828, 0.029995 +19:26:01, 1091.5, 885,-0.095478, 0.031696 +19:31:07, 1094.2, 885.1,-0.094126, 0.031878 +19:36:13, 1094.2, 883.9,-0.094852, 0.035436 +19:41:21, 1093.2, 884.2,-0.11022, 0.031471 +19:46:27, 1093.4, 884.6,-0.093274, 0.031055 +19:51:34, 1092.1, 883.2,-0.11996, 0.030071 +19:56:40, 1094.7, 883.5,-0.090561, 0.032072 +20:01:46, 1090.9, 883.1,-0.093273, 0.034408 +20:06:53, 1091.3, 880.8,-0.10919, 0.036667 +20:12:01, 1095.9, 882.3,-0.087907, 0.033331 +20:17:08, 1093.4, 883.8,-0.11177, 0.027881 +20:22:16, 1090.5, 883.4,-0.099112, 0.029205 +20:27:21, 1091.5, 883.1,-0.093811, 0.029466 +20:32:27, 1091, 883.2,-0.096633, 0.030197 +20:37:35, 1089.9, 881.2,-0.11515, 0.031255 +20:42:43, 1091.8, 883.1,-0.096172, 0.030463 +20:47:50, 1092.4, 884.6,-0.10933, 0.028769 +20:52:56, 1092.8, 880.8,-0.10945, 0.033085 +20:58:02, 1091.9, 883.7,-0.11175, 0.029983 +21:03:11, 1091.2, 880.8,-0.091632, 0.030885 +21:08:17, 1091.7, 883.6,-0.10002, 0.030234 +21:13:24, 1090, 880.9,-0.11468, 0.033629 +21:18:33, 1092, 880.4,-0.089628, 0.033297 +21:23:38, 1094.2, 882.4,-0.087731, 0.033577 +21:28:44, 1092.7, 881.6,-0.096102, 0.03349 +21:33:50, 1094.8, 883.8,-0.090251, 0.02944 +21:38:56, 1096.3, 883.9,-0.090513, 0.03052 +21:44:03, 1093, 882.9,-0.11005, 0.030832 +21:49:09, 1092.4, 882.5,-0.087522, 0.03369 +21:54:15, 1094.1, 884.4,-0.091044, 0.030247 +21:59:22, 1095.2, 886.1,-0.10962, 0.024788 +22:04:30, 1094.6, 883.9,-0.089036, 0.031714 +22:09:36, 1090.9, 883.6,-0.095784, 0.028957 +22:14:44, 1091.7, 885.4,-0.10729, 0.027359 +22:19:51, 1092.7, 884.2,-0.091738, 0.029183 +22:24:59, 1092.9, 882.2,-0.11385, 0.030234 +22:30:08, 1093.3, 884.4,-0.093892, 0.029451 +22:35:14, 1095.9, 884.5,-0.086609, 0.029973 +22:40:19, 1094.8, 885.4,-0.086979, 0.026603 +22:45:25, 1092.6, 885.5,-0.093908, 0.028651 +22:50:33, 1095, 883.2,-0.10473, 0.028907 +22:55:39, 1094.6, 883.6,-0.10637, 0.030962 +22:57:15, 1098, 878.9,-0.073165, 0.035505 +23:02:23, 1097.6, 879.1,-0.064012, 0.034825 +23:07:29, 1101.1, 878.5,-0.053059, 0.036454 +23:12:35, 1096.5, 879.9,-0.056435, 0.032432 +23:17:41, 1097.2, 878.2,-0.061311, 0.032143 +23:22:48, 1100, 879.4,-0.060269, 0.03079 +23:27:54, 1098.7, 878.3,-0.051592, 0.03348 +23:33:02, 1096.6, 879,-0.066266, 0.031853 +23:38:09, 1097.7, 878.8,-0.048859, 0.032677 +23:43:15, 1098.5, 877.5,-0.05091, 0.036148 +23:48:21, 1101.6, 878.2,-0.046499, 0.033352 +23:53:26, 1097.4, 878.7,-0.057467, 0.032821 +23:58:32, 1099.4, 876.8,-0.049522, 0.037438 +00:03:38, 1098.7, 877.7,-0.052748, 0.034827 +00:08:46, 1098.4, 877.9,-0.062436, 0.031424 +00:13:54, 1096.8, 877.8,-0.056041, 0.03579 +00:19:01, 1098.5, 879,-0.058908, 0.03372 +00:24:06, 1097.7, 879.9,-0.058404, 0.030124 +00:29:12, 1097.9, 877.7,-0.060684, 0.036442 +00:34:18, 1097.2, 878.2,-0.064929, 0.034695 +00:39:24, 1097.9, 878.6,-0.058925, 0.032791 +00:44:30, 1099.8, 878.8,-0.052343, 0.03565 +00:49:37, 1095.6, 875.9,-0.072043, 0.035027 +00:54:43, 1099.6, 879.7,-0.051911, 0.03431 +00:59:50, 1096.5, 880.1,-0.068103, 0.032352 +01:04:55, 1096.7, 877.9,-0.063349, 0.036794 +01:10:03, 1098.3, 878.9,-0.063479, 0.035299 +01:15:08, 1097.7, 877.5,-0.06252, 0.036833 +01:20:16, 1096.9, 880.2,-0.059832, 0.033268 +01:25:22, 1096.6, 878.3,-0.062183, 0.035198 +01:30:29, 1099.5, 877.6,-0.065986, 0.034114 +01:35:36, 1097.2, 879.4,-0.062591, 0.034039 +01:40:42, 1098.8, 878.7,-0.057664, 0.03431 +01:45:48, 1098, 878.6,-0.056329, 0.035506 +01:50:54, 1097.2, 877.7,-0.059495, 0.03825 +01:56:00, 1097.1, 878.8,-0.06187, 0.035319 +02:01:06, 1100.4, 877.8,-0.050598, 0.039153 +02:06:13, 1095.9, 879.8,-0.072556, 0.033639 +02:11:19, 1093.3, 877.8,-0.066548, 0.036513 +02:16:26, 1096.2, 877.9,-0.070999, 0.035202 +02:21:32, 1095.1, 879.1,-0.075426, 0.03017 +02:26:39, 1096.6, 878.4,-0.06107, 0.034835 +02:31:47, 1094.6, 877,-0.079564, 0.034497 +02:36:52, 1093.4, 876.3,-0.074446, 0.03348 +02:41:58, 1094.7, 876.8,-0.060807, 0.036994 +02:47:04, 1093.1, 876.6,-0.068357, 0.037341 +02:52:10, 1096.6, 877.6,-0.064314, 0.038357 +02:57:18, 1096.6, 878,-0.069532, 0.036905 +03:02:24, 1095, 878.6,-0.062256, 0.037013 +03:07:31, 1095.6, 878.8,-0.067727, 0.036823 +03:12:37, 1093.3, 878.9,-0.077432, 0.034467 +03:17:43, 1094.7, 877.6,-0.065401, 0.034343 +03:22:50, 1096.1, 879.2,-0.070851, 0.034334 +03:27:57, 1094.1, 879,-0.067534, 0.0343 +03:33:05, 1096.7, 877.7,-0.067384, 0.036214 +03:38:13, 1092, 879.3,-0.07331, 0.031179 +03:43:20, 1091.2, 877.8,-0.084606, 0.033658 +03:48:26, 1094.1, 877.5,-0.076603, 0.034474 +03:53:32, 1096.2, 877.8,-0.06236, 0.035214 +03:58:38, 1092.8, 877.2,-0.067829, 0.038182 +04:03:43, 1091.7, 878.3,-0.077367, 0.03589 +04:08:49, 1093.5, 876.9,-0.062241, 0.035776 +04:13:55, 1093.2, 877.5,-0.068524, 0.03702 +04:19:01, 1092.1, 877.7,-0.070266, 0.038713 +04:24:06, 1091.4, 877.3,-0.068818, 0.037419 +04:29:14, 1092.1, 876.6,-0.076505, 0.037539 +04:34:21, 1091, 877.8,-0.074625, 0.036015 +04:39:29, 1093, 876.5,-0.078857, 0.036288 +04:44:37, 1090.3, 878,-0.075081, 0.03482 +04:49:43, 1089.5, 876.3,-0.075537, 0.03662 +04:54:48, 1089, 876.2,-0.072292, 0.037192 +04:59:54, 1088.9, 876.1,-0.069099, 0.036205 +05:01:19, 1085.2, 879.8,-0.089858, 0.029898 +05:06:27, 1084.8, 878.6,-0.11746, 0.032844 +05:11:35, 1085.8, 880.1,-0.095173, 0.034515 +05:16:42, 1085.8, 880,-0.11522, 0.03181 +05:21:48, 1085.3, 880.2,-0.096485, 0.028819 +05:26:54, 1085.4, 879.2,-0.10018, 0.033464 +05:31:59, 1083.6, 877.8,-0.10519, 0.035801 +05:37:05, 1083.9, 876.7,-0.10184, 0.037695 +05:42:13, 1084.8, 878.7,-0.11544, 0.031789 +05:47:18, 1082.4, 878.3,-0.12281, 0.0355 +05:52:24, 1085.2, 879.5,-0.11633, 0.035254 +05:57:30, 1083.6, 879.3,-0.10228, 0.034844 +06:02:36, 1084.9, 878.1,-0.10548, 0.039 +06:07:43, 1086.7, 879.4,-0.11735, 0.035257 +06:12:51, 1084.7, 879,-0.096472, 0.036453 +06:17:57, 1082, 881.2,-0.10718, 0.032353 +06:23:05, 1083.2, 879.9,-0.12451, 0.033221 +06:28:10, 1084.5, 879.9,-0.10073, 0.037029 +06:33:16, 1086.2, 880.4,-0.099724, 0.034742 +06:38:23, 1085.8, 880.2,-0.11435, 0.034298 +06:43:29, 1084.4, 879.8,-0.11895, 0.034462 +06:48:35, 1081.6, 880.9,-0.10867, 0.030497 +06:53:41, 1082, 879.8,-0.10593, 0.033209 +06:58:47, 1085, 878.8,-0.10886, 0.036345 +07:03:54, 1081.9, 877.9,-0.12135, 0.035835 +07:09:00, 1088.1, 879.9,-0.10444, 0.031292 +07:14:07, 1080.5, 879.9,-0.12658, 0.031595 +07:19:13, 1080.3, 879.5,-0.12783, 0.031302 +07:24:21, 1082, 880.1,-0.1034, 0.033087 +07:29:27, 1080.1, 878.6,-0.1072, 0.034435 +07:34:34, 1082.7, 879.1,-0.12635, 0.032225 +07:39:39, 1080.4, 879.7,-0.11149, 0.033945 +07:44:45, 1081.6, 878,-0.11343, 0.033964 +07:49:51, 1080.8, 877.5,-0.11568, 0.036602 +07:54:57, 1082.1, 877.4,-0.10876, 0.036709 +08:00:02, 1083.3, 879.8,-0.10757, 0.032981 +08:05:09, 1083.4, 878.2,-0.10264, 0.036 +08:10:14, 1080.8, 879.2,-0.11003, 0.03398 +08:15:20, 1082.4, 878.3,-0.1161, 0.03375 +08:20:26, 1081.1, 878.7,-0.10953, 0.033336 +08:25:32, 1081.5, 875.8,-0.12031, 0.036639 +08:30:37, 1081.9, 878.1,-0.11083, 0.036778 +08:35:43, 1081.2, 878.5,-0.11116, 0.034261 +08:40:51, 1083.7, 878.7,-0.12381, 0.034651 +08:45:57, 1081.6, 880,-0.11309, 0.033298 +08:51:04, 1081.9, 878.6,-0.12726, 0.033666 +08:56:10, 1082.3, 880,-0.10964, 0.031341 +09:01:16, 1081, 880.7,-0.11554, 0.030422 +09:06:22, 1081.9, 878.7,-0.11291, 0.035648 +09:11:28, 1082.8, 879.4,-0.10992, 0.035585 +09:16:34, 1081.7, 882,-0.114, 0.032917 +09:21:42, 1081, 879.7,-0.12921, 0.033436 +09:26:47, 1083, 879.6,-0.10846, 0.033416 +09:31:53, 1079.4, 877.3,-0.11919, 0.036546 +09:36:59, 1081.3, 878,-0.11206, 0.034952 +09:42:05, 1082.3, 877.4,-0.10946, 0.037359 +09:47:11, 1080.8, 878.4,-0.11578, 0.033721 +09:52:17, 1082.6, 877.5,-0.11174, 0.034509 +09:57:24, 1079.7, 879.5,-0.1327, 0.032061 +10:02:30, 1079.3, 876.9,-0.12054, 0.035242 +10:07:35, 1078.6, 876.5,-0.11343, 0.03723 +10:12:41, 1078.1, 874.7,-0.11949, 0.03935 +10:17:47, 1076.4, 877.4,-0.12557, 0.034068 +10:22:52, 1077.2, 876.5,-0.11696, 0.03674 +10:27:58, 1076, 876.6,-0.11708, 0.037681 +10:33:06, 1075.2, 874.9,-0.13592, 0.03779 +10:38:12, 1074.8, 878.8,-0.11876, 0.034751 +10:43:18, 1072.8, 877,-0.12729, 0.035958 +10:48:24, 1073.6, 874.5,-0.12293, 0.038995 +10:53:32, 1073.9, 876.6,-0.14351, 0.031106 +10:58:38, 1075.3, 876.3,-0.14305, 0.035249 diff --git a/pxii_bec/macros/luts/beampos/beampos_0207.csv b/pxii_bec/macros/luts/beampos/beampos_0207.csv new file mode 100644 index 0000000..900d77c --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_0207.csv @@ -0,0 +1,57 @@ +Beam size: focus, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y +22:44:24, 1047.8, 984.4 +22:54:27, 1042.3, 990.1 +23:04:31, 1039.3, 993.6 +23:14:34, 1036, 996.9 +23:24:38, 1033.6, 998.3 +23:34:41, 1033.2, 998.5 +23:44:44, 1032.5, 1000 +23:54:48, 1030.5, 1001 +00:04:51, 1029.6, 1003 +00:14:54, 1029.4, 1003 +00:24:57, 1028.2, 1004 +00:35:00, 1028.4, 1005 +00:45:04, 1030, 1008 +00:55:07, 1027.9, 1006 +01:05:10, 1027.5, 1009 +01:15:13, 1029.1, 1008 +01:25:17, 1028, 1008 +01:35:20, 1027.3, 1010 +01:45:23, 1029.6, 1011 +01:55:27, 1029, 1011 +02:05:30, 1026, 1011 +02:15:33, 1029.5, 1011 +02:25:36, 1028.3, 1011 +02:35:40, 1027.9, 1012 +02:45:43, 1027.7, 1013 +02:55:46, 1028.2, 1012 +03:05:49, 1027.2, 1014 +03:15:53, 1028.5, 1012 +03:25:56, 1025.8, 1014 +03:35:59, 1030.8, 1015 +03:46:02, 1028.3, 1015 +03:56:05, 1025.8, 1016 +04:06:09, 1027, 1015 +04:16:12, 1029.3, 1018 +04:26:15, 1029.9, 1018 +04:36:19, 1029.3, 1015 +04:46:22, 1029.2, 1018 +04:56:25, 1029.5, 1015 +05:06:28, 1031.8, 1016 +05:16:31, 1032.3, 1015 +05:26:35, 1030.7, 1017 +05:36:38, 1030.7, 1018 +05:46:41, 1030.2, 1017 +05:56:44, 1031.5, 1019 +06:06:48, 1029.3, 1018 +06:16:52, 1030.7, 1021 +06:26:55, 1031.5, 1019 +06:36:58, 1028.6, 1023 +06:47:01, 1027.9, 1021 +06:57:05, 1029.2, 1022 +07:07:08, 1028.6, 1022 +07:17:11, 1026.2, 1021 +07:27:14, 1028.7, 1022 +07:37:18, 1028.1, 1022 +07:47:21, 1029.4, 1020 diff --git a/pxii_bec/macros/luts/beampos/beampos_17071707.csv b/pxii_bec/macros/luts/beampos/beampos_17071707.csv new file mode 100644 index 0000000..ccbc557 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_17071707.csv @@ -0,0 +1,71 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +17:07:55, 1081.5, 865.8,-0.10403, 0.046367 +17:13:03, 1082.7, 866.4,-0.11939, 0.050761 +17:18:09, 1085.1, 870.1,-0.11518, 0.046755 +17:23:14, 1087.3, 871.1,-0.094016, 0.046281 +17:28:20, 1085.3, 872,-0.10154, 0.043894 +17:33:27, 1086.7, 871.3,-0.098555, 0.048176 +17:38:32, 1090.3, 874.1,-0.091664, 0.043092 +17:43:40, 1087.9, 873,-0.11371, 0.043823 +17:48:46, 1087.3, 874.7,-0.095203, 0.040304 +17:53:55, 1087.9, 875.3,-0.08925, 0.044265 +17:59:04, 1061.6, 872.7,-0.10805, 0.037891 +18:04:14, 1091.5, 876.4,-0.093787, 0.043133 +18:09:20, 1088.4, 877.4,-0.096473, 0.041942 +18:14:27, 1090.8, 877.3,-0.11096, 0.0401 +18:19:37, 1090.5, 880.1,-0.099086, 0.038092 +18:24:43, 1090.9, 879.8,-0.11313, 0.036666 +18:29:50, 1091.5, 881.2,-0.096125, 0.03569 +18:34:56, 1089.2, 880.3,-0.10161, 0.038647 +18:40:02, 1091.5, 883.7,-0.096326, 0.03126 +18:45:08, 1091.5, 882,-0.093638, 0.037376 +18:50:15, 1093.6, 883.5,-0.10822, 0.03282 +18:55:22, 1092.2, 880.7,-0.097546, 0.036702 +19:00:28, 1091.7, 882.1,-0.099781, 0.038295 +19:05:34, 1091.1, 882.5,-0.10108, 0.036448 +19:10:40, 1091.8, 884.3,-0.098202, 0.032866 +19:15:46, 1091.8, 883.2,-0.096186, 0.032321 +19:20:53, 1092.8, 883.4,-0.11828, 0.029995 +19:26:01, 1091.5, 885,-0.095478, 0.031696 +19:31:07, 1094.2, 885.1,-0.094126, 0.031878 +19:36:13, 1094.2, 883.9,-0.094852, 0.035436 +19:41:21, 1093.2, 884.2,-0.11022, 0.031471 +19:46:27, 1093.4, 884.6,-0.093274, 0.031055 +19:51:34, 1092.1, 883.2,-0.11996, 0.030071 +19:56:40, 1094.7, 883.5,-0.090561, 0.032072 +20:01:46, 1090.9, 883.1,-0.093273, 0.034408 +20:06:53, 1091.3, 880.8,-0.10919, 0.036667 +20:12:01, 1095.9, 882.3,-0.087907, 0.033331 +20:17:08, 1093.4, 883.8,-0.11177, 0.027881 +20:22:16, 1090.5, 883.4,-0.099112, 0.029205 +20:27:21, 1091.5, 883.1,-0.093811, 0.029466 +20:32:27, 1091, 883.2,-0.096633, 0.030197 +20:37:35, 1089.9, 881.2,-0.11515, 0.031255 +20:42:43, 1091.8, 883.1,-0.096172, 0.030463 +20:47:50, 1092.4, 884.6,-0.10933, 0.028769 +20:52:56, 1092.8, 880.8,-0.10945, 0.033085 +20:58:02, 1091.9, 883.7,-0.11175, 0.029983 +21:03:11, 1091.2, 880.8,-0.091632, 0.030885 +21:08:17, 1091.7, 883.6,-0.10002, 0.030234 +21:13:24, 1090, 880.9,-0.11468, 0.033629 +21:18:33, 1092, 880.4,-0.089628, 0.033297 +21:23:38, 1094.2, 882.4,-0.087731, 0.033577 +21:28:44, 1092.7, 881.6,-0.096102, 0.03349 +21:33:50, 1094.8, 883.8,-0.090251, 0.02944 +21:38:56, 1096.3, 883.9,-0.090513, 0.03052 +21:44:03, 1093, 882.9,-0.11005, 0.030832 +21:49:09, 1092.4, 882.5,-0.087522, 0.03369 +21:54:15, 1094.1, 884.4,-0.091044, 0.030247 +21:59:22, 1095.2, 886.1,-0.10962, 0.024788 +22:04:30, 1094.6, 883.9,-0.089036, 0.031714 +22:09:36, 1090.9, 883.6,-0.095784, 0.028957 +22:14:44, 1091.7, 885.4,-0.10729, 0.027359 +22:19:51, 1092.7, 884.2,-0.091738, 0.029183 +22:24:59, 1092.9, 882.2,-0.11385, 0.030234 +22:30:08, 1093.3, 884.4,-0.093892, 0.029451 +22:35:14, 1095.9, 884.5,-0.086609, 0.029973 +22:40:19, 1094.8, 885.4,-0.086979, 0.026603 +22:45:25, 1092.6, 885.5,-0.093908, 0.028651 +22:50:33, 1095, 883.2,-0.10473, 0.028907 +22:55:39, 1094.6, 883.6,-0.10637, 0.030962 diff --git a/pxii_bec/macros/luts/beampos/beampos_17072256.csv b/pxii_bec/macros/luts/beampos/beampos_17072256.csv new file mode 100644 index 0000000..c3105d4 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_17072256.csv @@ -0,0 +1,74 @@ +Beam size: 25 x 25, Energy: 16000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +22:57:15, 1098, 878.9,-0.073165, 0.035505 +23:02:23, 1097.6, 879.1,-0.064012, 0.034825 +23:07:29, 1101.1, 878.5,-0.053059, 0.036454 +23:12:35, 1096.5, 879.9,-0.056435, 0.032432 +23:17:41, 1097.2, 878.2,-0.061311, 0.032143 +23:22:48, 1100, 879.4,-0.060269, 0.03079 +23:27:54, 1098.7, 878.3,-0.051592, 0.03348 +23:33:02, 1096.6, 879,-0.066266, 0.031853 +23:38:09, 1097.7, 878.8,-0.048859, 0.032677 +23:43:15, 1098.5, 877.5,-0.05091, 0.036148 +23:48:21, 1101.6, 878.2,-0.046499, 0.033352 +23:53:26, 1097.4, 878.7,-0.057467, 0.032821 +23:58:32, 1099.4, 876.8,-0.049522, 0.037438 +00:03:38, 1098.7, 877.7,-0.052748, 0.034827 +00:08:46, 1098.4, 877.9,-0.062436, 0.031424 +00:13:54, 1096.8, 877.8,-0.056041, 0.03579 +00:19:01, 1098.5, 879,-0.058908, 0.03372 +00:24:06, 1097.7, 879.9,-0.058404, 0.030124 +00:29:12, 1097.9, 877.7,-0.060684, 0.036442 +00:34:18, 1097.2, 878.2,-0.064929, 0.034695 +00:39:24, 1097.9, 878.6,-0.058925, 0.032791 +00:44:30, 1099.8, 878.8,-0.052343, 0.03565 +00:49:37, 1095.6, 875.9,-0.072043, 0.035027 +00:54:43, 1099.6, 879.7,-0.051911, 0.03431 +00:59:50, 1096.5, 880.1,-0.068103, 0.032352 +01:04:55, 1096.7, 877.9,-0.063349, 0.036794 +01:10:03, 1098.3, 878.9,-0.063479, 0.035299 +01:15:08, 1097.7, 877.5,-0.06252, 0.036833 +01:20:16, 1096.9, 880.2,-0.059832, 0.033268 +01:25:22, 1096.6, 878.3,-0.062183, 0.035198 +01:30:29, 1099.5, 877.6,-0.065986, 0.034114 +01:35:36, 1097.2, 879.4,-0.062591, 0.034039 +01:40:42, 1098.8, 878.7,-0.057664, 0.03431 +01:45:48, 1098, 878.6,-0.056329, 0.035506 +01:50:54, 1097.2, 877.7,-0.059495, 0.03825 +01:56:00, 1097.1, 878.8,-0.06187, 0.035319 +02:01:06, 1100.4, 877.8,-0.050598, 0.039153 +02:06:13, 1095.9, 879.8,-0.072556, 0.033639 +02:11:19, 1093.3, 877.8,-0.066548, 0.036513 +02:16:26, 1096.2, 877.9,-0.070999, 0.035202 +02:21:32, 1095.1, 879.1,-0.075426, 0.03017 +02:26:39, 1096.6, 878.4,-0.06107, 0.034835 +02:31:47, 1094.6, 877,-0.079564, 0.034497 +02:36:52, 1093.4, 876.3,-0.074446, 0.03348 +02:41:58, 1094.7, 876.8,-0.060807, 0.036994 +02:47:04, 1093.1, 876.6,-0.068357, 0.037341 +02:52:10, 1096.6, 877.6,-0.064314, 0.038357 +02:57:18, 1096.6, 878,-0.069532, 0.036905 +03:02:24, 1095, 878.6,-0.062256, 0.037013 +03:07:31, 1095.6, 878.8,-0.067727, 0.036823 +03:12:37, 1093.3, 878.9,-0.077432, 0.034467 +03:17:43, 1094.7, 877.6,-0.065401, 0.034343 +03:22:50, 1096.1, 879.2,-0.070851, 0.034334 +03:27:57, 1094.1, 879,-0.067534, 0.0343 +03:33:05, 1096.7, 877.7,-0.067384, 0.036214 +03:38:13, 1092, 879.3,-0.07331, 0.031179 +03:43:20, 1091.2, 877.8,-0.084606, 0.033658 +03:48:26, 1094.1, 877.5,-0.076603, 0.034474 +03:53:32, 1096.2, 877.8,-0.06236, 0.035214 +03:58:38, 1092.8, 877.2,-0.067829, 0.038182 +04:03:43, 1091.7, 878.3,-0.077367, 0.03589 +04:08:49, 1093.5, 876.9,-0.062241, 0.035776 +04:13:55, 1093.2, 877.5,-0.068524, 0.03702 +04:19:01, 1092.1, 877.7,-0.070266, 0.038713 +04:24:06, 1091.4, 877.3,-0.068818, 0.037419 +04:29:14, 1092.1, 876.6,-0.076505, 0.037539 +04:34:21, 1091, 877.8,-0.074625, 0.036015 +04:39:29, 1093, 876.5,-0.078857, 0.036288 +04:44:37, 1090.3, 878,-0.075081, 0.03482 +04:49:43, 1089.5, 876.3,-0.075537, 0.03662 +04:54:48, 1089, 876.2,-0.072292, 0.037192 +04:59:54, 1088.9, 876.1,-0.069099, 0.036205 diff --git a/pxii_bec/macros/luts/beampos/beampos_18070501.csv b/pxii_bec/macros/luts/beampos/beampos_18070501.csv new file mode 100644 index 0000000..02babb8 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_18070501.csv @@ -0,0 +1,73 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +05:01:19, 1085.2, 879.8,-0.089858, 0.029898 +05:06:27, 1084.8, 878.6,-0.11746, 0.032844 +05:11:35, 1085.8, 880.1,-0.095173, 0.034515 +05:16:42, 1085.8, 880,-0.11522, 0.03181 +05:21:48, 1085.3, 880.2,-0.096485, 0.028819 +05:26:54, 1085.4, 879.2,-0.10018, 0.033464 +05:31:59, 1083.6, 877.8,-0.10519, 0.035801 +05:37:05, 1083.9, 876.7,-0.10184, 0.037695 +05:42:13, 1084.8, 878.7,-0.11544, 0.031789 +05:47:18, 1082.4, 878.3,-0.12281, 0.0355 +05:52:24, 1085.2, 879.5,-0.11633, 0.035254 +05:57:30, 1083.6, 879.3,-0.10228, 0.034844 +06:02:36, 1084.9, 878.1,-0.10548, 0.039 +06:07:43, 1086.7, 879.4,-0.11735, 0.035257 +06:12:51, 1084.7, 879,-0.096472, 0.036453 +06:17:57, 1082, 881.2,-0.10718, 0.032353 +06:23:05, 1083.2, 879.9,-0.12451, 0.033221 +06:28:10, 1084.5, 879.9,-0.10073, 0.037029 +06:33:16, 1086.2, 880.4,-0.099724, 0.034742 +06:38:23, 1085.8, 880.2,-0.11435, 0.034298 +06:43:29, 1084.4, 879.8,-0.11895, 0.034462 +06:48:35, 1081.6, 880.9,-0.10867, 0.030497 +06:53:41, 1082, 879.8,-0.10593, 0.033209 +06:58:47, 1085, 878.8,-0.10886, 0.036345 +07:03:54, 1081.9, 877.9,-0.12135, 0.035835 +07:09:00, 1088.1, 879.9,-0.10444, 0.031292 +07:14:07, 1080.5, 879.9,-0.12658, 0.031595 +07:19:13, 1080.3, 879.5,-0.12783, 0.031302 +07:24:21, 1082, 880.1,-0.1034, 0.033087 +07:29:27, 1080.1, 878.6,-0.1072, 0.034435 +07:34:34, 1082.7, 879.1,-0.12635, 0.032225 +07:39:39, 1080.4, 879.7,-0.11149, 0.033945 +07:44:45, 1081.6, 878,-0.11343, 0.033964 +07:49:51, 1080.8, 877.5,-0.11568, 0.036602 +07:54:57, 1082.1, 877.4,-0.10876, 0.036709 +08:00:02, 1083.3, 879.8,-0.10757, 0.032981 +08:05:09, 1083.4, 878.2,-0.10264, 0.036 +08:10:14, 1080.8, 879.2,-0.11003, 0.03398 +08:15:20, 1082.4, 878.3,-0.1161, 0.03375 +08:20:26, 1081.1, 878.7,-0.10953, 0.033336 +08:25:32, 1081.5, 875.8,-0.12031, 0.036639 +08:30:37, 1081.9, 878.1,-0.11083, 0.036778 +08:35:43, 1081.2, 878.5,-0.11116, 0.034261 +08:40:51, 1083.7, 878.7,-0.12381, 0.034651 +08:45:57, 1081.6, 880,-0.11309, 0.033298 +08:51:04, 1081.9, 878.6,-0.12726, 0.033666 +08:56:10, 1082.3, 880,-0.10964, 0.031341 +09:01:16, 1081, 880.7,-0.11554, 0.030422 +09:06:22, 1081.9, 878.7,-0.11291, 0.035648 +09:11:28, 1082.8, 879.4,-0.10992, 0.035585 +09:16:34, 1081.7, 882,-0.114, 0.032917 +09:21:42, 1081, 879.7,-0.12921, 0.033436 +09:26:47, 1083, 879.6,-0.10846, 0.033416 +09:31:53, 1079.4, 877.3,-0.11919, 0.036546 +09:36:59, 1081.3, 878,-0.11206, 0.034952 +09:42:05, 1082.3, 877.4,-0.10946, 0.037359 +09:47:11, 1080.8, 878.4,-0.11578, 0.033721 +09:52:17, 1082.6, 877.5,-0.11174, 0.034509 +09:57:24, 1079.7, 879.5,-0.1327, 0.032061 +10:02:30, 1079.3, 876.9,-0.12054, 0.035242 +10:07:35, 1078.6, 876.5,-0.11343, 0.03723 +10:12:41, 1078.1, 874.7,-0.11949, 0.03935 +10:17:47, 1076.4, 877.4,-0.12557, 0.034068 +10:22:52, 1077.2, 876.5,-0.11696, 0.03674 +10:27:58, 1076, 876.6,-0.11708, 0.037681 +10:33:06, 1075.2, 874.9,-0.13592, 0.03779 +10:38:12, 1074.8, 878.8,-0.11876, 0.034751 +10:43:18, 1072.8, 877,-0.12729, 0.035958 +10:48:24, 1073.6, 874.5,-0.12293, 0.038995 +10:53:32, 1073.9, 876.6,-0.14351, 0.031106 +10:58:38, 1075.3, 876.3,-0.14305, 0.035249 diff --git a/pxii_bec/macros/luts/beampos/beampos_18071135.csv b/pxii_bec/macros/luts/beampos/beampos_18071135.csv new file mode 100644 index 0000000..767fc02 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_18071135.csv @@ -0,0 +1,78 @@ +Beam size: 25 x 25, Energy: 10000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +11:35:45, 1062.5, 868.9,-0.11896, 0.01887 +11:40:52, 1063, 871.8,-0.12142, 0.014688 +11:45:58, 1066.9, 874.7,-0.12046, 0.0086598 +11:51:04, 1068, 876.4,-0.1167, 0.017193 +11:56:10, 1068.1, 874.4,-0.12148, 0.018058 +12:01:16, 1068.2, 878.5,-0.11942, 0.008117 +12:06:22, 1068.7, 878,-0.12182, 0.0070722 +12:11:28, 1070.3, 876.5,-0.12096, 0.013999 +12:16:34, 1070.5, 874.9,-0.11751, 0.020493 +12:21:40, 1075.6, 877.7,-0.11723, 0.018245 +12:26:46, 1071.5, 881.7,-0.12407, 0.0088893 +12:31:51, 1071, 879.9,-0.1276, 0.01151 +12:36:58, 1070.4, 882.6,-0.12483, 0.0062113 +12:42:04, 1072.2, 880.9,-0.11932, 0.0076498 +12:47:09, 1073.2, 882.1,-0.11921, 0.0075093 +12:52:15, 1071.3, 881.3,-0.12551, 0.015369 +12:57:21, 1073.9, 880.4,-0.11533, 0.011686 +13:02:27, 1074.1, 879.6,-0.12139, 0.012885 +13:07:33, 1073.4, 881.4,-0.12404, 0.009902 +13:12:39, 1076.1, 881.6,-0.12028, 0.011644 +13:17:45, 1077.2, 883.2,-0.11862, 0.0070691 +13:22:51, 1075, 879.1,-0.1205, 0.016371 +13:27:57, 1077, 879.8,-0.11828, 0.013926 +13:33:03, 1077.7, 882.4,-0.11576, 0.008192 +13:38:09, 1076, 880.3,-0.12159, 0.014465 +13:43:15, 1077.1, 881.2,-0.12135, 0.013428 +13:48:21, 1077.2, 882.7,-0.11629, 0.0082309 +13:53:27, 1078.9, 883.6,-0.12406, 0.0064463 +13:58:33, 1076.2, 882.8,-0.11756, 0.0078457 +14:03:38, 1076.6, 881.5,-0.11809, 0.012274 +14:08:44, 1077.1, 883.7,-0.12376, 0.0075757 +14:13:50, 1075, 883.6,-0.11847, 0.0069435 +14:18:56, 1075.7, 881.3,-0.1204, 0.011577 +14:24:01, 1076.4, 881,-0.12215, 0.012281 +14:29:07, 1075.7, 881.6,-0.12133, 0.0040628 +14:34:13, 1075.9, 882.5,-0.11678, 0.0065513 +14:39:19, 1077.6, 880.5,-0.11551, 0.011332 +14:44:24, 1075.9, 881.1,-0.12023, 0.013476 +14:49:31, 1076.8, 881.9,-0.11705, 0.011102 +14:54:37, 1076.8, 881.6,-0.11483, 0.016159 +14:59:42, 1077.6, 880.7,-0.1214, 0.013621 +15:04:48, 1077.1, 884.1,-0.11704, 0.0070347 +15:09:54, 1076.7, 882.3,-0.11226, 0.011983 +15:15:00, 1076.1, 884.4,-0.11965, 0.0086288 +15:20:05, 1077, 883.2,-0.1144, 0.0095036 +15:25:11, 1077, 884,-0.11607, 0.0082163 +15:30:17, 1076.5, 883.6,-0.12069, 0.0088895 +15:35:23, 1075.8, 883.5,-0.11596, 0.011014 +15:40:29, 1079, 885.1,-0.11446, 0.011612 +15:45:35, 1078.8, 886.3,-0.11167, 0.0078587 +15:50:40, 1079.9, 884.1,-0.11666, 0.01034 +15:55:46, 1080.4, 883.7,-0.11024, 0.010066 +16:00:52, 1079.9, 883.7,-0.10819, 0.012905 +16:05:58, 1080.4, 888,-0.11271, 0.0021722 +16:11:03, 1079.3, 886.7,-0.11757, 0.0040589 +16:16:09, 1080.2, 888.7,-0.11446,-0.00084994 +16:21:15, 1082.1, 885.8,-0.10947, 0.0059782 +16:26:21, 1079, 887.4,-0.11827, 0.0029425 +16:31:27, 1078.7, 884.6,-0.11141, 0.011771 +16:36:33, 1077.1, 884.2,-0.11274, 0.01089 +16:41:38, 1074.7, 885.6,-0.11916, 0.009934 +16:46:44, 1080.6, 885.5,-0.11678, 0.0076036 +16:51:50, 1079.1, 885.6,-0.11783, 0.011119 +16:56:56, 1078, 887.1,-0.11665, 0.002222 +17:02:01, 1076.9, 890.7,-0.11545,-0.0045117 +17:07:07, 1079.2, 888.5,-0.11464,-0.00083601 +17:12:13, 1082.5, 888.5,-0.12047, 0.0023168 +17:17:19, 1082.7, 887.6,-0.1125, 0.0030391 +17:22:25, 1080, 887.3,-0.11396, 0.0045574 +17:27:30, 1078.2, 885.6,-0.12064, 0.0084515 +17:32:36, 1077.3, 887.1,-0.11613, 0.0062257 +17:37:42, 1077.5, 887.9,-0.11352, 0.0050877 +17:42:47, 1078.6, 886.5,-0.11666, 0.0073078 +17:47:53, 1078.3, 888.1,-0.1172, 0.0044806 +17:52:59, 1078.8, 887,-0.11465, 0.0042768 +17:58:05, 1080, 887.5,-0.11797, 0.0057352 diff --git a/pxii_bec/macros/luts/beampos/beampos_18071800.csv b/pxii_bec/macros/luts/beampos/beampos_18071800.csv new file mode 100644 index 0000000..c1d67cb --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_18071800.csv @@ -0,0 +1,73 @@ +Beam size: 25 x 25, Energy: 7000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +18:00:23, 1087.2, 898.9,-0.11289,-0.056702 +18:05:30, 1088, 898.7,-0.111,-0.051116 +18:10:37, 1087.9, 896,-0.11463,-0.044413 +18:15:43, 1090, 896,-0.11563,-0.048558 +18:20:52, 1089.9, 896.9,-0.11147,-0.044115 +18:25:58, 1085.8, 892.7,-0.10464,-0.0304 +18:31:05, 1086.2, 895.8,-0.12132,-0.050184 +18:36:14, 1089.8, 893.1,-0.10226,-0.02751 +18:41:21, 1087, 894.2,-0.13051,-0.030585 +18:46:28, 1088.4, 895.3,-0.10238,-0.033711 +18:51:35, 1083.4, 890,-0.13426,-0.022771 +18:56:44, 1085.7, 893,-0.11405,-0.025597 +19:01:50, 1083.2, 890.6,-0.10936,-0.021125 +19:06:57, 1083.4, 890.7,-0.13996,-0.018376 +19:12:03, 1080.4, 889.6,-0.14768,-0.015343 +19:17:11, 1083.1, 888,-0.13984,-0.010937 +19:22:17, 1085.1, 887.1,-0.13604,-0.0098507 +19:27:24, 1078.1, 886.3,-0.14872,-0.0083533 +19:32:29, 1081.7, 887.3,-0.14793,-0.0020641 +19:37:37, 1083.5, 886.1,-0.1435,-0.0031823 +19:42:44, 1081.8, 885.3,-0.14713, 0.00076525 +19:47:51, 1085.6, 886,-0.12325,-0.005586 +19:52:57, 1082.8, 884.8,-0.13169, 0.002535 +19:58:03, 1083.1, 886.6,-0.1433, 0.0036532 +20:03:10, 1081.4, 886.2,-0.14891, 0.0065452 +20:08:16, 1078, 886.3,-0.15479, 0.0044528 +20:13:22, 1080.5, 886.9,-0.15429, 0.00013618 +20:18:28, 1079, 884.5,-0.1563, 0.0046595 +20:23:35, 1081.3, 880.9,-0.12887, 0.023665 +20:28:45, 1074.5, 882.4,-0.14363, 0.01673 +20:33:52, 1081.6, 884.1,-0.14379, 0.011203 +20:38:59, 1078.5, 884.7,-0.16287, 0.0078645 +20:44:06, 1081.8, 883.3,-0.13597, 0.014495 +20:49:13, 1079.5, 879.7,-0.16022, 0.030429 +20:54:21, 1081.8, 883.6,-0.14835, 0.010793 +20:59:27, 1082.5, 882.8,-0.15187, 0.020659 +21:04:33, 1080.6, 880.2,-0.15458, 0.022691 +21:09:38, 1080.4, 881,-0.154, 0.022332 +21:14:44, 1080.6, 880.7,-0.13678, 0.021345 +21:19:51, 1080, 882.2,-0.16281, 0.022404 +21:25:01, 1081.1, 880.2,-0.15382, 0.029244 +21:30:07, 1081.6, 883.1,-0.15009, 0.021002 +21:35:12, 1079.6, 884.4,-0.13683, 0.013609 +21:40:19, 1079.3, 884.6,-0.16139, 0.013444 +21:45:27, 1082.5, 882.3,-0.13616, 0.028945 +21:50:33, 1080.2, 884.9,-0.14429, 0.014658 +21:55:40, 1079.5, 883.2,-0.15799, 0.023379 +22:00:46, 1077.2, 883.1,-0.15915, 0.020498 +22:05:52, 1077.9, 881,-0.16593, 0.021929 +22:10:59, 1080.8, 885.5,-0.13688, 0.012467 +22:16:06, 1079.8, 881.1,-0.16093, 0.034882 +22:21:15, 1081.7, 882.1,-0.13768, 0.026467 +22:26:24, 1078.9, 883.5,-0.15947, 0.025523 +22:31:30, 1078.6, 885.7,-0.16555, 0.017603 +22:36:37, 1077.1, 883.2,-0.17131, 0.023058 +22:41:43, 1078.5, 883.6,-0.16515, 0.030139 +22:46:51, 1079.4, 883.7,-0.16058, 0.026854 +22:51:58, 1077, 882.1,-0.16906, 0.030297 +22:57:06, 1081.5, 885.3,-0.15947, 0.016286 +23:02:13, 1075.3, 882.7,-0.17468, 0.021457 +23:07:20, 1078.5, 879.2,-0.15431, 0.036046 +23:12:26, 1081.2, 881.6,-0.1613, 0.0279 +23:17:32, 1079.9, 880.4,-0.16349, 0.030523 +23:22:39, 1074, 878.5,-0.17429, 0.047282 +23:27:46, 1079.2, 878.6,-0.14555, 0.041583 +23:32:54, 1078.3, 879.2,-0.16937, 0.037788 +23:38:01, 1078.4, 881,-0.15078, 0.029148 +23:43:07, 1077.3, 880.5,-0.16738, 0.030062 +23:48:13, 1074.1, 882.3,-0.16877, 0.021855 +23:53:20, 1078.4, 883.4,-0.16899, 0.017587 +23:58:28, 1080.1, 881.1,-0.16262, 0.025849 diff --git a/pxii_bec/macros/luts/beampos/beampos_19070000.csv b/pxii_bec/macros/luts/beampos/beampos_19070000.csv new file mode 100644 index 0000000..d2f25ff --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_19070000.csv @@ -0,0 +1,73 @@ +Beam size: 25 x 25, Energy: 9000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +00:00:27, 1096.2, 878.9,-0.10422, 0.051015 +00:05:33, 1102.6, 878.8,-0.10089, 0.047783 +00:10:40, 1094, 881.1,-0.10438, 0.042959 +00:15:47, 1094.1, 878.8,-0.088006, 0.042954 +00:20:53, 1095.7, 877.4,-0.095532, 0.047889 +00:25:59, 1094, 874.9,-0.090727, 0.046443 +00:31:05, 1098, 878,-0.081301, 0.046345 +00:36:11, 1094.9, 877.2,-0.084523, 0.045295 +00:41:17, 1093.3, 877.6,-0.083545, 0.041377 +00:46:23, 1095.3, 876.7,-0.084554, 0.04756 +00:51:29, 1098.2, 877.2,-0.075455, 0.047755 +00:56:35, 1098.1, 880.7,-0.076532, 0.037133 +01:01:41, 1099, 878.5,-0.080367, 0.044453 +01:06:47, 1097.9, 880.6,-0.071593, 0.038292 +01:11:54, 1099.6, 879.6,-0.069253, 0.044711 +01:17:00, 1097.4, 881.9,-0.072625, 0.040504 +01:22:06, 1099.9, 880.7,-0.075477, 0.041547 +01:27:12, 1102.9, 878.4,-0.069703, 0.045874 +01:32:18, 1108.7, 880.2,-0.072999, 0.035963 +01:37:25, 1101.4, 880.8,-0.071325, 0.039413 +01:42:31, 1096.4, 879.2,-0.080792, 0.045308 +01:47:39, 1102.2, 880.6,-0.078503, 0.042056 +01:52:44, 1099.1, 883.1,-0.068643, 0.03505 +01:57:50, 1099.6, 881.2,-0.075927, 0.042831 +02:02:57, 1097.3, 881.7,-0.075821, 0.043285 +02:08:02, 1097.4, 879.1,-0.077765, 0.048317 +02:13:08, 1098, 878.6,-0.080888, 0.046227 +02:18:16, 1103, 882.1,-0.069456, 0.042083 +02:23:21, 1100.2, 882.2,-0.07461, 0.042027 +02:28:27, 1099.5, 879.6,-0.072908, 0.045414 +02:33:34, 1098.6, 881.3,-0.072111, 0.045849 +02:38:42, 1101, 883.2,-0.075653, 0.037313 +02:43:48, 1100.5, 882.6,-0.074713, 0.042508 +02:48:56, 1100.7, 882.2,-0.068493, 0.04146 +02:54:03, 1099.2, 880.7,-0.073816, 0.043851 +02:59:09, 1100.2, 880.2,-0.071329, 0.045464 +03:04:16, 1099.9, 880.3,-0.074841, 0.044893 +03:09:23, 1101.3, 880,-0.068119, 0.046967 +03:14:29, 1097.2, 884.4,-0.073234, 0.03653 +03:19:35, 1096.5, 882.6,-0.076674, 0.036552 +03:24:40, 1096, 878.9,-0.0746, 0.046635 +03:29:46, 1096.7, 880.2,-0.073988, 0.039682 +03:34:52, 1096.3, 877.9,-0.072519, 0.042302 +03:39:58, 1099, 878.2,-0.074265, 0.044691 +03:45:05, 1094.7, 879.3,-0.084827, 0.043503 +03:50:13, 1094.5, 876.9,-0.076947, 0.043621 +03:55:20, 1096.3, 877,-0.077052, 0.046556 +04:00:26, 1096.1, 875.4,-0.081599, 0.049468 +04:05:32, 1095.8, 879.7,-0.08487, 0.044777 +04:10:38, 1099.5, 877.9,-0.078693, 0.046543 +04:15:44, 1094.8, 874.8,-0.077996, 0.046238 +04:20:51, 1098.3, 875.9,-0.071925, 0.050462 +04:25:59, 1096.8, 875.8,-0.074895, 0.042541 +04:31:08, 1097.6, 876.7,-0.080193, 0.047458 +04:36:17, 1060.5, 874.7,-0.07387, 0.046123 +04:41:25, 1094.3, 877.1,-0.07925, 0.046501 +04:46:31, 1093.3, 877.2,-0.082028, 0.043891 +04:51:36, 1094.5, 874.9,-0.082283, 0.046545 +04:56:42, 1095.8, 878.3,-0.07603, 0.044235 +05:01:49, 1096.9, 879.6,-0.08036, 0.046302 +05:06:56, 1096.5, 878,-0.080912, 0.047365 +05:12:02, 1099.7, 877.8,-0.075186, 0.047222 +05:17:09, 1096.9, 879.2,-0.085779, 0.045361 +05:22:15, 1096.3, 876.7,-0.085266, 0.0484 +05:27:25, 1105.3, 879.2,-0.078254, 0.049087 +05:32:34, 1055.9, 875.9,-0.078914, 0.046331 +05:37:43, 1096.4, 878.3,-0.078052, 0.044381 +05:42:48, 1095.1, 877.8,-0.082107, 0.045591 +05:47:55, 1094.4, 877.6,-0.082593, 0.047571 +05:53:02, 1095.1, 877.7,-0.078357, 0.044259 +05:58:08, 1096.3, 878.5,-0.080765, 0.041253 diff --git a/pxii_bec/macros/luts/beampos/beampos_19070559.csv b/pxii_bec/macros/luts/beampos/beampos_19070559.csv new file mode 100644 index 0000000..79e742e --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_19070559.csv @@ -0,0 +1,73 @@ +Beam size: 25 x 25, Energy: 12670 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +06:00:03, 1089.8, 870.1,-0.075726, 0.057242 +06:05:12, 1090.6, 870.9,-0.054504, 0.056696 +06:10:18, 1090.4, 872.6,-0.056052, 0.050934 +06:15:24, 1090.8, 869.6,-0.056711, 0.056018 +06:20:29, 1093.2, 872.5,-0.048436, 0.052689 +06:25:35, 1092.2, 873.8,-0.046384, 0.048112 +06:30:42, 1090.7, 872.3,-0.064578, 0.047664 +06:35:50, 1095.3, 873.3,-0.039321, 0.049451 +06:40:57, 1094.3, 872.4,-0.061085, 0.051917 +06:46:03, 1096, 875.1,-0.053488, 0.045762 +06:51:11, 1094.1, 875,-0.038676, 0.047646 +06:56:17, 1093.7, 874.8,-0.035873, 0.045234 +07:01:23, 1095.8, 874.1,-0.032996, 0.047143 +07:06:29, 1094.1, 875.8,-0.060449, 0.038967 +07:11:35, 1093.5, 875.3,-0.064064, 0.041099 +07:16:41, 1097, 874.2,-0.034394, 0.045616 +07:21:48, 1097.3, 875.6,-0.045313, 0.042338 +07:26:54, 1098.6, 878.8,-0.025292, 0.039332 +07:32:01, 1096.2, 875.6,-0.051904, 0.044109 +07:37:07, 1096.8, 879.8,-0.040263, 0.036713 +07:42:13, 1097.7, 879.3,-0.047349, 0.03665 +07:47:18, 1098.4, 879.1,-0.032718, 0.03625 +07:52:24, 1096.7, 878.6,-0.059916, 0.036537 +07:57:34, 1096.2, 878,-0.057346, 0.036411 +08:02:43, 1076.4, 873.3,-0.05637, 0.037097 +08:07:52, 1097.4, 876.4,-0.03254, 0.043524 +08:13:00, 1094.7, 875.4,-0.059477, 0.044236 +08:18:06, 1096.5, 874.3,-0.054567, 0.042628 +08:23:12, 1094.3, 873.6,-0.060655, 0.047918 +08:28:17, 1094.9, 872.7,-0.045298, 0.046942 +08:33:25, 1095.2, 873,-0.052788, 0.046684 +08:38:32, 1094.7, 874,-0.040514, 0.046534 +08:43:38, 1093, 876.4,-0.040237, 0.042712 +08:48:44, 1094.2, 874.1,-0.035634, 0.048417 +08:53:50, 1091.6, 874.4,-0.04272, 0.048589 +08:58:55, 1093.5, 873.2,-0.039836, 0.048642 +09:04:02, 1093.9, 874.2,-0.041484, 0.046145 +09:09:07, 1094.3, 872.9,-0.038794, 0.049678 +09:14:13, 1093.6, 870.4,-0.039772, 0.054932 +09:19:20, 1094.6, 874.5,-0.06241, 0.043971 +09:24:26, 1094.6, 873.2,-0.06635, 0.045956 +09:29:34, 1092.5, 874.4,-0.046905, 0.045537 +09:34:40, 1092.5, 874,-0.045189, 0.046929 +09:39:47, 1093.9, 873.1,-0.064249, 0.049993 +09:44:53, 1090.7, 872.7,-0.064463, 0.049656 +09:49:59, 1090.2, 872.5,-0.042274, 0.050164 +09:55:07, 1094.9, 874.7,-0.062986, 0.047024 +10:00:13, 1094.5, 873.9,-0.047026, 0.050467 +10:05:19, 1090.1, 867.9,-0.072768, 0.055509 +10:10:25, 1089.2, 870.2,-0.051434, 0.047583 +10:15:33, 1087.2, 870.8,-0.07974, 0.047684 +10:20:39, 1088.5, 869.3,-0.077472, 0.050213 +10:25:46, 1088.5, 869.5,-0.052469, 0.047447 +10:30:53, 1085.6, 866.3,-0.079447, 0.053265 +10:35:59, 1084.5, 870.2,-0.062915, 0.048998 +10:41:05, 1087.2, 868.8,-0.072563, 0.052968 +10:46:11, 1088.3, 869.2,-0.073626, 0.050495 +10:51:18, 1086.3, 870.4,-0.061491, 0.051031 +10:56:24, 1085.6, 869.1,-0.058558, 0.051483 +11:01:32, 1087.7, 867.3,-0.075988, 0.053007 +11:06:38, 1085.5, 868.4,-0.076915, 0.053232 +11:11:43, 1084.4, 867,-0.063152, 0.054525 +11:16:49, 1084.9, 869.4,-0.057951, 0.049182 +11:21:57, 1084.6, 869.9,-0.082062, 0.049092 +11:27:03, 1086.5, 867.3,-0.057374, 0.057174 +11:32:09, 1084.8, 868,-0.065534, 0.056068 +11:37:15, 1086.3, 869.3,-0.063686, 0.05045 +11:42:22, 1086.8, 870.5,-0.075117, 0.050376 +11:47:28, 1084.7, 869.6,-0.065606, 0.051288 +11:52:35, 1083.2, 866.5,-0.084646, 0.053896 +11:57:43, 1084.1, 867.9,-0.06012, 0.05496 diff --git a/pxii_bec/macros/luts/beampos/beampos_19071158.csv b/pxii_bec/macros/luts/beampos/beampos_19071158.csv new file mode 100644 index 0000000..3065e45 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_19071158.csv @@ -0,0 +1,73 @@ +Beam size: 25 x 25, Energy: 15000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +11:59:00, 1088.4, 868.8,-0.076482, 0.065731 +12:04:06, 1088.6, 868.5,-0.075798, 0.065046 +12:09:11, 1086.2, 870.3,-0.083481, 0.060803 +12:14:17, 1088.2, 869.6,-0.070638, 0.062346 +12:19:23, 1088.7, 868.2,-0.069533, 0.065481 +12:24:29, 1090.7, 868.3,-0.06659, 0.065482 +12:29:35, 1092.7, 866.8,-0.061025, 0.06676 +12:34:41, 1090.2, 869.7,-0.069311, 0.063017 +12:39:47, 1092.2, 869.8,-0.056527, 0.062016 +12:44:52, 1112.3, 850.5, 0.04966, 0.10371 +12:49:58, 1111.8, 863.2, 0.051658, 0.077989 +12:55:04, 1109.4, 874, 0.027556, 0.055713 +13:00:09, 1109.5, 873.1, 0.032834, 0.058692 +13:05:15, 1113.5, 874.5, 0.036455, 0.054885 +13:10:21, 1111, 873.8, 0.031303, 0.056003 +13:15:27, 1109, 872.5, 0.038276, 0.058991 +13:20:33, 1109.9, 873.1, 0.031477, 0.05798 +13:25:39, 1111.4, 872.8, 0.031182, 0.057984 +13:30:44, 1111.1, 874.9, 0.033867, 0.055528 +13:35:50, 1112.4, 874.2, 0.034476, 0.05649 +13:40:56, 1114.4, 874.4, 0.041443, 0.057118 +13:46:02, 1112.6, 875.9, 0.034084, 0.055139 +13:51:08, 1111.4, 874.8, 0.032731, 0.053112 +13:56:14, 1113.4, 876.6, 0.035743, 0.05341 +14:01:19, 1115.8, 875.6, 0.039268, 0.056284 +14:06:25, 1113.9, 878, 0.036519, 0.051352 +14:11:31, 1111.9, 876.5, 0.036827, 0.053118 +14:16:37, 1114.5, 876, 0.041577, 0.054167 +14:21:43, 1116.7, 876.5, 0.044925, 0.053997 +14:26:48, 1115.2, 876.3, 0.036758, 0.053849 +14:31:54, 1114.4, 878.8, 0.037616, 0.050496 +14:37:00, 1115.5, 878.4, 0.043492, 0.051726 +14:42:05, 1116.4, 877, 0.046624, 0.054037 +14:47:11, 1113.7, 877.5, 0.039416, 0.050736 +14:52:17, 1116.1, 879.7, 0.044124, 0.049925 +14:57:22, 1117.3, 877.9, 0.053136, 0.052914 +15:02:28, 1113.6, 878, 0.044115, 0.052158 +15:07:34, 1113.9, 878.2, 0.040034, 0.047948 +15:12:40, 1111.9, 876.8, 0.034813, 0.051975 +15:17:46, 1117, 876, 0.050279, 0.054367 +15:22:52, 1115.9, 877.4, 0.045172, 0.053026 +15:27:58, 1112.4, 876.5, 0.039972, 0.053036 +15:33:03, 1114, 875.6, 0.046774, 0.052996 +15:38:09, 1114, 875.7, 0.042843, 0.054435 +15:43:15, 1115.9, 875.7, 0.044451, 0.054752 +15:48:20, 1115.5, 875.3, 0.044003, 0.052915 +15:53:26, 1111.7, 874.5, 0.036981, 0.055973 +15:58:32, 1112.2, 876.2, 0.03839, 0.0529 +16:03:37, 1114.5, 875, 0.041577, 0.054337 +16:08:43, 1115, 874.1, 0.038677, 0.056231 +16:13:49, 1115.8, 876.1, 0.044489, 0.055163 +16:18:54, 1113.5, 876.8, 0.035821, 0.054732 +16:24:00, 1116, 876.5, 0.042683, 0.056534 +16:29:06, 1115.7, 878, 0.040596, 0.054578 +16:34:12, 1113.8, 877.2, 0.035674, 0.054329 +16:39:18, 1116.2, 876.4, 0.043127, 0.057105 +16:44:24, 1113.8, 875.9, 0.041567, 0.059277 +16:49:29, 1113.8, 875.3, 0.037544, 0.05579 +16:54:35, 1113.3, 875.3, 0.042273, 0.05777 +16:59:41, 1112.7, 876.9, 0.029153, 0.053549 +17:04:47, 1112.3, 875.6, 0.029099, 0.060035 +17:09:52, 1115.1, 876, 0.043104, 0.057382 +17:14:58, 1113.5, 876.1, 0.033973, 0.056598 +17:20:04, 1112.1, 876.2, 0.040206, 0.055084 +17:25:10, 1112.8, 875.9, 0.035065, 0.056058 +17:30:15, 1112.9, 876.9, 0.028595, 0.057244 +17:35:21, 1115.9, 876.1, 0.038115, 0.056979 +17:40:27, 1111.7, 877, 0.028549, 0.056126 +17:45:32, 1109.7, 875.4, 0.033823, 0.054598 +17:50:38, 1112, 875.7, 0.035057, 0.056551 +17:55:44, 1110.9, 876.6, 0.026614, 0.056027 diff --git a/pxii_bec/macros/luts/beampos/beampos_19071756.csv b/pxii_bec/macros/luts/beampos/beampos_19071756.csv new file mode 100644 index 0000000..caa4b96 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_19071756.csv @@ -0,0 +1,41 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +17:57:03, 1081.3, 875.8,-0.11122, 0.045013 +18:02:09, 1079.9, 873.8,-0.12293, 0.050853 +18:07:14, 1078.2, 874.4,-0.12417, 0.04782 +18:12:21, 1080, 872.9,-0.13328, 0.047685 +18:17:28, 1078.5, 873.4,-0.12336, 0.047952 +18:22:34, 1080.7, 875.3,-0.11877, 0.048252 +18:27:41, 1079.7, 875,-0.1316, 0.049279 +18:32:48, 1080.9, 874.7,-0.12823, 0.049914 +18:37:53, 1079.3, 873.8,-0.1343, 0.0506 +18:42:59, 1080.2, 875.2,-0.11865, 0.049372 +18:48:07, 1082.7, 873.6,-0.12981, 0.050035 +18:53:12, 1083.1, 876.8,-0.13422, 0.043321 +18:58:18, 1077.3, 876.4,-0.13903, 0.044899 +19:03:26, 1049.6, 976.6,-0.25672,-0.19651 +19:08:32, 1079.1, 876.7,-0.11786, 0.045326 +19:13:38, 1082.3, 875.9,-0.11708, 0.043901 +19:18:44, 1083.4, 878.8,-0.10999, 0.042962 +19:23:49, 1079.8, 878.1,-0.11641, 0.0409 +19:28:55, 1081.9, 877.9,-0.11094, 0.040306 +19:34:01, 1081.7, 877.5,-0.1086, 0.043686 +19:39:08, 1081.6, 878.2,-0.13015, 0.039693 +19:44:14, 1081.8, 880.1,-0.13167, 0.036952 +19:49:20, 1081.7, 898.1,-0.11858,-0.0037615 +19:54:26, 1080.5, 897.3,-0.13063,-0.0029066 +19:59:34, 1080.8, 898.1,-0.11391,-0.0041038 +20:04:42, 1082.3, 897.6,-0.13463,-0.0057737 +20:09:47, 1086, 898.2,-0.12315,-0.0030449 +20:14:53, 1086.3, 898.9,-0.1259,-0.0036708 +20:20:01, 1084.7, 901.5,-0.11375,-0.010266 +20:25:06, 1083.1, 900.8,-0.11676,-0.0083519 +20:30:12, 1084.8, 901.8,-0.11506,-0.0089971 +20:35:18, 1084.8, 898.6,-0.10809,-0.0043314 +20:40:23, 1083.8, 900.4,-0.11612,-0.0042361 +20:45:29, 1085.1, 900.5,-0.10516,-0.008494 +20:50:35, 1085.9, 901.4,-0.10048,-0.0093025 +20:55:42, 1087.5, 900.3,-0.12276,-0.0065716 +21:00:48, 1087.5, 902,-0.11076,-0.0088263 +21:05:54, 1088, 899.7,-0.099168,-0.0042224 +21:11:01, 1088.2, 900.1,-0.11814,-0.0081361 diff --git a/pxii_bec/macros/luts/beampos/beampos_19072236.csv b/pxii_bec/macros/luts/beampos/beampos_19072236.csv new file mode 100644 index 0000000..69e3515 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_19072236.csv @@ -0,0 +1,14 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +22:36:25, 1060.4, 878.9,-0.10583,-0.0084627 +22:38:31, 1063.3, 881.9,-0.1066,-0.0073115 +22:40:37, 1063.9, 881.4,-0.10975,-0.0055692 +22:42:43, 1065, 883.9,-0.1324,-0.0099198 +22:44:49, 1066.7, 884.9,-0.13217,-0.0094756 +22:46:55, 1067.1, 885.5,-0.11527,-0.0077712 +22:49:03, 1069.5, 886.4,-0.12735,-0.0080743 +22:51:09, 1072.6, 886.3,-0.12191,-0.0092353 +22:53:15, 1072, 888.3,-0.11964,-0.0056324 +22:55:22, 1074.4, 889.6,-0.1025,-0.010078 +22:57:29, 1073.6, 889.6,-0.11851,-0.010061 +22:59:35, 1075.4, 889.1,-0.12013,-0.010561 diff --git a/pxii_bec/macros/luts/beampos/beampos_19072303.csv b/pxii_bec/macros/luts/beampos/beampos_19072303.csv new file mode 100644 index 0000000..21ca183 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_19072303.csv @@ -0,0 +1,29 @@ +Beam size: 25 x 25, Energy: 6000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +23:03:39, 1086.1, 878.6,-0.10838, 0.0059334 +23:05:44, 1088.5, 890.3,-0.11136,-0.01826 +23:07:50, 1090.2, 886.6,-0.11445,-0.0036606 +23:09:56, 1089.8, 888.5,-0.11115,-0.0081606 +23:12:02, 1088.9, 886.5,-0.10979,-9.9095e-05 +23:14:07, 1091.4, 886.4,-0.11265,-0.00089106 +23:16:13, 1091.9, 889.5,-0.11494,-0.0021195 +23:18:19, 1093, 887.9,-0.11659, 0.0020202 +23:20:25, 1093.7, 887.8,-0.11693,-0.00030628 +23:22:31, 1093.9, 891.1,-0.11816,-0.0057121 +23:24:37, 1091.7, 886.6,-0.12128, 0.0051707 +23:26:42, 1090.3, 887.7,-0.11649, 0.0031412 +23:28:48, 1090.4, 887,-0.11383, 0.0019807 +23:30:54, 1091, 888.7,-0.11061, 0.001034 +23:33:00, 1092.5, 890,-0.11252,-0.0065677 +23:35:06, 1093.6, 889.7,-0.11642,-0.0025576 +23:37:12, 1090.8, 891.6,-0.12155,-0.0063002 +23:39:18, 1091.4, 890.6,-0.12272,-0.0048353 +23:41:24, 1093.8, 890.1,-0.12113,-0.0013978 +23:43:30, 1094.6, 891.6,-0.11878,-0.0034721 +23:45:36, 1094.7, 888.1,-0.11605, 0.0064705 +23:47:42, 1096.6, 890.6,-0.11813,-0.0016227 +23:49:48, 1094.8, 890.5,-0.11452, 0.0015881 +23:51:54, 1094.8, 891.3,-0.1147,-0.0027561 +23:53:59, 1093.4, 891.4,-0.11232,-0.0017604 +23:56:05, 1095.8, 889.5,-0.11213, 0.0012026 +23:58:11, 1091.7, 890.9,-0.11552,-4.8605e-05 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070000.csv b/pxii_bec/macros/luts/beampos/beampos_20070000.csv new file mode 100644 index 0000000..22aca30 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070000.csv @@ -0,0 +1,31 @@ +Beam size: 25 x 25, Energy: 8000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +00:00:30, 1088.3, 894.7,-0.10247,-0.022685 +00:02:35, 1091.7, 890.6,-0.091432,-0.0026408 +00:04:41, 1090.4, 893.2,-0.091495,-0.010632 +00:06:47, 1092.1, 893.1,-0.088456,-0.0092543 +00:08:53, 1093.2, 895.7,-0.08548,-0.013679 +00:10:59, 1095.5, 892,-0.08163,-0.0053854 +00:13:04, 1093, 895.9,-0.085617,-0.01478 +00:15:10, 1092.1, 893,-0.087674,-0.0047268 +00:17:16, 1092.7, 897.5,-0.090985,-0.016994 +00:19:22, 1091.5, 895.4,-0.088027,-0.013004 +00:21:28, 1092.7, 893.4,-0.084513,-0.0078035 +00:23:33, 1093.4, 895.6,-0.081424,-0.013122 +00:25:39, 1095, 895.1,-0.077877,-0.007636 +00:27:45, 1095.7, 895.4,-0.080481,-0.010022 +00:29:51, 1093.9, 895.8,-0.084139,-0.01127 +00:31:57, 1095.9, 895.8,-0.083969,-0.0097662 +00:34:03, 1095.8, 895.1,-0.083824,-0.0075766 +00:36:08, 1096.1, 895.4,-0.081804,-0.0069044 +00:38:14, 1096.8, 895.7,-0.079827,-0.0087801 +00:40:21, 1097.8, 895.1,-0.078845,-0.0060065 +00:42:26, 1094.9, 898.4,-0.083426,-0.014225 +00:44:32, 1096.5, 897.1,-0.085291,-0.012956 +00:46:38, 1095.4, 894.4,-0.086194,-0.0030342 +00:48:44, 1091.8, 894.4,-0.091819,-0.007776 +00:50:50, 1096.9, 895,-0.086827,-0.006593 +00:52:55, 1093.8, 896.5,-0.083934,-0.010891 +00:55:02, 1095.9, 892.6,-0.078386,-0.00066634 +00:57:08, 1094.8, 895.5,-0.080492,-0.0060498 +00:59:14, 1095.4, 893.8,-0.079348,-0.0010273 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070100.csv b/pxii_bec/macros/luts/beampos/beampos_20070100.csv new file mode 100644 index 0000000..1a872f4 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070100.csv @@ -0,0 +1,31 @@ +Beam size: 25 x 25, Energy: 10000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +01:00:57, 1086.2, 886.6,-0.065065,-0.00013186 +01:03:03, 1084.7, 887.7,-0.074515,-0.0017025 +01:05:08, 1086, 889.3,-0.077061,-0.00024336 +01:07:14, 1084.6, 887.9,-0.08186, 0.0007312 +01:09:20, 1084.7, 887.2,-0.078934, 0.0048637 +01:11:25, 1083.8, 889.2,-0.083071,-0.0023657 +01:13:31, 1083.6, 889.9,-0.082672,-0.0024003 +01:15:37, 1084.6, 888.5,-0.082158,-0.0016185 +01:17:43, 1084.7, 888.3,-0.078614, 0.0024562 +01:19:49, 1084.5, 891.1,-0.076958,-0.0058177 +01:21:56, 1083.9, 889.6,-0.07548, 0.0016631 +01:24:02, 1084.4, 891.3,-0.078394,-0.0033353 +01:26:08, 1085, 887.4,-0.081657, 0.0040334 +01:28:14, 1084.2, 890,-0.080469,-0.00024043 +01:30:20, 1085.4, 889.7,-0.085927,-0.0057618 +01:32:27, 1086.8, 891.8,-0.083425,-0.0068752 +01:34:33, 1085.6, 890.1,-0.086878,-0.0048822 +01:36:39, 1084.6, 892.9,-0.083786,-0.0098233 +01:38:44, 1083.4, 889.8,-0.081551,-0.0053882 +01:40:50, 1085.7, 890.6,-0.075925,-0.0068812 +01:42:56, 1084.1, 890.1,-0.075559,-0.0051225 +01:45:02, 1085.4, 892.2,-0.076528,-0.010656 +01:47:08, 1083.2, 890.7,-0.077802,-0.0069342 +01:49:13, 1083.7, 892.8,-0.082591,-0.013723 +01:51:19, 1083.3, 890.7,-0.084526,-0.0091534 +01:53:25, 1081.9, 892.1,-0.089283,-0.012845 +01:55:32, 1083.8, 892.4,-0.087885,-0.0087082 +01:57:38, 1080.9, 893.3,-0.088293,-0.013436 +01:59:44, 1082.4, 891.9,-0.084131,-0.0047178 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070200.csv b/pxii_bec/macros/luts/beampos/beampos_20070200.csv new file mode 100644 index 0000000..a7b2ffb --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070200.csv @@ -0,0 +1,30 @@ +Beam size: 25 x 25, Energy: 12000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +02:01:24, 1089.8, 885.8,-0.076, 0.032848 +02:03:30, 1092.4, 889.2,-0.054165, 0.028047 +02:05:37, 1090.5, 884.4,-0.071597, 0.033274 +02:07:43, 1093.4, 887.4,-0.068904, 0.028838 +02:09:49, 1094.7, 885.9,-0.066548, 0.029639 +02:11:55, 1091.4, 885.9,-0.06624, 0.031237 +02:14:01, 1091.6, 885.3,-0.065731, 0.032068 +02:16:06, 1092.3, 885.7,-0.066224, 0.03011 +02:18:12, 1094.7, 886,-0.044613, 0.031121 +02:20:18, 1093.7, 886.2,-0.041754, 0.029849 +02:22:26, 1091.9, 886.8,-0.060506, 0.029507 +02:24:33, 1096.3, 888.9,-0.03123, 0.026509 +02:26:40, 1095.2, 888.2,-0.053696, 0.029404 +02:28:46, 1094.1, 888.1,-0.03567, 0.027089 +02:30:52, 1094.2, 888,-0.03523, 0.028663 +02:32:58, 1097.2, 887.2,-0.028733, 0.030174 +02:35:03, 1097.3, 887.9,-0.047942, 0.029229 +02:37:09, 1096, 887.4,-0.05307, 0.029778 +02:39:14, 1095.8, 886.7,-0.031823, 0.031276 +02:41:21, 1095.8, 887.2,-0.035524, 0.030281 +02:43:27, 1095, 889.2,-0.052045, 0.024124 +02:45:34, 1095.8, 885.9,-0.025722, 0.03354 +02:47:40, 1097.2, 889,-0.026883, 0.025967 +02:49:46, 1095.3, 886.4,-0.028725, 0.030098 +02:51:54, 1097.8, 886.4,-0.051672, 0.031952 +02:54:00, 1097.6, 889.5,-0.036, 0.026482 +02:56:05, 1095.1, 887.3,-0.033187, 0.028698 +02:58:13, 1095.2, 887.6,-0.049451, 0.024264 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070258.csv b/pxii_bec/macros/luts/beampos/beampos_20070258.csv new file mode 100644 index 0000000..3b7fd19 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070258.csv @@ -0,0 +1,31 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +02:59:19, 1088.8, 886.1,-0.066777, 0.023394 +03:01:24, 1088.8, 886.9,-0.067831, 0.023045 +03:03:32, 1086.6, 888.1,-0.093135, 0.01838 +03:05:37, 1087.2, 886.5,-0.086424, 0.022722 +03:07:43, 1086.9, 888.1,-0.066847, 0.01881 +03:09:50, 1087.6, 888.3,-0.083542, 0.020706 +03:11:58, 1088, 889.2,-0.066662, 0.018156 +03:14:03, 1086.7, 888.5,-0.067556, 0.016385 +03:16:09, 1088.7, 886.2,-0.067532, 0.023735 +03:18:15, 1087.9, 890.6,-0.069117, 0.018238 +03:20:21, 1088.5, 889.6,-0.086728, 0.016721 +03:22:28, 1087.7, 887.9,-0.063337, 0.021393 +03:24:35, 1091, 889.3,-0.061427, 0.021218 +03:26:42, 1090.3, 890.7,-0.081099, 0.016934 +03:28:47, 1089.3, 889.5,-0.06018, 0.019599 +03:30:54, 1090.4, 889.2,-0.078334, 0.017338 +03:33:02, 1089.4, 890.2,-0.063479, 0.019633 +03:35:08, 1088.8, 889.7,-0.064698, 0.019546 +03:37:14, 1086.7, 890.7,-0.06736, 0.016639 +03:39:20, 1088.3, 886.7,-0.063542, 0.023539 +03:41:26, 1088.8, 890.6,-0.06362, 0.01551 +03:43:33, 1091.6, 889.1,-0.078626, 0.02067 +03:45:39, 1090.6, 889.2,-0.081025, 0.018433 +03:47:46, 1090.8, 889,-0.064292, 0.018227 +03:49:54, 1088.1, 889.5,-0.086955, 0.015797 +03:51:59, 1089.2, 889.9,-0.067474, 0.015368 +03:54:05, 1090.6, 889.3,-0.063786, 0.015413 +03:56:11, 1090.3, 889.4,-0.060395, 0.015081 +03:58:17, 1092.3, 889.1,-0.058559, 0.015406 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070359.csv b/pxii_bec/macros/luts/beampos/beampos_20070359.csv new file mode 100644 index 0000000..36e08bd --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070359.csv @@ -0,0 +1,31 @@ +Beam size: 25 x 25, Energy: 14000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +03:59:44, 1085.5, 885.7,-0.098346, 0.028605 +04:01:51, 1084.7, 883.6,-0.10983, 0.028994 +04:03:59, 1084.1, 885.9,-0.099608, 0.028806 +04:06:06, 1084.4, 885.7,-0.11286, 0.026572 +04:08:12, 1084.9, 885.4,-0.11494, 0.028373 +04:10:17, 1084.4, 887.4,-0.10967, 0.026349 +04:12:23, 1087.1, 885.4,-0.10401, 0.028785 +04:14:29, 1086.8, 887.3,-0.10464, 0.024945 +04:16:34, 1086, 885.7,-0.10224, 0.030138 +04:18:40, 1085.9, 888.1,-0.10274, 0.023789 +04:20:49, 1085.7, 886.4,-0.088085, 0.030793 +04:22:54, 1087.2, 887.6,-0.090379, 0.024066 +04:25:01, 1083.9, 886.8,-0.10515, 0.031232 +04:27:08, 1083.1, 887.3,-0.099723, 0.02765 +04:29:14, 1083.1, 885.8,-0.10305, 0.026765 +04:31:20, 1084, 884.6,-0.1004, 0.02838 +04:33:27, 1084.7, 886.5,-0.11276, 0.025315 +04:35:33, 1086.1, 884.7,-0.10571, 0.029943 +04:37:39, 1086.2, 888.2,-0.10983, 0.021139 +04:39:47, 1087.4, 885.4,-0.096865, 0.031181 +04:41:53, 1086.2, 888.6,-0.099061, 0.025925 +04:43:58, 1084.5, 886.2,-0.0989, 0.029481 +04:46:06, 1082.1, 886.6,-0.1155, 0.026603 +04:48:12, 1084.4, 885.1,-0.11323, 0.028742 +04:50:18, 1083, 884.7,-0.10087, 0.031223 +04:52:24, 1082.3, 883.4,-0.097488, 0.032156 +04:54:30, 1085.1, 886.6,-0.10599, 0.026845 +04:56:36, 1085.5, 884.1,-0.092027, 0.031292 +04:58:43, 1086.1, 886.5,-0.10409, 0.026272 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070459.csv b/pxii_bec/macros/luts/beampos/beampos_20070459.csv new file mode 100644 index 0000000..9111b53 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070459.csv @@ -0,0 +1,31 @@ +Beam size: 25 x 25, Energy: 16000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +05:00:07, 1085, 883.8,-0.076696, 0.025634 +05:02:13, 1086.9, 882.4,-0.074979, 0.025503 +05:04:19, 1086, 883.1,-0.081743, 0.024614 +05:06:25, 1085.9, 882.8,-0.075776, 0.026175 +05:08:31, 1083.8, 883.9,-0.082228, 0.026293 +05:10:38, 1084.2, 883.9,-0.091544, 0.024279 +05:12:44, 1080.9, 882.6,-0.082779, 0.025366 +05:14:51, 1083.2, 883.9,-0.092996, 0.022878 +05:16:59, 1082.3, 884.5,-0.082728, 0.024254 +05:19:05, 1085.8, 883.8,-0.078074, 0.025324 +05:21:11, 1083.4, 883,-0.08049, 0.025883 +05:23:17, 1083.2, 883.2,-0.082627, 0.025098 +05:25:23, 1083.2, 882,-0.083604, 0.027314 +05:27:30, 1083.6, 885,-0.096756, 0.020698 +05:29:36, 1084.8, 883.2,-0.076157, 0.027332 +05:31:42, 1084.2, 884.5,-0.077174, 0.022879 +05:33:48, 1086, 883.2,-0.077332, 0.027437 +05:35:54, 1083.3, 885.4,-0.095597, 0.019258 +05:38:00, 1083.3, 884,-0.094601, 0.025104 +05:40:06, 1084.8, 885.3,-0.09063, 0.020397 +05:42:12, 1085.4, 883.9,-0.082295, 0.025197 +05:44:17, 1084.7, 884.8,-0.08566, 0.022262 +05:46:25, 1084.3, 883.8,-0.084293, 0.026268 +05:48:33, 1082, 883.5,-0.098464, 0.025377 +05:50:39, 1081.4, 884,-0.10101, 0.022308 +05:52:45, 1082.2, 884.8,-0.099798, 0.022877 +05:54:51, 1082.4, 883.3,-0.08863, 0.026499 +05:56:58, 1084.4, 885.2,-0.091666, 0.023724 +05:59:03, 1083.6, 884,-0.091715, 0.022943 diff --git a/pxii_bec/macros/luts/beampos/beampos_20070559.csv b/pxii_bec/macros/luts/beampos/beampos_20070559.csv new file mode 100644 index 0000000..5d7b3e9 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20070559.csv @@ -0,0 +1,31 @@ +Beam size: 25 x 25, Energy: 18000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +06:00:07, 1082, 883.4,-0.11192, 0.037721 +06:02:12, 1083, 885,-0.11957, 0.038156 +06:04:18, 1084.8, 886,-0.11856, 0.036642 +06:06:26, 1084.5, 885.7,-0.10789, 0.037436 +06:08:33, 1084.9, 884.5,-0.11389, 0.037365 +06:10:39, 1085.3, 885.9,-0.1102, 0.035751 +06:12:47, 1087.5, 883.5,-0.089998, 0.040013 +06:14:53, 1085.4, 884.6,-0.093043, 0.038193 +06:16:59, 1084.4, 883.8,-0.098512, 0.039186 +06:19:05, 1084.4, 885,-0.098786, 0.037087 +06:21:11, 1083.1, 885,-0.10092, 0.038601 +06:23:16, 1085.7, 883.8,-0.097485, 0.038191 +06:25:22, 1085.6, 884.7,-0.090524, 0.039356 +06:27:28, 1086.8, 884.1,-0.09521, 0.041347 +06:29:34, 1086.8, 885.6,-0.101, 0.040327 +06:31:42, 1086, 884.6,-0.094068, 0.04094 +06:33:49, 1084.9, 887,-0.10728, 0.037482 +06:35:55, 1084.7, 885.9,-0.10485, 0.041545 +06:38:02, 1084.7, 886.1,-0.098321, 0.036696 +06:40:08, 1085.7, 882.4,-0.089756, 0.040941 +06:42:14, 1084.9, 884.1,-0.099562, 0.036133 +06:44:20, 1086.9, 882.9,-0.091885, 0.040227 +06:46:28, 1085.8, 883.8,-0.08283, 0.035471 +06:48:36, 1087.2, 884.2,-0.089415, 0.039128 +06:50:43, 1087.9, 884.6,-0.08288, 0.037156 +06:52:51, 1086.9, 884.7,-0.096839, 0.040378 +06:54:58, 1087.4, 885,-0.091789, 0.036039 +06:57:05, 1086.7, 885.2,-0.10133, 0.039144 +06:59:11, 1088.2, 885.9,-0.10203, 0.038694 diff --git a/pxii_bec/macros/luts/beampos/beampos_20260718-19_10-7-9-12p67-15-12p4.csv b/pxii_bec/macros/luts/beampos/beampos_20260718-19_10-7-9-12p67-15-12p4.csv new file mode 100644 index 0000000..c700ac3 --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20260718-19_10-7-9-12p67-15-12p4.csv @@ -0,0 +1,365 @@ +Beam size: 25 x 25, Energy: 10000 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +11:35:45, 1062.5, 868.9,-0.11896, 0.01887 +11:40:52, 1063, 871.8,-0.12142, 0.014688 +11:45:58, 1066.9, 874.7,-0.12046, 0.0086598 +11:51:04, 1068, 876.4,-0.1167, 0.017193 +11:56:10, 1068.1, 874.4,-0.12148, 0.018058 +12:01:16, 1068.2, 878.5,-0.11942, 0.008117 +12:06:22, 1068.7, 878,-0.12182, 0.0070722 +12:11:28, 1070.3, 876.5,-0.12096, 0.013999 +12:16:34, 1070.5, 874.9,-0.11751, 0.020493 +12:21:40, 1075.6, 877.7,-0.11723, 0.018245 +12:26:46, 1071.5, 881.7,-0.12407, 0.0088893 +12:31:51, 1071, 879.9,-0.1276, 0.01151 +12:36:58, 1070.4, 882.6,-0.12483, 0.0062113 +12:42:04, 1072.2, 880.9,-0.11932, 0.0076498 +12:47:09, 1073.2, 882.1,-0.11921, 0.0075093 +12:52:15, 1071.3, 881.3,-0.12551, 0.015369 +12:57:21, 1073.9, 880.4,-0.11533, 0.011686 +13:02:27, 1074.1, 879.6,-0.12139, 0.012885 +13:07:33, 1073.4, 881.4,-0.12404, 0.009902 +13:12:39, 1076.1, 881.6,-0.12028, 0.011644 +13:17:45, 1077.2, 883.2,-0.11862, 0.0070691 +13:22:51, 1075, 879.1,-0.1205, 0.016371 +13:27:57, 1077, 879.8,-0.11828, 0.013926 +13:33:03, 1077.7, 882.4,-0.11576, 0.008192 +13:38:09, 1076, 880.3,-0.12159, 0.014465 +13:43:15, 1077.1, 881.2,-0.12135, 0.013428 +13:48:21, 1077.2, 882.7,-0.11629, 0.0082309 +13:53:27, 1078.9, 883.6,-0.12406, 0.0064463 +13:58:33, 1076.2, 882.8,-0.11756, 0.0078457 +14:03:38, 1076.6, 881.5,-0.11809, 0.012274 +14:08:44, 1077.1, 883.7,-0.12376, 0.0075757 +14:13:50, 1075, 883.6,-0.11847, 0.0069435 +14:18:56, 1075.7, 881.3,-0.1204, 0.011577 +14:24:01, 1076.4, 881,-0.12215, 0.012281 +14:29:07, 1075.7, 881.6,-0.12133, 0.0040628 +14:34:13, 1075.9, 882.5,-0.11678, 0.0065513 +14:39:19, 1077.6, 880.5,-0.11551, 0.011332 +14:44:24, 1075.9, 881.1,-0.12023, 0.013476 +14:49:31, 1076.8, 881.9,-0.11705, 0.011102 +14:54:37, 1076.8, 881.6,-0.11483, 0.016159 +14:59:42, 1077.6, 880.7,-0.1214, 0.013621 +15:04:48, 1077.1, 884.1,-0.11704, 0.0070347 +15:09:54, 1076.7, 882.3,-0.11226, 0.011983 +15:15:00, 1076.1, 884.4,-0.11965, 0.0086288 +15:20:05, 1077, 883.2,-0.1144, 0.0095036 +15:25:11, 1077, 884,-0.11607, 0.0082163 +15:30:17, 1076.5, 883.6,-0.12069, 0.0088895 +15:35:23, 1075.8, 883.5,-0.11596, 0.011014 +15:40:29, 1079, 885.1,-0.11446, 0.011612 +15:45:35, 1078.8, 886.3,-0.11167, 0.0078587 +15:50:40, 1079.9, 884.1,-0.11666, 0.01034 +15:55:46, 1080.4, 883.7,-0.11024, 0.010066 +16:00:52, 1079.9, 883.7,-0.10819, 0.012905 +16:05:58, 1080.4, 888,-0.11271, 0.0021722 +16:11:03, 1079.3, 886.7,-0.11757, 0.0040589 +16:16:09, 1080.2, 888.7,-0.11446,-0.00084994 +16:21:15, 1082.1, 885.8,-0.10947, 0.0059782 +16:26:21, 1079, 887.4,-0.11827, 0.0029425 +16:31:27, 1078.7, 884.6,-0.11141, 0.011771 +16:36:33, 1077.1, 884.2,-0.11274, 0.01089 +16:41:38, 1074.7, 885.6,-0.11916, 0.009934 +16:46:44, 1080.6, 885.5,-0.11678, 0.0076036 +16:51:50, 1079.1, 885.6,-0.11783, 0.011119 +16:56:56, 1078, 887.1,-0.11665, 0.002222 +17:02:01, 1076.9, 890.7,-0.11545,-0.0045117 +17:07:07, 1079.2, 888.5,-0.11464,-0.00083601 +17:12:13, 1082.5, 888.5,-0.12047, 0.0023168 +17:17:19, 1082.7, 887.6,-0.1125, 0.0030391 +17:22:25, 1080, 887.3,-0.11396, 0.0045574 +17:27:30, 1078.2, 885.6,-0.12064, 0.0084515 +17:32:36, 1077.3, 887.1,-0.11613, 0.0062257 +17:37:42, 1077.5, 887.9,-0.11352, 0.0050877 +17:42:47, 1078.6, 886.5,-0.11666, 0.0073078 +17:47:53, 1078.3, 888.1,-0.1172, 0.0044806 +17:52:59, 1078.8, 887,-0.11465, 0.0042768 +17:58:05, 1080, 887.5,-0.11797, 0.0057352 +18:00:23, 1087.2, 898.9,-0.11289,-0.056702 +18:05:30, 1088, 898.7,-0.111,-0.051116 +18:10:37, 1087.9, 896,-0.11463,-0.044413 +18:15:43, 1090, 896,-0.11563,-0.048558 +18:20:52, 1089.9, 896.9,-0.11147,-0.044115 +18:25:58, 1085.8, 892.7,-0.10464,-0.0304 +18:31:05, 1086.2, 895.8,-0.12132,-0.050184 +18:36:14, 1089.8, 893.1,-0.10226,-0.02751 +18:41:21, 1087, 894.2,-0.13051,-0.030585 +18:46:28, 1088.4, 895.3,-0.10238,-0.033711 +18:51:35, 1083.4, 890,-0.13426,-0.022771 +18:56:44, 1085.7, 893,-0.11405,-0.025597 +19:01:50, 1083.2, 890.6,-0.10936,-0.021125 +19:06:57, 1083.4, 890.7,-0.13996,-0.018376 +19:12:03, 1080.4, 889.6,-0.14768,-0.015343 +19:17:11, 1083.1, 888,-0.13984,-0.010937 +19:22:17, 1085.1, 887.1,-0.13604,-0.0098507 +19:27:24, 1078.1, 886.3,-0.14872,-0.0083533 +19:32:29, 1081.7, 887.3,-0.14793,-0.0020641 +19:37:37, 1083.5, 886.1,-0.1435,-0.0031823 +19:42:44, 1081.8, 885.3,-0.14713, 0.00076525 +19:47:51, 1085.6, 886,-0.12325,-0.005586 +19:52:57, 1082.8, 884.8,-0.13169, 0.002535 +19:58:03, 1083.1, 886.6,-0.1433, 0.0036532 +20:03:10, 1081.4, 886.2,-0.14891, 0.0065452 +20:08:16, 1078, 886.3,-0.15479, 0.0044528 +20:13:22, 1080.5, 886.9,-0.15429, 0.00013618 +20:18:28, 1079, 884.5,-0.1563, 0.0046595 +20:23:35, 1081.3, 880.9,-0.12887, 0.023665 +20:28:45, 1074.5, 882.4,-0.14363, 0.01673 +20:33:52, 1081.6, 884.1,-0.14379, 0.011203 +20:38:59, 1078.5, 884.7,-0.16287, 0.0078645 +20:44:06, 1081.8, 883.3,-0.13597, 0.014495 +20:49:13, 1079.5, 879.7,-0.16022, 0.030429 +20:54:21, 1081.8, 883.6,-0.14835, 0.010793 +20:59:27, 1082.5, 882.8,-0.15187, 0.020659 +21:04:33, 1080.6, 880.2,-0.15458, 0.022691 +21:09:38, 1080.4, 881,-0.154, 0.022332 +21:14:44, 1080.6, 880.7,-0.13678, 0.021345 +21:19:51, 1080, 882.2,-0.16281, 0.022404 +21:25:01, 1081.1, 880.2,-0.15382, 0.029244 +21:30:07, 1081.6, 883.1,-0.15009, 0.021002 +21:35:12, 1079.6, 884.4,-0.13683, 0.013609 +21:40:19, 1079.3, 884.6,-0.16139, 0.013444 +21:45:27, 1082.5, 882.3,-0.13616, 0.028945 +21:50:33, 1080.2, 884.9,-0.14429, 0.014658 +21:55:40, 1079.5, 883.2,-0.15799, 0.023379 +22:00:46, 1077.2, 883.1,-0.15915, 0.020498 +22:05:52, 1077.9, 881,-0.16593, 0.021929 +22:10:59, 1080.8, 885.5,-0.13688, 0.012467 +22:16:06, 1079.8, 881.1,-0.16093, 0.034882 +22:21:15, 1081.7, 882.1,-0.13768, 0.026467 +22:26:24, 1078.9, 883.5,-0.15947, 0.025523 +22:31:30, 1078.6, 885.7,-0.16555, 0.017603 +22:36:37, 1077.1, 883.2,-0.17131, 0.023058 +22:41:43, 1078.5, 883.6,-0.16515, 0.030139 +22:46:51, 1079.4, 883.7,-0.16058, 0.026854 +22:51:58, 1077, 882.1,-0.16906, 0.030297 +22:57:06, 1081.5, 885.3,-0.15947, 0.016286 +23:02:13, 1075.3, 882.7,-0.17468, 0.021457 +23:07:20, 1078.5, 879.2,-0.15431, 0.036046 +23:12:26, 1081.2, 881.6,-0.1613, 0.0279 +23:17:32, 1079.9, 880.4,-0.16349, 0.030523 +23:22:39, 1074, 878.5,-0.17429, 0.047282 +23:27:46, 1079.2, 878.6,-0.14555, 0.041583 +23:32:54, 1078.3, 879.2,-0.16937, 0.037788 +23:38:01, 1078.4, 881,-0.15078, 0.029148 +23:43:07, 1077.3, 880.5,-0.16738, 0.030062 +23:48:13, 1074.1, 882.3,-0.16877, 0.021855 +23:53:20, 1078.4, 883.4,-0.16899, 0.017587 +23:58:28, 1080.1, 881.1,-0.16262, 0.025849 +00:00:27, 1096.2, 878.9,-0.10422, 0.051015 +00:05:33, 1102.6, 878.8,-0.10089, 0.047783 +00:10:40, 1094, 881.1,-0.10438, 0.042959 +00:15:47, 1094.1, 878.8,-0.088006, 0.042954 +00:20:53, 1095.7, 877.4,-0.095532, 0.047889 +00:25:59, 1094, 874.9,-0.090727, 0.046443 +00:31:05, 1098, 878,-0.081301, 0.046345 +00:36:11, 1094.9, 877.2,-0.084523, 0.045295 +00:41:17, 1093.3, 877.6,-0.083545, 0.041377 +00:46:23, 1095.3, 876.7,-0.084554, 0.04756 +00:51:29, 1098.2, 877.2,-0.075455, 0.047755 +00:56:35, 1098.1, 880.7,-0.076532, 0.037133 +01:01:41, 1099, 878.5,-0.080367, 0.044453 +01:06:47, 1097.9, 880.6,-0.071593, 0.038292 +01:11:54, 1099.6, 879.6,-0.069253, 0.044711 +01:17:00, 1097.4, 881.9,-0.072625, 0.040504 +01:22:06, 1099.9, 880.7,-0.075477, 0.041547 +01:27:12, 1102.9, 878.4,-0.069703, 0.045874 +01:32:18, 1108.7, 880.2,-0.072999, 0.035963 +01:37:25, 1101.4, 880.8,-0.071325, 0.039413 +01:42:31, 1096.4, 879.2,-0.080792, 0.045308 +01:47:39, 1102.2, 880.6,-0.078503, 0.042056 +01:52:44, 1099.1, 883.1,-0.068643, 0.03505 +01:57:50, 1099.6, 881.2,-0.075927, 0.042831 +02:02:57, 1097.3, 881.7,-0.075821, 0.043285 +02:08:02, 1097.4, 879.1,-0.077765, 0.048317 +02:13:08, 1098, 878.6,-0.080888, 0.046227 +02:18:16, 1103, 882.1,-0.069456, 0.042083 +02:23:21, 1100.2, 882.2,-0.07461, 0.042027 +02:28:27, 1099.5, 879.6,-0.072908, 0.045414 +02:33:34, 1098.6, 881.3,-0.072111, 0.045849 +02:38:42, 1101, 883.2,-0.075653, 0.037313 +02:43:48, 1100.5, 882.6,-0.074713, 0.042508 +02:48:56, 1100.7, 882.2,-0.068493, 0.04146 +02:54:03, 1099.2, 880.7,-0.073816, 0.043851 +02:59:09, 1100.2, 880.2,-0.071329, 0.045464 +03:04:16, 1099.9, 880.3,-0.074841, 0.044893 +03:09:23, 1101.3, 880,-0.068119, 0.046967 +03:14:29, 1097.2, 884.4,-0.073234, 0.03653 +03:19:35, 1096.5, 882.6,-0.076674, 0.036552 +03:24:40, 1096, 878.9,-0.0746, 0.046635 +03:29:46, 1096.7, 880.2,-0.073988, 0.039682 +03:34:52, 1096.3, 877.9,-0.072519, 0.042302 +03:39:58, 1099, 878.2,-0.074265, 0.044691 +03:45:05, 1094.7, 879.3,-0.084827, 0.043503 +03:50:13, 1094.5, 876.9,-0.076947, 0.043621 +03:55:20, 1096.3, 877,-0.077052, 0.046556 +04:00:26, 1096.1, 875.4,-0.081599, 0.049468 +04:05:32, 1095.8, 879.7,-0.08487, 0.044777 +04:10:38, 1099.5, 877.9,-0.078693, 0.046543 +04:15:44, 1094.8, 874.8,-0.077996, 0.046238 +04:20:51, 1098.3, 875.9,-0.071925, 0.050462 +04:25:59, 1096.8, 875.8,-0.074895, 0.042541 +04:31:08, 1097.6, 876.7,-0.080193, 0.047458 +04:36:17, 1060.5, 874.7,-0.07387, 0.046123 +04:41:25, 1094.3, 877.1,-0.07925, 0.046501 +04:46:31, 1093.3, 877.2,-0.082028, 0.043891 +04:51:36, 1094.5, 874.9,-0.082283, 0.046545 +04:56:42, 1095.8, 878.3,-0.07603, 0.044235 +05:01:49, 1096.9, 879.6,-0.08036, 0.046302 +05:06:56, 1096.5, 878,-0.080912, 0.047365 +05:12:02, 1099.7, 877.8,-0.075186, 0.047222 +05:17:09, 1096.9, 879.2,-0.085779, 0.045361 +05:22:15, 1096.3, 876.7,-0.085266, 0.0484 +05:27:25, 1105.3, 879.2,-0.078254, 0.049087 +05:32:34, 1055.9, 875.9,-0.078914, 0.046331 +05:37:43, 1096.4, 878.3,-0.078052, 0.044381 +05:42:48, 1095.1, 877.8,-0.082107, 0.045591 +05:47:55, 1094.4, 877.6,-0.082593, 0.047571 +05:53:02, 1095.1, 877.7,-0.078357, 0.044259 +05:58:08, 1096.3, 878.5,-0.080765, 0.041253 +06:00:03, 1089.8, 870.1,-0.075726, 0.057242 +06:05:12, 1090.6, 870.9,-0.054504, 0.056696 +06:10:18, 1090.4, 872.6,-0.056052, 0.050934 +06:15:24, 1090.8, 869.6,-0.056711, 0.056018 +06:20:29, 1093.2, 872.5,-0.048436, 0.052689 +06:25:35, 1092.2, 873.8,-0.046384, 0.048112 +06:30:42, 1090.7, 872.3,-0.064578, 0.047664 +06:35:50, 1095.3, 873.3,-0.039321, 0.049451 +06:40:57, 1094.3, 872.4,-0.061085, 0.051917 +06:46:03, 1096, 875.1,-0.053488, 0.045762 +06:51:11, 1094.1, 875,-0.038676, 0.047646 +06:56:17, 1093.7, 874.8,-0.035873, 0.045234 +07:01:23, 1095.8, 874.1,-0.032996, 0.047143 +07:06:29, 1094.1, 875.8,-0.060449, 0.038967 +07:11:35, 1093.5, 875.3,-0.064064, 0.041099 +07:16:41, 1097, 874.2,-0.034394, 0.045616 +07:21:48, 1097.3, 875.6,-0.045313, 0.042338 +07:26:54, 1098.6, 878.8,-0.025292, 0.039332 +07:32:01, 1096.2, 875.6,-0.051904, 0.044109 +07:37:07, 1096.8, 879.8,-0.040263, 0.036713 +07:42:13, 1097.7, 879.3,-0.047349, 0.03665 +07:47:18, 1098.4, 879.1,-0.032718, 0.03625 +07:52:24, 1096.7, 878.6,-0.059916, 0.036537 +07:57:34, 1096.2, 878,-0.057346, 0.036411 +08:02:43, 1076.4, 873.3,-0.05637, 0.037097 +08:07:52, 1097.4, 876.4,-0.03254, 0.043524 +08:13:00, 1094.7, 875.4,-0.059477, 0.044236 +08:18:06, 1096.5, 874.3,-0.054567, 0.042628 +08:23:12, 1094.3, 873.6,-0.060655, 0.047918 +08:28:17, 1094.9, 872.7,-0.045298, 0.046942 +08:33:25, 1095.2, 873,-0.052788, 0.046684 +08:38:32, 1094.7, 874,-0.040514, 0.046534 +08:43:38, 1093, 876.4,-0.040237, 0.042712 +08:48:44, 1094.2, 874.1,-0.035634, 0.048417 +08:53:50, 1091.6, 874.4,-0.04272, 0.048589 +08:58:55, 1093.5, 873.2,-0.039836, 0.048642 +09:04:02, 1093.9, 874.2,-0.041484, 0.046145 +09:09:07, 1094.3, 872.9,-0.038794, 0.049678 +09:14:13, 1093.6, 870.4,-0.039772, 0.054932 +09:19:20, 1094.6, 874.5,-0.06241, 0.043971 +09:24:26, 1094.6, 873.2,-0.06635, 0.045956 +09:29:34, 1092.5, 874.4,-0.046905, 0.045537 +09:34:40, 1092.5, 874,-0.045189, 0.046929 +09:39:47, 1093.9, 873.1,-0.064249, 0.049993 +09:44:53, 1090.7, 872.7,-0.064463, 0.049656 +09:49:59, 1090.2, 872.5,-0.042274, 0.050164 +09:55:07, 1094.9, 874.7,-0.062986, 0.047024 +10:00:13, 1094.5, 873.9,-0.047026, 0.050467 +10:05:19, 1090.1, 867.9,-0.072768, 0.055509 +10:10:25, 1089.2, 870.2,-0.051434, 0.047583 +10:15:33, 1087.2, 870.8,-0.07974, 0.047684 +10:20:39, 1088.5, 869.3,-0.077472, 0.050213 +10:25:46, 1088.5, 869.5,-0.052469, 0.047447 +10:30:53, 1085.6, 866.3,-0.079447, 0.053265 +10:35:59, 1084.5, 870.2,-0.062915, 0.048998 +10:41:05, 1087.2, 868.8,-0.072563, 0.052968 +10:46:11, 1088.3, 869.2,-0.073626, 0.050495 +10:51:18, 1086.3, 870.4,-0.061491, 0.051031 +10:56:24, 1085.6, 869.1,-0.058558, 0.051483 +11:01:32, 1087.7, 867.3,-0.075988, 0.053007 +11:06:38, 1085.5, 868.4,-0.076915, 0.053232 +11:11:43, 1084.4, 867,-0.063152, 0.054525 +11:16:49, 1084.9, 869.4,-0.057951, 0.049182 +11:21:57, 1084.6, 869.9,-0.082062, 0.049092 +11:27:03, 1086.5, 867.3,-0.057374, 0.057174 +11:32:09, 1084.8, 868,-0.065534, 0.056068 +11:37:15, 1086.3, 869.3,-0.063686, 0.05045 +11:42:22, 1086.8, 870.5,-0.075117, 0.050376 +11:47:28, 1084.7, 869.6,-0.065606, 0.051288 +11:52:35, 1083.2, 866.5,-0.084646, 0.053896 +11:57:43, 1084.1, 867.9,-0.06012, 0.05496 +11:59:00, 1088.4, 868.8,-0.076482, 0.065731 +12:04:06, 1088.6, 868.5,-0.075798, 0.065046 +12:09:11, 1086.2, 870.3,-0.083481, 0.060803 +12:14:17, 1088.2, 869.6,-0.070638, 0.062346 +12:19:23, 1088.7, 868.2,-0.069533, 0.065481 +12:24:29, 1090.7, 868.3,-0.06659, 0.065482 +12:29:35, 1092.7, 866.8,-0.061025, 0.06676 +12:34:41, 1090.2, 869.7,-0.069311, 0.063017 +12:39:47, 1092.2, 869.8,-0.056527, 0.062016 +12:44:52, 1112.3, 850.5, 0.04966, 0.10371 +12:49:58, 1111.8, 863.2, 0.051658, 0.077989 +12:55:04, 1109.4, 874, 0.027556, 0.055713 +13:00:09, 1109.5, 873.1, 0.032834, 0.058692 +13:05:15, 1113.5, 874.5, 0.036455, 0.054885 +13:10:21, 1111, 873.8, 0.031303, 0.056003 +13:15:27, 1109, 872.5, 0.038276, 0.058991 +13:20:33, 1109.9, 873.1, 0.031477, 0.05798 +13:25:39, 1111.4, 872.8, 0.031182, 0.057984 +13:30:44, 1111.1, 874.9, 0.033867, 0.055528 +13:35:50, 1112.4, 874.2, 0.034476, 0.05649 +13:40:56, 1114.4, 874.4, 0.041443, 0.057118 +13:46:02, 1112.6, 875.9, 0.034084, 0.055139 +13:51:08, 1111.4, 874.8, 0.032731, 0.053112 +13:56:14, 1113.4, 876.6, 0.035743, 0.05341 +14:01:19, 1115.8, 875.6, 0.039268, 0.056284 +14:06:25, 1113.9, 878, 0.036519, 0.051352 +14:11:31, 1111.9, 876.5, 0.036827, 0.053118 +14:16:37, 1114.5, 876, 0.041577, 0.054167 +14:21:43, 1116.7, 876.5, 0.044925, 0.053997 +14:26:48, 1115.2, 876.3, 0.036758, 0.053849 +14:31:54, 1114.4, 878.8, 0.037616, 0.050496 +14:37:00, 1115.5, 878.4, 0.043492, 0.051726 +14:42:05, 1116.4, 877, 0.046624, 0.054037 +14:47:11, 1113.7, 877.5, 0.039416, 0.050736 +14:52:17, 1116.1, 879.7, 0.044124, 0.049925 +14:57:22, 1117.3, 877.9, 0.053136, 0.052914 +15:02:28, 1113.6, 878, 0.044115, 0.052158 +15:07:34, 1113.9, 878.2, 0.040034, 0.047948 +15:12:40, 1111.9, 876.8, 0.034813, 0.051975 +15:17:46, 1117, 876, 0.050279, 0.054367 +15:22:52, 1115.9, 877.4, 0.045172, 0.053026 +15:27:58, 1112.4, 876.5, 0.039972, 0.053036 +15:33:03, 1114, 875.6, 0.046774, 0.052996 +15:38:09, 1114, 875.7, 0.042843, 0.054435 +15:43:15, 1115.9, 875.7, 0.044451, 0.054752 +15:48:20, 1115.5, 875.3, 0.044003, 0.052915 +15:53:26, 1111.7, 874.5, 0.036981, 0.055973 +15:58:32, 1112.2, 876.2, 0.03839, 0.0529 +16:03:37, 1114.5, 875, 0.041577, 0.054337 +16:08:43, 1115, 874.1, 0.038677, 0.056231 +16:13:49, 1115.8, 876.1, 0.044489, 0.055163 +16:18:54, 1113.5, 876.8, 0.035821, 0.054732 +16:24:00, 1116, 876.5, 0.042683, 0.056534 +16:29:06, 1115.7, 878, 0.040596, 0.054578 +16:34:12, 1113.8, 877.2, 0.035674, 0.054329 +16:39:18, 1116.2, 876.4, 0.043127, 0.057105 +16:44:24, 1113.8, 875.9, 0.041567, 0.059277 +16:49:29, 1113.8, 875.3, 0.037544, 0.05579 +16:54:35, 1113.3, 875.3, 0.042273, 0.05777 +16:59:41, 1112.7, 876.9, 0.029153, 0.053549 +17:04:47, 1112.3, 875.6, 0.029099, 0.060035 +17:09:52, 1115.1, 876, 0.043104, 0.057382 +17:14:58, 1113.5, 876.1, 0.033973, 0.056598 +17:20:04, 1112.1, 876.2, 0.040206, 0.055084 +17:25:10, 1112.8, 875.9, 0.035065, 0.056058 +17:30:15, 1112.9, 876.9, 0.028595, 0.057244 +17:35:21, 1115.9, 876.1, 0.038115, 0.056979 +17:40:27, 1111.7, 877, 0.028549, 0.056126 +17:45:32, 1109.7, 875.4, 0.033823, 0.054598 +17:50:38, 1112, 875.7, 0.035057, 0.056551 +17:55:44, 1110.9, 876.6, 0.026614, 0.056027 +17:57:03, 1081.3, 875.8,-0.11122, 0.045013 +18:02:09, 1079.9, 873.8,-0.12293, 0.050853 +18:07:14, 1078.2, 874.4,-0.12417, 0.04782 diff --git a/pxii_bec/macros/luts/beampos/beampos_20260719_20_12p4_6to18.csv b/pxii_bec/macros/luts/beampos/beampos_20260719_20_12p4_6to18.csv new file mode 100644 index 0000000..995ea5d --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_20260719_20_12p4_6to18.csv @@ -0,0 +1,243 @@ +Beam size: 25 x 25, Energy: 12400 eV, Zoom: 1000.0 +Time,Scin_x,Scin_y,BPM_x,BPM_y +22:36:25, 1060.4, 878.9,-0.10583,-0.0084627 +22:38:31, 1063.3, 881.9,-0.1066,-0.0073115 +22:40:37, 1063.9, 881.4,-0.10975,-0.0055692 +22:42:43, 1065, 883.9,-0.1324,-0.0099198 +22:44:49, 1066.7, 884.9,-0.13217,-0.0094756 +22:46:55, 1067.1, 885.5,-0.11527,-0.0077712 +22:49:03, 1069.5, 886.4,-0.12735,-0.0080743 +22:51:09, 1072.6, 886.3,-0.12191,-0.0092353 +22:53:15, 1072, 888.3,-0.11964,-0.0056324 +22:55:22, 1074.4, 889.6,-0.1025,-0.010078 +22:57:29, 1073.6, 889.6,-0.11851,-0.010061 +22:59:35, 1075.4, 889.1,-0.12013,-0.010561 +23:03:39, 1086.1, 878.6,-0.10838, 0.0059334 +23:05:44, 1088.5, 890.3,-0.11136,-0.01826 +23:07:50, 1090.2, 886.6,-0.11445,-0.0036606 +23:09:56, 1089.8, 888.5,-0.11115,-0.0081606 +23:12:02, 1088.9, 886.5,-0.10979,-9.9095e-05 +23:14:07, 1091.4, 886.4,-0.11265,-0.00089106 +23:16:13, 1091.9, 889.5,-0.11494,-0.0021195 +23:18:19, 1093, 887.9,-0.11659, 0.0020202 +23:20:25, 1093.7, 887.8,-0.11693,-0.00030628 +23:22:31, 1093.9, 891.1,-0.11816,-0.0057121 +23:24:37, 1091.7, 886.6,-0.12128, 0.0051707 +23:26:42, 1090.3, 887.7,-0.11649, 0.0031412 +23:28:48, 1090.4, 887,-0.11383, 0.0019807 +23:30:54, 1091, 888.7,-0.11061, 0.001034 +23:33:00, 1092.5, 890,-0.11252,-0.0065677 +23:35:06, 1093.6, 889.7,-0.11642,-0.0025576 +23:37:12, 1090.8, 891.6,-0.12155,-0.0063002 +23:39:18, 1091.4, 890.6,-0.12272,-0.0048353 +23:41:24, 1093.8, 890.1,-0.12113,-0.0013978 +23:43:30, 1094.6, 891.6,-0.11878,-0.0034721 +23:45:36, 1094.7, 888.1,-0.11605, 0.0064705 +23:47:42, 1096.6, 890.6,-0.11813,-0.0016227 +23:49:48, 1094.8, 890.5,-0.11452, 0.0015881 +23:51:54, 1094.8, 891.3,-0.1147,-0.0027561 +23:53:59, 1093.4, 891.4,-0.11232,-0.0017604 +23:56:05, 1095.8, 889.5,-0.11213, 0.0012026 +23:58:11, 1091.7, 890.9,-0.11552,-4.8605e-05 +00:00:30, 1088.3, 894.7,-0.10247,-0.022685 +00:02:35, 1091.7, 890.6,-0.091432,-0.0026408 +00:04:41, 1090.4, 893.2,-0.091495,-0.010632 +00:06:47, 1092.1, 893.1,-0.088456,-0.0092543 +00:08:53, 1093.2, 895.7,-0.08548,-0.013679 +00:10:59, 1095.5, 892,-0.08163,-0.0053854 +00:13:04, 1093, 895.9,-0.085617,-0.01478 +00:15:10, 1092.1, 893,-0.087674,-0.0047268 +00:17:16, 1092.7, 897.5,-0.090985,-0.016994 +00:19:22, 1091.5, 895.4,-0.088027,-0.013004 +00:21:28, 1092.7, 893.4,-0.084513,-0.0078035 +00:23:33, 1093.4, 895.6,-0.081424,-0.013122 +00:25:39, 1095, 895.1,-0.077877,-0.007636 +00:27:45, 1095.7, 895.4,-0.080481,-0.010022 +00:29:51, 1093.9, 895.8,-0.084139,-0.01127 +00:31:57, 1095.9, 895.8,-0.083969,-0.0097662 +00:34:03, 1095.8, 895.1,-0.083824,-0.0075766 +00:36:08, 1096.1, 895.4,-0.081804,-0.0069044 +00:38:14, 1096.8, 895.7,-0.079827,-0.0087801 +00:40:21, 1097.8, 895.1,-0.078845,-0.0060065 +00:42:26, 1094.9, 898.4,-0.083426,-0.014225 +00:44:32, 1096.5, 897.1,-0.085291,-0.012956 +00:46:38, 1095.4, 894.4,-0.086194,-0.0030342 +00:48:44, 1091.8, 894.4,-0.091819,-0.007776 +00:50:50, 1096.9, 895,-0.086827,-0.006593 +00:52:55, 1093.8, 896.5,-0.083934,-0.010891 +00:55:02, 1095.9, 892.6,-0.078386,-0.00066634 +00:57:08, 1094.8, 895.5,-0.080492,-0.0060498 +00:59:14, 1095.4, 893.8,-0.079348,-0.0010273 +01:00:57, 1086.2, 886.6,-0.065065,-0.00013186 +01:03:03, 1084.7, 887.7,-0.074515,-0.0017025 +01:05:08, 1086, 889.3,-0.077061,-0.00024336 +01:07:14, 1084.6, 887.9,-0.08186, 0.0007312 +01:09:20, 1084.7, 887.2,-0.078934, 0.0048637 +01:11:25, 1083.8, 889.2,-0.083071,-0.0023657 +01:13:31, 1083.6, 889.9,-0.082672,-0.0024003 +01:15:37, 1084.6, 888.5,-0.082158,-0.0016185 +01:17:43, 1084.7, 888.3,-0.078614, 0.0024562 +01:19:49, 1084.5, 891.1,-0.076958,-0.0058177 +01:21:56, 1083.9, 889.6,-0.07548, 0.0016631 +01:24:02, 1084.4, 891.3,-0.078394,-0.0033353 +01:26:08, 1085, 887.4,-0.081657, 0.0040334 +01:28:14, 1084.2, 890,-0.080469,-0.00024043 +01:30:20, 1085.4, 889.7,-0.085927,-0.0057618 +01:32:27, 1086.8, 891.8,-0.083425,-0.0068752 +01:34:33, 1085.6, 890.1,-0.086878,-0.0048822 +01:36:39, 1084.6, 892.9,-0.083786,-0.0098233 +01:38:44, 1083.4, 889.8,-0.081551,-0.0053882 +01:40:50, 1085.7, 890.6,-0.075925,-0.0068812 +01:42:56, 1084.1, 890.1,-0.075559,-0.0051225 +01:45:02, 1085.4, 892.2,-0.076528,-0.010656 +01:47:08, 1083.2, 890.7,-0.077802,-0.0069342 +01:49:13, 1083.7, 892.8,-0.082591,-0.013723 +01:51:19, 1083.3, 890.7,-0.084526,-0.0091534 +01:53:25, 1081.9, 892.1,-0.089283,-0.012845 +01:55:32, 1083.8, 892.4,-0.087885,-0.0087082 +01:57:38, 1080.9, 893.3,-0.088293,-0.013436 +01:59:44, 1082.4, 891.9,-0.084131,-0.0047178 +02:01:24, 1089.8, 885.8,-0.076, 0.032848 +02:03:30, 1092.4, 889.2,-0.054165, 0.028047 +02:05:37, 1090.5, 884.4,-0.071597, 0.033274 +02:07:43, 1093.4, 887.4,-0.068904, 0.028838 +02:09:49, 1094.7, 885.9,-0.066548, 0.029639 +02:11:55, 1091.4, 885.9,-0.06624, 0.031237 +02:14:01, 1091.6, 885.3,-0.065731, 0.032068 +02:16:06, 1092.3, 885.7,-0.066224, 0.03011 +02:18:12, 1094.7, 886,-0.044613, 0.031121 +02:20:18, 1093.7, 886.2,-0.041754, 0.029849 +02:22:26, 1091.9, 886.8,-0.060506, 0.029507 +02:24:33, 1096.3, 888.9,-0.03123, 0.026509 +02:26:40, 1095.2, 888.2,-0.053696, 0.029404 +02:28:46, 1094.1, 888.1,-0.03567, 0.027089 +02:30:52, 1094.2, 888,-0.03523, 0.028663 +02:32:58, 1097.2, 887.2,-0.028733, 0.030174 +02:35:03, 1097.3, 887.9,-0.047942, 0.029229 +02:37:09, 1096, 887.4,-0.05307, 0.029778 +02:39:14, 1095.8, 886.7,-0.031823, 0.031276 +02:41:21, 1095.8, 887.2,-0.035524, 0.030281 +02:43:27, 1095, 889.2,-0.052045, 0.024124 +02:45:34, 1095.8, 885.9,-0.025722, 0.03354 +02:47:40, 1097.2, 889,-0.026883, 0.025967 +02:49:46, 1095.3, 886.4,-0.028725, 0.030098 +02:51:54, 1097.8, 886.4,-0.051672, 0.031952 +02:54:00, 1097.6, 889.5,-0.036, 0.026482 +02:56:05, 1095.1, 887.3,-0.033187, 0.028698 +02:58:13, 1095.2, 887.6,-0.049451, 0.024264 +02:59:19, 1088.8, 886.1,-0.066777, 0.023394 +03:01:24, 1088.8, 886.9,-0.067831, 0.023045 +03:03:32, 1086.6, 888.1,-0.093135, 0.01838 +03:05:37, 1087.2, 886.5,-0.086424, 0.022722 +03:07:43, 1086.9, 888.1,-0.066847, 0.01881 +03:09:50, 1087.6, 888.3,-0.083542, 0.020706 +03:11:58, 1088, 889.2,-0.066662, 0.018156 +03:14:03, 1086.7, 888.5,-0.067556, 0.016385 +03:16:09, 1088.7, 886.2,-0.067532, 0.023735 +03:18:15, 1087.9, 890.6,-0.069117, 0.018238 +03:20:21, 1088.5, 889.6,-0.086728, 0.016721 +03:22:28, 1087.7, 887.9,-0.063337, 0.021393 +03:24:35, 1091, 889.3,-0.061427, 0.021218 +03:26:42, 1090.3, 890.7,-0.081099, 0.016934 +03:28:47, 1089.3, 889.5,-0.06018, 0.019599 +03:30:54, 1090.4, 889.2,-0.078334, 0.017338 +03:33:02, 1089.4, 890.2,-0.063479, 0.019633 +03:35:08, 1088.8, 889.7,-0.064698, 0.019546 +03:37:14, 1086.7, 890.7,-0.06736, 0.016639 +03:39:20, 1088.3, 886.7,-0.063542, 0.023539 +03:41:26, 1088.8, 890.6,-0.06362, 0.01551 +03:43:33, 1091.6, 889.1,-0.078626, 0.02067 +03:45:39, 1090.6, 889.2,-0.081025, 0.018433 +03:47:46, 1090.8, 889,-0.064292, 0.018227 +03:49:54, 1088.1, 889.5,-0.086955, 0.015797 +03:51:59, 1089.2, 889.9,-0.067474, 0.015368 +03:54:05, 1090.6, 889.3,-0.063786, 0.015413 +03:56:11, 1090.3, 889.4,-0.060395, 0.015081 +03:58:17, 1092.3, 889.1,-0.058559, 0.015406 +03:59:44, 1085.5, 885.7,-0.098346, 0.028605 +04:01:51, 1084.7, 883.6,-0.10983, 0.028994 +04:03:59, 1084.1, 885.9,-0.099608, 0.028806 +04:06:06, 1084.4, 885.7,-0.11286, 0.026572 +04:08:12, 1084.9, 885.4,-0.11494, 0.028373 +04:10:17, 1084.4, 887.4,-0.10967, 0.026349 +04:12:23, 1087.1, 885.4,-0.10401, 0.028785 +04:14:29, 1086.8, 887.3,-0.10464, 0.024945 +04:16:34, 1086, 885.7,-0.10224, 0.030138 +04:18:40, 1085.9, 888.1,-0.10274, 0.023789 +04:20:49, 1085.7, 886.4,-0.088085, 0.030793 +04:22:54, 1087.2, 887.6,-0.090379, 0.024066 +04:25:01, 1083.9, 886.8,-0.10515, 0.031232 +04:27:08, 1083.1, 887.3,-0.099723, 0.02765 +04:29:14, 1083.1, 885.8,-0.10305, 0.026765 +04:31:20, 1084, 884.6,-0.1004, 0.02838 +04:33:27, 1084.7, 886.5,-0.11276, 0.025315 +04:35:33, 1086.1, 884.7,-0.10571, 0.029943 +04:37:39, 1086.2, 888.2,-0.10983, 0.021139 +04:39:47, 1087.4, 885.4,-0.096865, 0.031181 +04:41:53, 1086.2, 888.6,-0.099061, 0.025925 +04:43:58, 1084.5, 886.2,-0.0989, 0.029481 +04:46:06, 1082.1, 886.6,-0.1155, 0.026603 +04:48:12, 1084.4, 885.1,-0.11323, 0.028742 +04:50:18, 1083, 884.7,-0.10087, 0.031223 +04:52:24, 1082.3, 883.4,-0.097488, 0.032156 +04:54:30, 1085.1, 886.6,-0.10599, 0.026845 +04:56:36, 1085.5, 884.1,-0.092027, 0.031292 +04:58:43, 1086.1, 886.5,-0.10409, 0.026272 +05:00:07, 1085, 883.8,-0.076696, 0.025634 +05:02:13, 1086.9, 882.4,-0.074979, 0.025503 +05:04:19, 1086, 883.1,-0.081743, 0.024614 +05:06:25, 1085.9, 882.8,-0.075776, 0.026175 +05:08:31, 1083.8, 883.9,-0.082228, 0.026293 +05:10:38, 1084.2, 883.9,-0.091544, 0.024279 +05:12:44, 1080.9, 882.6,-0.082779, 0.025366 +05:14:51, 1083.2, 883.9,-0.092996, 0.022878 +05:16:59, 1082.3, 884.5,-0.082728, 0.024254 +05:19:05, 1085.8, 883.8,-0.078074, 0.025324 +05:21:11, 1083.4, 883,-0.08049, 0.025883 +05:23:17, 1083.2, 883.2,-0.082627, 0.025098 +05:25:23, 1083.2, 882,-0.083604, 0.027314 +05:27:30, 1083.6, 885,-0.096756, 0.020698 +05:29:36, 1084.8, 883.2,-0.076157, 0.027332 +05:31:42, 1084.2, 884.5,-0.077174, 0.022879 +05:33:48, 1086, 883.2,-0.077332, 0.027437 +05:35:54, 1083.3, 885.4,-0.095597, 0.019258 +05:38:00, 1083.3, 884,-0.094601, 0.025104 +05:40:06, 1084.8, 885.3,-0.09063, 0.020397 +05:42:12, 1085.4, 883.9,-0.082295, 0.025197 +05:44:17, 1084.7, 884.8,-0.08566, 0.022262 +05:46:25, 1084.3, 883.8,-0.084293, 0.026268 +05:48:33, 1082, 883.5,-0.098464, 0.025377 +05:50:39, 1081.4, 884,-0.10101, 0.022308 +05:52:45, 1082.2, 884.8,-0.099798, 0.022877 +05:54:51, 1082.4, 883.3,-0.08863, 0.026499 +05:56:58, 1084.4, 885.2,-0.091666, 0.023724 +05:59:03, 1083.6, 884,-0.091715, 0.022943 +06:00:07, 1082, 883.4,-0.11192, 0.037721 +06:02:12, 1083, 885,-0.11957, 0.038156 +06:04:18, 1084.8, 886,-0.11856, 0.036642 +06:06:26, 1084.5, 885.7,-0.10789, 0.037436 +06:08:33, 1084.9, 884.5,-0.11389, 0.037365 +06:10:39, 1085.3, 885.9,-0.1102, 0.035751 +06:12:47, 1087.5, 883.5,-0.089998, 0.040013 +06:14:53, 1085.4, 884.6,-0.093043, 0.038193 +06:16:59, 1084.4, 883.8,-0.098512, 0.039186 +06:19:05, 1084.4, 885,-0.098786, 0.037087 +06:21:11, 1083.1, 885,-0.10092, 0.038601 +06:23:16, 1085.7, 883.8,-0.097485, 0.038191 +06:25:22, 1085.6, 884.7,-0.090524, 0.039356 +06:27:28, 1086.8, 884.1,-0.09521, 0.041347 +06:29:34, 1086.8, 885.6,-0.101, 0.040327 +06:31:42, 1086, 884.6,-0.094068, 0.04094 +06:33:49, 1084.9, 887,-0.10728, 0.037482 +06:35:55, 1084.7, 885.9,-0.10485, 0.041545 +06:38:02, 1084.7, 886.1,-0.098321, 0.036696 +06:40:08, 1085.7, 882.4,-0.089756, 0.040941 +06:42:14, 1084.9, 884.1,-0.099562, 0.036133 +06:44:20, 1086.9, 882.9,-0.091885, 0.040227 +06:46:28, 1085.8, 883.8,-0.08283, 0.035471 +06:48:36, 1087.2, 884.2,-0.089415, 0.039128 +06:50:43, 1087.9, 884.6,-0.08288, 0.037156 +06:52:51, 1086.9, 884.7,-0.096839, 0.040378 +06:54:58, 1087.4, 885,-0.091789, 0.036039 +06:57:05, 1086.7, 885.2,-0.10133, 0.039144 +06:59:11, 1088.2, 885.9,-0.10203, 0.038694 diff --git a/pxii_bec/macros/luts/beampos/beampos_3rdJul.csv b/pxii_bec/macros/luts/beampos/beampos_3rdJul.csv new file mode 100644 index 0000000..b0fba7a --- /dev/null +++ b/pxii_bec/macros/luts/beampos/beampos_3rdJul.csv @@ -0,0 +1,50 @@ +Beam size: focus, Energy: 12400 eV, Zoom: 116.0 +Time,Scin_x,Scin_y +22:42:33, 1004.4, 975.1 +22:47:51, 1004.2, 974.9 +22:49:25, 1004, 975.1 +22:59:29, 1004.3, 974.9 +23:09:32, 1004, 974.9 +23:19:35, 1004, 975 +23:29:40, 1003.8, 975 +23:39:43, 1004, 975.1 +23:49:46, 1003.8, 975.1 +23:59:50, 1003.9, 975 +00:09:53, 1004.1, 974.8 +00:19:56, 1004.1, 975.4 +00:29:59, 1003.8, 975.2 +00:40:02, 1003.7, 975 +00:50:06, 1003.9, 975.1 +01:00:09, 1003.7, 975 +01:10:13, 1003.9, 975.4 +01:20:17, 1003.8, 975.2 +01:30:20, 1003.5, 975.2 +01:40:24, 1003.6, 975.4 +01:50:27, 1003.6, 975.5 +02:00:30, 1003.6, 975.3 +02:10:34, 1003.6, 975.3 +02:20:37, 1003.4, 975.1 +02:30:40, 1003.3, 975 +02:40:43, 1003.6, 975.5 +02:50:46, 1003.4, 975.4 +03:00:50, 1003.6, 975.7 +03:10:53, 1003.4, 975.3 +03:20:56, 1003.3, 975.5 +03:30:59, 1003.3, 975.6 +03:41:03, 1003.1, 975.4 +03:51:06, 1003.2, 975.5 +04:01:09, 1003.3, 975.8 +04:11:12, 1003.2, 975.4 +04:21:17, 1003.2, 976.1 +04:31:20, 1003.1, 975.8 +04:41:24, 1003.3, 975.7 +04:51:27, 1003.1, 975.8 +05:01:30, 1003.3, 975.7 +05:11:33, 1003.1, 975.9 +05:21:37, 1003.5, 975.7 +05:31:40, 1003, 975.9 +05:41:44, 1003, 975.9 +05:51:47, 1003, 975.9 +06:01:51, 1002.8, 975.8 +06:11:54, 1002.9, 976 +06:21:58, 1002.9, 976 diff --git a/pxii_bec/macros/luts/bpm_calib/10000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/10000_bpm_flux.png new file mode 100644 index 0000000..6803900 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/10000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/11000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/11000_bpm_flux.png new file mode 100644 index 0000000..81e7d24 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/11000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/12400_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/12400_bpm_flux.png new file mode 100644 index 0000000..c64e1e7 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/12400_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/13000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/13000_bpm_flux.png new file mode 100644 index 0000000..9e52061 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/13000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/14000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/14000_bpm_flux.png new file mode 100644 index 0000000..4c556f2 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/14000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/15000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/15000_bpm_flux.png new file mode 100644 index 0000000..3296449 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/15000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/16000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/16000_bpm_flux.png new file mode 100644 index 0000000..3542b7b Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/16000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/18000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/18000_bpm_flux.png new file mode 100644 index 0000000..6e62202 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/18000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/20000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/20000_bpm_flux.png new file mode 100644 index 0000000..d1f3c53 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/20000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/25000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/25000_bpm_flux.png new file mode 100644 index 0000000..4a01680 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/25000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/26000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/26000_bpm_flux.png new file mode 100644 index 0000000..e2c28f6 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/26000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/7000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/7000_bpm_flux.png new file mode 100644 index 0000000..1c8223b Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/7000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/8000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/8000_bpm_flux.png new file mode 100644 index 0000000..66bafb9 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/8000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/9000_bpm_flux.png b/pxii_bec/macros/luts/bpm_calib/9000_bpm_flux.png new file mode 100644 index 0000000..6f2c69e Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/9000_bpm_flux.png differ diff --git a/pxii_bec/macros/luts/bpm_calib/bpm_flux_20260708b.csv b/pxii_bec/macros/luts/bpm_calib/bpm_flux_20260708b.csv new file mode 100644 index 0000000..db63a8e --- /dev/null +++ b/pxii_bec/macros/luts/bpm_calib/bpm_flux_20260708b.csv @@ -0,0 +1,131 @@ +Energy,Transmission,BPMSum,Flux +12400,1,1.134e+04,7532685061250.3232 +12400,0.899,1.024e+04,6772294984160.3574 +12400,0.809,9201,6124470356347.3281 +12400,0.702,8088,5350302915005.6543 +12400,0.609,7155,4645292348765.6748 +12400,0.493,5920,3800337276438.1807 +12400,0.399,4833,3070548562164.8252 +12400,0.3,3720,2358333169603.6377 +12400,0.198,2263,1336342740375.0320 +12400,0.101,1235,703770666171.1462 +7000,1,4.476e+04,6436140512915.9844 +7000,0.827,3.736e+04,5309285982050.1934 +7000,0.827,3.733e+04,5314654213065.4043 +7000,0.683,3.111e+04,4387320028299.9258 +7000,0.565,2.601e+04,3635399701661.0376 +7000,0.467,2.172e+04,2998422523135.2920 +7000,0.386,1.814e+04,2478441009469.7397 +7000,0.319,1.492e+04,2045070504283.2258 +7000,0.218,1.082e+04,1451488946687.8269 +7000,0.102,5346,676413776966.3547 +8000,1,6.793e+04,15727843170276.4590 +8000,0.879,6.004e+04,13819254581986.3848 +8000,0.773,5.307e+04,12136254901317.5352 +8000,0.679,4.695e+04,10675936744224.1504 +8000,0.597,4.118e+04,9357424735313.9023 +8000,0.525,3.667e+04,8122632777481.4893 +8000,0.406,2.868e+04,6347657504982.6934 +8000,0.314,2.304e+04,4977908252322.6572 +8000,0.187,1.458e+04,3099165995576.0337 +8000,0.0993,1389,249826707654.1367 +9000,1,4.571e+04,14720286303762.9180 +9000,0.913,4.188e+04,13425038163601.8105 +9000,0.833,3.838e+04,12251518687857.9785 +9000,0.694,3.224e+04,10199573059049.3828 +9000,0.579,2.712e+04,8506152395963.5654 +9000,0.482,2.323e+04,7206595047434.1689 +9000,0.402,1.984e+04,6106446365403.7188 +9000,0.306,1.493e+04,4635761419761.6670 +9000,0.194,1.014e+04,3009683711654.2842 +9000,0.101,1556,408976390274.0555 +10000,1,2.023e+04,8554050080482.5293 +10000,0.875,1.779e+04,7476890158819.9688 +10000,0.818,1.67e+04,7000855035082.3701 +10000,0.716,1.47e+04,6115274111160.3066 +10000,0.586,1.231e+04,5067725135453.7754 +10000,0.512,1.093e+04,4484909241068.2422 +10000,0.392,8443,3383799628557.7827 +10000,0.3,6691,2675117112135.6924 +10000,0.201,4578,1801542560326.4976 +10000,0.0997,2143,747500728252.5858 +11000,1,2.426e+04,12815460791802.7754 +11000,0.904,2.156e+04,11555157515199.1191 +11000,0.817,1.997e+04,10455371003355.1328 +11000,0.702,1.719e+04,9074253118134.4902 +11000,0.604,1.488e+04,7796747595336.0684 +11000,0.494,1.257e+04,6432916602849.3584 +11000,0.403,1.033e+04,5314987494364.1875 +11000,0.298,7905,3942785493561.6626 +11000,0.199,5535,2702467756059.4136 +11000,0.1,1116,461789044357.9803 +13000,1,9022,6624921473596.8174 +13000,0.912,8268,6043893299677.2012 +13000,0.806,7285,5368301791267.5469 +13000,0.691,6381,4600035039332.9805 +13000,0.593,5542,3966206972358.2070 +13000,0.493,4697,3331970904653.3179 +13000,0.398,3859,2677258422609.1279 +13000,0.3,2600,1758092651244.1499 +13000,0.201,1848,1200803654456.2910 +13000,0.0989,867,529121536316.5936 +14000,1,6897,5884631205475.0830 +14000,0.906,6273,5324536184671.7246 +14000,0.801,5603,4729963961205.1719 +14000,0.708,5006,4195582791145.1680 +14000,0.596,4285,3563093355709.6265 +14000,0.501,3623,3017097382502.4009 +14000,0.401,2990,2438633585090.8047 +14000,0.302,2040,1615445561826.5513 +14000,0.2,1279,970509043793.6504 +14000,0.1,689.5,501819180706.3018 +15000,1,4340,4136863338360.4150 +15000,0.904,3943,3739295639865.4609 +15000,0.802,3528,3323261712444.9971 +15000,0.696,3115,2914643137864.3525 +15000,0.605,2697,2533508310799.8457 +15000,0.505,2076,1902873354197.9543 +15000,0.397,1693,1511647186618.8613 +15000,0.299,1312,1153043903278.7817 +15000,0.2,828.5,706391392607.8254 +15000,0.0991,395.2,312236130428.1239 +16000,1,2828,3012195510638.8330 +16000,0.905,2536,2720823225691.5381 +16000,0.806,2295,2440595256954.2891 +16000,0.694,2017,2106106465175.7031 +16000,0.598,1762,1825082730154.0757 +16000,0.498,1488,1526813590293.4890 +16000,0.399,1122,1121512371786.7903 +16000,0.301,857.6,853216827892.0696 +16000,0.201,555.5,524130222779.8034 +16000,0.1,251.1,221346448884.6107 +18000,1,1550,2041394587295.4211 +18000,0.9,1393,1840053256930.5376 +18000,0.801,1265,1642496879398.7856 +18000,0.696,1111,1432057243025.0005 +18000,0.597,906.1,1150019150956.6804 +18000,0.501,769.9,966366493137.8896 +18000,0.4,593.6,726166538741.6500 +18000,0.299,456.4,547583807753.1071 +18000,0.2,279.8,320262340785.0782 +18000,0.1,139.1,149745285222.3748 +20000,1,902.4,1404116947130.5781 +20000,0.902,822.1,1267604115818.5461 +20000,0.8,726,1120749228302.4438 +20000,0.699,622.1,938563254146.6006 +20000,0.599,543.4,799094377554.7214 +20000,0.501,443.7,646189096027.0322 +20000,0.401,355.8,521226898742.6551 +20000,0.3,258.6,367712921576.5609 +20000,0.199,165.2,221086451588.1793 +20000,0.0998,35.81,39886019479.0598 +25000,1,25.28,45346813745.1336 +25000,0.898,22.8,40319503557.9165 +25000,0.799,20.26,33682007591.4503 +25000,0.701,17.55,28359078382.7308 +25000,0.599,15,22116049681.7357 +25000,0.501,12.33,18600276912.8541 +25000,0.4,9.836,13178730948.7196 +25000,0.3,7.675,9630076458.1290 +25000,0.2,5.088,4339930537.8026 +25000,0.1,2.907,1875578706.7481 diff --git a/pxii_bec/macros/luts/bpm_calib/bpm_flux_fits.csv b/pxii_bec/macros/luts/bpm_calib/bpm_flux_fits.csv new file mode 100644 index 0000000..fd65119 --- /dev/null +++ b/pxii_bec/macros/luts/bpm_calib/bpm_flux_fits.csv @@ -0,0 +1,13 @@ +Energy,Slope,Intercept,R2 +7000,1.4144e+08,0,0.999 +8000,2.2797e+08,0,0.999 +9000,3.1771e+08,0,0.999 +10000,4.1669e+08,0,0.998 +11000,5.254e+08,0,0.999 +12400,6.5738e+08,0,0.998 +13000,7.2457e+08,0,0.998 +14000,8.4107e+08,0,0.999 +15000,9.3907e+08,0,0.998 +16000,1.0522e+09,0,0.998 +18000,1.2945e+09,0,0.997 +20000,1.522e+09,0,0.997 diff --git a/pxii_bec/macros/luts/bpm_calib/fits-25.csv b/pxii_bec/macros/luts/bpm_calib/fits-25.csv new file mode 100644 index 0000000..fd65119 --- /dev/null +++ b/pxii_bec/macros/luts/bpm_calib/fits-25.csv @@ -0,0 +1,13 @@ +Energy,Slope,Intercept,R2 +7000,1.4144e+08,0,0.999 +8000,2.2797e+08,0,0.999 +9000,3.1771e+08,0,0.999 +10000,4.1669e+08,0,0.998 +11000,5.254e+08,0,0.999 +12400,6.5738e+08,0,0.998 +13000,7.2457e+08,0,0.998 +14000,8.4107e+08,0,0.999 +15000,9.3907e+08,0,0.998 +16000,1.0522e+09,0,0.998 +18000,1.2945e+09,0,0.997 +20000,1.522e+09,0,0.997 diff --git a/pxii_bec/macros/luts/bpm_calib/slopes_vs_energy.png b/pxii_bec/macros/luts/bpm_calib/slopes_vs_energy.png new file mode 100644 index 0000000..ed0b9f2 Binary files /dev/null and b/pxii_bec/macros/luts/bpm_calib/slopes_vs_energy.png differ diff --git a/pxii_bec/macros/luts/roll_20000.csv b/pxii_bec/macros/luts/roll_20000.csv new file mode 100644 index 0000000..aed035c --- /dev/null +++ b/pxii_bec/macros/luts/roll_20000.csv @@ -0,0 +1,10 @@ +Roll, Y pos +1,313.4 +2,351.5 +3,388.1 +4,425 +5,460 +6,494.7 +7,526.9 +8,558.8 +9,590.4 diff --git a/pxii_bec/macros/luts/roll_6000.csv b/pxii_bec/macros/luts/roll_6000.csv new file mode 100644 index 0000000..35bd5d2 --- /dev/null +++ b/pxii_bec/macros/luts/roll_6000.csv @@ -0,0 +1,12 @@ +Roll, Y pos +2,125.4 +2.5,194.1 +3,260.1 +3.5,325.8 +4,387.4 +4.5,446.9 +5,504.4 +5.5,558.2 +6,609.9 +6.5,658.1 +7,705.2 diff --git a/pxii_bec/macros/luts/vfm_pitch_energy.csv b/pxii_bec/macros/luts/vfm_pitch_energy.csv new file mode 100644 index 0000000..fa5bcae --- /dev/null +++ b/pxii_bec/macros/luts/vfm_pitch_energy.csv @@ -0,0 +1,96 @@ +energy,pitch,diode +10.00,2.89010,2.778e-05 +10.00,2.91510,2.7708e-05 +10.00,2.94010,2.7698e-05 +10.00,2.96510,2.7769e-05 +10.00,2.99010,2.7757e-05 +11.00,2.89010,7.9613e-05 +11.00,2.91510,7.9352e-05 +11.00,2.94010,7.9336e-05 +11.00,2.96510,7.9483e-05 +11.00,2.99010,7.9565e-05 +12.00,2.89010,7.449e-05 +12.00,2.91510,7.4458e-05 +12.00,2.94010,7.4567e-05 +12.00,2.96510,7.4801e-05 +12.00,2.99010,7.4712e-05 +13.00,2.89010,5.6131e-05 +13.00,2.91510,5.6056e-05 +13.00,2.94010,5.5966e-05 +13.00,2.96510,5.5828e-05 +13.00,2.99010,5.5948e-05 +14.00,2.89010,5.5324e-05 +14.00,2.91510,5.5195e-05 +14.00,2.94010,5.5113e-05 +14.00,2.96510,5.5187e-05 +14.00,2.99010,5.508e-05 +15.00,2.89010,4.1622e-05 +15.00,2.91510,4.1965e-05 +15.00,2.94010,4.2153e-05 +15.00,2.96510,4.2094e-05 +15.00,2.99010,4.2148e-05 +16.00,2.89010,2.8267e-05 +16.00,2.91510,2.8252e-05 +16.00,2.94010,2.8214e-05 +16.00,2.96510,2.8193e-05 +16.00,2.99010,2.8145e-05 +17.00,2.89010,2.1235e-05 +17.00,2.91510,2.1204e-05 +17.00,2.94010,2.1172e-05 +17.00,2.96510,2.1117e-05 +17.00,2.99010,2.1088e-05 +18.00,2.89010,1.7443e-05 +18.00,2.91510,1.7463e-05 +18.00,2.94010,1.7414e-05 +18.00,2.96510,1.7132e-05 +18.00,2.99010,1.7091e-05 +19.00,2.89010,1.1583e-05 +19.00,2.91510,1.1553e-05 +19.00,2.94010,1.1521e-05 +19.00,2.96510,1.1486e-05 +19.00,2.99010,1.144e-05 +20.00,2.89010,1.0526e-05 +20.00,2.91510,1.0445e-05 +20.00,2.94010,1.036e-05 +20.00,2.96510,1.0243e-05 +20.00,2.99010,1.0096e-05 +21.00,2.89010,6.2969e-06 +21.00,2.91510,6.0377e-06 +21.00,2.94010,5.7381e-06 +21.00,2.96510,5.4072e-06 +21.00,2.99010,5.0424e-06 +22.00,2.89010,2.5998e-06 +22.00,2.91510,2.3461e-06 +22.00,2.94010,2.0986e-06 +22.00,2.96510,1.8549e-06 +22.00,2.99010,1.6269e-06 +23.00,2.89010,8.4958e-07 +23.00,2.91510,7.6319e-07 +23.00,2.94010,6.9276e-07 +23.00,2.96510,6.2826e-07 +23.00,2.99010,5.6922e-07 +24.00,2.89010,3.8721e-07 +24.00,2.91510,3.5652e-07 +24.00,2.94010,3.3073e-07 +24.00,2.96510,3.0885e-07 +24.00,2.99010,2.892e-07 +25.00,2.89010,1.7873e-07 +25.00,2.91510,1.6681e-07 +25.00,2.94010,1.5642e-07 +25.00,2.96510,1.4637e-07 +25.00,2.99010,1.3626e-07 +26.00,2.89010,1.3718e-07 +26.00,2.91510,1.2827e-07 +26.00,2.94010,1.1991e-07 +26.00,2.96510,1.1148e-07 +26.00,2.99010,1.0365e-07 +27.00,2.89010,5.8959e-08 +27.00,2.91510,5.5025e-08 +27.00,2.94010,5.1655e-08 +27.00,2.96510,4.9044e-08 +27.00,2.99010,4.715e-08 +28.00,2.89010,3.8685e-08 +28.00,2.91510,3.7246e-08 +28.00,2.94010,3.6209e-08 +28.00,2.96510,3.5094e-08 +28.00,2.99010,3.3689e-08 diff --git a/pxii_bec/macros/luts/x1_data b/pxii_bec/macros/luts/x1_data new file mode 100644 index 0000000..e5d7aae --- /dev/null +++ b/pxii_bec/macros/luts/x1_data @@ -0,0 +1,441 @@ +-1.162165000000001669e+00 +-1.162175000000004843e+00 +-1.162175000000004843e+00 +-1.162179999999999325e+00 +-1.162170000000003256e+00 +-1.162175000000004843e+00 +-1.162165000000001669e+00 +-1.162165000000001669e+00 +-1.162170000000003256e+00 +-1.162175000000004843e+00 +-1.162170000000003256e+00 +-1.162170000000003256e+00 +-1.162160000000000082e+00 +-1.162165000000001669e+00 +-1.162165000000001669e+00 +-1.162175000000004843e+00 +-1.162165000000001669e+00 +-1.162150000000004013e+00 +-1.162179999999999325e+00 +-1.162154999999998495e+00 +-1.162165000000001669e+00 +-1.166699999999998738e+00 +-1.166715000000003499e+00 +-1.166715000000003499e+00 +-1.166710000000001912e+00 +-1.166710000000001912e+00 +-1.166699999999998738e+00 +-1.166710000000001912e+00 +-1.166710000000001912e+00 +-1.166699999999998738e+00 +-1.166715000000003499e+00 +-1.166710000000001912e+00 +-1.166705000000000325e+00 +-1.166705000000000325e+00 +-1.166710000000001912e+00 +-1.166705000000000325e+00 +-1.166715000000003499e+00 +-1.166719999999997981e+00 +-1.166699999999998738e+00 +-1.166705000000000325e+00 +-1.166705000000000325e+00 +-1.166715000000003499e+00 +-1.171800000000004616e+00 +-1.171810000000000684e+00 +-1.171815000000002271e+00 +-1.171804999999999097e+00 +-1.171804999999999097e+00 +-1.171810000000000684e+00 +-1.171820000000003859e+00 +-1.171810000000000684e+00 +-1.171810000000000684e+00 +-1.171815000000002271e+00 +-1.171804999999999097e+00 +-1.171815000000002271e+00 +-1.171790000000001442e+00 +-1.171820000000003859e+00 +-1.171810000000000684e+00 +-1.171804999999999097e+00 +-1.171810000000000684e+00 +-1.171804999999999097e+00 +-1.171820000000003859e+00 +-1.171810000000000684e+00 +-1.171810000000000684e+00 +-1.176900000000003388e+00 +-1.176929999999998699e+00 +-1.176929999999998699e+00 +-1.176929999999998699e+00 +-1.176929999999998699e+00 +-1.176925000000004218e+00 +-1.176915000000001044e+00 +-1.176929999999998699e+00 +-1.176915000000001044e+00 +-1.176920000000002631e+00 +-1.176929999999998699e+00 +-1.176920000000002631e+00 +-1.176915000000001044e+00 +-1.176904999999997870e+00 +-1.176915000000001044e+00 +-1.176929999999998699e+00 +-1.176920000000002631e+00 +-1.176920000000002631e+00 +-1.176929999999998699e+00 +-1.176925000000004218e+00 +-1.176915000000001044e+00 +-1.182000000000002160e+00 +-1.182005000000003747e+00 +-1.182005000000003747e+00 +-1.182009999999998229e+00 +-1.182005000000003747e+00 +-1.182009999999998229e+00 +-1.182005000000003747e+00 +-1.182009999999998229e+00 +-1.182000000000002160e+00 +-1.182005000000003747e+00 +-1.182009999999998229e+00 +-1.182005000000003747e+00 +-1.182009999999998229e+00 +-1.182000000000002160e+00 +-1.182000000000002160e+00 +-1.182000000000002160e+00 +-1.181995000000000573e+00 +-1.182009999999998229e+00 +-1.182000000000002160e+00 +-1.181989999999998986e+00 +-1.181995000000000573e+00 +-1.186875000000000568e+00 +-1.186885000000003743e+00 +-1.186889999999998224e+00 +-1.186900000000001398e+00 +-1.186894999999999811e+00 +-1.186889999999998224e+00 +-1.186880000000002156e+00 +-1.186869999999998981e+00 +-1.186894999999999811e+00 +-1.186880000000002156e+00 +-1.186885000000003743e+00 +-1.186869999999998981e+00 +-1.186900000000001398e+00 +-1.186885000000003743e+00 +-1.186875000000000568e+00 +-1.186869999999998981e+00 +-1.186880000000002156e+00 +-1.186894999999999811e+00 +-1.186885000000003743e+00 +-1.186905000000002985e+00 +-1.186885000000003743e+00 +-1.191994999999998583e+00 +-1.192015000000004932e+00 +-1.192035000000004175e+00 +-1.192010000000003345e+00 +-1.192010000000003345e+00 +-1.192010000000003345e+00 +-1.192015000000004932e+00 +-1.192010000000003345e+00 +-1.192005000000001758e+00 +-1.192019999999999413e+00 +-1.192019999999999413e+00 +-1.192015000000004932e+00 +-1.192015000000004932e+00 +-1.192010000000003345e+00 +-1.192005000000001758e+00 +-1.192010000000003345e+00 +-1.192005000000001758e+00 +-1.192010000000003345e+00 +-1.192015000000004932e+00 +-1.192005000000001758e+00 +-1.192010000000003345e+00 +-1.197079999999999700e+00 +-1.197085000000001287e+00 +-1.197099999999998943e+00 +-1.197090000000002874e+00 +-1.197079999999999700e+00 +-1.197095000000004461e+00 +-1.197074999999998113e+00 +-1.197095000000004461e+00 +-1.197079999999999700e+00 +-1.197070000000003631e+00 +-1.197090000000002874e+00 +-1.197085000000001287e+00 +-1.197079999999999700e+00 +-1.197085000000001287e+00 +-1.197090000000002874e+00 +-1.197090000000002874e+00 +-1.197070000000003631e+00 +-1.197085000000001287e+00 +-1.197085000000001287e+00 +-1.197079999999999700e+00 +-1.197090000000002874e+00 +-1.202030000000000598e+00 +-1.202035000000002185e+00 +-1.202040000000003772e+00 +-1.202044999999998254e+00 +-1.202040000000003772e+00 +-1.202040000000003772e+00 +-1.202030000000000598e+00 +-1.202035000000002185e+00 +-1.202035000000002185e+00 +-1.202035000000002185e+00 +-1.202035000000002185e+00 +-1.202030000000000598e+00 +-1.202030000000000598e+00 +-1.202044999999998254e+00 +-1.202040000000003772e+00 +-1.202040000000003772e+00 +-1.202030000000000598e+00 +-1.202035000000002185e+00 +-1.202030000000000598e+00 +-1.202024999999999011e+00 +-1.202040000000003772e+00 +-1.206940000000003010e+00 +-1.206955000000000666e+00 +-1.206945000000004597e+00 +-1.206940000000003010e+00 +-1.206940000000003010e+00 +-1.206935000000001423e+00 +-1.206945000000004597e+00 +-1.206940000000003010e+00 +-1.206940000000003010e+00 +-1.206949999999999079e+00 +-1.206945000000004597e+00 +-1.206929999999999836e+00 +-1.206945000000004597e+00 +-1.206935000000001423e+00 +-1.206945000000004597e+00 +-1.206940000000003010e+00 +-1.206945000000004597e+00 +-1.206949999999999079e+00 +-1.206945000000004597e+00 +-1.206955000000000666e+00 +-1.206935000000001423e+00 +-1.211885000000002321e+00 +-1.211905000000001564e+00 +-1.211915000000004738e+00 +-1.211894999999998390e+00 +-1.211899999999999977e+00 +-1.211890000000003909e+00 +-1.211899999999999977e+00 +-1.211905000000001564e+00 +-1.211905000000001564e+00 +-1.211905000000001564e+00 +-1.211894999999998390e+00 +-1.211894999999998390e+00 +-1.211899999999999977e+00 +-1.211905000000001564e+00 +-1.211905000000001564e+00 +-1.211905000000001564e+00 +-1.211894999999998390e+00 +-1.211894999999998390e+00 +-1.211899999999999977e+00 +-1.211894999999998390e+00 +-1.211905000000001564e+00 +-1.217080000000002826e+00 +-1.217105000000003656e+00 +-1.217125000000002899e+00 +-1.217109999999998138e+00 +-1.217105000000003656e+00 +-1.217100000000002069e+00 +-1.217105000000003656e+00 +-1.217095000000000482e+00 +-1.217105000000003656e+00 +-1.217105000000003656e+00 +-1.217100000000002069e+00 +-1.217100000000002069e+00 +-1.217109999999998138e+00 +-1.217100000000002069e+00 +-1.217114999999999725e+00 +-1.217105000000003656e+00 +-1.217095000000000482e+00 +-1.217105000000003656e+00 +-1.217109999999998138e+00 +-1.217100000000002069e+00 +-1.217085000000004413e+00 +-1.222050000000002967e+00 +-1.222065000000000623e+00 +-1.222070000000002210e+00 +-1.222070000000002210e+00 +-1.222065000000000623e+00 +-1.222065000000000623e+00 +-1.222065000000000623e+00 +-1.222070000000002210e+00 +-1.222055000000004554e+00 +-1.222055000000004554e+00 +-1.222079999999998279e+00 +-1.222050000000002967e+00 +-1.222059999999999036e+00 +-1.222070000000002210e+00 +-1.222065000000000623e+00 +-1.222050000000002967e+00 +-1.222055000000004554e+00 +-1.222059999999999036e+00 +-1.222055000000004554e+00 +-1.222059999999999036e+00 +-1.222065000000000623e+00 +-1.226984999999999104e+00 +-1.227009999999999934e+00 +-1.227000000000003865e+00 +-1.227004999999998347e+00 +-1.227009999999999934e+00 +-1.227004999999998347e+00 +-1.227000000000003865e+00 +-1.227004999999998347e+00 +-1.227000000000003865e+00 +-1.227004999999998347e+00 +-1.227020000000003108e+00 +-1.227000000000003865e+00 +-1.227004999999998347e+00 +-1.227000000000003865e+00 +-1.227004999999998347e+00 +-1.227020000000003108e+00 +-1.226990000000000691e+00 +-1.227015000000001521e+00 +-1.227004999999998347e+00 +-1.227004999999998347e+00 +-1.226990000000000691e+00 +-1.231974999999998488e+00 +-1.231985000000001662e+00 +-1.231990000000003249e+00 +-1.231990000000003249e+00 +-1.231990000000003249e+00 +-1.231985000000001662e+00 +-1.231980000000000075e+00 +-1.231995000000004836e+00 +-1.231985000000001662e+00 +-1.231985000000001662e+00 +-1.231990000000003249e+00 +-1.231970000000004006e+00 +-1.231990000000003249e+00 +-1.231985000000001662e+00 +-1.231985000000001662e+00 +-1.231985000000001662e+00 +-1.231999999999999318e+00 +-1.231995000000004836e+00 +-1.231980000000000075e+00 +-1.231980000000000075e+00 +-1.231980000000000075e+00 +-1.236960000000003390e+00 +-1.236985000000004220e+00 +-1.236980000000002633e+00 +-1.236975000000001046e+00 +-1.236975000000001046e+00 +-1.236980000000002633e+00 +-1.236980000000002633e+00 +-1.236969999999999459e+00 +-1.236969999999999459e+00 +-1.236985000000004220e+00 +-1.236964999999997872e+00 +-1.236985000000004220e+00 +-1.236964999999997872e+00 +-1.236964999999997872e+00 +-1.236980000000002633e+00 +-1.236985000000004220e+00 +-1.236964999999997872e+00 +-1.236980000000002633e+00 +-1.236960000000003390e+00 +-1.236964999999997872e+00 +-1.236985000000004220e+00 +-1.242000000000004434e+00 +-1.242015000000002090e+00 +-1.242029999999999745e+00 +-1.242010000000000502e+00 +-1.242004999999998915e+00 +-1.242010000000000502e+00 +-1.242000000000004434e+00 +-1.242010000000000502e+00 +-1.241990000000001260e+00 +-1.242004999999998915e+00 +-1.242004999999998915e+00 +-1.242015000000002090e+00 +-1.242004999999998915e+00 +-1.242000000000004434e+00 +-1.242000000000004434e+00 +-1.242000000000004434e+00 +-1.241995000000002847e+00 +-1.241995000000002847e+00 +-1.242010000000000502e+00 +-1.242000000000004434e+00 +-1.242000000000004434e+00 +-1.247064999999999202e+00 +-1.247070000000000789e+00 +-1.247064999999999202e+00 +-1.247075000000002376e+00 +-1.247075000000002376e+00 +-1.247080000000003963e+00 +-1.247070000000000789e+00 +-1.247070000000000789e+00 +-1.247070000000000789e+00 +-1.247075000000002376e+00 +-1.247064999999999202e+00 +-1.247075000000002376e+00 +-1.247084999999998445e+00 +-1.247064999999999202e+00 +-1.247075000000002376e+00 +-1.247084999999998445e+00 +-1.247064999999999202e+00 +-1.247064999999999202e+00 +-1.247080000000003963e+00 +-1.247060000000004720e+00 +-1.247075000000002376e+00 +-1.252065000000001760e+00 +-1.252060000000000173e+00 +-1.252070000000003347e+00 +-1.252075000000004934e+00 +-1.252060000000000173e+00 +-1.252075000000004934e+00 +-1.252079999999999416e+00 +-1.252079999999999416e+00 +-1.252060000000000173e+00 +-1.252065000000001760e+00 +-1.252060000000000173e+00 +-1.252075000000004934e+00 +-1.252054999999998586e+00 +-1.252065000000001760e+00 +-1.252079999999999416e+00 +-1.252060000000000173e+00 +-1.252060000000000173e+00 +-1.252075000000004934e+00 +-1.252070000000003347e+00 +-1.252070000000003347e+00 +-1.252070000000003347e+00 +-1.257065000000004318e+00 +-1.257080000000001974e+00 +-1.257085000000003561e+00 +-1.257069999999998799e+00 +-1.257065000000004318e+00 +-1.257065000000004318e+00 +-1.257075000000000387e+00 +-1.257085000000003561e+00 +-1.257080000000001974e+00 +-1.257080000000001974e+00 +-1.257080000000001974e+00 +-1.257069999999998799e+00 +-1.257075000000000387e+00 +-1.257080000000001974e+00 +-1.257069999999998799e+00 +-1.257080000000001974e+00 +-1.257069999999998799e+00 +-1.257075000000000387e+00 +-1.257065000000004318e+00 +-1.257075000000000387e+00 +-1.257075000000000387e+00 +-1.262125000000004604e+00 +-1.262135000000000673e+00 +-1.262149999999998329e+00 +-1.262149999999998329e+00 +-1.262135000000000673e+00 +-1.262129999999999086e+00 +-1.262140000000002260e+00 +-1.262135000000000673e+00 +-1.262129999999999086e+00 +-1.262140000000002260e+00 +-1.262145000000003847e+00 +-1.262145000000003847e+00 +-1.262129999999999086e+00 +-1.262145000000003847e+00 +-1.262145000000003847e+00 +-1.262135000000000673e+00 +-1.262115000000001430e+00 +-1.262129999999999086e+00 +-1.262129999999999086e+00 +-1.262145000000003847e+00 +-1.262129999999999086e+00 diff --git a/pxii_bec/macros/luts/x2_data b/pxii_bec/macros/luts/x2_data new file mode 100644 index 0000000..4a9fd7d --- /dev/null +++ b/pxii_bec/macros/luts/x2_data @@ -0,0 +1,441 @@ +-1.660045000000003768e+00 +-1.664615000000004841e+00 +-1.669490000000003249e+00 +-1.674134999999999707e+00 +-1.679075000000004536e+00 +-1.684015000000002260e+00 +-1.688650000000002649e+00 +-1.693770000000000664e+00 +-1.698990000000001999e+00 +-1.704030000000003042e+00 +-1.708690000000004261e+00 +-1.713520000000002597e+00 +-1.718925000000005809e+00 +-1.723895000000005950e+00 +-1.729100000000002524e+00 +-1.733605000000004281e+00 +-1.739040000000002806e+00 +-1.743954999999999700e+00 +-1.748600000000003263e+00 +-1.753740000000000521e+00 +-1.759100000000003661e+00 +-1.660030000000006112e+00 +-1.664610000000003254e+00 +-1.669485000000001662e+00 +-1.674140000000001294e+00 +-1.679095000000003779e+00 +-1.684020000000003847e+00 +-1.688645000000001062e+00 +-1.693735000000003765e+00 +-1.699004999999999654e+00 +-1.704064999999999941e+00 +-1.708595000000002528e+00 +-1.713620000000005916e+00 +-1.718970000000005882e+00 +-1.723835000000001116e+00 +-1.729010000000002378e+00 +-1.733610000000005869e+00 +-1.738925000000001830e+00 +-1.744100000000003092e+00 +-1.748530000000002360e+00 +-1.753790000000002181e+00 +-1.759105000000005248e+00 +-1.660000000000003695e+00 +-1.664650000000001739e+00 +-1.669430000000005521e+00 +-1.674105000000004395e+00 +-1.679035000000006050e+00 +-1.683939999999999770e+00 +-1.688655000000004236e+00 +-1.693760000000004595e+00 +-1.698865000000004954e+00 +-1.703985000000002970e+00 +-1.708645000000004188e+00 +-1.713635000000003572e+00 +-1.718965000000004295e+00 +-1.723850000000005878e+00 +-1.728960000000000719e+00 +-1.733645000000002767e+00 +-1.738905000000002588e+00 +-1.744060000000004607e+00 +-1.748519999999999186e+00 +-1.753770000000002938e+00 +-1.759005000000001928e+00 +-1.660075000000006185e+00 +-1.664580000000000837e+00 +-1.669499999999999318e+00 +-1.674115000000000464e+00 +-1.679045000000002119e+00 +-1.684074999999999989e+00 +-1.688615000000005750e+00 +-1.693815000000000737e+00 +-1.698920000000001096e+00 +-1.704055000000003872e+00 +-1.708535000000004800e+00 +-1.713660000000004402e+00 +-1.718975000000000364e+00 +-1.724000000000003752e+00 +-1.729050000000000864e+00 +-1.733580000000003452e+00 +-1.738885000000003345e+00 +-1.744095000000001505e+00 +-1.748650000000004923e+00 +-1.753735000000006039e+00 +-1.759075000000002831e+00 +-1.660020000000002938e+00 +-1.664625000000000909e+00 +-1.669445000000003176e+00 +-1.674105000000004395e+00 +-1.679014999999999702e+00 +-1.684015000000002260e+00 +-1.688655000000004236e+00 +-1.693725000000000591e+00 +-1.698850000000000193e+00 +-1.704019999999999868e+00 +-1.708635000000001014e+00 +-1.713554999999999495e+00 +-1.718890000000001805e+00 +-1.723955000000003679e+00 +-1.728870000000000573e+00 +-1.733660000000000423e+00 +-1.738960000000005834e+00 +-1.743995000000005291e+00 +-1.748640000000001749e+00 +-1.753669999999999618e+00 +-1.758960000000001855e+00 +-1.660080000000000666e+00 +-1.664700000000003399e+00 +-1.669420000000002346e+00 +-1.674030000000001905e+00 +-1.678975000000001216e+00 +-1.684020000000003847e+00 +-1.688625000000001819e+00 +-1.693695000000005280e+00 +-1.698810000000001708e+00 +-1.703980000000001382e+00 +-1.708600000000004115e+00 +-1.713570000000004256e+00 +-1.718895000000003392e+00 +-1.724015000000001407e+00 +-1.729075000000001694e+00 +-1.733665000000002010e+00 +-1.738820000000004029e+00 +-1.744150000000004752e+00 +-1.748675000000005753e+00 +-1.753720000000001278e+00 +-1.759105000000005248e+00 +-1.659885000000002719e+00 +-1.664619999999999322e+00 +-1.669505000000000905e+00 +-1.674155000000006055e+00 +-1.678945000000005905e+00 +-1.684120000000000061e+00 +-1.688729999999999620e+00 +-1.693809999999999150e+00 +-1.698959999999999582e+00 +-1.703880000000005168e+00 +-1.708650000000005775e+00 +-1.713560000000001082e+00 +-1.719010000000004368e+00 +-1.723750000000002558e+00 +-1.729040000000004795e+00 +-1.733625000000003524e+00 +-1.738990000000001146e+00 +-1.744044999999999845e+00 +-1.748845000000002869e+00 +-1.753650000000000375e+00 +-1.758995000000005859e+00 +-1.660025000000004525e+00 +-1.664680000000004156e+00 +-1.669405000000004691e+00 +-1.674080000000003565e+00 +-1.678969999999999629e+00 +-1.683960000000006119e+00 +-1.688645000000001062e+00 +-1.693760000000004595e+00 +-1.698920000000001096e+00 +-1.703995000000006144e+00 +-1.708635000000001014e+00 +-1.713545000000003427e+00 +-1.718930000000000291e+00 +-1.723915000000005193e+00 +-1.729089999999999350e+00 +-1.733525000000000205e+00 +-1.738894999999999413e+00 +-1.744075000000002262e+00 +-1.748695000000004995e+00 +-1.753740000000000521e+00 +-1.759070000000001244e+00 +-1.660030000000006112e+00 +-1.664655000000003326e+00 +-1.669435000000000002e+00 +-1.674115000000000464e+00 +-1.679020000000001289e+00 +-1.683960000000006119e+00 +-1.688590000000004920e+00 +-1.693775000000002251e+00 +-1.698824999999999363e+00 +-1.704015000000005386e+00 +-1.708615000000001771e+00 +-1.713640000000005159e+00 +-1.718875000000004150e+00 +-1.723964999999999748e+00 +-1.729085000000004868e+00 +-1.733630000000005111e+00 +-1.738915000000005762e+00 +-1.744020000000006121e+00 +-1.748730000000001894e+00 +-1.753690000000005966e+00 +-1.758990000000004272e+00 +-1.660045000000003768e+00 +-1.664709999999999468e+00 +-1.669344999999999857e+00 +-1.674055000000002735e+00 +-1.678930000000001144e+00 +-1.684045000000004677e+00 +-1.688655000000004236e+00 +-1.693695000000005280e+00 +-1.698835000000002537e+00 +-1.704010000000003799e+00 +-1.708600000000004115e+00 +-1.713560000000001082e+00 +-1.718880000000005737e+00 +-1.724045000000003824e+00 +-1.729070000000000107e+00 +-1.733600000000002694e+00 +-1.738915000000005762e+00 +-1.744020000000006121e+00 +-1.748699999999999477e+00 +-1.753745000000002108e+00 +-1.759000000000000341e+00 +-1.659990000000000521e+00 +-1.664645000000000152e+00 +-1.669409999999999172e+00 +-1.674130000000005225e+00 +-1.679080000000006123e+00 +-1.683984999999999843e+00 +-1.688695000000002722e+00 +-1.693695000000005280e+00 +-1.698875000000001023e+00 +-1.704064999999999941e+00 +-1.708660000000001844e+00 +-1.713550000000005014e+00 +-1.719000000000001194e+00 +-1.723765000000000214e+00 +-1.729025000000000034e+00 +-1.733560000000004209e+00 +-1.739050000000005980e+00 +-1.744044999999999845e+00 +-1.748725000000000307e+00 +-1.753735000000006039e+00 +-1.758955000000000268e+00 +-1.660035000000000593e+00 +-1.664630000000002497e+00 +-1.669385000000005448e+00 +-1.674125000000003638e+00 +-1.679000000000002046e+00 +-1.684004999999999086e+00 +-1.688630000000003406e+00 +-1.693765000000006182e+00 +-1.698810000000001708e+00 +-1.704015000000005386e+00 +-1.708670000000005018e+00 +-1.713554999999999495e+00 +-1.718870000000002563e+00 +-1.723930000000002849e+00 +-1.728965000000002306e+00 +-1.733675000000005184e+00 +-1.738970000000001903e+00 +-1.744010000000002947e+00 +-1.748620000000002506e+00 +-1.753735000000006039e+00 +-1.758955000000000268e+00 +-1.660030000000006112e+00 +-1.664735000000000298e+00 +-1.669350000000001444e+00 +-1.674044999999999561e+00 +-1.678945000000005905e+00 +-1.684025000000005434e+00 +-1.688684999999999548e+00 +-1.693695000000005280e+00 +-1.698820000000004882e+00 +-1.704010000000003799e+00 +-1.708629999999999427e+00 +-1.713590000000003499e+00 +-1.718795000000000073e+00 +-1.723970000000001335e+00 +-1.728934999999999889e+00 +-1.733700000000006014e+00 +-1.738935000000005004e+00 +-1.744065000000006194e+00 +-1.748595000000001676e+00 +-1.753785000000000593e+00 +-1.758990000000004272e+00 +-1.659950000000002035e+00 +-1.664635000000004084e+00 +-1.669295000000005302e+00 +-1.674020000000005837e+00 +-1.678935000000002731e+00 +-1.684055000000000746e+00 +-1.688695000000002722e+00 +-1.693805000000004668e+00 +-1.698860000000003367e+00 +-1.704100000000003945e+00 +-1.708525000000001626e+00 +-1.713680000000003645e+00 +-1.718910000000001048e+00 +-1.724005000000005339e+00 +-1.729015000000003965e+00 +-1.733620000000001937e+00 +-1.739035000000001219e+00 +-1.744044999999999845e+00 +-1.748715000000004238e+00 +-1.753615000000003477e+00 +-1.759060000000005175e+00 +-1.660030000000006112e+00 +-1.664680000000004156e+00 +-1.669360000000004618e+00 +-1.674055000000002735e+00 +-1.678945000000005905e+00 +-1.684015000000002260e+00 +-1.688620000000000232e+00 +-1.693720000000006110e+00 +-1.698855000000001780e+00 +-1.704084999999999184e+00 +-1.708645000000004188e+00 +-1.713580000000000325e+00 +-1.718900000000004979e+00 +-1.724030000000006169e+00 +-1.728954999999999131e+00 +-1.733755000000002156e+00 +-1.738885000000003345e+00 +-1.744125000000003922e+00 +-1.748635000000000161e+00 +-1.753685000000004379e+00 +-1.758965000000003442e+00 +-1.659485000000003652e+00 +-1.664580000000000837e+00 +-1.669305000000001371e+00 +-1.674075000000001978e+00 +-1.679045000000002119e+00 +-1.683975000000003774e+00 +-1.688750000000005969e+00 +-1.693690000000003693e+00 +-1.699030000000000484e+00 +-1.703794999999999504e+00 +-1.708690000000004261e+00 +-1.713595000000005086e+00 +-1.719050000000002854e+00 +-1.723760000000005732e+00 +-1.729025000000000034e+00 +-1.733640000000001180e+00 +-1.738935000000005004e+00 +-1.743870000000001141e+00 +-1.748840000000001282e+00 +-1.753759999999999764e+00 +-1.759015000000005102e+00 +-1.659980000000004452e+00 +-1.664615000000004841e+00 +-1.669364999999999100e+00 +-1.674095000000001221e+00 +-1.679020000000001289e+00 +-1.684015000000002260e+00 +-1.688695000000002722e+00 +-1.693795000000001494e+00 +-1.698940000000000339e+00 +-1.703960000000002140e+00 +-1.708680000000001087e+00 +-1.713580000000000325e+00 +-1.718895000000003392e+00 +-1.723795000000002631e+00 +-1.729044999999999277e+00 +-1.733715000000003670e+00 +-1.738965000000000316e+00 +-1.744055000000003020e+00 +-1.748690000000003408e+00 +-1.753700000000002035e+00 +-1.759070000000001244e+00 +-1.660009999999999764e+00 +-1.664640000000005671e+00 +-1.669315000000004545e+00 +-1.674044999999999561e+00 +-1.678940000000004318e+00 +-1.684060000000002333e+00 +-1.688615000000005750e+00 +-1.693730000000002178e+00 +-1.698820000000004882e+00 +-1.703974999999999795e+00 +-1.708645000000004188e+00 +-1.713585000000001912e+00 +-1.718885000000000218e+00 +-1.723945000000000505e+00 +-1.728905000000004577e+00 +-1.733544999999999447e+00 +-1.739070000000005223e+00 +-1.744015000000004534e+00 +-1.748630000000005680e+00 +-1.753730000000004452e+00 +-1.758974999999999511e+00 +-1.660035000000000593e+00 +-1.664700000000003399e+00 +-1.669325000000000614e+00 +-1.674120000000002051e+00 +-1.679005000000003633e+00 +-1.683950000000002944e+00 +-1.688635000000004993e+00 +-1.693780000000003838e+00 +-1.698840000000004125e+00 +-1.704080000000004702e+00 +-1.708595000000002528e+00 +-1.713655000000002815e+00 +-1.718910000000001048e+00 +-1.723855000000000359e+00 +-1.728990000000003135e+00 +-1.733655000000005941e+00 +-1.738965000000000316e+00 +-1.743999999999999773e+00 +-1.748730000000001894e+00 +-1.753705000000003622e+00 +-1.759025000000001171e+00 +-1.660054999999999836e+00 +-1.664725000000004229e+00 +-1.669330000000002201e+00 +-1.674130000000005225e+00 +-1.678905000000000314e+00 +-1.684090000000004750e+00 +-1.688585000000003333e+00 +-1.693765000000006182e+00 +-1.698800000000005639e+00 +-1.704080000000004702e+00 +-1.708605000000005703e+00 +-1.713655000000002815e+00 +-1.718895000000003392e+00 +-1.723900000000000432e+00 +-1.729010000000002378e+00 +-1.733685000000001253e+00 +-1.739005000000005907e+00 +-1.744020000000006121e+00 +-1.748609999999999332e+00 +-1.753855000000001496e+00 +-1.759070000000001244e+00 +-1.660030000000006112e+00 +-1.664655000000003326e+00 +-1.669320000000006132e+00 +-1.674070000000000391e+00 +-1.678895000000004245e+00 +-1.684025000000005434e+00 +-1.688645000000001062e+00 +-1.693760000000004595e+00 +-1.698835000000002537e+00 +-1.704010000000003799e+00 +-1.708629999999999427e+00 +-1.713580000000000325e+00 +-1.718790000000005591e+00 +-1.723960000000005266e+00 +-1.728945000000003063e+00 +-1.733634999999999593e+00 +-1.739010000000000389e+00 +-1.743985000000002117e+00 +-1.748735000000003481e+00 +-1.753815000000003010e+00 +-1.759080000000004418e+00 diff --git a/pxii_bec/macros/luts/y1_data b/pxii_bec/macros/luts/y1_data new file mode 100644 index 0000000..8724f67 --- /dev/null +++ b/pxii_bec/macros/luts/y1_data @@ -0,0 +1,441 @@ +1.205727766938570156e+01 +1.133966594666880390e+01 +1.103075793035168140e+01 +1.055046943628765099e+01 +1.011034531019341642e+01 +9.319242360215184817e+00 +8.423816062889885714e+00 +7.560917629244459093e+00 +7.049511134670077617e+00 +6.660715436375517662e+00 +6.287826529823123956e+00 +5.932127033839905472e+00 +5.666066039277621869e+00 +5.496861454723254603e+00 +5.454493394713734844e+00 +5.274894625131867798e+00 +5.206484998756308435e+00 +5.243894959347072060e+00 +5.226129757715653135e+00 +5.183968690326024920e+00 +5.413887268883606829e+00 +9.881953348467341414e+00 +9.754469388762732507e+00 +9.366195707607031906e+00 +8.947777498958934927e+00 +8.387026592591272589e+00 +7.718016700102882766e+00 +7.078382328315356631e+00 +6.602326095268738371e+00 +6.284415028338178111e+00 +5.992608184747973965e+00 +5.674532436332153651e+00 +5.584947489232067852e+00 +5.302715411280012781e+00 +5.197827898010775272e+00 +5.168691499878206308e+00 +5.183653514898558079e+00 +5.160838022308310791e+00 +5.163871211797468774e+00 +5.270127795181865693e+00 +5.389377536459071472e+00 +5.487232452916143366e+00 +8.448633400567125307e+00 +8.492703001908740390e+00 +8.114244207223402228e+00 +7.793497128548517949e+00 +7.444603988903280900e+00 +7.084629225353771709e+00 +6.496249330446762116e+00 +6.076147477672201092e+00 +5.708680541822266363e+00 +5.390878159201028197e+00 +5.208100409355515659e+00 +5.092573052439338888e+00 +4.970764506557231677e+00 +5.048098388604313591e+00 +5.124603186954225897e+00 +5.259125308315465652e+00 +5.282307100702992919e+00 +5.466451219133488415e+00 +5.449295172424669431e+00 +5.499489374740820224e+00 +5.629961183090770760e+00 +7.218071072397825638e+00 +7.574975509192210410e+00 +7.348336246746418610e+00 +7.007707387006199440e+00 +6.623916437703310400e+00 +6.305392562084331409e+00 +5.962518435695340457e+00 +5.522007118680313908e+00 +5.430749152949099212e+00 +5.288650103693804283e+00 +5.139397724043634597e+00 +5.070269216265613998e+00 +5.074216367606107170e+00 +5.124803622800277125e+00 +5.242348036009295775e+00 +5.319519698847039457e+00 +5.483971411520198735e+00 +5.628229063635711071e+00 +5.748987092654180842e+00 +5.874476945974787867e+00 +5.803321972491873204e+00 +6.843344181266233228e+00 +6.860760806954633750e+00 +6.709057437687493852e+00 +6.486719651920523688e+00 +5.868456534727561014e+00 +5.652875168801308803e+00 +5.460980564187966735e+00 +5.102958705125889338e+00 +5.118244738702292018e+00 +5.042331537131665264e+00 +5.108116561495979369e+00 +5.192555499829326848e+00 +5.255767632581959781e+00 +5.406192104511422514e+00 +5.421526428632503780e+00 +5.604829556087114639e+00 +5.799045985125410141e+00 +5.824684307463424915e+00 +6.119807184777489972e+00 +6.105798692102111680e+00 +6.261285092722790324e+00 +6.454700975410086805e+00 +6.447964205577498831e+00 +6.387692876516432250e+00 +6.053264422068367345e+00 +5.694441449675439415e+00 +5.446724646777382439e+00 +5.267465758686038058e+00 +5.149251380927338140e+00 +5.071496979572066799e+00 +5.039588906323488438e+00 +5.037958964889217128e+00 +5.167969202344695034e+00 +5.414472778058041058e+00 +5.491773547994618809e+00 +5.646551863264282822e+00 +5.887524185772985419e+00 +6.068658129740934548e+00 +6.125898962629681144e+00 +6.200443096681887312e+00 +6.530286732272776007e+00 +6.481049914868759032e+00 +5.912630679567693726e+00 +5.844362123795558972e+00 +5.796378246679173785e+00 +5.595066381880445583e+00 +5.439125805431229921e+00 +5.193036382909821391e+00 +5.002933777922428327e+00 +4.986394826445568640e+00 +4.960313468253590763e+00 +5.034568863742307165e+00 +5.242547271809461229e+00 +5.316295275621490291e+00 +5.547667830649645637e+00 +5.667885356864679203e+00 +5.941207337840910263e+00 +6.117155335787847648e+00 +6.271876267431779617e+00 +6.449960531176069267e+00 +6.569138099779434192e+00 +6.693109930016822418e+00 +6.920135494094922457e+00 +5.652890392025544664e+00 +5.497955510390170275e+00 +5.514711909172980597e+00 +5.376774929930999036e+00 +5.187530386856010090e+00 +5.102124515756983669e+00 +5.100634344472099180e+00 +5.074541293157760258e+00 +5.126084156465735120e+00 +5.163471603464564019e+00 +5.367671375129228650e+00 +5.511570217129673210e+00 +5.812985295639847116e+00 +5.989582371010808259e+00 +6.583096006446046644e+00 +6.526570512575412764e+00 +6.857982989257133788e+00 +7.098995663001908873e+00 +7.301230838390515565e+00 +7.574345982462941329e+00 +7.586499459331415451e+00 +5.420777672770090483e+00 +5.324464494508565515e+00 +5.186553642458411773e+00 +5.064386096914761382e+00 +5.119304960457883524e+00 +5.161059999650404961e+00 +5.119162636806833255e+00 +5.133012200675175052e+00 +5.271720762461579390e+00 +5.476020119788903351e+00 +5.546413837040084616e+00 +5.792598501761045071e+00 +6.036748431823721894e+00 +6.322282396225446632e+00 +6.718003741381647131e+00 +6.750150185102633316e+00 +7.009865141945048173e+00 +7.177396120625938458e+00 +7.683561793628210346e+00 +7.969963833265528486e+00 +8.157504138139952232e+00 +5.129691491539290382e+00 +5.141541671815518022e+00 +5.077736240734794571e+00 +5.010711709779589462e+00 +5.112301980473874075e+00 +5.120977946970674211e+00 +5.191493085503529947e+00 +5.297403940894412244e+00 +5.453156957971914132e+00 +5.759660014611504231e+00 +5.951381939399157162e+00 +6.292203676427285508e+00 +6.676270544267535634e+00 +6.862354196011252405e+00 +7.175296352820391910e+00 +7.461656528360231633e+00 +7.736506874528019218e+00 +8.042871135699369844e+00 +8.207895396459445436e+00 +8.548003903378566193e+00 +8.987341023692989594e+00 +5.315847933138427628e+00 +5.213150475667000627e+00 +5.147821242384511997e+00 +5.209262178647303010e+00 +5.244205599354427427e+00 +5.342288339315654611e+00 +5.380625664030867839e+00 +5.502013015193917056e+00 +5.758743861013750021e+00 +6.015419690861380175e+00 +6.262835969048901497e+00 +6.710211541935152013e+00 +6.996334775275873774e+00 +7.436947350419895741e+00 +7.739913914074831425e+00 +8.324915468508615746e+00 +8.638022419659854734e+00 +8.670430613768068895e+00 +9.203522037095730468e+00 +9.194649214948283245e+00 +9.263944434674490580e+00 +5.284991351927334158e+00 +5.129861097654959678e+00 +5.121893199940755537e+00 +5.370216512086485317e+00 +5.417740181706758307e+00 +5.560008039757092568e+00 +5.650993677883335842e+00 +6.015013194514697403e+00 +6.283898818623720572e+00 +6.624997271950793909e+00 +6.918588879229188748e+00 +7.247859472384488910e+00 +7.808444992584145261e+00 +8.438483670037150830e+00 +9.022661171047102968e+00 +9.204488306673917819e+00 +9.322727763048920480e+00 +9.631543145958602281e+00 +9.860073951172012130e+00 +1.001699528502354930e+01 +1.018529899736638278e+01 +5.265026785970017720e+00 +5.322649091801090471e+00 +5.336008848932899618e+00 +5.504421112189256782e+00 +5.641910049645609604e+00 +5.761388826192888502e+00 +6.023647376899127437e+00 +6.323723798266075669e+00 +6.549430116213829756e+00 +6.975385384879498218e+00 +7.433816165839674639e+00 +7.949254702024570740e+00 +8.605311185822127840e+00 +9.067502353796205838e+00 +9.553781439580344426e+00 +9.925054647191380752e+00 +9.918977855875164451e+00 +1.007100953987708181e+01 +1.043357374968106832e+01 +1.048362882277129060e+01 +1.065658323813539887e+01 +5.420829340781863515e+00 +5.560769822448785149e+00 +5.604412347496188218e+00 +5.465618691682452734e+00 +5.722142770669014666e+00 +5.914669188159171753e+00 +6.270648493824011460e+00 +6.677614690128830688e+00 +7.019509524208341844e+00 +7.413182291018977743e+00 +8.042339511377116779e+00 +8.774710889996919505e+00 +9.384165968182875517e+00 +9.975133250360125103e+00 +1.008188655944662671e+01 +1.037582912489411768e+01 +1.064877546622228266e+01 +1.036470021284644893e+01 +1.102150824450396449e+01 +1.052092276750719968e+01 +1.081474032367021643e+01 +5.358355604504141390e+00 +5.435536941685303880e+00 +5.529784856346502409e+00 +5.811045085029125978e+00 +6.006084980927252737e+00 +6.377068550178355721e+00 +6.636844936231431014e+00 +7.171081362723790598e+00 +7.531295817328637732e+00 +8.185619142401691306e+00 +8.598525044287246288e+00 +9.056197526680714205e+00 +1.001505507731449818e+01 +1.027831581452493204e+01 +1.052645600970189399e+01 +1.037654170163114031e+01 +1.076512091716119457e+01 +1.139264314560303148e+01 +1.114227807327447017e+01 +1.075025392986193928e+01 +1.106787326762256640e+01 +5.565558965010031223e+00 +5.577062350994505202e+00 +5.666906381746999344e+00 +5.892502180245080545e+00 +6.344067942752981359e+00 +6.636575667518426869e+00 +7.374981592593808699e+00 +7.674954212738357207e+00 +8.349688481494823122e+00 +8.891614337289304615e+00 +9.677529396143942364e+00 +9.880094932679961417e+00 +1.061502931119160387e+01 +1.110622518768721356e+01 +1.108455159344507734e+01 +1.159764983877389533e+01 +1.143629790408789049e+01 +1.152416117794904515e+01 +1.121116069569028006e+01 +1.196085188734605254e+01 +1.051778990338397968e+01 +5.871809301696933936e+00 +6.077636286755057959e+00 +6.239721646829922364e+00 +6.309685941327336955e+00 +6.891782183921100646e+00 +7.050799855766490154e+00 +7.751616632451707289e+00 +8.530198908093540311e+00 +9.089200495723760653e+00 +1.018286750902515436e+01 +1.084652804745480381e+01 +1.104252545431596566e+01 +1.178352853479764839e+01 +1.160202312893636289e+01 +1.204604895248957241e+01 +1.215809794127082810e+01 +1.311329535781806754e+01 +1.230038475235365780e+01 +1.198989541014897675e+01 +1.261917645449002556e+01 +1.244125879210741736e+01 +6.227590968664327598e+00 +6.363394361821522516e+00 +6.786110961961957067e+00 +6.974062887055529458e+00 +7.566306680537535634e+00 +8.099940781811746149e+00 +8.692224601007024987e+00 +9.631726142262218460e+00 +1.024747624056002593e+01 +1.095086112016867830e+01 +1.123802306994079636e+01 +1.188879821029703798e+01 +1.258962510376665023e+01 +1.233438935240403111e+01 +1.314842797709996880e+01 +1.339197382913231138e+01 +1.291637698629583930e+01 +1.318385421652126865e+01 +1.398212725996117101e+01 +1.241144876335093095e+01 +1.110362792399428145e+01 +6.355570911421182245e+00 +6.781615832734090965e+00 +6.618620157116203551e+00 +7.228175835538888094e+00 +7.971071795173005015e+00 +8.861998096929626811e+00 +9.704353569472713659e+00 +1.048826459250010856e+01 +1.106893013636958045e+01 +1.201814765098381876e+01 +1.271343885933388762e+01 +1.299517655546482509e+01 +1.356107540029611691e+01 +1.338675158330168280e+01 +1.428426947583743534e+01 +1.439558442757804002e+01 +1.386084832397312994e+01 +1.320957075927895552e+01 +1.356391506327358165e+01 +1.444371555775653526e+01 +1.302444489268369843e+01 +6.766552870192540148e+00 +6.972631347139365943e+00 +7.440785540105559370e+00 +7.978437981937754664e+00 +8.485896158759963726e+00 +9.394960290041712625e+00 +1.007641336813789934e+01 +1.108347226403805230e+01 +1.145433407866199893e+01 +1.241126362322670573e+01 +1.318832923294690929e+01 +1.335090970919050868e+01 +1.387704678171356676e+01 +1.392213384059501102e+01 +1.470678982110802480e+01 +1.430315031610674659e+01 +1.520393962250984110e+01 +1.445181398763884317e+01 +1.331384532600219828e+01 +1.357690100594223992e+01 +1.186752049203542292e+01 +7.062126130162237558e+00 +7.350706243269983453e+00 +7.882811939391144662e+00 +8.637966700401184639e+00 +9.348942582145841840e+00 +1.024892716304864138e+01 +1.094326896376587754e+01 +1.176005325784623068e+01 +1.303182306838899329e+01 +1.313489976815964688e+01 +1.403555469539445255e+01 +1.400891119777906901e+01 +1.522691667858845399e+01 +1.493530628502457702e+01 +1.481432614829653538e+01 +1.528012450272668410e+01 +1.444003460636995584e+01 +1.473501299903103323e+01 +1.225273334441774686e+01 +1.189877075142024765e+01 +1.370772585689158163e+01 diff --git a/pxii_bec/macros/luts/y2_data b/pxii_bec/macros/luts/y2_data new file mode 100644 index 0000000..21de315 --- /dev/null +++ b/pxii_bec/macros/luts/y2_data @@ -0,0 +1,441 @@ +1.088833954535054077e-01 +5.919629664876235181e-02 +2.985903956356247488e-02 +6.451432357799708264e-03 +4.773589778631147471e-04 +1.375481931119597670e-02 +7.574787578576076819e-02 +1.470368934071246692e-01 +2.538689701459935777e-01 +3.311382506321973174e-01 +4.240651568680846029e-01 +4.839892697056275006e-01 +5.414834651833817514e-01 +5.648860796334854717e-01 +5.860120075806936057e-01 +5.960798831905967932e-01 +6.073092315300672173e-01 +5.940203732021944738e-01 +5.844152636441717341e-01 +6.013079996792591864e-01 +5.681644625996575826e-01 +4.527831760776461316e-03 +-3.298425981602277988e-03 +1.499093423282235821e-03 +1.419670434295643678e-02 +5.804166569108091395e-02 +1.260177468896573061e-01 +1.931700382646362735e-01 +2.966415474049914347e-01 +4.082415355898114662e-01 +4.833553969492390134e-01 +5.299926299934040186e-01 +5.634868859039474653e-01 +6.022630122659348162e-01 +6.140592374469959758e-01 +6.205672132939320518e-01 +6.109286137290844687e-01 +5.995384519075575014e-01 +6.027329111573169751e-01 +5.785370853516811351e-01 +5.558936622216567036e-01 +5.362669568846395451e-01 +1.866833190372066756e-02 +2.612206009719515720e-02 +6.442184253301691532e-02 +9.394407765417017719e-02 +1.656882270880724872e-01 +2.567327028875498462e-01 +3.436279295317325455e-01 +4.578167236887082381e-01 +5.249955356222305580e-01 +5.678885146030141495e-01 +6.022457477841629547e-01 +6.270014771352933058e-01 +6.383364849101405003e-01 +6.345525479086974174e-01 +6.238163249066569493e-01 +6.103749456371393434e-01 +5.900208524993448833e-01 +5.650234178633731785e-01 +5.509833246785771355e-01 +5.225942881665457396e-01 +5.014448342704812545e-01 +1.221580607867011614e-01 +1.167845542607070797e-01 +1.682321092423990361e-01 +2.181730272369495072e-01 +3.059273836011209280e-01 +3.903079808156536545e-01 +4.914834257431406339e-01 +5.581403815232556243e-01 +5.920559218673433488e-01 +6.178206153510183984e-01 +6.363286830933985172e-01 +6.452060384099692625e-01 +6.395367926984047990e-01 +6.176835804020598397e-01 +6.057656359917361621e-01 +5.836678872573924926e-01 +5.580507152473116461e-01 +5.216212916076691242e-01 +4.972606676224817779e-01 +4.824743097195466346e-01 +4.311050064201448206e-01 +2.508517076205194485e-01 +2.361013224219183360e-01 +2.641489600402808224e-01 +3.311002368631816295e-01 +4.421810069209904381e-01 +5.098617472939644957e-01 +5.617352810377522765e-01 +6.079742439853792479e-01 +6.274564012671890456e-01 +6.335771001468345487e-01 +6.520490548695055955e-01 +6.351521266519919440e-01 +6.246212294625584915e-01 +6.016379507148399419e-01 +5.722625550969838715e-01 +5.487565344452188798e-01 +5.011771114528399407e-01 +4.766296810624338631e-01 +4.266678748720245662e-01 +4.155774313675033027e-01 +3.548765713227870489e-01 +3.542428441498300384e-01 +3.655857580657740913e-01 +4.018562303665093594e-01 +4.556681011371122580e-01 +5.370359967791165090e-01 +5.804627863401494725e-01 +6.151165958311942683e-01 +6.390250693865491272e-01 +6.502385680508196986e-01 +6.459270683892313070e-01 +6.408535300892184150e-01 +6.227693986216616961e-01 +5.764281441461250877e-01 +5.473650131784960626e-01 +5.123698663958202726e-01 +4.730403981027689886e-01 +4.305673626584372582e-01 +3.979966907872424797e-01 +3.320857872946747502e-01 +3.015454663116101108e-01 +2.596202755160957887e-01 +4.271850842029902839e-01 +4.750976343449805350e-01 +4.922053124523448897e-01 +5.355964801072816694e-01 +5.809427348870407348e-01 +6.176476776317801898e-01 +6.405551223501455560e-01 +6.432731165829351783e-01 +6.489814584115578544e-01 +6.414986167726017818e-01 +6.091903057670072785e-01 +5.866760782239398564e-01 +5.400721500281110421e-01 +5.030583539038764318e-01 +4.399389172224174027e-01 +4.047025796838242817e-01 +3.568126490841009857e-01 +3.064099571434716895e-01 +2.556787298308312861e-01 +2.305072050508887582e-01 +1.860100793099919714e-01 +5.290051448057261352e-01 +5.503220396592108932e-01 +5.660458878993810394e-01 +5.859653622334137779e-01 +6.238740850202000310e-01 +6.401377639357016536e-01 +6.384682577025465600e-01 +6.372441117796654453e-01 +6.261886881197332722e-01 +6.095964457972270489e-01 +5.698357277342599447e-01 +5.371714600133203898e-01 +4.703788415340344198e-01 +4.263808100512674892e-01 +3.406612270756652627e-01 +3.084523612076406351e-01 +2.341057993675428051e-01 +1.924902483721161461e-01 +1.640578969298838452e-01 +1.545181021533975074e-01 +9.375173249070391235e-02 +5.707360636597763603e-01 +5.800546592241762056e-01 +6.122757128362217305e-01 +6.291627750029459287e-01 +6.339684903458775445e-01 +6.289878488474742735e-01 +6.276469852941241045e-01 +6.187563993310253307e-01 +5.844663666537038837e-01 +5.500803013619042225e-01 +5.122111377177120950e-01 +4.510232699548756830e-01 +3.807154053654516201e-01 +3.017313860307057061e-01 +2.358824066866026248e-01 +2.041863786052972862e-01 +1.432391657474307300e-01 +1.224034693534420126e-01 +7.846677945306643198e-02 +6.718860735943313345e-02 +4.078916050612740180e-02 +6.060469187304203809e-01 +6.138730297967112115e-01 +6.264963909720878688e-01 +6.402954105673812624e-01 +6.347169041276718993e-01 +6.249766456166193640e-01 +6.068315224971830846e-01 +5.822660658837659486e-01 +5.421503029974489296e-01 +4.828352061073754031e-01 +4.423017111298154780e-01 +3.516448945862027942e-01 +2.653422596511912923e-01 +2.175300097512125608e-01 +1.518672896375639347e-01 +1.305325822339425124e-01 +8.716665354266138477e-02 +5.699112873186402278e-02 +3.343862492041954626e-02 +2.681468293737918063e-02 +2.807659417574230945e-03 +6.014431787749677794e-01 +6.140141056198061831e-01 +6.224004644471676784e-01 +6.205838916840618058e-01 +6.110884780209703271e-01 +5.921152184355765735e-01 +5.619610721464362024e-01 +5.249757091965495670e-01 +4.667858895439985778e-01 +4.079127302025093438e-01 +3.321035805895888315e-01 +2.526687511227408978e-01 +1.804493380555630133e-01 +1.338395007308814944e-01 +9.431458553494234676e-02 +5.394188154482269792e-02 +3.149981422377190476e-02 +1.574650048534157257e-02 +2.818127143099275617e-03 +4.284843305776686075e-03 +3.686829791022660108e-03 +6.011698333146268114e-01 +6.129406147048280795e-01 +6.120361090984371977e-01 +5.956557234842323467e-01 +5.808168815460260648e-01 +5.460628203970836481e-01 +5.173332621385209329e-01 +4.274679820270039232e-01 +3.626077555059399882e-01 +2.808262692501241609e-01 +2.022067505305547297e-01 +1.451493740956194545e-01 +9.863242098899369092e-02 +5.093431178547391802e-02 +1.235958491880812145e-02 +7.050994491715715552e-03 +8.652737840895950716e-04 +9.927293479476663463e-03 +2.472372962430928120e-02 +1.553847154625745582e-02 +2.744543006138802990e-02 +5.870837697490146612e-01 +5.862405659779242884e-01 +5.862503736485817907e-01 +5.646085499533989305e-01 +5.351601052465432273e-01 +4.946882137913583000e-01 +4.283313529927136876e-01 +3.684452611829859281e-01 +2.676142560112931279e-01 +1.992426704973845331e-01 +1.436652084685304809e-01 +8.424148879212586816e-02 +3.944410709852567976e-02 +1.008177348078627932e-02 +-1.144676873514040034e-03 +1.777641082673813051e-03 +1.387476720639517838e-02 +2.321849291494474180e-02 +2.772845325386858600e-02 +6.349187613003795527e-02 +1.061205188608092403e-01 +5.664359621788622734e-01 +5.500949584300380835e-01 +5.388482079021037485e-01 +5.262066581603603854e-01 +4.725829979041614726e-01 +4.159849624268928681e-01 +3.401685160876560254e-01 +2.498922110470308822e-01 +1.627753426598615716e-01 +1.079768964919363000e-01 +5.348801507915286468e-02 +1.450363282080601758e-02 +5.578772212098361515e-03 +1.622869366254008419e-02 +2.952184684165866727e-02 +2.386819226031045363e-02 +7.443106114775767390e-02 +7.043266477674942072e-02 +1.375205418427265791e-01 +1.047198472800930646e-01 +1.197013985974500205e-01 +5.403663660181243777e-01 +5.238729425789344640e-01 +5.147979306858245785e-01 +4.686567440339463597e-01 +4.045511891980069219e-01 +3.332777609466835989e-01 +2.414275143010899960e-01 +1.602370413445325104e-01 +1.058561798513824453e-01 +3.868513013804885520e-02 +1.557274549845952087e-02 +5.082032949152640380e-03 +1.291259127617100204e-02 +1.496313962286340178e-02 +4.984236653248198812e-02 +6.876983875218876940e-02 +9.987235767608734771e-02 +1.710403776593207581e-01 +1.675085631771704442e-01 +1.912452230459232849e-01 +2.404734383422588440e-01 +4.888333192421445150e-01 +4.830646602806233925e-01 +4.593158528680238439e-01 +3.996195189457122376e-01 +3.028561940666760766e-01 +2.331806476480499934e-01 +1.525157985765949464e-01 +7.552369685258839005e-02 +2.941570683051032697e-02 +6.785603544540688009e-03 +6.666095459714375428e-03 +2.957099591125950111e-02 +5.283990464693766320e-02 +1.075164414319564749e-01 +1.422964824799951289e-01 +2.105085827675869936e-01 +2.372403954486134448e-01 +2.041270003252622089e-01 +2.540043541083866763e-01 +2.272053648529606951e-01 +1.644060855976656188e-01 +4.285947835554590468e-01 +3.928038487344165386e-01 +3.719628859906854990e-01 +3.015826418095670647e-01 +2.154687052857929275e-01 +1.501847340087640592e-01 +7.382963381428526983e-02 +2.023888786510480084e-02 +2.821541412422077285e-03 +1.394883581122689092e-02 +5.502154548478605661e-02 +7.526357787308306235e-02 +1.298543234232299448e-01 +1.349749272962479929e-01 +2.210428639410791651e-01 +2.901979427475832596e-01 +3.183350088066454475e-01 +2.937436447003489159e-01 +3.230001724532743923e-01 +3.009346264204731947e-01 +3.420536429137855938e-01 +3.305443938715758034e-01 +2.967409586325849280e-01 +2.355454525440625058e-01 +2.016386303836905647e-01 +1.032434033573885884e-01 +6.028313732058131202e-02 +1.705570985628221056e-02 +7.484024880507273575e-03 +3.012202561617595073e-02 +9.686090587897908111e-02 +1.283047082492129454e-01 +1.686829078568568285e-01 +2.578623504274370482e-01 +2.662066031260062471e-01 +3.374037873307617064e-01 +3.597541140312625618e-01 +3.726139555534533909e-01 +3.690316688821818625e-01 +4.133570288409452731e-01 +3.585913265693810859e-01 +3.527198905768607062e-01 +2.769542083787376874e-01 +2.218622676611985423e-01 +1.925490992874160368e-01 +1.241856792866384424e-01 +4.982223014176700993e-02 +1.553464820246961559e-02 +6.527322673355213933e-03 +2.651409582320519639e-02 +5.681195979908677807e-02 +1.094923887034671972e-01 +2.184004618874324233e-01 +2.760255180463034863e-01 +3.376762721172292259e-01 +3.393510232887718137e-01 +3.879421828368968539e-01 +4.186618453505983606e-01 +4.108738650573509066e-01 +4.053003490349463278e-01 +5.018436325199184811e-01 +5.258756609744991151e-01 +4.581291118255868544e-01 +1.853053659221791383e-01 +1.524569974672896622e-01 +1.168644320128360420e-01 +4.984782411840940619e-02 +7.222710389813786526e-03 +9.366175896237215323e-04 +3.233569980021618745e-02 +6.415522951938736063e-02 +1.470595540543787050e-01 +2.503964067453200437e-01 +3.260475703153682958e-01 +3.483290618620125123e-01 +4.207636780409765853e-01 +4.311513046970755769e-01 +4.626426561236507418e-01 +5.001194435120059900e-01 +5.679040376148367653e-01 +4.462438983221544420e-01 +4.627893575993562436e-01 +4.736249952129842344e-01 +4.072367768072252536e-01 +1.259002806578609635e-01 +7.396761526818756982e-02 +5.712011227864698115e-02 +1.808174432521823458e-02 +8.567306297651611268e-04 +3.187939501214862720e-02 +7.486488487618320198e-02 +1.638304537832035723e-01 +2.230600359794805976e-01 +3.010627192795484741e-01 +3.530226905335387966e-01 +4.315555573535201361e-01 +4.972495745139798862e-01 +5.579315493975164353e-01 +5.403272780056601610e-01 +5.971831430981732192e-01 +5.565927148186462503e-01 +4.728031525925035505e-01 +4.582171314819339369e-01 +4.724448724476021932e-01 +5.873080381148912954e-01 diff --git a/pxii_bec/macros/mx_basics.bak b/pxii_bec/macros/mx_basics.bak new file mode 100755 index 0000000..5bd6f9a --- /dev/null +++ b/pxii_bec/macros/mx_basics.bak @@ -0,0 +1,313 @@ +"""Get data from an h5 file or BEC history and perform fitting.""" + +import numpy as np +from lmfit.models import ( + GaussianModel, + LorentzianModel, + VoigtModel, + ConstantModel, + LinearModel, +) +from scipy.ndimage import gaussian_filter1d +import h5py +import matplotlib.pyplot as plt + + +def create_fit_parameters( + deriv: bool = False, + negative: bool = False, + model: str = "Voigt", + baseline: str = "Linear", + smoothing: None = None, +): + """Store the fit parameters in a dictionary.""" + # map input model to lmfit model name + model_mappings = { + "Gaussian": GaussianModel, + "Lorentzian": LorentzianModel, + "Voigt": VoigtModel, + "Constant": ConstantModel, + "Linear": LinearModel, + } + return { + "deriv": deriv, + "negative": negative, + "model": model_mappings[model], + "baseline": model_mappings[baseline], + "smoothing": smoothing, + } + + +def get_data_from_h5(signal_name: str = "lu_bpmsum"): + """Get data from an h5 file.""" + root, name = get_signal_values(signal_name) + with h5py.File("scan_676.h5", "r") as f: + entry = f["entry"]["collection"] + y_data = entry["devices"][root][name]["value"][:] + motor_data = entry["metadata"]["bec"] + motor_name = motor_data["scan_motors"][0].decode() + scan_number = motor_data["scan_number"][()] + x_data = entry["devices"][motor_name][motor_name]["value"][:] + return { + "x_data": x_data, + "y_data": y_data, + "signal_name": signal_name, + "motor_name": motor_name, + "scan_number": str(scan_number), + } + +def get_history(scan): + if isinstance(scan, int): + if scan < 0: + return bec.history[scan] + return bec.history.get_by_scan_number(scan) + # return bec.history.get_by_dataset_number(scan) + return scan + + +def get_signal_values(signal_name): + + try: + mot = getattr(dev,signal_name) + root_name = signal_name + except: + root_name = signal_name.split("_", maxsplit=1)[0] + + return root_name, signal_name + + +def get_data_from_history( + scan: int, + signal_name: str = "lu_bpmsum", +): + """Read data from the BEC history and return the X and Y data as arrays.""" + + data = get_history(scan) + md = data.metadata["bec"] + motor_name = md["scan_report_devices"][0].decode() + mot_name = motor_name.replace(".","_") + print(data.devices) + if "." in motor_name: + root_name = motor_name.split(".")[0] + x_data = data.devices[root_name][mot_name].read()["value"] + else: + x_data = data.devices[mot_name][mot_name].read()["value"] + + scan_number = md["scan_number"] + + # y_data = data.devices[signal_name][signal_name].read()["value"] + root, name = get_signal_values(signal_name) + y_data = data.devices[root][name].read()["value"] + return { + "signal_name": signal_name, + "x_data": x_data, + "y_data": y_data, + "motor_name": mot_name, + "scan_number": float(scan_number), + } + + +def process_data(data, fit_params): + """ + Process the signal data for fitting based on derivative or smoothing. + """ + smoothing = fit_params["smoothing"] + deriv = fit_params["deriv"] + negative = fit_params["negative"] + + signal_name = data["signal_name"] + y_data = data["y_data"] + + if smoothing and smoothing > 0.01: + fitting_data = gaussian_filter1d(y_data, smoothing) + signal_name = f"Smoothed {signal_name}" + else: + fitting_data = y_data.copy() + + if deriv: + fitting_data = np.gradient(fitting_data) + signal_name = f"Derivative of {signal_name}" + + if negative: + fitting_data = -fitting_data + signal_name = f"Negative {signal_name}" + + data.update( + { + "y_to_fit": fitting_data, + "signal_name": signal_name, + } + ) + return data + + # if deriv: + # if smoothing: + # y_smooth = gaussian_filter1d(y_data, smoothing) + # fitting_data = np.gradient(y_smooth) + # signal_name = f"Derivative of smoothed {signal_name}" + # else: + # fitting_data = np.gradient(y_data) + # signal_name = f"Derivative of {signal_name}" + # elif smoothing and smoothing > 0.01: + # fitting_data = gaussian_filter1d(y_data, smoothing) + # signal_name = f"Smoothed {signal_name}" + # else: + # fitting_data = y_data + + # updated_data = { + # "y_to_fit": fitting_data, + # "signal_name": signal_name, + # } + # data.update(updated_data) + # return data + + +def fit(data, fit_params): + """Fit a signal to a model and return the fitting results.""" + # Create the model + peak_model = fit_params["model"](prefix="peak_") + baseline_model = fit_params["baseline"](prefix="base_") + full_model = peak_model + baseline_model + + # Prepare data + processed_data = process_data(data, fit_params) + params = full_model.make_params() + y_min = np.min(processed_data["y_to_fit"]) + + # Configure baseline parameters + if fit_params["baseline"] == ConstantModel: + params["base_c"].set(value=y_min) + elif fit_params["baseline"] == LinearModel: + params["base_intercept"].set(value=y_min) + params["base_slope"].set(value=0) + + # Add peak-specific parameters + params.update( + peak_model.guess(processed_data["y_to_fit"], x=processed_data["x_data"]) + ) + + # Perform the fitting + lmfit_result = full_model.fit( + processed_data["y_to_fit"], params, x=processed_data["x_data"] + ) + + # Find the X that gives the max Y + max_index = np.argmax(processed_data["y_to_fit"]) + x_max = processed_data["x_data"][max_index] + + # Generate data for a smoothed fit curve + fit_xdata = np.linspace(np.min(data["x_data"]), np.max(data["x_data"]), 500) + fit_ydata = lmfit_result.eval(x=fit_xdata, params=lmfit_result.params) + + # Collect results + return { + "model": fit_params["model"].__name__, + "fwhm": lmfit_result.params["peak_fwhm"].value, + "centre": lmfit_result.best_values["peak_center"], + "height": lmfit_result.params["peak_height"].value, + "chi_sq": lmfit_result.chisqr, + "lmfit_result": lmfit_result, + "x_max": x_max, + "fit_xdata": fit_xdata, + "fit_ydata": fit_ydata, + } + + +def plot_fitted_data(data, fit_result): + """Plot the original data and the fitted model.""" + plt.plot(data["x_data"], data["y_to_fit"], label="Data") + plt.plot(fit_result['fit_xdata'], fit_result['fit_ydata'], label="Fit") + plt.xlabel(data["motor_name"]) + plt.ylabel(data["signal_name"]) + plt.title(f"Scan {data['scan_number']}, fitted with {fit_result['model']}") + plt.grid(True) + plt.legend() + plt.show() + + +def select_bec_window(dock_area_name="Fitting"): + """Check to see if the fitting results dock is already open and re-create it if not""" + open_docks = bec.gui.windows + if open_docks.get(dock_area_name) is None: + dock_area = bec.gui.new(dock_area_name) + # wf = dock_area.new("Plot").new(bec.gui.available_widgets.Waveform) + wf = dock_area.new(widget='Waveform', object_name='Plot') + text_box = dock_area.new(widget='TextBox', object_name="Results", where="bottom") + else: + wf = bec.gui.Fitting.Plot + text_box = bec.gui.Fitting.Results + return wf, text_box + + +def plot_live_data_bec( + motor_name, + signal_name, + window_name="Fitting" +): + """ + Plotting live data for motor and signal using BEC. + + This function plots live data from a specified motor and signal. + It clears the current plot window, sets its title, labels the axes + with the provided motor and signal names, and initializes live plotting + on the given signal against the motor. + + Args: + motor_name (str): The name of the motor to be used as the x-axis. + signal_name (str): The name of the signal to be used as the y-axis. + + Returns: + None + """ + root, name = get_signal_values(signal_name) + wf, text_box = select_bec_window(window_name) + text_box.set_plain_text("Plotting live data") + wf.clear_all() + wf.title = "Scan: Live scan" + wf.x_label = motor_name + wf.y_label = signal_name + wf.plot(device_x=motor_name, device_y=root) + + + + +def plot_fitted_data_bec( + data, + fit_result, +): + """ + Plot fitted data and display fitting parameters in the specified window. + + This function selects a BEC window and plots the original data along with the + fitted function. Additionally, it displays the fitting results in a text + box within the same window for better visualization of the fit results. + + Parameters: + data : dict + Dictionary containing the original dataset, where 'x_data' and 'y_to_fit' + hold the independent variable and the dependent variable, respectively, + 'scan_number' represents the scan number, 'motor_name' and 'signal_name' + provide axis labels. + fit_result : dict + Dictionary containing the results of the fit, including parameters such + as 'centre', 'fwhm', 'height', and the fitted model stored under + 'lmfit_result', with its 'best_fit' attribute representing the fitted data. + """ + wf, text_box = select_bec_window() + fit_text = ( + f"Fit parameters: Centre = {fit_result['centre']:.5g}, " + f"FWHM = {fit_result['fwhm']:.5f}, " + f"Height = {fit_result['height']:.4g}\n" + f"Model = {fit_result['model']}\n" + f"Chi sq = {fit_result['chi_sq']:.3g}" + ) + text_box.set_plain_text(fit_text) + wf.clear_all() + wf.title = f"Scan: {data['scan_number']}" + wf.x_label = data["motor_name"] + wf.y_label = data["signal_name"] + wf.plot(x=data["x_data"], y=data["y_to_fit"], label="Data") + wf.plot(x=fit_result["fit_xdata"], y=fit_result["fit_ydata"], label="Fit") + # wf.Fit.set(symbol_size = 0) + wf.get_curve('Fit').set(symbol_size=0) + diff --git a/pxii_bec/macros/mx_basics.py b/pxii_bec/macros/mx_basics.py index 492234c..c089c45 100755 --- a/pxii_bec/macros/mx_basics.py +++ b/pxii_bec/macros/mx_basics.py @@ -1,5 +1,5 @@ """Get data from an h5 file or BEC history and perform fitting.""" - +import re import numpy as np from lmfit.models import ( GaussianModel, @@ -15,6 +15,7 @@ import matplotlib.pyplot as plt def create_fit_parameters( deriv: bool = False, + negative: bool = False, model: str = "Voigt", baseline: str = "Linear", smoothing: None = None, @@ -30,47 +31,94 @@ def create_fit_parameters( } return { "deriv": deriv, + "negative": negative, "model": model_mappings[model], "baseline": model_mappings[baseline], "smoothing": smoothing, } -def get_data_from_h5(signal_name: str = "lu_bpmsum"): - """Get data from an h5 file.""" - with h5py.File("scan_676.h5", "r") as f: - entry = f["entry"]["collection"] - y_data = entry["devices"][signal_name][signal_name]["value"][:] - motor_data = entry["metadata"]["bec"] - motor_name = motor_data["scan_motors"][0].decode() - scan_number = motor_data["scan_number"][()] - x_data = entry["devices"][motor_name][motor_name]["value"][:] - return { - "x_data": x_data, - "y_data": y_data, - "signal_name": signal_name, - "motor_name": motor_name, - "scan_number": str(scan_number), - } +# def get_data_from_h5(signal_name: str = "lu_bpmsum"): +# """Get data from an h5 file.""" +# root, name = get_signal_values(signal_name) +# with h5py.File("scan_676.h5", "r") as f: +# entry = f["entry"]["collection"] +# y_data = entry["devices"][root][name]["value"][:] +# motor_data = entry["metadata"]["bec"] +# motor_name = motor_data["scan_motors"][0].decode() +# scan_number = motor_data["scan_number"][()] +# x_data = entry["devices"][motor_name][motor_name]["value"][:] +# return { +# "x_data": x_data, +# "y_data": y_data, +# "signal_name": signal_name, +# "motor_name": motor_name, +# "scan_number": str(scan_number), +# } + +def get_history(scan): + if isinstance(scan, int): + if scan < 0: + return bec.history[scan] + return bec.history.get_by_scan_number(scan) + # return bec.history.get_by_dataset_number(scan) + return scan + + +def get_value(dev_name, all=False): + if dev_name == dev.scam: + root = 'scam' + live_root = 'scam' + name = 'scam_contrast' + value = dev_name.read()[name]['value'] + else: + try: + name = live_root = root = dev_name.name + value = dev_name.read()[name]['value'] + except: + print("non-standard device") + root = dev_name.dotted_name + name = dev_name.full_name + live_root = dev_name.parent.name + value = dev_name.read()[name]['value'] + + + if all: + return {"value": value, "root": root, "name": name, "live_root": live_root} + + return value def get_data_from_history( - history_index: int, - signal_name: str = "lu_bpmsum", + scan: int, + signal_dev, ): """Read data from the BEC history and return the X and Y data as arrays.""" - scan = bec.history[history_index] - md = scan.metadata["bec"] - motor_name = md["scan_motors"][0].decode() + + data = get_history(scan) + md = data.metadata["bec"] + motor_name = md["scan_report_devices"][0].decode() + if '.' in motor_name: + root = motor_name.split(".")[0] + name = motor_name.replace(".","_") + else: + root = motor_name + name = motor_name + + + x_data = data.devices[root][name].read()["value"] + y_res = get_value(signal_dev, True) + y_data = data.devices[y_res['root']][y_res['name']].read()["value"] + signal_name = y_res['name'] + scan_number = md["scan_number"] - x_data = scan.devices[motor_name][motor_name].read()["value"] - y_data = scan.devices[signal_name][signal_name].read()["value"] + return { "signal_name": signal_name, "x_data": x_data, "y_data": y_data, "motor_name": motor_name, - "scan_number": scan_number, + "scan_number": float(scan_number), } @@ -78,29 +126,33 @@ def process_data(data, fit_params): """ Process the signal data for fitting based on derivative or smoothing. """ - smoothing, deriv = fit_params["smoothing"], fit_params["deriv"] + smoothing = fit_params["smoothing"] + deriv = fit_params["deriv"] + negative = fit_params["negative"] + signal_name = data["signal_name"] y_data = data["y_data"] - if deriv: - if smoothing: - y_smooth = gaussian_filter1d(y_data, smoothing) - fitting_data = np.gradient(y_smooth) - signal_name = f"Derivative of smoothed {signal_name}" - else: - fitting_data = np.gradient(y_data) - signal_name = f"Derivative of {signal_name}" - elif smoothing and smoothing > 0.01: + if smoothing and smoothing > 0.01: fitting_data = gaussian_filter1d(y_data, smoothing) signal_name = f"Smoothed {signal_name}" else: - fitting_data = y_data + fitting_data = y_data.copy() - updated_data = { - "y_to_fit": fitting_data, - "signal_name": signal_name, - } - data.update(updated_data) + if deriv: + fitting_data = np.gradient(fitting_data) + signal_name = f"Derivative of {signal_name}" + + if negative: + fitting_data = -fitting_data + signal_name = f"Negative {signal_name}" + + data.update( + { + "y_to_fit": fitting_data, + "signal_name": signal_name, + } + ) return data @@ -172,7 +224,6 @@ def select_bec_window(dock_area_name="Fitting"): open_docks = bec.gui.windows if open_docks.get(dock_area_name) is None: dock_area = bec.gui.new(dock_area_name) - # wf = dock_area.new("Plot").new(bec.gui.available_widgets.Waveform) wf = dock_area.new(widget='Waveform', object_name='Plot') text_box = dock_area.new(widget='TextBox', object_name="Results", where="bottom") else: @@ -210,6 +261,8 @@ def plot_live_data_bec( wf.plot(device_x=motor_name, device_y=signal_name) + + def plot_fitted_data_bec( data, fit_result, @@ -234,9 +287,9 @@ def plot_fitted_data_bec( """ wf, text_box = select_bec_window() fit_text = ( - f"Fit parameters: Centre = {fit_result['centre']:.4f}, " - f"FWHM = {fit_result['fwhm']:.3f}, " - f"Height = {fit_result['height']:.4f}\n" + f"Fit parameters: Centre = {fit_result['centre']:.5g}, " + f"FWHM = {fit_result['fwhm']:.5f}, " + f"Height = {fit_result['height']:.4g}\n" f"Model = {fit_result['model']}\n" f"Chi sq = {fit_result['chi_sq']:.3g}" ) diff --git a/pxii_bec/macros/mx_methods.py b/pxii_bec/macros/mx_methods.py index 8631d0f..6a00c64 100755 --- a/pxii_bec/macros/mx_methods.py +++ b/pxii_bec/macros/mx_methods.py @@ -36,7 +36,7 @@ def calculate_step_size(start: float, stop: float, steps: int) -> float: """ if steps < 1: raise ValueError("Number of steps must be at least 1.") - return round((stop - start) / steps, 3) + return round((stop - start) / (steps - 1), 5) def move_to_position(motor_device, motor_name: str, position: float, data: dict): @@ -105,6 +105,7 @@ def go_to_peak( settle: float = FitDefaults.SETTLE_TIME, confirm: bool = True, gomax: bool = False, + negative: bool = False ): """ Go to the peak of a signal by scanning a motor within a specified range and @@ -132,8 +133,12 @@ def go_to_peak( Returns: None """ - motor_name = motor_device.name - signal_name = signal_device.name + # Get motor and signal names + mres = get_value(motor_device, True) + motor_name = mres['root'] + sres = get_value(signal_device, True) + signal_name = sres['root'] + print(f"Signal name is {signal_name}") # wf.plot(x_name=motor_name, y_name=signal_name) if plot: plot_live_data_bec(motor_name, signal_name) @@ -142,8 +147,9 @@ def go_to_peak( step_size = calculate_step_size(start, stop, steps) # Confirm the scan range - # current_motor_position = motor_device.user_readback.get() - current_motor_position = motor_device.read()[motor_name]["value"] + current_motor_position = mres['value'] + print(f"Starting motor position = {current_motor_position}") + if confirm: if relative: scan_start = current_motor_position + start @@ -159,12 +165,15 @@ def go_to_peak( ) print(f"Relative mode = {relative}") input("Press Enter to continue...") + # Perform the scan scan_result = scans.line_scan( motor_device, start, stop, steps=steps, relative=relative, settling_time=settle ) - motor_data = scan_result.scan.live_data[motor_name][motor_name].val - signal_data = scan_result.scan.live_data[signal_name][signal_name].val + motor_data = scan_result.scan.live_data[mres['live_root']][mres['name']].val + # # motor_data = scan_result.scan.live_data[motor_name][motor_name].val + # sres = get_value(signal_name, True) + signal_data = scan_result.scan.live_data[sres['root']][sres['name']].val scan_number = "Current" data = { @@ -177,7 +186,10 @@ def go_to_peak( } # Define and fit model to scan data - fit_params = create_fit_parameters(False, FitDefaults.MODEL, FitDefaults.BASELINE) + fit_params = create_fit_parameters(deriv = False, + negative = False, + model = FitDefaults.MODEL, + baseline = FitDefaults.BASELINE) fit_result = fit(data, fit_params) # Plot the fitted data if plot = True @@ -198,6 +210,8 @@ def fit_history( history_index: int, signal_name: str, deriv: bool = False, + negative: bool = False, + smoothing: bool = False, model: str = FitDefaults.MODEL, move_to_peak: bool = False, ): @@ -226,15 +240,17 @@ def fit_history( data = get_data_from_history(history_index, signal_name) # Define fitting parameters - fit_params = create_fit_parameters(deriv, model, FitDefaults.BASELINE) + fit_params = create_fit_parameters(deriv, negative, model, FitDefaults.BASELINE) # Perform fit and plot the data fit_result = fit(data, fit_params) plot_fitted_data_bec(data, fit_result) + # Optionally move the motor to the peak position if move_to_peak: move_to_position(data["motor_device"], data["motor_name"], fit_result["centre"], data) + return fit_result def scan_bpm(bpmname): diff --git a/pxii_bec/macros/pxii_energy.py b/pxii_bec/macros/pxii_energy.py index 3b40325..541e6e9 100755 --- a/pxii_bec/macros/pxii_energy.py +++ b/pxii_bec/macros/pxii_energy.py @@ -85,7 +85,12 @@ def mono_pitch_scan(plot=True): energy = get_current_energy() pos = get_dcm_motors_positions(energy) print(f"Setting DCM Pitch to default value of {pos['dcm_pitch']}") - # scans.umv(EnergyDefaults.mono_pitch, pos["dcm_pitch"], relative=False) + # Set fine pitch to middle of its' travel range + scans.umv(EnergyDefaults.mono_fpitch, pos["dcm_fine_pitch"], relative=False) + # Move DCM pitch to starting value + scans.umv(EnergyDefaults.mono_pitch, pos["dcm_pitch"], relative=False) + + # Go to peak using default parameters from EnergyDefaults if plot: print("Scanning monochromator pitch and moving to peak, with plotting.") @@ -162,13 +167,14 @@ def get_dcm_motors_positions(energy_ev): """ # dcm_motor_values = get_value_from_lut(energy_ev) dcm_motor_values = {} - # pitch = float(np.poly1d(Calibration.pitch)(energy_ev)) - pitch = -5.5 + pitch = float(np.poly1d(Calibration.pitch_calib)(energy_ev)) + # pitch = -5.5 + fpitch = 5.0 roll = EnergyDefaults.mono_roll_value perp = calc_perp_position(energy_ev, print_result=False) bragg_angle = convert_from_energy(energy_ev, print_result=False)["bragg_angle_mrad"] dcm_motor_values.update( - {"bragg_angle": bragg_angle, "perp": perp, "dcm_pitch": pitch, "dcm_roll": roll} + {"bragg_angle": bragg_angle, "perp": perp, "dcm_pitch": pitch, "dcm_roll": roll, "dcm_fine_pitch": fpitch} ) return dcm_motor_values @@ -192,6 +198,7 @@ def move_dcm_motors(energy_ev): # umv(EnergyDefaults.mono_pitch, dcm_pos["dcm_pitch"]) # umv(EnergyDefaults.mono_roll, dcm_pos["dcm_roll"]) # print("\n***DCM Roll movement is currently disabled ***\n") + scans.umv(EnergyDefaults.mono_fpitch,dcm_pos["dcm_fine_pitch"], relative=False ) scans.umv( EnergyDefaults.energy, dcm_pos["bragg_angle"], @@ -247,3 +254,34 @@ def bl_energy(energy_ev, move_gap=True, mono_scan=True, plot=True): mono_pitch_scan(plot=True) else: mono_pitch_scan(plot=False) + +def new_calc_gap(energy_ev): + """ + Calculates the gap based on the given energy + """ + gapval = Gap() + harmonic_values = gapval.get_harmonic_values(energy_ev) + if harmonic_values is not None: + fit = np.poly1d(harmonic_values)(energy_ev) + gap_value = fit * 0.9994 + return gap_value + return None + +def set_gap(energy_ev, print_result=True): + """ + set the gap + """ + gap = new_calc_gap(energy_ev) + # else: + # gap = calc_gap(energy_kev) + if gap is not None and Harmonics.min_gap_value <= gap <= 20: + umv(dev.id_gap, gap) + if print_result: + print(f"Setting gap to {gap:.3f} mm") + else: + msg = ( + f"Position {gap: .3f} mm is outside the allowed scan range of " + f"4.5 to 20 mm. Not changing the gap." + ) + raise ValueError(msg) + return gap diff --git a/pxii_bec/macros/pxii_parameters.py b/pxii_bec/macros/pxii_parameters.py index 5a1f2d7..c21b95b 100755 --- a/pxii_bec/macros/pxii_parameters.py +++ b/pxii_bec/macros/pxii_parameters.py @@ -15,9 +15,10 @@ class EnergyDefaults: signals = {"sig1": dev.lu_bpmsum, "sig2": dev.ss_bpmsum, "sig3": dev.bcu_bpmsum} energy = dev.dcm_bragg mono_pitch = dev.dcm_pitch + mono_fpitch = dev.dcm_fpitch mono_perp = dev.dcm_perp mono_roll = dev.dcm_froll - mono_roll_value = 4.65 + mono_roll_value = 4.56 LUT_table = "luts/energy_lut.csv" stripe_thresholds = {"silicon": 9000, "rhodium": 20000, "platinum": 40000} pitch_scan = {"halfwidth": 0.075, "steps": 20} @@ -27,8 +28,13 @@ class EnergyDefaults: class Calibration: """Calibration parameters for PXII optics""" - pitch = np.array([4.61823701e-14, -1.97330772e-09, 2.89694543e-05, -5.34468669e00]) - roll = np.array([2.28291039e-03, -2.41928101e01]) + # pitch = np.array([4.61823701e-14, -1.97330772e-09, 2.89694543e-05, -5.34468669e00]) + pitch_calib = [-5.89030403e-19, + 4.85665619e-14, + -1.49364459e-09, + 2.08652765e-05, + -5.59843072e+00] + # roll = np.array([2.28291039e-03, -2.41928101e01]) @dataclass(frozen=True) @@ -147,7 +153,7 @@ class BPMScans: "x_device": dev.lu_bpm_x, "y_device": dev.lu_bpm_y, } - bsc = { + ss = { "x_name": dev.ss_bpm_x.name, "y_name": dev.ss_bpm_y.name, "z1_name": dev.ss_bpm1.name, diff --git a/pxii_bec/macros/set_kbox.sh b/pxii_bec/macros/set_kbox.sh index fa30fd9..c071ac1 100755 --- a/pxii_bec/macros/set_kbox.sh +++ b/pxii_bec/macros/set_kbox.sh @@ -13,7 +13,7 @@ usage() { echo "Usage: $(basename "$0") " echo echo "Example:" - echo " $(basename "$0") colli_in 41.5" + echo " $(basename "$0") colli_in 39.5" echo " $(basename "$0") colli_out 20." echo " $(basename "$0") scinti_in 40." echo " $(basename "$0") diode_in 44." @@ -33,7 +33,7 @@ fi DEVICE_NAME="$1" SET_VALUE="$2" -if ! [[ "$SET_VALUE" =~ ^[0-9]+$ ]]; then +if ! [[ "$SET_VALUE" =~ ^[0-9]+([.][0-9]+)?$ ]]; then echo "Error: set_value must be numeric" exit 1 fi