@@ -301,11 +301,11 @@ def get_object_titles(self, panel: str | None = None) -> list[str]:
301
301
Objects are sorted by group number and object index in group.
302
302
303
303
Args:
304
- panel (str | None) : panel name (valid values: "signal", "image").
305
- If None, current panel is used.
304
+ panel: panel name (valid values: "signal", "image", "macro ").
305
+ If None, current data panel is used (i.e. signal or image panel) .
306
306
307
307
Returns:
308
- list[str]: list of object titles
308
+ List of object titles
309
309
310
310
Raises:
311
311
ValueError: if panel not found
@@ -390,6 +390,32 @@ def add_label_with_title(
390
390
If None, current panel is used.
391
391
"""
392
392
393
+ @abc .abstractmethod
394
+ def run_macro (self , number_or_title : int | str | None = None ) -> None :
395
+ """Run macro.
396
+
397
+ Args:
398
+ number: Number of the macro (starting at 1). Defaults to None (run
399
+ current macro, or does nothing if there is no macro).
400
+ """
401
+
402
+ @abc .abstractmethod
403
+ def stop_macro (self , number_or_title : int | str | None = None ) -> None :
404
+ """Stop macro.
405
+
406
+ Args:
407
+ number: Number of the macro (starting at 1). Defaults to None (stop
408
+ current macro, or does nothing if there is no macro).
409
+ """
410
+
411
+ @abc .abstractmethod
412
+ def import_macro_from_file (self , filename : str ) -> None :
413
+ """Import macro from file
414
+
415
+ Args:
416
+ filename: Filename.
417
+ """
418
+
393
419
@abc .abstractmethod
394
420
def calc (self , name : str , param : gds .DataSet | None = None ) -> gds .DataSet :
395
421
"""Call compute function ``name`` in current panel's processor.
@@ -636,11 +662,11 @@ def get_object_titles(self, panel: str | None = None) -> list[str]:
636
662
Objects are sorted by group number and object index in group.
637
663
638
664
Args:
639
- panel (str | None) : panel name (valid values: "signal", "image").
640
- If None, current panel is used.
665
+ panel: panel name (valid values: "signal", "image", "macro ").
666
+ If None, current data panel is used (i.e. signal or image panel) .
641
667
642
668
Returns:
643
- list[str]: list of object titles
669
+ List of object titles
644
670
645
671
Raises:
646
672
ValueError: if panel not found
@@ -675,3 +701,29 @@ def add_label_with_title(
675
701
If None, current panel is used.
676
702
"""
677
703
self ._cdl .add_label_with_title (title , panel )
704
+
705
+ def run_macro (self , number_or_title : int | str | None = None ) -> None :
706
+ """Run macro.
707
+
708
+ Args:
709
+ number: Number of the macro (starting at 1). Defaults to None (run
710
+ current macro, or does nothing if there is no macro).
711
+ """
712
+ self ._cdl .run_macro (number_or_title )
713
+
714
+ def stop_macro (self , number_or_title : int | str | None = None ) -> None :
715
+ """Stop macro.
716
+
717
+ Args:
718
+ number: Number of the macro (starting at 1). Defaults to None (stop
719
+ current macro, or does nothing if there is no macro).
720
+ """
721
+ self ._cdl .stop_macro (number_or_title )
722
+
723
+ def import_macro_from_file (self , filename : str ) -> None :
724
+ """Import macro from file
725
+
726
+ Args:
727
+ filename: Filename.
728
+ """
729
+ return self ._cdl .import_macro_from_file (filename )
0 commit comments