Skip to content

Get started

apeck12 edited this page Mar 3, 2022 · 2 revisions

How to get started accessing, visualizing and processing data. The following instructions apply to the psana cluster.

From IPython

After logging into pslogin.slac.stanford.edu, add the following to your .bashrc file:

export PYTHONPATH="${PYTHONPATH}:/cds/home/{path_to}/sfx_utils"

Then from the terminal, activate a psana conda environment:

$ source /reg/g/psdm/etc/psconda.sh -py3

This permits loading modules directly in IPython, e.g.: from sfx_utils.psana_interface import *

From JupyterHub

Alternatively, one can open a JupyterHub instance using the LCLS-I py3 kernel from https://pswww.slac.stanford.edu/. Running the following:

import sys, os
module_path = os.path.abspath(os.path.join('/cds/home/{initial}/{username}/sfx_utils'))
if module_path not in sys.path:
    sys.path.append(module_path)

enables the desired modules to be conveniently imported, e.g.: from sfx_utils.interfaces.psana_interface import PsanaInterface

Make sure you are running your scripts on the LCLS-I-py3 kernel.

Error message when starting the Jupyter hub

If this gives an error message, you will need to fix your ssh keys. Login to your account:

and run the following line:

/cds/group/psdm/sw/jupyterhub/psjhub/jhub/generate-keys.sh 

Miscellaneous notes about the psana nodes

NERSC remote analysis