Classes | |
class | GeometryAccess |
Functions | |
GeometryAccess (const std::string &path, unsigned pbits) | |
~GeometryAccess () | |
void | load_pars_from_file (const std::string &path) |
void | save_pars_in_file (const std::string &path) |
void | add_comment_to_dict (const std::string &line) |
GeometryAccess::shpGO | parse_line (const std::string &line) |
GeometryAccess::shpGO | find_parent (const GeometryAccess::shpGO &geobj) |
void | set_relations () |
GeometryAccess::shpGO | get_geo (const std::string &oname, const unsigned &oindex) |
GeometryAccess::shpGO | get_top_geo () |
void | get_pixel_coords (const double *&X, const double *&Y, const double *&Z, unsigned &size, const std::string &oname, const unsigned &oindex, const bool do_tilt, const bool do_eval) |
void | get_pixel_xy_at_z (const double *&XatZ, const double *&YatZ, unsigned &size, const double &Zplain, const std::string &oname, const unsigned &oindex) |
void | get_pixel_areas (const double *&A, unsigned &size, const std::string &oname, const unsigned &oindex) |
void | get_pixel_mask (const int *&mask, unsigned &size, const std::string &oname, const unsigned &oindex, const unsigned &mbits) |
double | get_pixel_scale_size (const std::string &oname, const unsigned &oindex) |
void | set_geo_pars (const std::string &oname, const unsigned &oindex, const double &x0, const double &y0, const double &z0, const double &rot_z, const double &rot_y, const double &rot_x, const double &tilt_z, const double &tilt_y, const double &tilt_x) |
void | move_geo (const std::string &oname, const unsigned &oindex, const double &dx, const double &dy, const double &dz) |
void | tilt_geo (const std::string &oname, const unsigned &oindex, const double &dt_x, const double &dt_y, const double &dt_z) |
void | print_list_of_geos () |
void | print_list_of_geos_children () |
void | print_comments_from_dict () |
void | print_pixel_coords (const std::string &oname, const unsigned &oindex) |
void | get_pixel_coord_indexes (const unsigned *&iX, const unsigned *&iY, unsigned &size, const std::string &oname, const unsigned &oindex, const double &pix_scale_size_um, const int *xy0_off_pix, const bool do_tilt) |
void | get_pixel_xy_inds_at_z (const unsigned *&iX, const unsigned *&iY, unsigned &size, const double &Zplain, const std::string &oname, const unsigned &oindex, const double &pix_scale_size_um, const int *xy0_off_pix) |
ndarray< GeometryAccess::image_t, 2 > & | ref_img_from_pixel_arrays (const unsigned *&iX, const unsigned *&iY, const double *W, const unsigned &size) |
ndarray< GeometryAccess::image_t, 2 > | img_from_pixel_arrays (const unsigned *&iX, const unsigned *&iY, const double *W, const unsigned &size) |
def | divide_protected |
def | img_default |
def | img_from_pixel_arrays |
def | test_access |
def | test_plot_quad |
def | test_mask_quad |
def | test_plot_cspad |
def | test_img_default |
def | test_save_pars_in_file |
def | test_load_pars_from_file |
def | test_cspad2x2 |
def | test_epix100a |
def | test_cspad_xy_at_z |
Variables | |
string | __version__ = "$Revision: 12898 $" |
string | basedir = '/reg/g/psdm/detector/alignment/cspad/calib-cxi-ds1-2014-03-19/' |
fname = '/reg/d/psdm/cxi/cxii0114/calib/CsPadCalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data' basedir = '/reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-cxi-ds1-2013-12-20/' fname_geometry = basedir + 'calib/CsPadCalibV1/CxiDs1.0:Cspad.0/geometry/1-end.data' fname_data = basedir + 'cspad-ndarr-ave-cxi83714-r0136.dat' amp_range = (0,0.5) | |
string | fname_data = 'cspad-ndarr-ave-cxii0114-r0227.dat' |
string | fname_geometry = 'calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data' |
tuple | amp_range = (0,500) |
tuple | geometry = GeometryAccess(fname_geometry, 0) |
XPP basedir = '/reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-xpp-2013-01-29/' fname_data = basedir + 'cspad-xpptut13-r1437-nda.dat' fname_geometry = basedir + 'calib/CsPadCalibV1/XppGon.0:Cspad.0/geometry/0-end.data' amp_range = (1500,2500). | |
string | msg = 'Use command: sys.argv[0] <num>, wher num=1,2,3,...,10' |
tuple | ga0 = GeometryAccess(fname_geometry, 0) |
GeometryAccess::GeometryAccess | ( | const std::string & | path, | |
unsigned | pbits | |||
) |
Definition at line 48 of file GeometryAccess.cpp.
References load_pars_from_file(), print_comments_from_dict(), print_list_of_geos(), and print_list_of_geos_children().
GeometryAccess::~GeometryAccess | ( | ) |
Definition at line 70 of file GeometryAccess.cpp.
void GeometryAccess::load_pars_from_file | ( | const std::string & | path | ) |
Definition at line 80 of file GeometryAccess.cpp.
References add_comment_to_dict(), m_path, parse_line(), and set_relations().
Referenced by GeometryAccess().
void GeometryAccess::save_pars_in_file | ( | const std::string & | path | ) |
Definition at line 112 of file GeometryAccess.cpp.
void GeometryAccess::add_comment_to_dict | ( | const std::string & | line | ) |
GeometryAccess::shpGO GeometryAccess::parse_line | ( | const std::string & | line | ) |
Definition at line 198 of file GeometryAccess.cpp.
References GeometryObject::GeometryObject(), and msg.
Referenced by load_pars_from_file().
GeometryAccess::shpGO GeometryAccess::find_parent | ( | const GeometryAccess::shpGO & | geobj | ) |
Definition at line 245 of file GeometryAccess.cpp.
References GeometryObject::GeometryObject().
Referenced by set_relations().
void GeometryAccess::set_relations | ( | ) |
Definition at line 282 of file GeometryAccess.cpp.
References find_parent().
Referenced by load_pars_from_file().
GeometryAccess::shpGO GeometryAccess::get_geo | ( | const std::string & | oname, | |
const unsigned & | oindex | |||
) |
Definition at line 307 of file GeometryAccess.cpp.
Referenced by get_pixel_areas(), get_pixel_coords(), get_pixel_mask(), get_pixel_scale_size(), move_geo(), set_geo_pars(), and tilt_geo().
GeometryAccess::shpGO GeometryAccess::get_top_geo | ( | ) |
Definition at line 320 of file GeometryAccess.cpp.
Referenced by get_pixel_areas(), get_pixel_coords(), get_pixel_mask(), get_pixel_scale_size(), move_geo(), set_geo_pars(), and tilt_geo().
void GeometryAccess::get_pixel_coords | ( | const double *& | X, | |
const double *& | Y, | |||
const double *& | Z, | |||
unsigned & | size, | |||
const std::string & | oname, | |||
const unsigned & | oindex, | |||
const bool | do_tilt, | |||
const bool | do_eval | |||
) |
Definition at line 328 of file GeometryAccess.cpp.
References get_geo(), get_top_geo(), and GeometryObject::string_geo_children().
Referenced by get_pixel_coord_indexes(), get_pixel_xy_at_z(), and print_pixel_coords().
void GeometryAccess::get_pixel_xy_at_z | ( | const double *& | XatZ, | |
const double *& | YatZ, | |||
unsigned & | size, | |||
const double & | Zplain, | |||
const std::string & | oname, | |||
const unsigned & | oindex | |||
) |
Definition at line 349 of file GeometryAccess.cpp.
References get_pixel_coords().
Referenced by get_pixel_xy_inds_at_z().
void GeometryAccess::get_pixel_areas | ( | const double *& | A, | |
unsigned & | size, | |||
const std::string & | oname, | |||
const unsigned & | oindex | |||
) |
Definition at line 407 of file GeometryAccess.cpp.
References get_geo(), get_top_geo(), msg, and GeometryObject::string_geo_children().
void GeometryAccess::get_pixel_mask | ( | const int *& | mask, | |
unsigned & | size, | |||
const std::string & | oname, | |||
const unsigned & | oindex, | |||
const unsigned & | mbits | |||
) |
Definition at line 423 of file GeometryAccess.cpp.
References get_geo(), get_top_geo(), msg, and GeometryObject::string_geo_children().
double GeometryAccess::get_pixel_scale_size | ( | const std::string & | oname, | |
const unsigned & | oindex | |||
) |
Definition at line 442 of file GeometryAccess.cpp.
References get_geo(), and get_top_geo().
Referenced by get_pixel_coord_indexes(), and get_pixel_xy_inds_at_z().
void GeometryAccess::set_geo_pars | ( | const std::string & | oname, | |
const unsigned & | oindex, | |||
const double & | x0, | |||
const double & | y0, | |||
const double & | z0, | |||
const double & | rot_z, | |||
const double & | rot_y, | |||
const double & | rot_x, | |||
const double & | tilt_z, | |||
const double & | tilt_y, | |||
const double & | tilt_x | |||
) |
void GeometryAccess::move_geo | ( | const std::string & | oname, | |
const unsigned & | oindex, | |||
const double & | dx, | |||
const double & | dy, | |||
const double & | dz | |||
) |
void GeometryAccess::tilt_geo | ( | const std::string & | oname, | |
const unsigned & | oindex, | |||
const double & | dt_x, | |||
const double & | dt_y, | |||
const double & | dt_z | |||
) |
void GeometryAccess::print_list_of_geos | ( | ) |
void GeometryAccess::print_list_of_geos_children | ( | ) |
void GeometryAccess::print_comments_from_dict | ( | ) |
void GeometryAccess::print_pixel_coords | ( | const std::string & | oname, | |
const unsigned & | oindex | |||
) |
Definition at line 544 of file GeometryAccess.cpp.
References get_pixel_coords(), and CalibPars::size.
void GeometryAccess::get_pixel_coord_indexes | ( | const unsigned *& | iX, | |
const unsigned *& | iY, | |||
unsigned & | size, | |||
const std::string & | oname, | |||
const unsigned & | oindex, | |||
const double & | pix_scale_size_um, | |||
const int * | xy0_off_pix, | |||
const bool | do_tilt | |||
) |
Definition at line 567 of file GeometryAccess.cpp.
References get_pixel_coords(), and get_pixel_scale_size().
void GeometryAccess::get_pixel_xy_inds_at_z | ( | const unsigned *& | iX, | |
const unsigned *& | iY, | |||
unsigned & | size, | |||
const double & | Zplain, | |||
const std::string & | oname, | |||
const unsigned & | oindex, | |||
const double & | pix_scale_size_um, | |||
const int * | xy0_off_pix | |||
) |
Definition at line 620 of file GeometryAccess.cpp.
References get_pixel_scale_size(), and get_pixel_xy_at_z().
ndarray<GeometryAccess::image_t, 2>& GeometryAccess::ref_img_from_pixel_arrays | ( | const unsigned *& | iX, | |
const unsigned *& | iY, | |||
const double * | W, | |||
const unsigned & | size | |||
) |
ndarray<GeometryAccess::image_t, 2> GeometryAccess::img_from_pixel_arrays | ( | const unsigned *& | iX, | |
const unsigned *& | iY, | |||
const double * | W, | |||
const unsigned & | size | |||
) |
Definition at line 701 of file GeometryAccess.cpp.
def GeometryAccess::divide_protected | ( | num, | ||
den, | ||||
vsub_zero = 0 | ||||
) |
Returns result of devision of numpy arrays num/den with substitution of value vsub_zero for zero den elements.
Definition at line 115 of file GeometryAccess.py.
def GeometryAccess::img_default | ( | shape = (10,10 , |
||
dtype = np.float32 | ||||
) |
def GeometryAccess::img_from_pixel_arrays | ( | iX, | ||
iY, | ||||
W = None , |
||||
dtype = np.float32 , |
||||
vbase = 0 | ||||
) |
Returns image from iX, iY coordinate index arrays and associated weights W.
Definition at line 695 of file GeometryAccess.py.
def GeometryAccess::test_access | ( | geometry | ) |
Tests geometry acess methods of the class GeometryAccess
Definition at line 731 of file GeometryAccess.py.
def GeometryAccess::test_plot_quad | ( | geometry | ) |
Tests geometry acess methods of the class GeometryAccess object for CSPAD quad
Definition at line 783 of file GeometryAccess.py.
def GeometryAccess::test_mask_quad | ( | geometry, | ||
mbits | ||||
) |
Tests geometry acess methods of the class GeometryAccess object for CSPAD quad
Definition at line 803 of file GeometryAccess.py.
def GeometryAccess::test_plot_cspad | ( | geometry, | ||
fname_data, | ||||
amp_range = (0,0.5 | ||||
) |
The same test as previous, but use get_pixel_coord_indexes(...) method
Definition at line 823 of file GeometryAccess.py.
def GeometryAccess::test_img_default | ( | ) |
def GeometryAccess::test_save_pars_in_file | ( | geometry | ) |
def GeometryAccess::test_load_pars_from_file | ( | geometry | ) |
def GeometryAccess::test_cspad2x2 | ( | ) |
Test cspad2x2 geometry table
Definition at line 890 of file GeometryAccess.py.
Referenced by main().
def GeometryAccess::test_epix100a | ( | ) |
def GeometryAccess::test_cspad_xy_at_z | ( | ) |
string GeometryAccess::__version__ = "$Revision: 12898 $" [static] |
Definition at line 103 of file GeometryAccess.py.
string GeometryAccess::basedir = '/reg/g/psdm/detector/alignment/cspad/calib-cxi-ds1-2014-03-19/' [static] |
fname = '/reg/d/psdm/cxi/cxii0114/calib/CsPadCalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data' basedir = '/reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-cxi-ds1-2013-12-20/' fname_geometry = basedir + 'calib/CsPadCalibV1/CxiDs1.0:Cspad.0/geometry/1-end.data' fname_data = basedir + 'cspad-ndarr-ave-cxi83714-r0136.dat' amp_range = (0,0.5)
Definition at line 1002 of file GeometryAccess.py.
Referenced by main(), and test_cspad2x2().
string GeometryAccess::fname_data = 'cspad-ndarr-ave-cxii0114-r0227.dat' [static] |
string GeometryAccess::fname_geometry = 'calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/geometry/0-end.data' [static] |
tuple GeometryAccess::amp_range = (0,500) [static] |
Definition at line 1006 of file GeometryAccess.py.
tuple GeometryAccess::geometry = GeometryAccess(fname_geometry, 0) [static] |
XPP basedir = '/reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-xpp-2013-01-29/' fname_data = basedir + 'cspad-xpptut13-r1437-nda.dat' fname_geometry = basedir + 'calib/CsPadCalibV1/XppGon.0:Cspad.0/geometry/0-end.data' amp_range = (1500,2500).
Definition at line 1029 of file GeometryAccess.py.
Referenced by CSPadPixCoords::CSPadImageProducer::getGeometryPars(), CSPadPixCoords::CSPad2x2ImageProducer::getGeometryPars(), main(), PSQt::GeoImage::onGeometryIsLoaded(), and test_cspad2x2().
string GeometryAccess::msg = 'Use command: sys.argv[0] <num>, wher num=1,2,3,...,10' [static] |
Definition at line 1031 of file GeometryAccess.py.
Referenced by CSPadPixCoords::CSPadNDArrProducer::checkTypeImplementation(), CSPadPixCoords::CSPadImageProducer::checkTypeImplementation(), CSPadPixCoords::CSPad2x2NDArrProducer::checkTypeImplementation(), CSPadPixCoords::CSPad2x2ImageProducer::checkTypeImplementation(), PSCalib::CalibParsStore::Create(), pdscalibdata::CsPad2x2PedestalsV1::CsPad2x2PedestalsV1(), pdscalibdata::CsPad2x2PixelGainV1::CsPad2x2PixelGainV1(), pdscalibdata::CsPad2x2PixelStatusV1::CsPad2x2PixelStatusV1(), pdscalibdata::CsPadCommonModeSubV1::CsPadCommonModeSubV1(), pdscalibdata::CsPadFilterV1::CsPadFilterV1(), CSPadPixCoords::CSPadImageProducer::cspadImgActivePixelMask(), pdscalibdata::CsPadPedestalsV1::CsPadPedestalsV1(), pdscalibdata::CsPadPixelGainV1::CsPadPixelGainV1(), pdscalibdata::CsPadPixelStatusV1::CsPadPixelStatusV1(), CSPadPixCoords::defineImageShape(), get_pixel_areas(), get_pixel_mask(), pdscalibdata::load_pars_from_file(), PSCalib::CSPadCalibPars::openCalibFile(), PSCalib::CSPad2x2CalibPars::openCalibFile(), and parse_line().
tuple GeometryAccess::ga0 = GeometryAccess(fname_geometry, 0) [static] |
Definition at line 1040 of file GeometryAccess.py.