xpdsim installation guideΒΆ
Before starting, make sure anaconda is installed, it is required for this installation. Note the syntax of this installation guide, as it was written, is based on Uinux system. For Windows users, please change the syntax accordingly if needed.
Activate/create a
python3conda environmentInstall
XPDstack from your terminalconda install -c conda-forge ipython xpdsim xpdacq xpdan
Setting up
ipythonprofileCreate
collectionprofile from your terminalipython profile create collection
Download the configuration file 999-load.py from xpdAcq repo.
Copy and paste the configuration file into the startup directory of ipython collection profile:
~/.ipython/profile_collection/startup/.Note
~/means the home directory of your machine, which depends on your OS and machine status. You can find out the exact filepath of~by doing the following in aPythonsessionimport os os.path.expanduser('~')
More information about the
ipythonconfiguration directory can be found in their official documentaion.
Create directories to simulate the machine status at the beamline
At your terminal, create simulation directories
mkdir -v ~/acqsim mkdir -v ~/acqsim/xpdUser mkdir -v ~/acqsim/xpdConfig
Create an empty long-term beamline config file
echo '{}' >~/acqsim/xpdConfig/XPD_beamline_config.yml
Enter
ipythonwithcollectionprofile specified from your terminal. This is command is essentially the same asbsuiyou will be typing at beamline!ipython --profile=collection
You should be prompted into an
ipythonsession, simulating your upcoming beamline experience. Please refer to the quikstart guide in xpdAcq documentation to run your simulated beamline and enjoy playing!You may find yourself need a syntax to create your simulated beamtime object and get everything running. This quick code snippet may be helpful for you.
bt = _start_beamtime('simulation', saf_num=300000, experimenters=['Jane', 'Doe'], wavelength=0.184649)