Skip to content

Simulate diffraction from crystals using divergent chromatic X-rays and flat detectors.

License

Notifications You must be signed in to change notification settings

AxelHenningsson/lauesim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

L A U E S I M

Barebones simulation of diffraction from crystals using divergent chromatic X-rays and flat detectors.

NOTE: This is a toy sientific project to gain a better understanding of the so called Laue Diffraction geometry in which a divergent and white beam of X-rays is allowed to illuminate a polycrytsal giving rise to diffraction that is recorded on a flat 2d area detector. Use it to learn about diffraction and have fun!

Example


    from lauesim import dct
    my_dct_model = dct.model()
    my_dct_model.collect()
    my_dct_model.show()

laue The default model features a single 0.5mm diameter single crystal of aplha quartz. The model parameters can be tweaked trhough attributes of the components. FOr instance to rotate the sample do:

    my_dct_model.sample.rotation_angle = np.pi/2.
    my_dct_model.collect()
    my_dct_model.show_frame()

This then gives a different diffraction pattern image

Installation


Clone the repo and go to the root

git clone https://github.com/AxelHenningsson/lauesim.git
cd lauesim

Create a new pip environment and install

python3 -m venv env
pip install -e .

About

Simulate diffraction from crystals using divergent chromatic X-rays and flat detectors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published