Page MenuHomec4science

save_data.py
No OneTemporary

File Metadata

Created
Fri, Jan 3, 08:13

save_data.py

import pickle
from Z_HELPERS.DM_communication import get_docs_VM
#module to save time in order to load the data only once and not each time we run main
#run it once before running main
print("Loading data...")
docs_meas = get_docs_VM(db_name='Optical_Trapping_ML_DB', coll_name='tseries_AMPexp1_meas', query={})
analyzed_doc = get_docs_VM(db_name='Optical_Trapping_ML_DB', coll_name='tseries_AMPexp1_analysis',query={})
with open('data_meas.pkl', 'wb') as f:
pickle.dump(docs_meas, f)
with open('data_analysed.pkl', 'wb') as f:
pickle.dump(analyzed_doc, f)
print("Data saved to pickle files")

Event Timeline