Data management¶
AsyncSession objects can store three kinds of data:
scalar variables monitored in time at possibly irregular time intervals. Scalar values of these variables are logged, in a “data logger” manner. They are suited to the monitoring of quantities over time when a regular measurement rate is not required. We call them “logged variables”. Tasks can save values by calling the
pymanip.asyncsession.AsyncSession.add_entry()
method, and they can be later retrieved by calling the following methodspymanip.asyncsession.AsyncSession.logged_variables()
,pymanip.asyncsession.AsyncSession.logged_variable()
,pymanip.asyncsession.AsyncSession.logged_data()
,pymanip.asyncsession.AsyncSession.logged_first_values()
,pymanip.asyncsession.AsyncSession.logged_last_values()
,pymanip.asyncsession.AsyncSession.logged_data_fromtimestamp()
, or by using the sesn[varname] syntax shortcut which is equivalent to thelogged_variable()
method.scalar parameter defined once in the session. We call them “parameters”. A program can save parameters with the
pymanip.asyncsession.AsyncSession.save_parameter()
method, and they can be later retrieved by calling thepymanip.asyncsession.AsyncSession.parameter()
,pymanip.asyncsession.AsyncSession.parameters()
,pymanip.asyncsession.AsyncSession.has_parameter()
methods.non-scalar variables monitored in time at possibly irregular time intervals. A non-scalar value is typically a numpy array from an acquisition card or a frame from a camera. We call them “datasets”. They can be saved with the
pymanip.asyncsession.AsyncSession.add_dataset()
method, and later be retrieved by thepymanip.asyncsession.AsyncSession.dataset()
,pymanip.asyncsession.AsyncSession.datasets()
,pymanip.asyncsession.AsyncSession.dataset_names()
,pymanip.asyncsession.AsyncSession.dataset_last_data()
,pymanip.asyncsession.AsyncSession.dataset_times()
methods.