Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Use bash as your shell
  2. Go to https://conda.io/miniconda.html
  3. Install the Python 2.7 64 bit bash installer (unless your OS is 32 bit but it most likely will not be)
  4. Find the installed file Miniconda2-latest-Linux-x86_64.sh
    1. It will probably be in Downloads, so do cd Downloads
    2. Run it with bash Miniconda2-latest-Linux-x86_64.sh
  5. Add miniconda2 to PATH
    1. The installation will automatically add the bin subdirectory of the installation to PATH  in your .bashrc file
    2. Close and reopen terminal and check by typing conda list which will print out the installed packages
    3. If conda is not found, follow step 5, else skip to step 6
  6. If not already created, create a .bash_profile file in your home directory
    1. Add the following script to it. This checks for the .bashrc and will run it on start up

      Code Block
      languagebash
      #!/bin/bash
       
      if [ -f $HOME/.bashrc ]; then
      	source $HOME/.bashrc
      fi
  7. Run conda update -y conda to update miniconda

  8. Download To replicate the psana environment on your laptop, download the file with the version requirements for all packages in psana. .
    The files can be found on GitHub, at this location.
    For example, at the time of writing, the most recent version of psana is 4.0.28. The file for the last this version of psana can be found here and can be downloaded using wget:
    wget https://raw.githubusercontent.com/slaclab/anarel-manage/master/envfiles/ana-4.0.28.yml(Links to files for alternate and legacy versions of psana can be found at this page).
  9. Create With the downloaded file, create the psana environment with the following command:
    conda env create -n ana-4.0.28 -f ana-4.0.28.yml
  10. Activate the environment environmeent with:
    conda activate ana-4.0.28
  11. The information in this point is only needed if a customized environment needs to be created.
    The above procedure creates a replica of the psana environment, as available at LCLS. The individual packages are available on the 'lcls-i' public channel on anaconda.org, so
    it is possible to create a personalized environment which mixes specific version of psana with custom version of other packages. However, be aware that not all versions
    of the python packages on conda-forge are compatible with each other, and this might limit the ability to mix-and-match.
    The list of channels needed to build a custom psana environment, with the correct priority, is the following:

    Code Block
    - lcls-i
    - conda-forge
    - defaults
  12. (optional, since we try to have an up-to-date copy of this in conda) Copy the experiment database from /reg/g/psdm/data/ExpNameDb/experiment-db.dat 

    1. Make a directory in the home directory with mkdir -p psdm/data/ExpNameDb 

    2. Copy the database

      1. With rsync: rsync -t psexport:/reg/g/psdm/data/ExpNameDb/experiment-db.dat ~psdm/data/ExpNameDb/

      2. With SCP: scp -p psexport:/reg/g/psdm/data/ExpNameDb/experiment-db.dat ~psdm/data/ExpNameDb/ 

  13. Copy the experiment data that will be used for analysis. This step requires patience if many runs will be copied

    1. For example, downloading run 54 from the experiment xpptut15, the following steps were taken:
      1. First create the required directories with mkdir -p psdm/xpp/xpptut15/
      2. Then these files were copied
        1. From /reg/d/psdm/xpp/xpptut15/xtc to ~/psdm/xpp/xpptut15/xtc

          Code Block
          languagebash
          -bash-4.2$ ls /reg/d/psdm/xpp/xpptut15/xtc/ | grep 54
          e665-r0054-s00-c00.xtc
          e665-r0054-s01-c00.xtc
          e665-r0054-s02-c00.xtc
          e665-r0054-s03-c00.xtc
          e665-r0054-s04-c00.xtc
          e665-r0054-s05-c00.xtc
        2. From /reg/d/psdm/xpp/xpptut15/xtc/index to ~/psdm/xpp/xpptut15/xtc/index:

          Code Block
          languagebash
          -bash-4.2$ ls /reg/d/psdm/xpp/xpptut15/xtc/index | grep 54
          e665-r0054-s00-c00.xtc.idx
          e665-r0054-s01-c00.xtc.idx
          e665-r0054-s02-c00.xtc.idx
          e665-r0054-s03-c00.xtc.idx
          e665-r0054-s04-c00.xtc.idx
          e665-r0054-s05-c00.xtc.idx
        3. From /reg/d/psdm/xpp/xpptut15/xtc/smalldata to ~/psdm/xpp/xpptut15/xtc/smalldata:

          Code Block
          languagebash
          -bash-4.2$ ls /reg/d/psdm/xpp/xpptut15/xtc/smalldata | grep 54
          e665-r0054-s00-c00.smd.xtc
          e665-r0054-s01-c00.smd.xtc
          e665-r0054-s02-c00.smd.xtc
          e665-r0054-s03-c00.smd.xtc
          e665-r0054-s04-c00.smd.xtc
          e665-r0054-s05-c00.smd.xtc
        4. And the entire directory /reg/d/psdm/xpp/xpptut15/calib to ~/psdm/xpp/xpptut15/calib
    2. Copy using either rsync or SCP. SCP may be simpler in this case because it copies the data of a symbolic link which is what is desired.
  14. Two environment variables must be set, SIT_DATA and SIT_PSDM_DATA by adding the following commands to the .bash_profile file
    1. (optional, see step (9)) export SIT_DATA=$HOME/psdm/data
    2. export SIT_PSDM_DATA=$HOME/psdm
    3. If step 5 was not done, create a .bash_profile file instead and begin it with #!/bin/bash 

...