Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

getFIRbandpass.m 858 B

12345678910111213141516171819202122232425262728293031
  1. function [ b, gd ] = getFIRbandpass( lcut,hcut,attenHz,attendB,eegFS )
  2. %make FIR filter
  3. %testing
  4. %eegFS = 2000;
  5. %lcut = 6;
  6. %hcut = 10;
  7. %attenHz = 2;
  8. %attendB = 40;
  9. nyq = round(eegFS/2);
  10. %make bandpass
  11. Fstop1 = (lcut - attenHz) / nyq; % First Stopband Frequency
  12. Fpass1 = lcut / nyq; % First Passband Frequency
  13. Fpass2 = hcut / nyq; % Second Passband Frequency
  14. Fstop2 = (hcut + attenHz) / nyq; % Second Stopband Frequency
  15. Astop1 = attendB; % First Stopband Attenuation (dB)
  16. Apass = 1; % Passband Ripple (dB)
  17. Astop2 = attendB; % Second Stopband Attenuation (dB)
  18. h = fdesign.bandpass('fst1,fp1,fp2,fst2,ast1,ap,ast2', Fstop1, Fpass1, ...
  19. Fpass2, Fstop2, Astop1, Apass, Astop2);
  20. Hd = design(h, 'kaiserwin');
  21. b = Hd.Numerator;
  22. %group delay
  23. [a,f] = grpdelay(b,1,nyq,eegFS);
  24. k = f >= lcut & f <= hcut;
  25. gd = fix(mean(a(k)));