Scribe
Scribe(root_path, delimiter=',', extension='data', decimal=True)
Bases: Consumer
A class that handles all of the file I/O operations for data acquisition. This includes reading and writing data to files, as well as managing metadata.
Initialize the Scribe.
current_directory()
Get the current directory for the data file.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
str
|
The path of the current directory. |
current_file()
Get the current file path.
Returns:
current_path()
Get the current path for the data file.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The path of the current datafile. |
next_file(title, next_block=False)
Set the next file to be written to.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
The title of the file. |
required |
next_block
|
bool
|
If True, increment the block number. Defaults to False. |
False
|
run(experiment)
async
The main loop that runs the tasks in the queue.
setup()
async
Setup the Scribe.
shutdown()
async
Shutdown the Scribe.
teardown()
async
Teardown the Scribe.