PaNOSC-ViNYL / SimEx

Start-to-end photon experiment simulation platform
https://simex.readthedocs.io/
GNU General Public License v3.0
26 stars 25 forks source link

Tutorial on nano crystal diffraction #158

Open n01r opened 6 years ago

n01r commented 6 years ago

Trying the tutorial on nano-crystal diffraction and reporting issues.

n01r commented 6 years ago

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: nanocrystalscatteringplot That's not what it's supposed to look like, according to the tutorial :sweat_smile:

cc'ing @CFGrote

rshopa commented 5 years ago

Same here - looks like detector output contains low statistics, as @n01r noticed. Only 23 non-zero pixels of the same intensity. image

rshopa commented 4 years ago

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?