Skip to main content
. 2026 Jan 22;26(2):743. doi: 10.3390/s26020743
Algorithm 2 Spectrum Attention Mechanism (SAM)
  •  Input: 

    Captured signal sequence xn

  •  Output: 

    xsamn

  •   1:

    Initialize: All-ones learnable array maskn

  •   2:

    # Transform the input series into frequency domain

    spnDFT(xn)

  •   3:

    # Element-wise multiply spectrum by mask

    masked_spnspn·maskn

  •   4:

    # Transform the spectrum back into the time domain

    xsamnIDFT(masked_spn)