Versions Compared

Key

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

...

Now examplenv will have the correct environment variables when activated with the command source activate examplenv and deactivate with source deactivate. And packages may be added, removed, upgraded, downgraded, etc. from this conda environment like usual. For information on this, follow link given at the beginning of this section.

Example

...

It's important to test whether or not the above steps actually worked. To do this, you can use any code that imports experiment data with psana. Below is the sample code from the Event Iteration page from the Building Blocks section, here. If following the multiple environments steps, make sure to activate the environment with the command source activate examplenv.

Code Block
languagepy
from psana import *

ds = DataSource('exp=xpptut15:run=54:smd')
nevent = 0
 
for evt in ds.events():
    nevent += 1
    if nevent == 3:
        break


print 'Processed', nevent, 'events.'

If successful, you should see the output:

Code Block
Processed 3 events.

 

 

 

cd /home/jsmith/anaconda3/envs/analytics