Skip to content

Commit

Permalink
Improving (speed-up) mix_fine_and_rough_sampling implementatoin in co…
Browse files Browse the repository at this point in the history
…mponent.py
  • Loading branch information
nmounet committed Jun 21, 2024
1 parent 06e8e15 commit 122ba39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xwakes/wit/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ def mix_fine_and_rough_sampling(start: float, stop: float, rough_points: int,
intervals = [np.linspace(max(i, start), min(f, stop), fine_points)
for i, f in rois
if (start <= i <= stop or start <= f <= stop)]
fine_sampling_rois = np.hstack(intervals) if intervals else np.array([])
rough_sampling = np.geomspace(start, stop, rough_points)

return unique_sigfigs(
np.sort(np.concatenate((fine_sampling_rois, rough_sampling))), 7)
np.sort(np.hstack((*intervals, rough_sampling)),kind='stable'), 7)


class Component:
Expand Down

0 comments on commit 122ba39

Please sign in to comment.