ASPL Manual v 1.00
© 2024 by SetSphere.COM


11-10

   TIE OSCILATOR SIGNALS TO ATTRIBUTES

[TIE OSCILATOR SIGNALS TO ATTRIBUTES]

WORKSPACE SIGNALS DESCRIPTION:

This workspace demonstrates how you can tie oscillating signals to ASPL attributes.

Create the element grouping class:

metagrouping -creategrouping OSCILLATORSGROUP -attributes "fosc1,t" "fosc2,t" "fx,i"

Edit /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/Feeder/Udev.pm

Edit /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/TieScaAttDev.pm

Start ASPL with workspace SIGNALS using the element grouping class OSCILLATORSGROUP:

aspl -wsname SIGNALS -groupingclass OSCILLATORSGROUP

①  aspl> S12 = ggoscillators(fonames,fosc1 fosc2,cycles,1,points,1000)

②  aspl> split S12 into S1 S2

③  aspl> ks fx

④  aspl> f&`ks= S1 S2

Now you can see where the signals intersected

Since ASPL variables are case sensitive, then we can create s12 with only 300 points, hence

lowering the granularity of the points.

⑤  aspl> s12 = ggoscillators(fonames,fosc1 fosc2,cycles,1,points,300)

⑥  aspl> split s12 into s1 s2

⑦  aspl> f&`ks= s1 s2

With 300 points, there is no interesction because of floating point truncation.

The intersection of s1 and s2 showed no intersecting points because the number of points is 300. This is a limitation when doing arithmetical processing on a computer. Usually the interesction of two signals (or any two continuous functions) can be resolved by doing piecewise regression between the two functions where the points are likely to intersect. This is beyond the point of ASPL calculator and we won't be treating here. However, ASPL attributes can be of type lambda code, see the BAYS12MON example on how to have attributes processing the result of other attributes using anonymous functions.
For the sake of explanation, we will show the graphical representation of the signals S1 and S2 and zoom into the intersecting area. We will also show the intersection of the signals s1 and s2 and zoom into the intersecting area.

⑧  aspl> cd ~tmp

⑨  aspl> ll

You can see two files being created

npdata -indata foo~fosc1_fosc2~1~1000



       Figure foo~fosc1_fosc2~1~1000.png
full view

Image File

 -F- Fig. 11.10.1   [Figure Two oscillating signals with 1000 points]
ASPL (C) 2024 Bassem Jamaleddine


npdata -indata foo~fosc1_fosc2~1~1000 -zoom 120,0.6,150,0.8,0.7,0.7,0.1,0.1



       Figure foo~fosc1_fosc2~1~1000-zoom-signal-intersection-point1.png
full view

Image File

 -F- Fig. 11.10.2   [Figure Signal intersection with 1000 points]
ASPL (C) 2024 Bassem Jamaleddine


npdata -indata foo~fosc1_fosc2~1~1000 -zoom 605,-0.60,635,-0.75,0.7,0.7,0.1,0.1



       Figure foo~fosc1_fosc2~1~1000-zoom-signal-intersection-point2.png
full view

Image File

 -F- Fig. 11.10.3   [Figure Signal intersection with 1000 points]
ASPL (C) 2024 Bassem Jamaleddine




npdata -indata foo~fosc1_fosc2~1~300



       Figure foo~fosc1_fosc2~1~300.png
full view

Image File

 -F- Fig. 11.10.4   [Figure Two oscillating signals with 300 points]
ASPL (C) 2024 Bassem Jamaleddine


npdata -indata foo~fosc1_fosc2~1~300 -zoom 25,0.6,45,0.8,0.7,0.7,0.1,0.1



       Figure foo~fosc1_fosc2~1~300-zoom-nointersection-point1.png
full view

Image File

 -F- Fig. 11.10.5   [Figure Signal scattered points cannot intersect with 300 points granularity]
ASPL (C) 2024 Bassem Jamaleddine


npdata -indata foo~fosc1_fosc2~1~300 -zoom 180,-0.60,190,-0.75,0.7,0.7,0.2,0.2



       Figure foo~fosc1_fosc2~1~300-zoom-nointersection-point2.png
full view

Image File

 -F- Fig. 11.10.6   [Figure Signal scattered points cannot intersect with 300 points granularity]
ASPL (C) 2024 Bassem Jamaleddine


Note that the OSCILLATORSGROUP grouping class has been created with the metagrouping command: the attributes fosc1 and fosc2 are of type t or tied. You can issue the command attributes at the ASPL prompt to view the list of attributes and their meta data definition.
################################# OUTPUT OF metagrouping
# metagrouping -creategrouping OSCILLATORSGROUP -attributes  "fosc1,t" "fosc2,t"  "fx,i"
att[fosc1]  typ[t]
att[fosc2]  typ[t]
att[fx]  typ[i]
::::::::::::::::::: GOOD  fosc1,t fosc2,t fx,i

creategrouping OSCILLATORSGROUP
  @@@ WARNING: TIE IS NOT SUPPORTED IN THIS VERSION - INTERNAL USE v2 @@@
  @@@ WARNING: TIE IS NOT SUPPORTED IN THIS VERSION - INTERNAL USE v2 @@@
ADDED ELMD: /opt/ASPLv1.00/BRIDGE/ASPL/Groupings/Elements/Attributes/OSCILLATORSGROUP.ELMD
ADDED /opt/ASPLv1.00/BRIDGE/ASPL/Groupings/Elements/OSCILLATORSGROUP/PrintableFormats.pm
ADDED /opt/ASPLv1.00/BRIDGE/ASPL/Groupings/Elements/OSCILLATORSGROUP/Proc.pm
ADDED /opt/ASPLv1.00/BRIDGE/ASPL/Groupings/Elements/OSCILLATORSGROUP/Proc1.pm
  Udev UNIX DEVICE MODULE CREATED: /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/Feeder/Udev.pm
    @@@ YOU MAY NEED TO EDIT /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/Feeder/Udev.pm TO MAKE CHANGES TO WHAT IS RETURNED BY THE UNIX DEVICES
  ATTRIBUTES WITH HOOKS: ADDED /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/TieScaAttDev.pm
                         ADDED /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/TiSCA_fosc1.pm
                         ADDED /opt/ASPLv1.00/BRIDGE/ASPL/GGs/OSCILLATORSGROUP/TiSCA_fosc2.pm

  OSCILLATORSGROUP HAS BEEN ADDED




This example is shown in the following terminal.

       terminal for example: TIE OSCILATOR SIGNALS TO ATTRIBUTES
viewme

 -E- Display. 11.10.1   [TIE OSCILATOR SIGNALS TO ATTRIBUTES][TIE OSCILATOR SIGNALS TO ATTRIBUTES]
Terminal showing TIE OSCILATOR SIGNALS TO ATTRIBUTES