<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: filterTimeSeries output varied if the Timesteps change?</title>
		<link>http://www.k-wave.org/forum/topic/filtertimeseries-output-varied-if-the-timesteps-change</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:20:09 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/filtertimeseries-output-varied-if-the-timesteps-change" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "filterTimeSeries output varied if the Timesteps change?"</title>
			<link>http://www.k-wave.org/forum/topic/filtertimeseries-output-varied-if-the-timesteps-change#post-7086</link>
			<pubDate>Fri, 18 Oct 2019 19:51:15 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7086@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Dirk,&#60;/p&#62;
&#60;p&#62;I've created a minimum working example:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;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, &#38;#39;LowPass&#38;#39;, &#38;#39;Plot&#38;#39;, true);

% plot
figure;
plot(source_p);
hold on;
plot(source_filt);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If you set &#60;code&#62;sc = 1&#60;/code&#62;, you get the expected behaviour. If you set &#60;code&#62;sc = 30&#60;/code&#62;, the signal amplitude is reduced similar to what you report. (Note, &#60;code&#62;filterTimeSeries&#60;/code&#62; uses &#60;code&#62;applyFilter&#60;/code&#62;).&#60;/p&#62;
&#60;p&#62;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:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;source_filt = applyFilter(source_p, 1/kgrid.dt, f_max, &#38;#39;LowPass&#38;#39;, &#38;#39;Plot&#38;#39;, true, &#38;#39;TransitionWidth&#38;#39;, 0.1 / sc);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;There is a more general point about whether this is intuitive behaviour of course!&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dbuender on "filterTimeSeries output varied if the Timesteps change?"</title>
			<link>http://www.k-wave.org/forum/topic/filtertimeseries-output-varied-if-the-timesteps-change#post-7048</link>
			<pubDate>Fri, 13 Sep 2019 13:32:00 +0000</pubDate>
			<dc:creator>dbuender</dc:creator>
			<guid isPermaLink="false">7048@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi, &#60;/p&#62;
&#60;p&#62;I am  not sure if i use somthing wrong, but in the example &#34;Diffraction Through A Slit Example&#34;, when the timestep dt drops I encounter a drop in the amplitude of the source. This occurs after the line 129 (&#60;code&#62;source.p = filterTimeSeries(kgrid, medium, source.p);&#60;/code&#62;)&#60;/p&#62;
&#60;p&#62;As far as i understood filterTimeSeries schould only effekt Signals witch are consist of frequencies higher or near the maximum supported frequency.&#60;/p&#62;
&#60;p&#62;Kind regards&#60;br /&#62;
Dirk
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
