Data Analysis Quick Start

You can perform data analysis remotely, off-site, or at a beamline computer. Accordingly, there are two parts to this guide.

Option 1: At the Beamline

  1. Log in to your controls account. If this is your first time, execute this command to add a line to your .bashrc file.:

    echo "export PATH=/opt/conda/bin:\$PATH" >> ~/.bashrc
    source ~/.bashrc
    
  2. Activate the analysis conda environment.:

    source activate analysis
    

    This command makes the data collection software available by adding it your UNIX $PATH.

  3. Start IPython.:

    ipython
    

    or, alternatively, IPython notebook:

    ipython notebook
    

You are ready to work. See the dataportal documentation to look up scans and retrieve data. See the scikit-xray documentation for some Python tools for X-ray data analysis.

Option 2: Remotely

You need access to the BNL campus network, via a wired connection or VPN. You also need a controls account. (Contact one of the NSLS-II sysadmins.)

  1. Go to https://notebook.nsls2.bnl.gov. Remember, if you are not connected to the campus network, that link will not work.

  2. You will be shown a login prompt. Enter your controls account and password.

    _images/jupyterhub-login.png
  3. Choose a beamline from drop-down menu at the top right of the page.

    _images/jupyterhub-kernel-menu.png

This will open a new IPython notebook with all the software ready to use. It has fast access to the beamline’s data.

_images/jupyterhub-blank-nb.png

You are ready to work. See the dataportal documentation to look up scans and retrieve data. See the scikit-xray documentation for some Python tools for X-ray data analysis.