TWOEARS / auditory-front-end

Two!Ears Auditory Model - Auditory front-end module
http://docs.twoears.eu/en/latest/afe/
GNU General Public License v2.0
16 stars 10 forks source link

add method to Signal for masking AFE signals #4

Closed kashefy closed 8 years ago

kashefy commented 8 years ago

This adds a method for masking AFE signals (not applicable to spectral features). We don't assume that the mask perfectly matches the dataBlock in time or frequency bins. Before masking the signal, we

  1. re-sample the mask along the temporal axis to match the sampling rate of the signal
  2. crop the mask to match the size of the Signal's dataBlock
  3. re-sample the mask along the frequency axis to get as close as possible to the signal's frequency resolution.

The masking matrix is generated by the SegmentationKS.

kashefy commented 8 years ago

@hagenw, this PR goes hand in hand with the SegmentIdentityKS from #17

hagenw commented 8 years ago

Stupid Matlab, you are right, it's part of a Toolbox. The problem is that resample() is not only using ìnterp1()as far as I know, but does something more. The best solution would be to test it with bothinterp1()andresample()and see if it has an influence on the outcome. If yes we should useresample()` and add an error message if it is not available stating that the Signal Processing Toolbox is needed.

BTW, resample() is used in the AFE at the moment

kashefy commented 8 years ago

@hagenw , I don't think we can switch to resample, since it requires integer arguments and this is not necessarily the case.

hagenw commented 8 years ago

OK, then I will merge it with the current stage and we use interp1().