Hi Dirk,
I've created a minimum working example:
clearvars;
close all;
% spatial grid properties
dx = 0.5e-3;
Nx = 500;
c0 = 1500;
% temporal grid
sc = 1;
dt = 0.3 * dx / c0 / sc;
Nt = 200 * sc;
% create grid
kgrid = kWaveGrid(Nx, dx);
kgrid.setTime(Nt, dt);
medium.sound_speed = c0;
% create source
f_max = medium.sound_speed / (2 * kgrid.dx);
source_freq = f_max / 2;
source_p = sin(2 * pi * source_freq * kgrid.t_array);
% apply filter
source_filt = applyFilter(source_p, 1/kgrid.dt, f_max, 'LowPass', 'Plot', true);
% plot
figure;
plot(source_p);
hold on;
plot(source_filt);
If you set sc = 1
, you get the expected behaviour. If you set sc = 30
, the signal amplitude is reduced similar to what you report. (Note, filterTimeSeries
uses applyFilter
).
The problem is that the filter transition width is set as a proportion of the sampling frequency. If you also reduce this relative to the increase in sampling frequency, everything is as it should be:
source_filt = applyFilter(source_p, 1/kgrid.dt, f_max, 'LowPass', 'Plot', true, 'TransitionWidth', 0.1 / sc);
There is a more general point about whether this is intuitive behaviour of course!
Brad.