Create nice images from Sensospot Array scans
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from pathlib import Path
|
|
|
|
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
|
|
|
|
from sensospot_grid import process
|
|
|
|
from sensospot_data import parse_file
|
|
|
|
from sensospot_data.parameters import _search_measurement_params_file
|
|
|
|
|
|
|
|
from defusedxml import ElementTree
|
|
|
|
|
|
|
|
import itertools
|
|
|
|
|
|
|
|
THIS_FILE_DIR = Path(__file__).absolute().parent
|
|
|
|
|
|
|
|
EXAMPLE_DATA_DIR = THIS_FILE_DIR / "example_data"
|
|
|
|
EXAMPLE_IMAGE = EXAMPLE_DATA_DIR / "11Aug2020 NQC0329 Dry SG2-127-002_1_A01_1.tif"
|
|
|
|
EXAMPLE_DATA = EXAMPLE_DATA_DIR / "11Aug2020 NQC0329 Dry SG2-127-002_1_A01_1.csv"
|
|
|
|
|
|
|
|
OUTPUT_DIR = THIS_FILE_DIR / "example_output"
|
|
|
|
old_output_files = [i for i in OUTPUT_DIR.iterdir() if i.is_file()]
|
|
|
|
for path in old_output_files:
|
|
|
|
path.unlink()
|
|
|
|
|
|
|
|
|
|
|
|
process(EXAMPLE_DATA_DIR, OUTPUT_DIR)
|