mirror of https://github.com/openXC7/prjxray.git
Merge pull request #148 from mithro/master
Changes from trying to generate updated database
This commit is contained in:
commit
b117448fd8
|
|
@ -1,3 +1,4 @@
|
|||
/env/
|
||||
/build/
|
||||
.Xil
|
||||
# Ignore database directories _except_ for their settings
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue