Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97194028
save_data.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 3, 08:13
Size
602 B
Mime Type
text/x-python
Expires
Sun, Jan 5, 08:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23351499
Attached To
R13271 Optical_Trapping_ML
save_data.py
View Options
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
Log In to Comment