#include <PixCoords2x1V2.h>
Inheritance diagram for CSPadPixCoords::PixCoords2x1V2:
Public Types | |
AXIS_X = 0 | |
AXIS_Y | |
AXIS_Z | |
UM = 0 | |
PIX | |
enum | AXIS { AXIS_X = 0, AXIS_Y, AXIS_Z } |
Enumerator for X, Y, and Z axes. More... | |
enum | UNITS { UM = 0, PIX } |
Enumerator for scales, coordinates in micrometers or pixels. More... | |
Public Member Functions | |
PixCoords2x1V2 (bool use_wide_pix_center=false) | |
Fills-in the map of perfect 2x1 coordinates, defined through the chip geometry. | |
virtual | ~PixCoords2x1V2 () |
Destructor. | |
void | print_coord_arrs_2x1 () |
Prints 2x1 pixel coordinates. | |
void | print_member_data () |
Prints class member data. | |
void | print_map_min_max (UNITS units, const double &angle_deg) |
Prints minimal and maximal values of the 2x1 coordinate map. | |
double * | get_x_map_2x1_um () |
Returns pointer to the 2x1 pixel map of x-coordinate [um]. | |
double * | get_y_map_2x1_um () |
Returns pointer to the 2x1 pixel map of y-coordinate [um]. | |
double * | get_z_map_2x1_um () |
Returns pointer to the 2x1 pixel map of z-coordinate [um]. | |
double * | get_x_map_2x1_pix () |
Returns pointer to the 2x1 pixel map of x-coordinate [pix]. | |
double * | get_y_map_2x1_pix () |
Returns pointer to the 2x1 pixel map of y-coordinate [pix]. | |
double * | get_z_map_2x1_pix () |
Returns pointer to the 2x1 pixel map of z-coordinate [pix]. | |
const unsigned | get_size () |
Returns sizee of the coordinate arrays. | |
double * | get_coord_map_2x1 (AXIS axis, UNITS units, const double &angle_deg=0) |
Returns pointer to the 2x1 pixel map for specified parameters. | |
double | get_min_of_coord_map_2x1 (AXIS axis, UNITS units, const double &angle_deg=0) |
Returns minimal value of the 2x1 pixel coordinate for specified parameters. | |
double | get_max_of_coord_map_2x1 (AXIS axis, UNITS units, const double &angle_deg=0) |
Returns miximal value of the 2x1 pixel coordinate for specified parameters. | |
Static Public Attributes | |
static const unsigned | ROWS2X1 = 185 |
Number of pixel rows in 2x1. | |
static const unsigned | COLS2X1 = 388 |
Number of pixel columnss in 2x1. | |
static const unsigned | COLS2X1HALF = 194 |
Half number of pixel columnss in 2x1. | |
static const unsigned | SIZE2X1 = COLS2X1*ROWS2X1 |
Number of pixels in 2x1. | |
static const unsigned | NCORNERS = 4 |
Number of corners... | |
static const double | PIX_SIZE_COLS = 109.92 |
Pixel size [um] in column direction. | |
static const double | PIX_SIZE_ROWS = 109.92 |
Pixel size [um] in row direction. | |
static const double | PIX_SIZE_WIDE = 274.80 |
Wide pixel length [um]. | |
static const double | PIX_SIZE_UM = 109.92 |
Pixel size [um]. | |
static const double | UM_TO_PIX = 1./109.92 |
Conversion factor between um and pix. | |
Protected Member Functions | |
void | make_maps_of_2x1_pix_coordinates () |
Generator of the 2x1 pixel coordinate map. |
2x1 sensor coordinate frame:
(Xmin,Ymax) ^ Y (Xmax,Ymax) (0,0) | (0,387) ------------------------------ | | | | | | | | | --|-------------+--------------|----> X | | | | | | | | | ------------------------------ (184,0) | (184,387) (Xmin,Ymin) (Xmax,Ymin)
The (r,c)=(0,0) is in the top left corner of the matrix which has coordinates (Xmin,Ymax) Here we assume that 2x1 has 185 rows and 388 columns. This assumption differs from the DAQ map, where rows and cols are interchanged: /reg/g/psdm/sw/external/lusi-xtc/2.12.0a/x86_64-rhel5-gcc41-opt/pdsdata/cspad/ElementIterator.hh, Detector.hh
#include "CSPadPixCoords/PixCoords2x1V2.h" typedef CSPadPixCoords::PixCoords2x1V2 PC2X1;
pix_coords_2x1 -> print_member_data(); pix_coords_2x1 -> print_coord_arrs_2x1(); double angle = 5; pix_coords_2x1 -> print_map_min_max(PC2X1::PIX); pix_coords_2x1 -> print_map_min_max(PC2X1::PIX, angle); pix_coords_2x1 -> print_map_min_max(PC2X1::UM); pix_coords_2x1 -> print_map_min_max(PC2X1::UM, angle);
double* x_arr = pix_coords_2x1 -> get_x_map_2x1_pix (); double* y_arr = pix_coords_2x1 -> get_y_map_2x1_pix (); double* z_arr = pix_coords_2x1 -> get_z_map_2x1_pix (); // returns 0-s or double* x_arr = pix_coords_2x1 -> get_coord_map_2x1 (PC2X1::AXIS_X, PC2X1::UM, angle); double* y_arr = pix_coords_2x1 -> get_coord_map_2x1 (PC2X1::AXIS_Y, PC2X1::UM, angle); double* z_arr = pix_coords_2x1 -> get_coord_map_2x1 (PC2X1::AXIS_Z, PC2X1::UM, angle); // returns 0-s double x_min_um = pix_coords_2x1 -> get_min_of_coord_map_2x1 (PC2X1::AXIS_X, PC2X1::UM, angle); double y_min_um = pix_coords_2x1 -> get_min_of_coord_map_2x1 (PC2X1::AXIS_Y, PC2X1::UM, angle); double z_min_um = pix_coords_2x1 -> get_min_of_coord_map_2x1 (PC2X1::AXIS_Z, PC2X1::UM, angle); double y_max_pix = pix_coords_2x1 -> get_max_of_coord_map_2x1 (PC2X1::AXIS_Y, PC2X1::PIX, angle);
Definition at line 159 of file PixCoords2x1V2.h.
Enumerator for scales, coordinates in micrometers or pixels.
Definition at line 168 of file PixCoords2x1V2.h.
CSPadPixCoords::PixCoords2x1V2::PixCoords2x1V2 | ( | bool | use_wide_pix_center = false |
) |
Fills-in the map of perfect 2x1 coordinates, defined through the chip geometry.
[in] | use_wide_pix_center | Optional parameter can be used if the wide-pixel row coordinate is prefered to be in the raw center. |
Definition at line 89 of file PixCoords2x1V2.cpp.
References make_maps_of_2x1_pix_coordinates().
CSPadPixCoords::PixCoords2x1V2::~PixCoords2x1V2 | ( | ) | [virtual] |
double * CSPadPixCoords::PixCoords2x1V2::get_coord_map_2x1 | ( | AXIS | axis, | |
UNITS | units, | |||
const double & | angle_deg = 0 | |||
) |
Returns pointer to the 2x1 pixel map for specified parameters.
[in] | axis | Axis from the enumerated list for X, Y, and Z |
[in] | units | Units [UM] or [PIX] from the enumerated list |
[in] | angle_deg | 2x1 rotation angle [degree] |
Definition at line 197 of file PixCoords2x1V2.cpp.
References AXIS_X, AXIS_Y, AXIS_Z, PIX, CSPadPixCoords::rotation(), and SIZE2X1.
Referenced by CSPadPixCoords::PixCoordsCSPadV2::fillOneSectionInDet(), CSPadPixCoords::PixCoordsCSPad2x2V2::fillOneSectionInDet(), get_max_of_coord_map_2x1(), and get_min_of_coord_map_2x1().
double CSPadPixCoords::PixCoords2x1V2::get_max_of_coord_map_2x1 | ( | AXIS | axis, | |
UNITS | units, | |||
const double & | angle_deg = 0 | |||
) |
Returns miximal value of the 2x1 pixel coordinate for specified parameters.
Definition at line 242 of file PixCoords2x1V2.cpp.
References PlotSpectralArrayFromFile::arr, get_coord_map_2x1(), CSPadPixCoords::max_of_array(), and NCORNERS.
Referenced by print_map_min_max().
double CSPadPixCoords::PixCoords2x1V2::get_min_of_coord_map_2x1 | ( | AXIS | axis, | |
UNITS | units, | |||
const double & | angle_deg = 0 | |||
) |
Returns minimal value of the 2x1 pixel coordinate for specified parameters.
Definition at line 232 of file PixCoords2x1V2.cpp.
References PlotSpectralArrayFromFile::arr, get_coord_map_2x1(), CSPadPixCoords::min_of_array(), and NCORNERS.
Referenced by print_map_min_max().
const unsigned CSPadPixCoords::PixCoords2x1V2::get_size | ( | ) | [inline] |
Returns sizee of the coordinate arrays.
Definition at line 247 of file PixCoords2x1V2.h.
References SIZE2X1.
double* CSPadPixCoords::PixCoords2x1V2::get_x_map_2x1_pix | ( | ) | [inline] |
Returns pointer to the 2x1 pixel map of x-coordinate [pix].
Definition at line 238 of file PixCoords2x1V2.h.
double* CSPadPixCoords::PixCoords2x1V2::get_x_map_2x1_um | ( | ) | [inline] |
Returns pointer to the 2x1 pixel map of x-coordinate [um].
Definition at line 229 of file PixCoords2x1V2.h.
double* CSPadPixCoords::PixCoords2x1V2::get_y_map_2x1_pix | ( | ) | [inline] |
Returns pointer to the 2x1 pixel map of y-coordinate [pix].
Definition at line 241 of file PixCoords2x1V2.h.
double* CSPadPixCoords::PixCoords2x1V2::get_y_map_2x1_um | ( | ) | [inline] |
Returns pointer to the 2x1 pixel map of y-coordinate [um].
Definition at line 232 of file PixCoords2x1V2.h.
double* CSPadPixCoords::PixCoords2x1V2::get_z_map_2x1_pix | ( | ) | [inline] |
Returns pointer to the 2x1 pixel map of z-coordinate [pix].
Definition at line 244 of file PixCoords2x1V2.h.
double* CSPadPixCoords::PixCoords2x1V2::get_z_map_2x1_um | ( | ) | [inline] |
Returns pointer to the 2x1 pixel map of z-coordinate [um].
Definition at line 235 of file PixCoords2x1V2.h.
void CSPadPixCoords::PixCoords2x1V2::make_maps_of_2x1_pix_coordinates | ( | ) | [protected] |
Generator of the 2x1 pixel coordinate map.
Definition at line 114 of file PixCoords2x1V2.cpp.
References COLS2X1, COLS2X1HALF, PIX_SIZE_COLS, PIX_SIZE_ROWS, PIX_SIZE_WIDE, ROWS2X1, and SIZE2X1.
Referenced by PixCoords2x1V2().
void CSPadPixCoords::PixCoords2x1V2::print_coord_arrs_2x1 | ( | ) |
void CSPadPixCoords::PixCoords2x1V2::print_map_min_max | ( | UNITS | units, | |
const double & | angle_deg | |||
) |
Prints minimal and maximal values of the 2x1 coordinate map.
[in] | units | Units [UM] or [PIX] from the enumerated list |
[in] | angle_deg | 2x1 rotation angle [degree] |
Definition at line 163 of file PixCoords2x1V2.cpp.
References AXIS_X, AXIS_Y, AXIS_Z, get_max_of_coord_map_2x1(), and get_min_of_coord_map_2x1().
void CSPadPixCoords::PixCoords2x1V2::print_member_data | ( | ) |
Prints class member data.
Definition at line 144 of file PixCoords2x1V2.cpp.
References COLS2X1, COLS2X1HALF, PIX_SIZE_COLS, PIX_SIZE_ROWS, PIX_SIZE_UM, PIX_SIZE_WIDE, ROWS2X1, and UM_TO_PIX.
const unsigned CSPadPixCoords::PixCoords2x1V2::COLS2X1 = 388 [static] |
Number of pixel columnss in 2x1.
Definition at line 175 of file PixCoords2x1V2.h.
Referenced by CSPadPixCoords::CSPad2x2ImageProducer::cspad_image_fill(), CSPadPixCoords::PixCoordsCSPadV2::fillOneSectionInDet(), CSPadPixCoords::PixCoordsCSPad2x2V2::fillOneSectionInDet(), CSPadPixCoords::CSPad2x2ImageProducer::getCalibPars(), CSPadPixCoords::PixCoordsCSPadV2::getPixCoorNDArrShapedAsData_um(), make_maps_of_2x1_pix_coordinates(), print_coord_arrs_2x1(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants(), CSPadPixCoords::PixCoordsCSPadV2::resetXYOriginAndMinMax(), CSPadPixCoords::PixCoordsCSPad2x2V2::resetXYOriginAndMinMax(), test02(), and test03().
const unsigned CSPadPixCoords::PixCoords2x1V2::COLS2X1HALF = 194 [static] |
Half number of pixel columnss in 2x1.
Definition at line 178 of file PixCoords2x1V2.h.
Referenced by make_maps_of_2x1_pix_coordinates(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), and CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants().
const unsigned CSPadPixCoords::PixCoords2x1V2::NCORNERS = 4 [static] |
Number of corners...
Definition at line 184 of file PixCoords2x1V2.h.
Referenced by get_max_of_coord_map_2x1(), and get_min_of_coord_map_2x1().
const double CSPadPixCoords::PixCoords2x1V2::PIX_SIZE_COLS = 109.92 [static] |
Pixel size [um] in column direction.
Definition at line 187 of file PixCoords2x1V2.h.
Referenced by make_maps_of_2x1_pix_coordinates(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), and CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants().
const double CSPadPixCoords::PixCoords2x1V2::PIX_SIZE_ROWS = 109.92 [static] |
Pixel size [um] in row direction.
Definition at line 190 of file PixCoords2x1V2.h.
Referenced by make_maps_of_2x1_pix_coordinates(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), and CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants().
const double CSPadPixCoords::PixCoords2x1V2::PIX_SIZE_UM = 109.92 [static] |
Pixel size [um].
Definition at line 196 of file PixCoords2x1V2.h.
Referenced by CSPadPixCoords::PixCoordsCSPadV2::fillPixelCoordinateArrays(), CSPadPixCoords::PixCoordsCSPad2x2V2::fillPixelCoordinateArrays(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), and CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants().
const double CSPadPixCoords::PixCoords2x1V2::PIX_SIZE_WIDE = 274.80 [static] |
Wide pixel length [um].
Definition at line 193 of file PixCoords2x1V2.h.
Referenced by make_maps_of_2x1_pix_coordinates(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), and CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants().
const unsigned CSPadPixCoords::PixCoords2x1V2::ROWS2X1 = 185 [static] |
Number of pixel rows in 2x1.
Definition at line 172 of file PixCoords2x1V2.h.
Referenced by CSPadPixCoords::CSPad2x2ImageProducer::cspad_image_fill(), CSPadPixCoords::PixCoordsCSPadV2::fillOneSectionInDet(), CSPadPixCoords::PixCoordsCSPad2x2V2::fillOneSectionInDet(), CSPadPixCoords::CSPad2x2ImageProducer::getCalibPars(), CSPadPixCoords::PixCoordsCSPadV2::getPixCoorNDArrShapedAsData_um(), make_maps_of_2x1_pix_coordinates(), print_coord_arrs_2x1(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants(), CSPadPixCoords::PixCoordsCSPadV2::resetXYOriginAndMinMax(), CSPadPixCoords::PixCoordsCSPad2x2V2::resetXYOriginAndMinMax(), test02(), and test03().
const unsigned CSPadPixCoords::PixCoords2x1V2::SIZE2X1 = COLS2X1*ROWS2X1 [static] |
Number of pixels in 2x1.
Definition at line 181 of file PixCoords2x1V2.h.
Referenced by get_coord_map_2x1(), get_size(), make_maps_of_2x1_pix_coordinates(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), and CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants().
const double CSPadPixCoords::PixCoords2x1V2::UM_TO_PIX = 1./109.92 [static] |
Conversion factor between um and pix.
Definition at line 199 of file PixCoords2x1V2.h.
Referenced by CSPadPixCoords::PixCoordsCSPadV2::getPixCoor_pix(), CSPadPixCoords::PixCoordsCSPad2x2V2::getPixCoor_pix(), print_member_data(), CSPadPixCoords::PixCoordsCSPadV2::printConstants(), CSPadPixCoords::PixCoordsCSPad2x2V2::printConstants(), test02(), test03(), and test04().