km3pipe.db
¶
Database utilities.
Module Contents¶
Classes¶
DBManager (username=None, password=None, url=None, temporary=False) |
A wrapper for the KM3NeT Web DB |
StreamDS (username=None, password=None, url=None, temporary=False) |
Access to the streamds data stored in the KM3NeT database. |
ParametersContainer (parameters) |
Provides easy access to parameters |
DOMContainer (doms) |
Provides easy access to DOM parameters stored in the DB. |
DOM (clb_upi, dom_id, dom_upi, du, det_oid, floor) |
Represents a DOM |
TriggerSetup (runsetup_oid, name, det_id, description, optical_df, acoustic_df) |
|
CLBMap (det_oid) |
Functions¶
we_are_in_lyon () |
Check if we are on a Lyon machine |
read_csv (text, sep=’\t’) |
Create a DataFrame from CSV text |
make_empty_dataset () |
Create an empty dataset |
add_datetime (dataframe, timestamp_key=’UNIXTIME’) |
Add an additional DATETIME column with standar datetime format. |
clbupi2ahrsupi (clb_upi) |
Generate AHRS UPI from CLB UPI. |
show_ahrs_calibration (clb_upi, version=‘3’) |
Show AHRS calibration data for given clb_upi. |
-
class
km3pipe.db.
DBManager
(username=None, password=None, url=None, temporary=False)[source]¶ Bases:
object
A wrapper for the KM3NeT Web DB
-
datalog
(self, parameter, run, maxrun=None, det_id='D_ARCA001')[source]¶ Retrieve datalogs for given parameter, run(s) and detector
-
detx
(self, det_id, t0set=None, calibration=None)[source]¶ Retrieve the detector file for given detector id
If t0set is given, append the calibration data.
-
ahrs
(self, run, maxrun=None, clbupi=None, det_id='D_ARCA001')[source]¶ Retrieve AHRS values for given run(s) (optionally CLBs) and detector
Request cookie for permanent session token.
-
-
km3pipe.db.
add_datetime
(dataframe, timestamp_key='UNIXTIME')[source]¶ Add an additional DATETIME column with standar datetime format.
This currently manipulates the incoming DataFrame!
-
class
km3pipe.db.
StreamDS
(username=None, password=None, url=None, temporary=False)[source]¶ Bases:
object
Access to the streamds data stored in the KM3NeT database.
-
class
km3pipe.db.
ParametersContainer
(parameters)[source]¶ Bases:
object
Provides easy access to parameters
-
class
km3pipe.db.
DOMContainer
(doms)[source]¶ Bases:
object
Provides easy access to DOM parameters stored in the DB.
-
class
km3pipe.db.
DOM
(clb_upi, dom_id, dom_upi, du, det_oid, floor)[source]¶ Bases:
object
Represents a DOM
-
class
km3pipe.db.
TriggerSetup
(runsetup_oid, name, det_id, description, optical_df, acoustic_df)[source]¶ Bases:
object
-
km3pipe.db.
show_ahrs_calibration
(clb_upi, version='3')[source]¶ Show AHRS calibration data for given clb_upi.