-
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.
Merge branch 'test_image_reconstruct' into perf-streamdaq
- Loading branch information
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
a962855
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I LIKE WHAT IM SEEING with the emergence of the
mio
click interfacea962855
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea a bit of flexibility helps. Just following your suggestion but this package seemed nice.