:mod:`km3pipe.hardware` ======================= .. py:module:: km3pipe.hardware .. autoapi-nested-parse:: Classes representing KM3NeT hardware. .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3pipe.hardware.Detector km3pipe.hardware.UTMInfo km3pipe.hardware.PMT .. data:: log .. py:class:: Detector(filename=None, det_id=None, t0set=None, calibration=None) Bases::class:`object` A KM3NeT detector. :Parameters: **filename: str, optional** Name of .detx file with detector definition. **det_id: int, optional** .detx ID of detector (when retrieving from database). **t0set: optional** t0set (when retrieving from database). **calibration: optional** calibration (when retrieving from database). .. !! processed by numpydoc !! .. attribute:: comments .. attribute:: dom_ids .. attribute:: dom_positions The positions of the DOMs, calculated from PMT directions. .. !! processed by numpydoc !! .. attribute:: dom_table A `Table` containing DOM attributes .. !! processed by numpydoc !! .. attribute:: com Center of mass, calculated from the mean of the PMT positions .. !! processed by numpydoc !! .. attribute:: xy_positions XY positions of the DUs, given by the DOMs on floor 1. .. !! processed by numpydoc !! .. attribute:: pmt_angles A list of PMT directions sorted by PMT channel, on DU-1, floor-1 .. !! processed by numpydoc !! .. attribute:: ascii The ascii representation of the detector .. !! processed by numpydoc !! .. attribute:: n_dus .. method:: reset_caches(self) .. method:: add_comment(self, comment) Add a comment which will be prefixed with a '#' .. !! processed by numpydoc !! .. method:: translate_detector(self, vector) Translate the detector by a given vector .. !! processed by numpydoc !! .. method:: rotate_dom_by_yaw(self, dom_id, heading, centre_point=None) Rotate a DOM by a given (yaw) heading. .. !! processed by numpydoc !! .. method:: rotate_du_by_yaw(self, du, heading) Rotate all DOMs on DU by a given (yaw) heading. .. !! processed by numpydoc !! .. method:: rescale(self, factor, origin=(0, 0, 0)) Stretch or shrink detector (DOM positions) by a given factor. .. !! processed by numpydoc !! .. method:: write(self, filename) Save detx file. .. !! processed by numpydoc !! .. method:: pmt_with_id(self, pmt_id) Get PMT with global pmt_id .. !! processed by numpydoc !! .. method:: get_pmt(self, dom_id, channel_id) Return PMT with DOM ID and DAQ channel ID .. !! processed by numpydoc !! .. method:: pmtid2omkey(self, pmt_id) .. method:: domid2floor(self, dom_id) .. py:class:: UTMInfo(ellipsoid, grid, easting, northing, z) Bases::class:`object` The UTM information .. !! processed by numpydoc !! .. py:class:: PMT(id, pos, dir, t0, channel_id, omkey) Bases::class:`object` Represents a photomultiplier. :Parameters: **id: int** .. **pos: 3-float-tuple (x, y, z)** .. **dir: 3-float-tuple (x, y, z)** .. **t0: int** .. **channel_id: int** .. **omkey: int** .. .. !! processed by numpydoc !! .. data:: ORDERED_PMT_IDS :annotation: = [28, 23, 22, 21, 27, 29, 20, 30, 26, 25, 19, 24, 13, 7, 1, 14, 18, 12, 6, 2, 11, 8, 0, 15, 4, 3, 5, 17, 10, 9, 16]