Denys Rozumnyi
commited on
Commit
·
c9676bf
1
Parent(s):
c90e817
update
Browse files- geom_solver.py +4 -4
- testing.ipynb +24 -33
geom_solver.py
CHANGED
@@ -170,12 +170,12 @@ class GeomSolver(object):
|
|
170 |
self.vertices = centers
|
171 |
nvert = centers.shape[0]
|
172 |
# desired_vertices = (self.xyz[:,-1] > z_th).sum() // 300
|
173 |
-
desired_vertices = 2*nvert
|
174 |
# desired_vertices = self.mean_vertices
|
175 |
if desired_vertices < self.min_vertices:
|
176 |
-
desired_vertices = self.
|
177 |
if desired_vertices > self.max_vertices:
|
178 |
-
desired_vertices = self.
|
179 |
# if self.broken_cams.any():
|
180 |
# vertices = centers
|
181 |
# print("There are broken cams.")
|
@@ -235,7 +235,7 @@ class GeomSolver(object):
|
|
235 |
|
236 |
edges = []
|
237 |
# thresholds_min_mean = {0 : [5, 7], 1 : [9, 25], 2: [30, 1000]}
|
238 |
-
thresholds_min_mean = {0 : [1, 7], 1 : [
|
239 |
for i in range(pyt_centers.shape[0]):
|
240 |
for j in range(i+1, pyt_centers.shape[0]):
|
241 |
etype = (self.is_apex[i] + self.is_apex[j])
|
|
|
170 |
self.vertices = centers
|
171 |
nvert = centers.shape[0]
|
172 |
# desired_vertices = (self.xyz[:,-1] > z_th).sum() // 300
|
173 |
+
desired_vertices = int(2*nvert)
|
174 |
# desired_vertices = self.mean_vertices
|
175 |
if desired_vertices < self.min_vertices:
|
176 |
+
desired_vertices = self.min_vertices
|
177 |
if desired_vertices > self.max_vertices:
|
178 |
+
desired_vertices = self.max_vertices
|
179 |
# if self.broken_cams.any():
|
180 |
# vertices = centers
|
181 |
# print("There are broken cams.")
|
|
|
235 |
|
236 |
edges = []
|
237 |
# thresholds_min_mean = {0 : [5, 7], 1 : [9, 25], 2: [30, 1000]}
|
238 |
+
thresholds_min_mean = {0 : [1, 7], 1 : [3, 25], 2: [3, 1000]}
|
239 |
for i in range(pyt_centers.shape[0]):
|
240 |
for j in range(i+1, pyt_centers.shape[0]):
|
241 |
etype = (self.is_apex[i] + self.is_apex[j])
|
testing.ipynb
CHANGED
@@ -176,7 +176,7 @@
|
|
176 |
},
|
177 |
{
|
178 |
"cell_type": "code",
|
179 |
-
"execution_count":
|
180 |
"id": "88f4fc8f-efa9-404b-9073-c7d4a73f9075",
|
181 |
"metadata": {},
|
182 |
"outputs": [
|
@@ -184,38 +184,29 @@
|
|
184 |
"name": "stdout",
|
185 |
"output_type": "stream",
|
186 |
"text": [
|
187 |
-
"2.4183324229440974
|
188 |
-
"1.9395643500589714 2.
|
189 |
-
"2.815541573372287
|
190 |
-
"2.3254810143936755 1.
|
191 |
-
"2.3286533191380765 1.
|
192 |
-
"2.342868026940067 1.
|
193 |
"2.04873204164575 1.8261703137595002\n",
|
194 |
-
"2.167980973024546 1.
|
195 |
-
"2.571328055702413
|
196 |
-
"2.0127597511603774 2.
|
197 |
-
"1.961080548873729 1.
|
198 |
-
"2.1617889927813057 1.
|
199 |
-
"2.0817899095268078 1.
|
200 |
-
"2.484359575186481 1.
|
201 |
-
"2.2997637652539 1.
|
202 |
-
"2.440276048704617 2.
|
203 |
-
"2.135748984421359 1.
|
204 |
-
"2.3955711940075584 2.
|
205 |
-
"2.516982526006783 2.
|
206 |
"2.521576698581939 1.6157957679817523\n",
|
207 |
"1.8495344082304994 1.578356057609313\n",
|
208 |
-
"2.932654420428436 1.
|
209 |
-
"1.9387187366052139 1.
|
210 |
-
"2.135296338517323 1.81075437070104\n",
|
211 |
-
"2.527322316920579 1.7985373080000897\n",
|
212 |
-
"2.681606928809334 2.226178041689217\n",
|
213 |
-
"2.4613439446210306 1.5399683591875555\n",
|
214 |
-
"2.3497006297365304 1.8154885619111523\n",
|
215 |
-
"2.2946897561795074 1.6075314334284299\n",
|
216 |
-
"2.2292662656029454 2.059612285543195\n",
|
217 |
-
"Averages\n",
|
218 |
-
"2.312343783912538 1.8787443502537793\n"
|
219 |
]
|
220 |
}
|
221 |
],
|
@@ -275,17 +266,17 @@
|
|
275 |
},
|
276 |
{
|
277 |
"cell_type": "code",
|
278 |
-
"execution_count":
|
279 |
"id": "a34d0a2b-9986-47cc-8a3f-c15397370c4d",
|
280 |
"metadata": {},
|
281 |
"outputs": [
|
282 |
{
|
283 |
"data": {
|
284 |
"text/plain": [
|
285 |
-
"
|
286 |
]
|
287 |
},
|
288 |
-
"execution_count":
|
289 |
"metadata": {},
|
290 |
"output_type": "execute_result"
|
291 |
}
|
|
|
176 |
},
|
177 |
{
|
178 |
"cell_type": "code",
|
179 |
+
"execution_count": null,
|
180 |
"id": "88f4fc8f-efa9-404b-9073-c7d4a73f9075",
|
181 |
"metadata": {},
|
182 |
"outputs": [
|
|
|
184 |
"name": "stdout",
|
185 |
"output_type": "stream",
|
186 |
"text": [
|
187 |
+
"2.4183324229440974 1.9299500599980244\n",
|
188 |
+
"1.9395643500589714 2.0236575080719104\n",
|
189 |
+
"2.815541573372287 2.025451371291628\n",
|
190 |
+
"2.3254810143936755 1.6480476525775554\n",
|
191 |
+
"2.3286533191380765 1.907214134613452\n",
|
192 |
+
"2.342868026940067 1.9669375866465235\n",
|
193 |
"2.04873204164575 1.8261703137595002\n",
|
194 |
+
"2.167980973024546 1.564003268847725\n",
|
195 |
+
"2.571328055702413 2.0208250552562745\n",
|
196 |
+
"2.0127597511603774 2.0591274116795564\n",
|
197 |
+
"1.961080548873729 1.8200081714452052\n",
|
198 |
+
"2.1617889927813057 1.6349180723685486\n",
|
199 |
+
"2.0817899095268078 1.5980454240474442\n",
|
200 |
+
"2.484359575186481 1.7471060400666858\n",
|
201 |
+
"2.2997637652539 1.7949245589214717\n",
|
202 |
+
"2.440276048704617 2.547320743171852\n",
|
203 |
+
"2.135748984421359 1.6773471490746195\n",
|
204 |
+
"2.3955711940075584 2.5549005938032896\n",
|
205 |
+
"2.516982526006783 2.2057496863750923\n",
|
206 |
"2.521576698581939 1.6157957679817523\n",
|
207 |
"1.8495344082304994 1.578356057609313\n",
|
208 |
+
"2.932654420428436 1.888064313171201\n",
|
209 |
+
"1.9387187366052139 1.6981983372339668\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
]
|
211 |
}
|
212 |
],
|
|
|
266 |
},
|
267 |
{
|
268 |
"cell_type": "code",
|
269 |
+
"execution_count": 210,
|
270 |
"id": "a34d0a2b-9986-47cc-8a3f-c15397370c4d",
|
271 |
"metadata": {},
|
272 |
"outputs": [
|
273 |
{
|
274 |
"data": {
|
275 |
"text/plain": [
|
276 |
+
"29"
|
277 |
]
|
278 |
},
|
279 |
+
"execution_count": 210,
|
280 |
"metadata": {},
|
281 |
"output_type": "execute_result"
|
282 |
}
|