Versions Compared

Key

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

In order to keep the filesizes small to avoid issue when analysis the smallData files, we try to extract the important information gleaned from areaDetectors at an event-by-event basis and only save these pieces of data.

Table of Contents

Analysis functions

The following functions are readily available for use in smalldata_tools:

  • ROI
  • Azimuthal integration
  • Droplet
  • Projection
  • Autocorrelation

The funtions definition can be found in <smalldata_tools>/smalldata_tools/ana_funcs, in case one want to take a close look at how the data are processed. These analysis functions are sub-classes of DetObjectFunc and the computation are done in the custom process method defined in each subclass.

Comments on the masks for area detectors

Each area detector defined loaded in the smalldata_tools has the following psana masks defined:

  • self.statusMask = self.det.mask(self.run, status=True): only accounts for the pixel status
  • self.mask = self.det.mask(self.run, unbond=True, unbondnbrs=True, status=True,  edges=True, central=True): accounts for the geometry pixels
  • self.cmask = self.det.mask(self.run, unbond=True, unbondnbrs=True, status=True,  edges=True, central=True, calib=True): generally the mask you wantthat fits most needs

Definitions of the psana mask's options:

  • calib : bool - True/False = on/off mask from calib directory.
  • status : bool - True/False = on/off mask generated from calib pixel_status.
  • edges : bool - True/False = on/off mask of edges.
  • - central : bool - True/False = on/off mask of two central columns.
  • unbond : bool - True/False = on/off mask of unbonded pixels.
  • - unbondnbrs : bool - True/False = on/off mask of unbonded pixel with four neighbors.
  • unbondnbrs8: bool - True/False = on/off mask of unbonded pixel with eight neighbors.

Detector configuration data

When a DetObject has been declared, information used to extract the data will also be stored in the hdf5 file in the UserDataCfg dataset, among other things we store:

  • pedestal (measured in a dark run)
  • noise (measured in a dark run)
  • gain (if applicable)
  • geometry arrays (x/y/z positions for each pixel)
  • mask (see above)

Common mode

The different common modes are described here

Interactive SmallDataAna session

For the use of the interactive features of SmallDataAna_psana, we recommend to start it in an ipython session as interactive grabbing of user input is currently not implemented via the notebook.

Creating an average image

In order to decide on the proper ROI, fit a team center or make a mask, the first step is always to create an image that you would like to use as base. This is achieved using the following function in the python terminal opened from:

/sdf/data/lcls/ds/<hutch>/<expname>/results/smalldata_tools via:

Code Block
languagebash
themeRDark
./producers/runSmallDataAna -r <#> [-e <expname>]

The following command will create an average image of 100 events of an area detector with a set of default parameters:

Code Block
languagepy
themeRDark
SDAna In: anaps.AvImage()

This will by default create an average image of 100 events of an area detector. The method will list and prompt for a detector name if more than one area detector is found in the dataset.

The full command with all its options can be looked via using the "?" feature of iPython:

Code Block
languagepy
themeRDark
SDAna In: anaps.AvImage?

If you would like to take a quick look at your average image before proceeding, call:

Code Block
languagepy
themeRDark
SDAna In: anaps.plotAvImage()

The SmallDataAna session can typically be used to help setting the parameters for the smalldata production.

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Deprecated

Typical forms of userData

...