-
Notifications
You must be signed in to change notification settings - Fork 14
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
Return keys of dictionary in crystfel.py #213
Comments
Is this going to be a new, general feature of the crystfel stream file output? If it is a very customized output for the LCLS processing pipeline (and will not make it more broadly into crystfel), I don't know if it makes sense to support. For very personal/custom use cases, I think it may be best to put together your own implementation rather than modifying the interface here. |
My use case is, of course, specific, but the point is general: |
got it -- I'll think over whether that will make sense. In the meantime, the desired functionality can be obtained this way (this is not officially supported, and is subject to change...): from reciprocalspaceship.io.crystfel import _parse_stream
d, cell = _parse_stream(streamfile) |
That can work. In that case, could we turn lines 238-268 in |
The from reciprocalspaceship.io.crystfel import StreamLoader
loader = StreamLoader(streamfile) # use to find metadata you seek
ds = loader.to_dataset(spacegroup=spacegroup) # also get a DataSet
ds.set_index(["H", "K", "L"], inplace=True) This isn't yet in the main codebase, but you can always test it out using the |
I will look in to extending the |
Is this still desirable, or has the update to |
Let's keep this open until I get a chance to try that. I expect that #260 does everything I need to, but I have not tested it yet. |
It would be helpful to optionally return the keys of the dictionary that
_parse_stream
inio/crystfel.py
produces when callingrs.read_crystfel
. My use case is working with stream files produced by a new crystfel data processing pipeline at LCLS that contains data from multiple fixed-target crystals. The crystal ID and per-crystal frame numbers are not encoded in the BATCH record produced byrs.read_crystfel
but are recoverable from the keys. There's no need to parse the keys any further--just to have the option to returnlist(d.keys())
.See
reciprocalspaceship/reciprocalspaceship/io/crystfel.py
Line 237 in 16867cf
The text was updated successfully, but these errors were encountered: