You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Unable to render {include} The included page could not be found.
 
 
Unable to render {include} The included page could not be found.

How do I run a batch job?

Visit Submitting Batch Jobs

Why did my batch job failed? I'm getting 'command not found'

Before running your script, make sure you can run something, for instance do

  bsub -q psnehq pwd

(substitute the appropriate queue for psnehq). If you created a script and are running

  bsub -q psnehq myscript

Then it maybe that the current directory is not in your path, run

  bsub -q psnehq ./myscript

Check that myscript is executable by yourself, check that you have the correct #! line to start the script.

Where is my epics variable?

Make sure it is a epics variable - it may be a control monitor variable. An easy way to see what is in the file is to use psana modules that dump data.  For instance:

  psana -m psana_examples.DumpEpics exp=cxitut13:run=0022

will show what epics variables are defined. Likewise

  psana -m psana_examples.DumpControl exp=xpptut13:run=0179

will almost always show what control variables are defined. It defaults to use the standard Source "ProcInfo()" for control data. It is possible (though very unlikely) for control data to come from a different source. One can use the EventKeys module to see all Source's present, and then specify the source for  DumpControl through a config file.

How do I access data inside a Psana class?

Look for an example in the psana_examples package that dumps this class. There should be both a C++ and Python module that dumps data for the class.

How do I find out the experiment number (expNum) or experiment?

Psana stores both the experiment and expNum in the environment object - Env that Modules are passed, or that one obtains from the DataSource in interactive Psana. See Interactive Analysis document and the C++ reference for Psana::Env

How do I write hdf5 files from C++ or Python

Python:

From Python we recommend h5py. For interactive Python, an example is found at Using h5py to Save Data.
For Python you can also use pytables. This is installed in the analysis release. Do

import tables

In your Python code.

C++

If developing a Psana module to process xtc, consider splitting your module into a C++ module which puts ndarrays in the event store, and a Python module which retrieves them and writes the hdf5 file using h5py.
You can also work with the C interface to hdf5.  hdf5 is installed as a package in the analysis release. From your C++ code, do

#include "hdf5/hdf5.h"

A tip for learning hdf5 is to run example programs from an 'app' subdirectory of your package. For example, if you create an analysis release and a package for yourself, create an app subdirectory to that package and put an example file there:

~/myrelease/mypackage/app/hdf5_example.c

Now run 'scons' from the ~/myrelease directory, and then run hdf5_example.

Psana Modules - Using the Translator:

The Psana ddl based Translator can be used to write ndarrays, strings and a few simple types that C++ modules register. These will be organized in the same groups that we use to translate xtc to hdf5. Datasets with event times will be written as well. To use this, create a psana config file that turns off the translation of all xtc types but allows translation of ndarrays and strings. An example cfg file is here: psana_translate_noxtc.cfg You would just change the modules and files parameters for psana and the output_file parameter to Translator.H5Output. Load modules before the translator that put ndarrays into the event store. The Translator will pick them up and write them to the hdf5 file

 
  • No labels