<?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: Frequency Spectrum of Point Source in 3D</title>
		<link>http://www.k-wave.org/forum/topic/frequency-spectrum-of-point-source-in-3d</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:48:27 +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/frequency-spectrum-of-point-source-in-3d" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Frequency Spectrum of Point Source in 3D"</title>
			<link>http://www.k-wave.org/forum/topic/frequency-spectrum-of-point-source-in-3d#post-7415</link>
			<pubDate>Sat, 18 Apr 2020 11:07:01 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7415@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi punnoj2,&#60;/p&#62;
&#60;p&#62;The frequency response of a point source in 1D emitting a delta function will be the Fourier transform of the delta function - so perfectly broadband. For a point source in 3D it will be the FT of the derivative of the delta function, so multiplied by I\omega, so you should see a ramp-type frequency response.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>punnoj2 on "Frequency Spectrum of Point Source in 3D"</title>
			<link>http://www.k-wave.org/forum/topic/frequency-spectrum-of-point-source-in-3d#post-7368</link>
			<pubDate>Sun, 05 Apr 2020 00:00:13 +0000</pubDate>
			<dc:creator>punnoj2</dc:creator>
			<guid isPermaLink="false">7368@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am trying to simulate a point source in 3D. I started by simply modifying the file example_na_source_smoothing.m to go from a 1D to a 3D model. After only changing the grid for source and sensor positions from 1D to 3D,  I'm finding that I don't get the flat frequency spectrum that is demonstrated in the 1D example. Is there something that I'm doing wrong?&#60;/p&#62;
&#60;p&#62;Code Excerpt:&#60;br /&#62;
% create the computational grid&#60;br /&#62;
Nx = 100;                   % number of grid points&#60;br /&#62;
dx = 0.05e-3; % grid point spacing [m]&#60;br /&#62;
Ny = 100;&#60;br /&#62;
Nz = 100;&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dx, Nz, dx);&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1500;  % [m/s]&#60;/p&#62;
&#60;p&#62;% define time array&#60;br /&#62;
dt = 2e-9;                  % [s]&#60;br /&#62;
t_end = 4.26e-6;            % [s]&#60;br /&#62;
Nt = round(t_end / dt) + 1;&#60;br /&#62;
kgrid.setTime(Nt, dt);&#60;/p&#62;
&#60;p&#62;% define the position of the source and sensor&#60;br /&#62;
source_sensor_dist = 1e-6;  % [s]&#60;br /&#62;
source_pos = [Nx/2,Ny/2,Nz/2];&#60;br /&#62;
sensor_pos = source_pos + [0,0,round(medium.sound_speed * source_sensor_dist / dx)];&#60;/p&#62;
&#60;p&#62;% create a binary sensor mask&#60;br /&#62;
sensor.mask = zeros(Nx,Ny,Nz);&#60;br /&#62;
sensor.mask(sensor_pos(1),sensor_pos(2),sensor_pos(3)) = 1;&#60;/p&#62;
&#60;p&#62;    sensor_data = kspaceSecondOrder(kgrid, medium, source, sensor, 'Smooth', false, 'PlotSim', false);&#60;/p&#62;
&#60;p&#62;    % calculate the amplitude spectrum of the recorded signal&#60;br /&#62;
    [f, func_as] = spect(sensor_data, 1/kgrid.dt);&#60;/p&#62;
&#60;p&#62;    % plot the initial pressure distribution&#60;br /&#62;
    subplot(3, 3, (source_index * 3) - 2);&#60;br /&#62;
    plot_width = 10;&#60;br /&#62;
    stem(0:2*plot_width, source.p0(source_pos - plot_width:source_pos + plot_width), 'k');&#60;br /&#62;
    set(gca, 'XLim', [0, 2 * plot_width], 'YLim', [-0.1, 1.1]);&#60;br /&#62;
    xlabel('Sample');&#60;br /&#62;
    ylabel('Amplitude [au]');&#60;br /&#62;
    title([window_type ': Spatial Source Shape']);&#60;/p&#62;
&#60;p&#62;    % plot the recorded time signals&#60;br /&#62;
    subplot(3, 3, (source_index * 3) - 1);&#60;br /&#62;
    [~, scale, prefix] = scaleSI(kgrid.t_array(end));&#60;br /&#62;
    plot(kgrid.t_array * scale, sensor_data(1, :), 'k-');&#60;br /&#62;
    axis tight;&#60;br /&#62;
    set(gca, 'YLim', [-0.15, 0.55], 'XLim', [1, 3]);&#60;br /&#62;
    ylabel('Amplitude [au]');&#60;br /&#62;
    xlabel(['Time [' prefix 's]']);&#60;br /&#62;
    title([window_type ': Recorded Time Pulse']);&#60;/p&#62;
&#60;p&#62;    % plot the amplitude spectrum of the recorded signal&#60;br /&#62;
    subplot(3, 3, (source_index * 3));&#60;br /&#62;
    [~, scale, prefix] = scaleSI(f(end));&#60;br /&#62;
    func_as(1) = 2 * func_as(1);&#60;br /&#62;
    plot(f * scale, func_as ./ max(func_as(:)), 'k-');&#60;br /&#62;
    set(gca, 'XLim', [0, 20], 'YLim', [0, 1.05]);&#60;br /&#62;
    xlabel(['Frequency [' prefix 'Hz]']);&#60;br /&#62;
    ylabel('Relative Amplitude Spectrum');&#60;br /&#62;
    title([window_type ': Frequency Response']);
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
