Feature #993
detector calibration
0%
Description
the detectors wish to store their calibration data as flat files
it is proposed that they provide the following metadata when storing a calibration:
device name
calibration type
valid from date
retrieval of a calibration will be via one of these methods
get_calibration _for _run(device_name, calibration_type, run_number)
get_calibration _for _date(device_name, calibration_type, date_number)
get_current_calibration(device_name, calibration_type)
get_calibration _for _id(id)
get_ids(start_time, stop_time)
Return a list of ids of the calibration data sets that were valid during the given time period.
N.B. if the stop_time is None then only the ids that were valid at the start_time will be returned.
Returns:
a dictionary containing the calibration ids data set:
key - id
value - dictionary with id specific data
id specific data dictionary:
key - validFrom
a datetime from when the id was valid
key - created
a datetime of when the id was created
Please can Yordan and Durga confirm that this will meet their requirements
Files
Related issues
Updated by Rajaram, Durga about 10 years ago
This is fine for the TOF calibrations and cabling map.
Gene is okay with this for the Ckov calibrations.
The Ckov map is part of files/DAQChannelMap.txt.
Maybe this should also go into the DB if it's not already
there, but I'm not sure under what category.
Is there a method for loading the files?
Or should I send them to you with name,type,valid_from_date?
Updated by Rogers, Chris about 10 years ago
Antony usually implements a web interface for upload and download and then a python binding in the cdb module. We need a download script inside MAUS, and an upload script somewhere (MAUS is convenient so I would do it there if I were you and keep everything together).
Download can be done from anywhere to the cdb download mirror server somewhere in PPD.
Upload is only available from inside micenet to the cdb server in the control room. For geometry, this is done by ssh onto onrec01 during a quiet time and do the upload from the MAUS install there, and I think this is a reasonable model to follow.
To have a look at the cdb module, loaded as a 3rd party library into MAUS, do
source env.sh python >> import cdb >> help(cdb)
Edit: worth also having a look at the geometry-cdb interface module
Updated by Wilson, Antony about 10 years ago
- Assignee changed from Rajaram, Durga to Karadzhov, Yordan
Hi Yordan
Please can you confirm that this will meet your requirement
Updated by Wilson, Antony about 10 years ago
- Assignee changed from Karadzhov, Yordan to Wilson, Antony
Updated by Wilson, Antony almost 10 years ago
- File calibration.py calibration.py added
- File calibration_detector_from_file.py calibration_detector_from_file.py added
My test CDB server has been updated and a new Python API is available at
http://bazaar.launchpad.net/~antony-wilson/mcdb/mice.cdb.client.api-python/download/head:/cdb0.0.3.1.tar.gz-20120712123901-x7c9fvjro7q23gbg-1/cdb-0.0.3.1.tar.gz
Documentation can be found at
http://rgma19.pp.rl.ac.uk:8080/cdb/doc/python/classcdb_1_1__calibration_1_1Calibration.html
and
http://rgma19.pp.rl.ac.uk:8080/cdb/doc/python/classcdb_1_1__calibration__supermouse_1_1CalibrationSuperMouse.html
The attached examples show how to add data and retrieve data to my test server. You should be able to use my test server for limited testing.
Regards
Antony
Updated by Rajaram, Durga over 9 years ago
- TOF calibrations are now in the production DB
- Code to access calibration added, modified, merged
- ConfigurationDefaults has new parameter to specifiy calib date (default = "current")
TOF_calibration_date_fromTOF_calib_date_from