|
@@ 412-422 (lines=11) @@
|
| 409 |
|
# get points iside current rectangle for current date |
| 410 |
|
rect_idx = (x1 < x) & ( x < x2) & (y1 < y) & ( y < y2) & idx |
| 411 |
|
|
| 412 |
|
if np.sum(rect_idx) > 0: |
| 413 |
|
textbox.set_val(label) |
| 414 |
|
|
| 415 |
|
selected_knot = label |
| 416 |
|
selected_x = x[rect_idx].ravel() |
| 417 |
|
selected_y = y[rect_idx].ravel() |
| 418 |
|
selected_ind = knots[label].index[rect_idx] |
| 419 |
|
|
| 420 |
|
log.debug(f'Selected {label} points rect_idx {rect_idx} x {x[rect_idx]}, y {y[rect_idx]} with indices {selected_ind}') |
| 421 |
|
|
| 422 |
|
textbox.begin_typing(None) |
| 423 |
|
break # if we find selected components in this epoch, continue with renaming |
| 424 |
|
else: |
| 425 |
|
pass |
|
@@ 667-676 (lines=10) @@
|
| 664 |
|
x = np.array(years) |
| 665 |
|
y = np.array(fluxes) |
| 666 |
|
|
| 667 |
|
if np.sum(rect_idx) > 0: |
| 668 |
|
textbox.set_val(label) |
| 669 |
|
selected_knot = label |
| 670 |
|
selected_x = x[rect_idx].ravel() |
| 671 |
|
selected_y = y[rect_idx].ravel() |
| 672 |
|
selected_ind = knots[label].index[rect_idx] |
| 673 |
|
log.debug(f'Selected {label} points rect_idx {rect_idx} date {x[rect_idx]}, flux {y[rect_idx]} with indices {selected_ind}') |
| 674 |
|
break # if we find selected components in this epoch, continue with renaming |
| 675 |
|
else: |
| 676 |
|
pass |
| 677 |
|
|
| 678 |
|
# print epoch of selected points: |
| 679 |
|
if selected_knot is not None: |