pcdshub / transfocate

Automated calculation of beryllium lens focusing optics
https://pcdshub.github.io/transfocate
Other
1 stars 7 forks source link

Request a combination for a specific energy #23

Open teddyrendahl opened 6 years ago

teddyrendahl commented 6 years ago

Request

Right now the Transfocator class only returns solutions for the current energy. It would be nice if you could enter a specific energy:

transfocator.find_best_combo(energy=8.5)  # In keV

Implementation

The IOC does have a requested energy field, this changes the REQ_FOCUS PV of each lens. We could have the Calculator object work on simpler Lens data structures that are filled either with live or requested focus values.

We would have to include some context to make sure that the requested energy is not changed by multiple users during a calculation.