-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aac78ce
commit e4d3936
Showing
6 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import click | ||
from miniscope_io.commands.capture import sdaqprof | ||
|
||
@click.group() | ||
def cli(): | ||
pass | ||
|
||
cli.add_command(sdaqprof) | ||
|
||
if __name__ == '__main__': | ||
cli() |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import click | ||
import os | ||
|
||
from pathlib import Path | ||
|
||
|
||
from miniscope_io.stream_daq import StreamDaqConfig, StreamDaq | ||
from miniscope_io.utils import hash_video, hash_file | ||
|
||
@click.command() | ||
@click.option('-c', '--config', required=True, help='YAML file to configure the streamDaq') | ||
@click.option('-s', '--source', required=False, help='RAW FPGA data to plug into okDevMock') | ||
@click.option('-o', '--output', default='output', help='Video output filename') | ||
def sdaqprof(config, source, output): | ||
|
||
output_video = Path("output") / (output + ".avi") | ||
|
||
if source: | ||
# environment variable to allow import okDevMock | ||
os.environ['STREAMDAQ_PROFILERUN'] = 'just_placeholder' | ||
os.environ['PYTEST_OKDEV_DATA_FILE'] = source | ||
|
||
daqConfig = StreamDaqConfig.from_yaml(config) | ||
|
||
daq_inst = StreamDaq(config=daqConfig) | ||
daq_inst.capture(source="fpga", video=output_video) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters