Merge pull request #148 from mithro/master

Changes from trying to generate updated database
This commit is contained in:
Tim Ansell 2018-10-14 13:51:55 -07:00 committed by GitHub
commit b117448fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 10 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/env/
/build/
.Xil
# Ignore database directories _except_ for their settings

View File

@ -1,6 +1,11 @@
CLANG_FORMAT ?= clang-format
.PHONY: database format clean
.PHONY: database format clean env
env:
virtualenv --python=python3 env
. env/bin/activate; pip install -r requirements.txt
ln -sf $(PWD)/prjxray env/lib/python3.*/site-packages/
build:
git submodule update --init --recursive

View File

@ -1,6 +1,6 @@
#!/bin/bash -xe
rm -r output
rm -rf output
mkdir -p output
python3 reduce_tile_types.py \
--root_dir specimen_001/ \
@ -21,3 +21,4 @@ if [ -f $BASE_TILEGRID ]; then
--overlay_grid output/tilegrid_full.json.tmp \
--output_grid output/tilegrid.json \
--mark_roi
fi

View File

@ -188,16 +188,16 @@ def find_origin_coordinate(site_names):
smallest coordinate to re-origin them all to be relative to the tile.
"""
if len(site_names) == 0:
x_coords = []
y_coords = []
for site in site_names:
coordinate = get_site_coordinate_from_name(site)
x_coords.append(coordinate.x_coord)
y_coords.append(coordinate.y_coord)
if len(x_coords) == 0 or len(y_coords) == 0:
return 0, 0
def inner_():
for site in site_names:
coordinate = get_site_coordinate_from_name(site)
yield coordinate.x_coord, coordinate.y_coord
x_coords, y_coords = zip(*inner_())
min_x_coord = min(x_coords)
min_y_coord = min(y_coords)