@@ 677-680 (lines=4) @@ | ||
674 | waiting_differential = False; |
|
675 | ||
676 | else: |
|
677 | waiting_differential = True; |
|
678 | ||
679 | return number_oscillations; |
|
680 | ||
681 | ||
682 | def allocate_sync_ensembles(dynamic, tolerance = 0.1, threshold = 1.0, ignore = None): |
|
683 | """! |
|
@@ 656-659 (lines=4) @@ | ||
653 | ||
654 | """ |
|
655 | ||
656 | number_oscillations = 0; |
|
657 | waiting_differential = False; |
|
658 | threshold_passed = False; |
|
659 | high_level_trigger = True if (osc_dyn[0][index] > amplitude_threshold) else False; |
|
660 | ||
661 | for values in osc_dyn: |
|
662 | if ( (values[index] >= amplitude_threshold) and (high_level_trigger is False) ): |
|
@@ 812-816 (lines=5) @@ | ||
809 | raise NameError('Impossible to represent clusters due to number of specified colors.'); |
|
810 | ||
811 | fig = plt.figure(); |
|
812 | ||
813 | if (axes is None): |
|
814 | # Check for dimensions |
|
815 | if ((dimension) == 1 or (dimension == 2)): |
|
816 | axes = fig.add_subplot(111); |
|
817 | elif (dimension == 3): |
|
818 | axes = fig.gca(projection='3d'); |
|
819 | else: |
|
@@ 791-795 (lines=5) @@ | ||
788 | @param[in] display_result (bool): If specified then matplotlib axes will be used for drawing and plot will not be shown. |
|
789 | ||
790 | @return (ax) Matplotlib axes where drawn clusters are presented. |
|
791 | ||
792 | """ |
|
793 | # Get dimension |
|
794 | dimension = 0; |
|
795 | if ( (data is not None) and (clusters is not None) ): |
|
796 | dimension = len(data[0]); |
|
797 | elif ( (data is None) and (clusters is not None) ): |
|
798 | dimension = len(clusters[0][0]); |
@@ 330-333 (lines=4) @@ | ||
327 | ||
328 | """! |
|
329 | @brief Draw canvas cluster descriptor. |
|
330 | ||
331 | @param[in] ax (Axis): Axis of the canvas where canvas cluster descriptor should be displayed. |
|
332 | @param[in] dimension (uint): Canvas dimension. |
|
333 | @param[in] cluster_descr (canvas_cluster_descr): Canvas cluster descriptor that should be displayed. |
|
334 | ||
335 | @return (fig) Figure where clusters are shown. |
|
336 | ||
@@ 323-327 (lines=5) @@ | ||
320 | ax.grid(visible_grid); |
|
321 | ||
322 | if (display is True): |
|
323 | plt.show(); |
|
324 | ||
325 | return cluster_figure; |
|
326 | ||
327 | ||
328 | """! |
|
329 | @brief Draw canvas cluster descriptor. |
|
330 |