Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Preparation of cspad data in text/unicode format for inserting takes ~1sec.
  • Only limited precision data can be saved due to limit on document size 16MB.

Inserting data

Code Block
titleInsert document in collection
collapsetrue
doc_id = col.insert_one(doc).inserted_id

Insertion time is 110-180ms.

Find data

Code Block
titleFind data
collapsetrue
t0_sec = time()
docs = col.find({"run": 125})
dt_sec = time() - t0_sec

Finding data time is 50-60us

Unpack data

Code Block
titleUnpack data from unicode to numpy array
collapsetrue
doc = docs[0]
xcarr = pickle.loads(doc["data"]) # 30-40ms
arr = gu.np.fromstring(xcarr, dtype=float, count=-1, sep=' ') # 300ms

time Time to unpack is 350ms.

Summary

...