|
|
|
@ -6,6 +6,7 @@ Parsing the numerical output from Sensovations Sensospot image analysis.
@@ -6,6 +6,7 @@ Parsing the numerical output from Sensovations Sensospot image analysis.
|
|
|
|
|
__version__ = "0.6.0" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import sys |
|
|
|
|
from pathlib import Path |
|
|
|
|
|
|
|
|
|
import click |
|
|
|
@ -29,7 +30,10 @@ from .parameters import ExposureInfo # noqa: F401
@@ -29,7 +30,10 @@ from .parameters import ExposureInfo # noqa: F401
|
|
|
|
|
"-o", |
|
|
|
|
"--outfile", |
|
|
|
|
default="collected_data.csv", |
|
|
|
|
help="Output file name", |
|
|
|
|
help=( |
|
|
|
|
"Output file name, use a dash '-' for stdout, " |
|
|
|
|
"default: 'collected_data.csv'" |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
@click.option( |
|
|
|
|
"-q", |
|
|
|
@ -42,5 +46,8 @@ def run(source, outfile, quiet=False):
@@ -42,5 +46,8 @@ def run(source, outfile, quiet=False):
|
|
|
|
|
source_path = Path(source) |
|
|
|
|
# read the raw data of a folder |
|
|
|
|
raw_data = parse_folder(source_path, quiet=quiet) |
|
|
|
|
csv_file = source_path / outfile |
|
|
|
|
raw_data.to_csv(csv_file, sep="\t") |
|
|
|
|
if outfile.strip() == "-": |
|
|
|
|
raw_data.to_csv(sys.stdout, sep="\t") |
|
|
|
|
else: |
|
|
|
|
csv_file = source_path / outfile |
|
|
|
|
raw_data.to_csv(csv_file, sep="\t") |
|
|
|
|