Hi,
I am using :
t0 = 120 * kgrid.dt / 2;
r = c0*( (1:length(kgrid.t_array)) * kgrid.dt / 2 - t0); % [m]
% create time gain compensation function based on attenuation value,
% transmit frequency, and round trip distance
tgc_alpha = 0.48; % [dB/(MHz cm)]
tgc = exp(2 * tgc_alpha * 5e6 / 1e6 * r *100);
% apply the time gain compensation to each of the scan lines
scan_lines2 = bsxfun(@times, tgc, transducer_data);
for time gain compensation of single Plane-wave.
120 is the length of my input signal, and the center frequency is 5e6 Hz, attenuation was 0.5 dB/MHz cm while simulating the raw data. I have a single plane wave and I do time compensation before cutting the near transducer signal (transmit pulse).
The result of this looks strange, it seems that the signal from end of the medium is extremely amplified. As the result the b-mode image is also looks quite disturbed. The effect is so high that I can not even afterwards normalize the data so I end up with quite large values.
The question is that whether this formula can be applied for plane-waves as well? Am I setting any parameter wrong here?
Best,