Page History
...
- Dark Run: 169, rear sensors gain 1/64, front 1/1, Imaging mode exp=amoa1214:run=169
- Run With Hits: 170 Low hit rate though, so you will have to use a hit finder of sorts exp=amoa1214:run=170
Calibration
...
of pnCCD
New modules for "old-style" calibration:
- pdscalibdata/include/PnccdBaseV1.h - baseclass for pnCCD parameters, defines Segs, Rows, Cols, Size
- pdscalibdata/include/PnccdPedestalsV1.h - loads pedestals from file, returns ndarray of pedestals
- pdscalibdata/include/PnccdCommonModeV1.h - the same for common mode
- pdscalibdata/include/PnccdPixelGainV1.h - the same for pixel gain
- pdscalibdata/include/PnccdPixelStatusV1.h - the same for pixel status
- PSCalib::PnccdCalibPars - wrapper for all pnCCD types
...
PSCalib/test/ex_calib_file_finder.cpp:
Code Block |
---|
// Assume that file is located in /reg/d/psdm/AMO/amotut13/calib/PNCCD::CalibV1/Camp.0:pnCCD.1/pedestals/1-end.data
const std::string calibDir = "/reg/d/psdm/AMO/amotut13/calib";
const std::string groupName = "PNCCD::CalibV1";
const std::string source = "Camp.0:pnCCD.1";
unsigned long runNumber = 10;
unsigned print_bits = 255;
PSCalib::PnccdCalibPars *calibpars = new PSCalib::PnccdCalibPars(calibDir, groupName, source, runNumber, print_bits);
calibpars->printCalibPars();
calibpars->printCalibParsStatus();
calibpars->printInputPars();
ndarray<pdscalibdata::PnccdPedestalsV1::pars_t, 3> peds = calibpars -> pedestals();
ndarray<pdscalibdata::PnccdCommonModeV1::pars_t, 1> cmod = calibpars -> common_mode();
ndarray<pdscalibdata::PnccdPixelStatusV1::pars_t, 3> stat = calibpars -> pixel_status();
ndarray<pdscalibdata::PnccdPixelGainV1::pars_t, 3> gain = calibpars -> pixel_gain(); |
Interface
...
pros
Simple format for calibration files - just a text file with pre-defined number of values for each type:
Code Block |
---|
973.941639 881.189675 1050.211 773.263749 899.241302 981.805836 1150.72615 993.084175 1121.15488 1029.76319 1220.14927 903.278339 1097.49944 1066.94949 1263.71044 1053.53872 1194.35915 935.320988 1317 ... |
Interface drawback
Detector-dependent objects, parameters:
- PSCalib::PnccdCalibPars which depends on PnccdPedestalsV1, PnccdCommonModeV1, ..., PnccdBaseV1
pdscalibdata::PnccdPedestalsV1::pars_t
dscalibdata::PnccdCommonModeV1::pars_t= float
pdscalibdata::PnccdCommonModeV1::pars_t = uint16_t
pdscalibdata::PnccdPixelStatusV1::pars_t = uint16_t
pdscalibdata::PnccdPixelGainV1::pars_t = float
- const std::string groupName = "PNCCD::CalibV1";
Other words, we need to define calibration array shape, type of parameters, and where to find it under calib directory: groupName="PNCCD::CalibV1", source="Camp.0:pnCCD.1";
How to improve interface for "new-style" calibration
- Use universal calibration object (for all detectors!):
PSCalib::CalibPars *calibpars = new PSCalib::CalibPars(calibDir, source, runNumber, print_bits);
wheresource d
efines the detector type, - Use universal (for all detectors!) modules for each calibration type:
pdscalibdata/include/DetPedestalsV1.h - loads pedestals from file, returns ndarray of pedestals
pdscalibdata/include/DetCommonModeV1.h - the same for common mode
pdscalibdata/include/DetPixelGainV1.h - the same for pixel gain
pdscalibdata/include/DetPixelStatusV1.h - the same for pixel status - Use universally (for all detectors!) pre-defined types of parameters :
pdscalibdata::DetPedestalsV1::pars_t = float
pdscalibdata::DetCommonModeV1::pars_t = uint16_t
pdscalibdata::DetPixelStatusV1::pars_t = uint16_t
pdscalibdata::DetPixelGainV1::pars_t = float
- Define the groupName="PNCCD::CalibV1" from dictionary for source="Camp.0:pnCCD.1" - this means that we will never change the groupName !
Save/retrieve ndarray type/shape from file header, for example:
Code Block # RULES: # Lines starting with # in the beginning of the file are considered as comments or pseudo-comments for metadata # Lines without # with space-separated values are used for input of parameters # Empty lines are ignored # Optional fields: # TITLE: This is a file with pedestals # DATE_TIME: 2014-01-30 10:21:23 # AUTHOR: someone # EXPERIMENT: amotut13 # DETECTOR: Camp.0:pnCCD.1 # CALIB_TYPE: pedestals # Mandatory fields: # DATA_TYPE: float # NDIMS: 3 # DIM1: 4 # DIM2: 255 # DIM3: 255 973.941639 881.189675 1050.211 773.263749 899.241302 981.805836 1150.72615 993.084175 1121.15488 1029.76319 1220.14927 903.278339 1097.49944 1066.94949 1263.71044 1053.53872 1194.35915 935.320988 1317 ...
Overview
Content Tools