-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_base_data.py
More file actions
24 lines (19 loc) · 821 Bytes
/
generate_base_data.py
File metadata and controls
24 lines (19 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import engine
import utils
ARGS = utils.get_args(isActionRequired=True)
ACTION = utils.process_action_input(ARGS.action)
SESSION_DURATION = ARGS.duration
FPS = ARGS.fps
TOTAL_SNAPSHOTS = SESSION_DURATION * FPS # ~30 iters/sec
MAX_FREQ = ARGS.max_frequency
# constructing base_data_loop() in engine.py has noticably faster execution time, as
# opposed to constructing and executing it in generate_base_data.py.
#
# for this reason, session data is built in engine.py as well, and not specified here.
#
# note that python imports are run once only. Therefore, we can import our bci values
# to both this file as well as engine.py.
session = engine.run_base_data_loop(ACTION, TOTAL_SNAPSHOTS, FPS, MAX_FREQ)
# keep engine work and utility functions separate
utils.save_session(ACTION, session)
utils.summary(ACTION)