ecpi.database.interact_caldb module
Section author: ECLAIRs GP team
CALDB interface
Summary
Classes:
(A)synchronous HTTP client |
Class diagram:
Functions:
CALDB request quzcif |
|
Simple download with API REST interface / JM Colley . |
|
Simple subprocess run |
|
Receive ARf file from the CALDB. |
|
Rename arf with correct syntaxe |
|
Rename arf with correct syntaxe |
|
Send whatever file to CALDB. |
Reference
- class CaldbIo(search_url='https://fsc.svom.org/caldb/api', max_tries=5, ssl_context=None, asynchronous=False, loop=None, use_tokens=True)[source]
Bases:
svom.messaging.httpio.HttpIo(A)synchronous HTTP client
- download_file_from_caldb(dest_dir, file_calib, path_caldb='user/data/svom/ecl/cpf/arf_effarea')[source]
Simple download with API REST interface / JM Colley .. note: for the moment the download does not account for the port 5000. Otherwise it does not work. :param dest_dir: destination directory :type dest_dir: str :param file_calib: name of the calibration file to be downloaded :type file_calib: str :param path_caldb: root path in caldb :type path_caldb: str
- receive_arf_file_from_caldb(dest_dir)[source]
Receive ARf file from the CALDB.
- Parameters
dest_dir (str) – path of the destination directory
- Returns
if the operation succeeded
- Return type
bool
- send_file_to_caldb(file)[source]
Send whatever file to CALDB. Usefull for tests. Not to be used in production.
Following keywords MUST appear in primary hdu file:
“TELESCOP” = “SVOM” “INSTRUME” = “ECL” “CCLS0001” = “BCF” “CDTP0001” = “DATA” “CCNM0001” = “ARF” “CVSD0001” = “1999-01-01” “CVST0001” = “00:00:00” “CDES0001” = “test dataset”
The KW CCNM0001 specifies the type in your request.
- Parameters
file (str) – path to the file to be sent to CALDB