Giter Club home page Giter Club logo

simex-lite's People

Contributors

godot11 avatar junceee avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

simex-lite's Issues

Missed dependencies or redundant import

[esobolev@max-display009]~/proj/simex1/diffraction_noise_geom% python diffr_2nip.py
Traceback (most recent call last):
  File "/home/esobolev/proj/simex1/diffraction_noise_geom/diffr_2nip.py", line 1, in <module>
    from SimExLite.DiffractionCalculators import SingFELPDBDiffractionCalculator
  File "/home/esobolev/envs/dev-202301/lib/python3.9/site-packages/SimExLite/DiffractionCalculators/__init__.py", line 3, in <module>
    from .CrystfelDiffractionCalculator import CrystfelDiffractionCalculator
  File "/home/esobolev/envs/dev-202301/lib/python3.9/site-packages/SimExLite/DiffractionCalculators/CrystfelDiffractionCalculator.py", line 6, in <module>
    import pytest
ModuleNotFoundError: No module named 'pytest'

In some files, this error about XMDYN exist

File /gpfs/exfel/data/user/juncheng/SimExLite/SimExLite/PMIData/XMDYNFormat.py:52, in XMDYNFormat.read(cls, filename, format)
     50 time_step = data_dict[step]
     51 # Time of each step in second
---> 52 time_step["time"] = h5["misc/time"][snp][()]
     53 time_step["atomic_numbers"] = step_in["Z"][()]
     54 # Velocity of each atom. The unit is m/s

Enhancement: Process beamlines downloaded from SiRepo's SRW tool

SiRepo makes it very intuitive and simple to configure a beamline and to propagate a Gaussian beam through it. Downloading
a beamline configuration is supported. A py script is generated that contains the beamline definition using srwpy's syntax.

Make a utility in simex(-lite) that reads (imports) the downloaded srwpy script and constructs a valid WPG beamline out of it that can be digested by the WPGPropagator.

DiffractionData

Detector data + Geometry data =|Assemble|> DiffractionData

Improve documentation

I found the following issues with the documentation;

Quickstart expectations: I would expect an example simulation as part of a quickstart, not just instructions for installation.

Redundant sections: Introduction/Quickstart and Users/Installation are more or less identical, remove one of them

installation uses python setup.py which is kind of old fashioned. pip install -e . is the way to go.

Calculators: Really just one Calculator? Can we have more?

PhenomSourceCalculator:

  • should describe that this is a XFEL pulse and how it is modeled
  • being picky: Why do we need all this wpg stuff, can't we put all that in some common namespace or (better) provide wrappers for common plotting tasks?
  • While at it, should also show how to use the sampling check in wpg.
  • also, since backengine installation only comes next, wpg might not be available, yet

Backengine installation

install from git without cloning:

pip install git+https://github.com/...@simex

mention that mpi is a requirement

WPG:

why install from juncheng repo, not central WPG?

Usage

Add introductory explanation of what is being done, what are the steps

  • add comments to code
  • turn doi into html
  • explain the img_gaussian parameters
  • What does "Larger slop and intercept gets larger noise" mean?

SimEx-Lite GaussianSourceCalculator test

@godot11 Could you please help test the GaussianSourceCalculator in the libpyvinyl branch of SimEx-Lite?

Quickstart

git clone https://github.com/PaNOSC-ViNYL/SimEx-Lite.git
git checkout libpyvinyl

And then have a look at tests/test_GaussianSourceCalculator.py. The WPG package needs to be installed for that.

After testing, could you please let me know:

  • What do you think blocked you from using the program?
  • What do you think is needed to let you start easier?

Add WPG installation instruction

As mentioned in #7 (comment)

An instruction to install WPG is needed.

I'd write somewhere in the documentation:
SimEx-Lite depends on WPG (github.com/Samoyl/WPG). Please download and build WPG as per their documentation. Then, you have to make the WPG library "visible" to SimEx-Lite. To this end, do one of the following:

$PYTHONPATH: If you have the environment variable $PYTHONPATH set, copy the WPG/ directory into any directory listed in $PYTHONPATH.
conda: If you installed SimEx-Lite in a conda environment, activate that environment and copy the WPG/ directory to $CONDA_PREFIX/lib/python3.x/site-packages/ (x is your python minor version).
pip: If you installed SimEx-Lite with pip install, copy the WPG directory into $HOME/.local/lib/python3.x/site-packages
Test that WPG can be imported by running:

$> python -c 'import WPG.Beamline'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.