<?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: Time between saving steps</title>
		<link>http://www.k-wave.org/forum/topic/time-between-saving-steps</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 22:32:12 +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/time-between-saving-steps" rel="self" type="application/rss+xml" />

		<item>
			<title>Dominique on "Time between saving steps"</title>
			<link>http://www.k-wave.org/forum/topic/time-between-saving-steps#post-9206</link>
			<pubDate>Thu, 10 Apr 2025 08:59:08 +0000</pubDate>
			<dc:creator>Dominique</dc:creator>
			<guid isPermaLink="false">9206@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;This topic remains pertinent today: I'm required to execute an extensive 2D simulation, yet the storage demands for sensor_data are restricting my progress since it records data at every time step.&#60;/p&#62;
&#60;p&#62;The solution suggested here is effective; however, I'm apprehensive that similar modifications might be needed in the C++ source code to avoid having to choose between computational speed and excessive RAM usage.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Time between saving steps"</title>
			<link>http://www.k-wave.org/forum/topic/time-between-saving-steps#post-3881</link>
			<pubDate>Mon, 26 Aug 2013 17:02:46 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3881@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Glad you got it to work, and thanks for posting your code!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ouelletn on "Time between saving steps"</title>
			<link>http://www.k-wave.org/forum/topic/time-between-saving-steps#post-3879</link>
			<pubDate>Mon, 26 Aug 2013 14:30:22 +0000</pubDate>
			<dc:creator>ouelletn</dc:creator>
			<guid isPermaLink="false">3879@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I have posted the changes I made below, in case anyone else needs to implement this.&#60;br /&#62;
I changed kspaceFirstOrder2D line 886 to add the further condition&#60;br /&#62;
&#60;code&#62;&#38;amp;&#38;amp; mod(t_index,save_step)==0&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and line 891 to&#60;br /&#62;
&#60;code&#62;file_index = floor(t_index/save_step) - sensor.record_start_index + 1&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I changed line 73 of /private/kspaceFirstOrder_createStorageVariables&#60;br /&#62;
&#60;code&#62;num_recorded_time_points = floor(kgrid.Nt/save_step) - sensor.record_start_index + 1;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;the final change I made was to add the input option using 'SaveFreq' to input_args by adding the following after line 739&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;case &#38;#39;SaveFreq&#38;#39;
   save_step = varargin{input_index + 1};&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;also, thanks for the help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Time between saving steps"</title>
			<link>http://www.k-wave.org/forum/topic/time-between-saving-steps#post-3826</link>
			<pubDate>Thu, 25 Jul 2013 18:57:30 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3826@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;In the current code there is no way to only store the data at some of the time steps. However, that would be relatively easy to implement. For example, in the 3D MATLAB code, on line 979 change&#60;/p&#62;
&#60;p&#62;&#60;code&#62;(t_index &#38;gt;= sensor.record_start_index)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;to &#60;/p&#62;
&#60;p&#62;&#60;code&#62;(rem(t_index, save_step) == 0)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;where &#60;code&#62;save_step&#60;/code&#62; is an integer which defines how often you want to save the data. Note that this modification would also need some changes to how &#60;code&#62;num_recorded_time_points&#60;/code&#62; is defined in &#60;code&#62;/private/kspaceFirstOrder_createStorageVariables&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;It is currently possible to set when the recording starts by defining &#60;code&#62;sensor.record_start_index&#60;/code&#62;. This is useful if you're only interested in storing the wave-field after it reaches steady state (for example).&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ouelletn on "Time between saving steps"</title>
			<link>http://www.k-wave.org/forum/topic/time-between-saving-steps#post-3820</link>
			<pubDate>Thu, 25 Jul 2013 16:03:07 +0000</pubDate>
			<dc:creator>ouelletn</dc:creator>
			<guid isPermaLink="false">3820@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;it appears that I have miscalculated that time step, although the question about storing data at intervals still stands, thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ouelletn on "Time between saving steps"</title>
			<link>http://www.k-wave.org/forum/topic/time-between-saving-steps#post-3819</link>
			<pubDate>Thu, 25 Jul 2013 15:26:30 +0000</pubDate>
			<dc:creator>ouelletn</dc:creator>
			<guid isPermaLink="false">3819@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Based on calculations from the K-wave manual the simulation I am running requires an incredibly small time step to remain stable and prevent phase error(~e-11), I am currently having issues storing the matrix of transmit receive values and cannot find a way to store the values at certain time intervals, eg every 500 steps, in the k-wave code and documentation, I was wondering if one is available?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
