meavis.filesystem.session module

MeaVis session.

class meavis.filesystem.session.Manager(access=None)[source]

Bases: meavis._detail.sqlite.SQLiteAccess

Provides an access to the MeaVis filesystem.

__init__(access=None)[source]

Connect to the internal database and loads the last state.

new_setup()[source]

Get a new setup to be filled and sealed.

roots

Get all roots.

root_path

Get current root path.

root

Get current root.

register_root(value, folder)[source]

Register a new root.

sessions

Get all sessions regarding the current root and sample.

session

Get the current session.

last_session

Get the newest session.

new_session(instruments=None, instances=None)[source]

Add a new session with the giver setups.

up()[source]

Select the parent session.

add_subsession(instruments=None, instances=None)[source]

Add a subsesssion.

all_setups

Get the current setups.

Instruments and instances setups for session and sample.

reload_session()[source]

Reload the current session.

samples

Get samples regarding root and session.

active_samples

Get active samples regarding the setups.

register_active_samples()[source]

Register the current active samples.

Make them aviable throught the MeaVis injection and registration mechanism.

sample

Get the current sample.

reload_sample()[source]

Reload the current sample.

query(**metadata)[source]

Execute a generic query to the database over metadata key/value.

query_current(**kwargs)[source]

Query regarding the current root/session/sample and dataset.

new_dataset(name)[source]

Add a dataset, return formated filename and metadata proxy.