CFEL - ASG Software Suite  2.5.0
CASS
Classes | Typedefs | Functions
cass::hllDataTypes Namespace Reference

Classes

struct  DarkcalFileHeader
 the file header structure of the hll darkcal file format More...
 
struct  FrameHeader
 the header that describe the frames More...
 
struct  Frms6FileHeader
 the file header More...
 
struct  statistics
 struct describing the statistics saved in a HLL Darkcal file More...
 

Typedefs

typedef int16_t pixel
 define a pixel More...
 
typedef std::vector< pixelframe_t
 define a frame More...
 

Functions

template<typename inputContainerType , typename outputContainerType >
void CASS2HLL (const inputContainerType &CASSMatrix, outputContainerType &HLLMatrix, size_t quadrantColumns, size_t quadrantRows, size_t CASSColumns)
 convert a linearised matrix in the CASS format to the hll format More...
 
template<typename inputContainerType , typename outputContainerType >
void HLL2CASS (const inputContainerType &HLLMatrix, outputContainerType &CASSMatrix, size_t quadrantColumns, size_t quadrantRows, size_t HLLColumns)
 convert a linearised matrix in the hll format to the CASS format More...
 

Typedef Documentation

typedef std::vector<pixel> cass::hllDataTypes::frame_t

define a frame

Definition at line 30 of file hlltypes.hpp.

typedef int16_t cass::hllDataTypes::pixel

define a pixel

Examples:
CsPadCrystal.ini, Fluorescence-pnCCD.ini, SACLA-offline.ini, and SACLA-online.ini.

Definition at line 27 of file hlltypes.hpp.

Function Documentation

template<typename inputContainerType , typename outputContainerType >
void cass::hllDataTypes::CASS2HLL ( const inputContainerType &  CASSMatrix,
outputContainerType &  HLLMatrix,
size_t  quadrantColumns,
size_t  quadrantRows,
size_t  CASSColumns 
)

convert a linearised matrix in the CASS format to the hll format

the difference between the CASS and HLL is, that the CASS format has all 4 quadrants in a quadrat wheras in HLL they are aligned in a rectangle.

  -----------
  | 1  | 2  |
  | C  | D  |
  -----O-----
  | 0  | 3  |
  | A  | B  |
  -----------
  --------->

      |
      v

  ----()--------()-----
  | 0  | 1  | 2  | 3  |
  | A  | C  | D  | B  |
  ---------------------
       --------->

The numbers indicate the tile of the frame wihtin the HLL frame format, the letters indicate the tiles within the CASS format. The arrows indicate the fast increasing coordinate within the linearised array. The parenthesis and the 0 indicate where the hole btw the quater holes are in the new tiles. This implies that the top two tiles in the CASS format have to be rotated by 180 degrees before adding them to HLL format array. This basically mean that one has to read these tiles reverseley. This is done in this function by using reverse iterators that will point at the last element of the tile.

This function will then read the first row of tile A then the last of tile C then the last row of tile C, then the first row Tile B to the first row of the HLL format. The second row of the HLL format is then build by the 2nd row of Tile A, the 2nd to last row of Tile C then the 2nd to last row of tile D and the 2nd row of tile B. This continues until one has read all the rows of the tiles.

Template Parameters
inputContainerTypethe type of the container containing the input
outputContainerTypethe type of the container containing the output
Parameters
CASSMatrixthe container containing the linearised input matrix
HLLMatrixthe container containing the linearised out matrix
quadrantColumnsthe number of columns in one quadrant
quadrantRowsthe number of rows in one quadrant
CASSColumnsthe number of columns in the CASS input container
Author
Lutz Foucar

Definition at line 235 of file hlltypes.hpp.

Referenced by cass::pixeldetector::saveHLLOffsetFile().

template<typename inputContainerType , typename outputContainerType >
void cass::hllDataTypes::HLL2CASS ( const inputContainerType &  HLLMatrix,
outputContainerType &  CASSMatrix,
size_t  quadrantColumns,
size_t  quadrantRows,
size_t  HLLColumns 
)

convert a linearised matrix in the hll format to the CASS format

the difference between the CASS and HLL is, that the CASS format has all 4 quadrants in a quadrat wheras in HLL they are aligned in a rectangle.

  ----()--------()-----
  | 0  | 1  | 2  | 3  |
  | A  | C  | D  | B  |
  ---------------------
       --------->

      |
      v

  -----------
  | 1  | 2  |
  | C  | D  |
  -----O-----
  | 0  | 3  |
  | A  | B  |
  -----------
  --------->

The numbers indicate the tile of the frame wihtin the HLL frame format, the letters indicate the tiles within the CASS format. The arrows indicate the fast increasing coordinate within the linearised array. The parenthesis and the 0 indicate where the hole btw the quater holes are in the new tiles. This implies that the tiles 1 and 2 in the HLL format have to be rotated by 180 degrees before adding them to CASS format array. This basically mean that one has to read these tiles reverseley. This is done in this function by using reverse iterators that will point at the last element of the tile.

This function will then read the first row of tile 0 then the first rowv of tile 3. Then the 2nd row of tile 0 and then the 2nd row of tile 3. This continues until all rows of the tiles have been read. It then continues with the last of tile 1 and the last row of tile 2. Then the 2nd to last row of tile 1 and the 2nd to last row of tile 2. This continues until all rows of the tiles have been read.

Note
The resulting image in the CASS format is rotated by 90 degrees clockwise to the image as it would look like inside the lab frame if one looks into the beam.
Template Parameters
inputContainerTypethe type of the container containing the input
outputContainerTypethe type of the container containing the output
Parameters
HLLMatrixthe container containing the linearised input matrix
CASSMatrixthe container containing the linearised out matrix
quadrantColumnsthe number of columns in one quadrant
quadrantRowsthe number of rows in one quadrant
HLLColumnsthe number of columns in the HLL input container
Author
Lutz Foucar

Definition at line 322 of file hlltypes.hpp.

Referenced by cass::pixeldetector::SHMStreamer::operator()(), cass::pixeldetector::Frms6Reader::operator()(), cass::pixeldetector::readHLLGainFile(), and cass::pixeldetector::readHLLOffsetFile().