|
@@ 437-447 (lines=11) @@
|
| 434 |
|
# get points iside current rectangle for current date |
| 435 |
|
rect_idx = (x1 < x) & ( x < x2) & (y1 < y) & ( y < y2) & idx |
| 436 |
|
|
| 437 |
|
if np.sum(rect_idx) > 0: |
| 438 |
|
textbox.set_val(label) |
| 439 |
|
|
| 440 |
|
selected_knot = label |
| 441 |
|
selected_x = x[rect_idx].ravel() |
| 442 |
|
selected_y = y[rect_idx].ravel() |
| 443 |
|
selected_ind = knots[label].index[rect_idx] |
| 444 |
|
|
| 445 |
|
log.debug(f'Selected {label} points rect_idx {rect_idx} x {x[rect_idx]}, y {y[rect_idx]} with indices {selected_ind}') |
| 446 |
|
|
| 447 |
|
textbox.begin_typing(None) |
| 448 |
|
break # if we find selected components in this epoch, continue with renaming |
| 449 |
|
else: |
| 450 |
|
pass |
|
@@ 705-714 (lines=10) @@
|
| 702 |
|
x = np.array(years) |
| 703 |
|
y = np.array(fluxes) |
| 704 |
|
|
| 705 |
|
if np.sum(rect_idx) > 0: |
| 706 |
|
textbox.set_val(label) |
| 707 |
|
selected_knot = label |
| 708 |
|
selected_x = x[rect_idx].ravel() |
| 709 |
|
selected_y = y[rect_idx].ravel() |
| 710 |
|
selected_ind = knots[label].index[rect_idx] |
| 711 |
|
log.debug(f'Selected {label} points rect_idx {rect_idx} date {x[rect_idx]}, flux {y[rect_idx]} with indices {selected_ind}') |
| 712 |
|
break # if we find selected components in this epoch, continue with renaming |
| 713 |
|
else: |
| 714 |
|
pass |
| 715 |
|
|
| 716 |
|
# print epoch of selected points: |
| 717 |
|
if selected_knot is not None: |