Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
# Database for experiment dbexp = client[("calibdb-cxif5315"] ) fs = big_data_file_system(dbexp) # Collections: col1 = dbexp["cspad-0-cxids2-0"] col2 = dbexp["cspad2x2-0-cxids2-0"] col3 = dbexp["andor-0-cxids2-0"] ... # Auto-generated collections 'fs.files' 'fs.chunks' # Document content for dbexp doc = { "_id":ObjectId("53402597d852426020000002"), # auto-generated "experiment": "cxif5315", "run": "123", "detector": "cspad-0-cxids2-0", "ctype": "pedestals", "time_sec": "1516321053 "time_nsec": 123456789", "time_stamp": "2018-01-18T16:17:33.123456789-0800", "version": "v00-11-22", "facilityuid": "LCLS2login-name", "uidhost": "login-namepsanaphi102", "hostport": "psanaphi10212345", "commentscomment": ["very good constants", "throw them in trash immediately!"] "id_data_size": 32*185*388 "5a98464a5777035bba3a4f41" "data_shape": (32,185,388) "data_type": "int16" "data": np.array(...) # added as a reference to big data } |
All meta-data information is accessible through a single-level document.
...
Code Block | ||||
---|---|---|---|---|
| ||||
# References or DBRefs for detectors dbdet = client['calib-cspad'] col1 = dbdet['cspad-0-cxids1-0'] col2Model #1: DB per detector type, collection per detector: ----------------------------------------------------------- dbdet = client('db-cspad') # Collections: col1 = dbdet['cspad-0-cxids2cxids1-0'] col2 = dbdet['cspad-0-cxids2-0'] col3 = dbdet['cspad-0-cxidsd-0'] col4 = dbdet['cspad-0-xcsendstation-0'] col5 = dbdet['cspad-0-xppgon-0'] col6 = dbdet['cspad-0-sxrbeamline-1'] col7 = dbdet['cspad-0-sxrbeamline-1'] col7 = dbdet['cspad-0-mectargetchamber-0'] # Document content for dbdet doc = { "_id":ObjectId("..."), "ref_id": ObjectId("534009e4d852427820000002"), etc... } # Model #2: DB per detector, one collection per detector: --------------------------------------------------------- dbdet = client('db-cspad-0-cxids1-0') col = dbdet['cspad-0-mectargetchambercxids1-0'] # Add Documentcollections contentin forcase dbdet docof =DB { "_id":ObjectId("..."), "ref_id": ObjectId("534009e4d852427820000002"), etc... }copy 'fs.files' 'fs.chunks' |
Essentially document in the detector collection has a reference to the data in the experiment collections.
...
Overview
Content Tools