Change request #1102
Clean-up calibration database handling
Status: | Closed | Start date: | 01/24/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 00-09-00 | |||
Duration: |
Description
Currently the calibration database handling is not very clean.
GammaLib defines a GAMMALIB_CALDB
environment variable that is setup by the GammaLib configuration script. ctools defines a CALDB
environment variable that is setup by the ctools configuration script. The GammaLib GCaldb
class handles GAMMALIB_CALDB
and CALDB
and gives precedence for GAMMALIB_CALDB
over CALDB
.
ctools should however not use CALDB
, as this may result in conflicts with the Fermi ScienceTools.
ctools could define an own calibration database environment variable CTOOLS_CALDB
, but then some specific code needs to be added to GammaLib to catch this. This isn’t very clean.
Alternatively, ctools could use the GAMMALIB_CALDB
environment variable, yet there may be situations where ctools cannot install into the directory (for example when GammaLib was installed by an administrator, but ctools is installed by a user).
Maybe at the end we’re left with having only a single CALDB
environment variable (an no GAMMALIB_CALDB
anymore), as this is the standard anyways. The conflict with the Fermi ScienceTools arises when Fermi response functions are needed but not available in the CALDB
directory. Once we package the relevant response functions with GammaLib, this should no longer be a serious problem.
Another issue is that the caldb path is not set properly so far. Actually, the expected structure
$CALDB/data/<mission> $CALDB/data/<mission>/<instrument> $GAMMALIB_CALDB/data/<mission> $GAMMALIB_CALDB/data/<mission>/<instrument>is not really used (the
data
directory is actually missing), and the responses classes do not use the appropriate GCaldb::path()
method to access the data. This should be made compatible.
Recurrence
No recurrence.
Related issues
History
#1 Updated by Knödlseder Jürgen almost 11 years ago
- Status changed from New to In Progress
- Assigned To set to Knödlseder Jürgen
- Target version set to 2nd coding sprint
- % Done changed from 0 to 10
- CAL_CLAS
- CAL_DTYP
- CAL_CNAM
- CAL_CDB
(additional flags may be added later).
For CAL_CLAS, CAL_DTYP and CAL_CNAM, we may just check whether the strings are identical (checks are only done if the selection strings are non-empty).
For CAL_CDB, we could test for identity in one of the fields. I guess that in reality, some complex syntax applies.
#2 Updated by Knödlseder Jürgen almost 11 years ago
- % Done changed from 10 to 80
The GCaldb class now makes use of the calibration index file. Response file selection is now based on the index file, allowing the use of 2D response functions in the ctools. A dummy 2D response has been added to GammaLib for testing.
#3 Updated by Knödlseder Jürgen over 10 years ago
- Status changed from In Progress to Resolved
- Target version changed from 2nd coding sprint to 00-09-00
- % Done changed from 80 to 100
For me this look like finished.
#4 Updated by Knödlseder Jürgen over 10 years ago
- Status changed from Resolved to Closed