-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take some fluorescence hdf files with the xspress3 #236
Comments
When we do this we should get @pblowey and @Relm-Arrowny involved |
Time put aside on the afternoon of 11th July for this |
Tested with: from bluesky import plan_stubs as bps
from bluesky.run_engine import RunEngine
from dodal.beamlines import i03
from dodal.devices.zebra_controlled_shutter import ZebraShutterState
RE = RunEngine()
shutter = i03.sample_shutter()
fluo_det = i03.xspress3mini()
def my_plan():
yield from bps.abs_set(shutter, ZebraShutterState.OPEN)
yield from bps.abs_set(fluo_det.acquire_time, 0.01)
yield from bps.stage(fluo_det, wait=True)
yield from bps.unstage(fluo_det, wait=True)
yield from bps.abs_set(shutter, ZebraShutterState.CLOSE)
RE(my_plan()) File produced at |
To get this to work we had to set |
Blocked on DiamondLightSource/dodal#679 |
Do next Friday? |
An update from my side of things as some comments/suggestions: I've now got a PR ready (DiamondLightSource/python-zocalo-pymca/pull/8) for the changes to the pymca_fitter service that will allow it to process h5 files. Full details can be found in that PR. I've also updated the pymca_fitter recipe to accept In terms of storing the data, I've found this documentation for writing MCA data using NeXus conventions. Would you be able to get the hdf5 file output by the xpress3 into this format? It would make the hdf5 file a lot more user friendly for any users who want to fit the data themselves in PyMCA as the relevant meta data is stored with the measurement. In that documentation, it suggests having calibration, channels and live time as meta data stored in the file. I think, since we are recording data from all channels in a straight-forward way (0-4095), we don't need the channels stored as meta data. I also don't know if the live time is something that can be readily obtained from the xpress3. The calibration needs to be stored in the file as a dataset in the format The calibrations for each beamline's MCA will need to be redone as currently GDA does not store all channels and (At least on some beamlines) applies an offset. In principle, this would only require changing the the zero parameter but it would make sense to redo the calibration completely to be sure that the calibration is good over the desired region of interest. In any case, while GDA and hyperion are both in operation, we'll need separate pymca config files as they'll require different calibrations. |
Maybe, the other option, which is probably preferable, is that we wrap the raw h5 with a VDS link like we do for the diffraction data. Do we have to use that convention or are we able to use https://manual.nexusformat.org/classes/applications/NXfluo.html#nxfluo? I think I would prefer a defined application definition if possible |
Just to check that I understand, with the diffraction data, do you write hdf5 file(s) containing the raw diffraction data as well as an hdf5 file containing the metadata, which are then linked together in a
I wasn't aware of this specific definition but I think, as long as you store the calibration at |
Yes, if you take a look in e.g.
Ah, so it has to have a calibration curve rather than an array of energies like |
I just had a play around, seeing what the PyMCA GUI would do if I provided energy in the |
GDA reads the data out of the xspress3 directly from PVs then writes it to it's own file format. However, the xspress3 IOC has the ability to write HDF files, which we would like to use. The first step in doing this is spending some time on the beamline manually triggering the fluorescence detector and getting an example file out. This can then be passed to analysis so that they can update their pipelines to work for it.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: