ecpi.database.interact_sdb module¶
Section author: ECLAIRs GP team
SDB interface
Summary¶
Classes:
#TODO: may be simpler solution can be used than a singleton |
Class diagram:
Functions:
|
|
|
|
from ECL-EVT-CAL_UTCtotootxxx.fits extract ECL-EVT-CAL |
|
|
|
return url SDB query |
|
|
|
Ping SDB server. |
|
Receive event ECL-EVT-SEC_XXX.fits or SVO-ATT-CNV_XXX.fits files from the SDB. |
|
Send L1 product generated by the ECLAIRs pipeline to the SDB. |
Reference¶
-
class
SdbParameters(*args, **kargs)[source]¶ Bases:
object#TODO: may be simpler solution can be used than a singleton
-
instance= None¶
-
-
download_url_and_rename(url_file, dest_dir, new_name='')[source]¶ - Returns
if the operation succeeded
- Return type
bool
-
extract_type(n_file)[source]¶ from ECL-EVT-CAL_UTCtotootxxx.fits extract ECL-EVT-CAL
- Parameters
n_file –
-
get_url_with_namefile(n_file, prod_acronyme='', level_obj='l1')[source]¶ - Parameters
n_file –
prod_acronyme –
level_obj –
-
receive_event_att_files(sdb_filename, dest_dir)[source]¶ Receive event ECL-EVT-SEC_XXX.fits or SVO-ATT-CNV_XXX.fits files from the SDB.
- Parameters
sdb_filename (str) – name of file to be downloaded from SDB
dest_dir (str) – path of the destination directory
- Returns
if the operation succeeded
- Return type
bool
-
send_product_ecpi(path_product)[source]¶ Send L1 product generated by the ECLAIRs pipeline to the SDB.
Check if input file has registered CARD KW value for DC1: ECL-SKY-IMA, ECL-SOP-IMA, ECL-DET-UBC and ECL-EVT-CAL.
- Parameters
path_product (str) – path to the .fits file to be sent.
- Returns
if the operation succeeded
- Return type
bool