lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
UtilsCSPAD.hh File Reference

Declares CSPAD 2x2 constants and templates that reorder data between [185,388,2] and [2,185,388] layouts. More...

#include <iostream>
#include <string>
#include "psalg/calib/NDArray.hh"

Namespaces

namespace  geometry
 Usage.
 

Typedefs

typedef psalg::types::shape_t geometry::shape_t
 Alias for psalg::types::shape_t (uint32_t).
 
typedef psalg::types::size_t geometry::psalg_size_t
 Alias for psalg::types::size_t (uint32_t).
 

Functions

template<typename T >
NDArray< const T > geometry::data2x2ToTwo2x1 (const NDArray< const T > &data2x2)
 Converts cspad2x2 NDArray data2x2[185,388,2] to two2x1[2,185,388].
 
template<typename T >
NDArray< const T > geometry::two2x1ToData2x2 (const NDArray< const T > &two2x1)
 Converts cspad2x2 NDArray two2x1[2,185,388] to data2x2[185,388,2].
 
template<typename T >
void geometry::two2x1ToData2x2 (T *A)
 Converts cspad2x2 NDArray two2x1[2,185,388] to data2x2[185,388,2].
 

Variables

static const psalg_size_t geometry::N2X1 = 2
 2: number of 2x1 parts, the first dimension of the two2x1 layout used by the conversion templates.
 
static const psalg_size_t geometry::ROWS2X1 = 185
 185: rows per 2x1 part in the conversion templates.
 
static const psalg_size_t geometry::COLS2X1 = 388
 388: columns per 2x1 part in the conversion templates.
 
static const psalg_size_t geometry::SIZE2X1 = COLS2X1*ROWS2X1
 COLS2X1*ROWS2X1 (71780) elements per 2x1 part.
 
static const psalg_size_t geometry::SIZE2X2 = N2X1*SIZE2X1
 N2X1*SIZE2X1 (143560) elements.
 

Detailed Description

Declares CSPAD 2x2 constants and templates that reorder data between [185,388,2] and [2,185,388] layouts.