SimEx
SimEx copied to clipboard
Tutorial on nano crystal diffraction
Trying the tutorial on nano-crystal diffraction and reporting issues.
- importing
CrystFELPhotonDiffractor, CrystFELPhotonDiffractorParameters, PhotonBeamParameters
is not sufficient to create thebeam
variable - the units are missing due to the upgrade to using the
pint
python package - [x] fix the imports
- [x] fix the
beam
object with units - the link to the geometry file is broken
- [x] fix the geometry file link
- creating the
parameters
object throws a warning even though the geometry file exists #159 - [x] fix the tutorial: constructor of
parameters
object takesdetector_geometry
instead ofgeometry
, thanks @belfhi
When trying to run the last command diffr_diagnostics.py -P -p1 -z True xstal_diffr.h5
I am encountering the following error:
Traceback (most recent call last):
File "/data/netapp/s2e/simex/bin/diffr_diagnostics.py", line 25, in <module>
from SimEx.Analysis.DiffractionAnalysis import DiffractionAnalysis, plt
File "/data/netapp/s2e/simex/lib/python3.4/SimEx/__init__.py", line 33, in <module>
from .Analysis.DiffractionAnalysis import DiffractionAnalysis
File "/data/netapp/s2e/simex/lib/python3.4/SimEx/Analysis/DiffractionAnalysis.py", line 23, in <module>
from SimEx.Analysis.AbstractAnalysis import AbstractAnalysis, plt, mpl
File "/data/netapp/s2e/simex/lib/python3.4/SimEx/Analysis/AbstractAnalysis.py", line 32
class AbstractAnalysis(object, metaclass=ABCMeta):
^
SyntaxError: invalid syntax
That is likely due to the #!/usr/bin/env python2.7
shebang in the beginning and the python3 branch being installed on Maxwell.
I replaced it by #!/usr/bin/env python
in the local copy of diffr_diagnostics.py
because the simex
module loads python 3.4 anyway.
../simex_platform/Sources/python/ScriptCollection/DataAnalysis/scattering/diffr_diagnostics.py -P -p1 -z True xstal_diffr.h5
/usr/lib64/python3.4/importlib/_bootstrap.py:321: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
return f(*args, **kwds)
initializing ocelot...
WARNING: esther_execute could not be imported. This is most probably due to Esther not being installed or not found. Expect RunTimeErrors when attempting to run the EstherPhotonMatterInteractor.backengine().
WARNING: Giving an operation with a single pattern has no effect.
The resulting plot looks like this:
That's not what it's supposed to look like, according to the tutorial :sweat_smile:
cc'ing @CFGrote
Same here - looks like detector output contains low statistics, as @n01r noticed. Only 23 non-zero pixels of the same intensity.
UPD: no improvement on diffraction patterns (i.e. few non-zero pixels only) if using files from SPI tutorial as input.
Unfortunately, I've found no way to "feed" CrystFEL (CrystFELPhotonDiffractorParameters()
and CrystFELPhotonDiffractor()
) with pmi_output
- data with different structure of .h5 file. @CFGrote , is there any way to overcome this problem? I mean - compare the images obtained using SingFEL and CrystFEL after PMI for, say, the same sample 5udc.pdb
?