0001 function hxrexp = iluke_hxrexpimport(external)
0002
0003 hxrexp = '';
0004
0005 if isfield(external,'ap') && isfield(external,'data'),
0006
0007 nt = length(external.time);
0008 nk = size(external.hxr.kdiag_hxr,2) - 1;
0009 nc = external.ap.nc;
0010
0011 hxrexp.data = NaN(nt,nk,nc);
0012
0013
0014
0015 mask = external.ap.chords_abs{external.ap.cams(2)}(1):nc;
0016 ncm = length(mask);
0017
0018 hxrexp.data(:,:,mask) = permute(reshape(external.data,ncm,nk,nt),[3 2 1]);
0019 hxrexp.time = external.time;
0020 hxrexp.energy = external.hxr.kdiag_hxr(1,1:(end-1));
0021
0022 end
0023
0024
0025