pcdshub / pcdscalc

PCDS control system-agnostic scientific calculation routines
Other
0 stars 6 forks source link

Add support for pre-focus lens in FWHM calculation #30

Closed vespos closed 3 months ago

vespos commented 3 months ago

Description

Add option to use pre-focusing lens when calculating the FWHM of the beam

Motivation and Context

Lens calculation in the FEH is quite off when not accounting for the pre-focussing lens set.

How Has This Been Tested?

Used at XCS in June. Added a test instance for this, based on the parameters used in the hutch

Where Has This Been Documented?

Docstring

vespos commented 3 months ago

There is an issue with xraylib for the build. I can look into that but if you already know a solution, let me know @ZLLentz

ZLLentz commented 3 months ago

xraylib is not compatible with numpy 2, which released recently. The conda builds know this and set version accordingly, the pip builds do not. See the small edit we made in pcdsdevices to add numpy<2 as a CI-time constraint: https://github.com/pcdshub/pcdsdevices/blob/c568a607c3fc6e998a158874150b5a561dc16aac/.github/workflows/standard.yml#L24

ZLLentz commented 3 months ago

d'oh, check out #29 which I'll merge now, no need to adjust anything here

ZLLentz commented 3 months ago

I am going to click "update branch", note that you will need to pull this update back to your clone to make more pushes

vespos commented 3 months ago

Hopefully xraylib will be numpy2 compatible sson: https://github.com/tschoonj/xraylib/pull/240

vespos commented 3 months ago

I have combined all calc_beam_fwhm tests into a single function, let me know if you think there's something else I could do!