DiamondLightSource / DiamondLightSource/sm-bluesky
Add i06-1 fastfieldscan with ID energy switch
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 2d 3m
- Merged PRs (30d)
- 8
Description
I06-1 have a `fastfieldscan` in GDA which allows them to do a flyscan, increasing the ramp rate for an axis and then move from position A to position B and continuously collect data while scanning over the super conducting magnet axis move. This is also known as a flyscan.
They are trying to to also add the ability to specify two energy values and then have the ID energy alternate between these values during the flyscan.
The GDA code is very old and doesn't natively support fly scanning easily, making this additional requirement harder. Instead, we should add this functionality into Bluesky as it supports it out of the box. This will require us to add the following:
- [x] `SuperConductionMagnet` device along with each axis. Each axis implements `Preparable` and `Flyable` Bluesky protocols.
- [x] Scaler cards and detectors to measure during the fly scan
- [ ] Add `fastfieldscan`
- [ ] Add `fastfieldscan_with_energy` support
### Goals
Acceptance criteria :
- [ ] Single-Axis Fly Magnetic Scan( Only uniaxal mode is required).: User should be able to run a fastfieldscan where a selected axis (x, y, z) of the superconducting magnet sets its ramp-up speed to match the desired resolution, moves from a start to an end position, and continuously collects detector data during the move. Once the scan is completed, the speed must automatically reset to the pre-scan baseline.
- [ ] Alternating Energy During Scan: User should be able to run a fastfieldscan_with_energy with two energy values, and have the beamline energy automatically alternate between these two values continuously while the magnet axis is flying and taking data.
- [ ] Scaler Cards/Fast Field Readback: Fast Field Readback is connected to the same scaler card as all 5 detectors. The scaler card must only trigger once per data point to read all 6 channels simultaneously.
- [ ] BlueAPI Integration: Both scan types (fastfieldscan and fastfieldscan_with_energy) can be successfully submitted, monitored, and run from GDA using BlueAPI.
- [ ] NeXus Format Validation: The generated data files must be in the correct NeXus format and contain all required metadata/structures to meet downstream data analysis requirements.
- [x] Safety Limit Verification: All magnetic field changes must be checked prior execution to guarantee that the requested move resides within the current mode-dependent safety limits (see Additional Context).
### Tasks
base on the goals, deduce the tasks required. check them off once they're done
- [x] DiamondLightSource/dodal#2120
- [x] #339
- [x] Investigate the possibility of using adc instead of the current fast readback detector chain.
- Essentially this is down to the length of the wire and what type of signal is less noisy, so they want to keep passing frequency down the long wire instead of voltage as it is slight less nosey .
### Related Resources
Current GDA impermentation:
`i06-1-config/scripts/magnet/useMagnet.py
i06-shared/scripts/Diamond/PseudoDevices/SuperconductingMagnet.py
i06-1-config/scripts/scan/fastFieldScanWithEnergySwitch.py`
Magnet Reference Manual: [Confluence Link](https://confluence.diamond.ac.uk/spaces/BLVI/pages/14746077/Superconducting+Magnet?preview=/14746077/108239327/Manual_Branchline_Magnet.pdf)
###Additional context
Fast Field Readback Conversion: The signal pipeline runs from the power supply resistor voltage $\rightarrow$ voltage amplifier $\rightarrow$ V2F $\rightarrow$ Scaler Card. The corrected counts from this channel can be converted to Tesla on-the-fly and the covertion is given by :
Safety Magnetic Limits are mode dependent and it is somewhat protected by epics (mode change in epics will set all axis to zero and it does not allow any set value above the axis limit, but there are no combined limit check):
Contributor guide
Assessment
This issue has not been assessed yet.