source: misclib/linebroad.m @ 188

Last change on this file since 188 was 17, checked in by tjniskan, 12 years ago
  • Rewrote the handling of plugins. The plugins now work without the

an2_plugins.m. Simply copy a plugin M-file into the plugins-directory
of analyze2 and they should work.

  • Rewrote the handling of 4D-arrays.
  • Restructured the analyze2 directory. Some misc functions that are

not used by analyze2 were moved into "misclib" directory.

D uiclear.m
D spectrsum.m
M analyze2.m
A misclib
A misclib/uiclear.m
A misclib/spectrsum.m
A misclib/shiftind.m
A misclib/linebroad.m
A misclib/b1_map.m
A misclib/makelcmraw.m
D b1_map.m
M an2_helpabout.m
A plugins
A plugins/calc_t1r_map.m
A plugins/show_kspace.m
A plugins/diffimage.m
A plugins/copydataroi_plugin.m
A plugins/mean_std_between_thold.m
A plugins/snapshot_plugin.m
A plugins/profile_plugin.m
A plugins/voxels_between_thold.m
D linebroad.m
D shiftind.m
D private
D an2_plugins.m
D makelcmraw.m

File size: 746 bytes
Line 
1function w_fid=linebroad(fid,at,lb)
2%line braodening for csi data set
3
4dims=size(fid);
5[np,loc]=max(dims);
6
7if length(dims)==2
8  dims(3)=1;
9end
10
11sw = np/at;
12t1 = ((1:np) .* 1/sw);
13
14if (loc == 1)   
15    for idx = 1:dims(2)
16        for idx2 = 1:dims(3)
17            fid(:,idx,idx2) = squeeze(fid(:,idx,idx2)) .* exp(-t1 .* pi * lb)';
18        end   
19    end
20end
21
22if (loc == 2)
23    for idx = 1:dims(1)
24        for idx2 = 1:dims(3)
25            fid(:,idx,idx2) = fid(:,idx,idx2) .* exp(-t1 .* pi * lb)';
26        end   
27    end
28end
29
30if (loc == 3)
31    for idx = 1:dims(1)
32        for idx2 = 1:dims(2)
33            fid(:,idx,idx2) = fid(:,idx,idx2) .* exp(-t1 .* pi * lb)';
34        end   
35    end
36end
37
38w_fid=fid;
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008