ImgPixSpectra::CameraPixSpectra Class Reference
[ImgPixSpectra]

Creates the spectal array for all pixels in the Opal-1k, Princeton, etc camera-detectors. More...

#include <CameraPixSpectra.h>

List of all members.

Public Member Functions

 CameraPixSpectra (const std::string &name)
virtual ~CameraPixSpectra ()
virtual void beginJob (Event &evt, Env &env)
 Method which is called once at the beginning of the job.
virtual void beginRun (Event &evt, Env &env)
 Method which is called at the beginning of the run.
virtual void beginCalibCycle (Event &evt, Env &env)
 Method which is called at the beginning of the calibration cycle.
virtual void event (Event &evt, Env &env)
virtual void endCalibCycle (Event &evt, Env &env)
 Method which is called at the end of the calibration cycle.
virtual void endRun (Event &evt, Env &env)
 Method which is called at the end of the run.
virtual void endJob (Event &evt, Env &env)
 Method which is called once at the end of the job.

Protected Member Functions

void printInputPars ()
void arrayInit ()
void arrayDelete ()
void arrayFill (const uint16_t *data)
void arrayFill8 (const uint8_t *data)
void saveArrayInFile ()
void saveShapeInFile ()
int ampToIndex (double amp)


Detailed Description

Creates the spectal array for all pixels in the Opal-1k, Princeton, etc camera-detectors.

CameraPixSpectra class is a psana module which creates and fills the spectral array for all pixels in the Opal-1k, Princeton, etc array. The spectral array has two dimensions, the total number of pixels and the number of amplitude bins requested in the list of configuration parameters.

An example of the configuration file (psana.cfg) for this module:

    [psana]                                                                   
    files         = /reg/d/psdm/sxr/sxr16410/xtc/e75-r0081-s01-c00.xtc    
    modules       = ImgPixSpectra.CameraPixSpectra                        
                                                                          
    [ImgPixSpectra.CameraPixSpectra]                                      
    source        = SxrBeamline.0:Opal1000.1                              
    amin          =     0.                                                
    amax          =  1000.                                                
    nbins         =   100                                                 
    arr_fname     = camera-pix-spectra.txt            
    #events       =   500                                                  

The output file "camera-pix-spectra.txt" contains the spectral array for CSPad pixels accumulated in job. Axillary file with additional name extension ".sha" contains the shape parameters of the spectral array. The file(s) can be used for further analysis or presentation, for example, using the python script:

    ImgPixSpectra/data/PlotSpectralArrayFromFile.py camera-pix-spectra.txt

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Version:
$Id: CameraPixSpectra.h$
Author:
Mikhail S. Dubrovin

Definition at line 82 of file CameraPixSpectra.h.


Constructor & Destructor Documentation

ImgPixSpectra::CameraPixSpectra::CameraPixSpectra ( const std::string &  name  ) 

Definition at line 54 of file CameraPixSpectra.cpp.

ImgPixSpectra::CameraPixSpectra::~CameraPixSpectra (  )  [virtual]

Definition at line 81 of file CameraPixSpectra.cpp.


Member Function Documentation

int ImgPixSpectra::CameraPixSpectra::ampToIndex ( double  amp  )  [protected]

Definition at line 400 of file CameraPixSpectra.cpp.

Referenced by arrayFill(), and arrayFill8().

void ImgPixSpectra::CameraPixSpectra::arrayDelete (  )  [protected]

Definition at line 338 of file CameraPixSpectra.cpp.

Referenced by endJob().

void ImgPixSpectra::CameraPixSpectra::arrayFill ( const uint16_t *  data  )  [protected]

Definition at line 346 of file CameraPixSpectra.cpp.

References ampToIndex().

Referenced by event().

void ImgPixSpectra::CameraPixSpectra::arrayFill8 ( const uint8_t *  data  )  [protected]

Definition at line 359 of file CameraPixSpectra.cpp.

References ampToIndex().

Referenced by event().

void ImgPixSpectra::CameraPixSpectra::arrayInit (  )  [protected]

Definition at line 323 of file CameraPixSpectra.cpp.

References CalibPars::size.

Referenced by beginJob(), and event().

void ImgPixSpectra::CameraPixSpectra::beginCalibCycle ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the beginning of the calibration cycle.

Definition at line 132 of file CameraPixSpectra.cpp.

void ImgPixSpectra::CameraPixSpectra::beginJob ( Event &  evt,
Env &  env 
) [virtual]

Method which is called once at the beginning of the job.

Definition at line 87 of file CameraPixSpectra.cpp.

References arrayInit(), and printInputPars().

void ImgPixSpectra::CameraPixSpectra::beginRun ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the beginning of the run.

Definition at line 126 of file CameraPixSpectra.cpp.

void ImgPixSpectra::CameraPixSpectra::endCalibCycle ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the end of the calibration cycle.

Definition at line 297 of file CameraPixSpectra.cpp.

void ImgPixSpectra::CameraPixSpectra::endJob ( Event &  evt,
Env &  env 
) [virtual]

Method which is called once at the end of the job.

Definition at line 309 of file CameraPixSpectra.cpp.

References arrayDelete(), saveArrayInFile(), and saveShapeInFile().

void ImgPixSpectra::CameraPixSpectra::endRun ( Event &  evt,
Env &  env 
) [virtual]

Method which is called at the end of the run.

Definition at line 303 of file CameraPixSpectra.cpp.

void ImgPixSpectra::CameraPixSpectra::event ( Event &  evt,
Env &  env 
) [virtual]

Method which is called with event data, this is the only required method, all other methods are optional

Definition at line 198 of file CameraPixSpectra.cpp.

References arrayFill(), arrayFill8(), arrayInit(), and h5constants::data.

void ImgPixSpectra::CameraPixSpectra::printInputPars (  )  [protected]

Definition at line 411 of file CameraPixSpectra.cpp.

Referenced by beginJob().

void ImgPixSpectra::CameraPixSpectra::saveArrayInFile (  )  [protected]

Definition at line 372 of file CameraPixSpectra.cpp.

References PlotSpectralArrayFromFile::arr.

Referenced by endJob().

void ImgPixSpectra::CameraPixSpectra::saveShapeInFile (  )  [protected]

Definition at line 382 of file CameraPixSpectra.cpp.

Referenced by endJob().


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7