- Timestamp:
- Feb 24, 2025, 7:49:59 PM (3 weeks ago)
- Location:
- trunk/src
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_file_index.m
r1127 r1172 1 %======================================================================= 1 2 %'get_file_index': determine the frame indexes from ref indices and pair option for civ 3 % [i1,i2,j1,j2] = get_file_index(ref_i,ref_j,PairString) 4 %------------------------------------------------------------------------ 5 % OUTPUT: 6 % i1,i2,j1,j2: frem indices i and j for image 1 and 2 7 % 8 % INPUT: 9 % ref_i,ref_j: reference indices set in the GUI series 10 % PairString: string defining the choice of pairing: 'Di=..','Dj=..','-' 11 12 %===================================================================== 2 13 % Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France 3 14 % http://www.legi.grenoble-inp.fr -
trunk/src/mouse_down.m
r1127 r1172 493 493 h_ListCoord=hh_geometry_calib.ListCoord; %findobj(h_geometry_calib,'Tag','ListCoord'); 494 494 Coord=get(h_ListCoord,'Data'); 495 Coord=Coord(:,1:6); 495 496 %data=read_geometry_calib(Coord);%transform char cell to numbers 496 497 xlim=get(haxes,'XLim'); -
trunk/src/series/sub_background.m
r1128 r1172 229 229 NomType=Param.InputTable(:,4); 230 230 FileExt=Param.InputTable(:,5); 231 %hdisp=disp_uvmat('WAITING...','checking the file series',checkrun); 232 [filecell,i1_series,i2_series,j1_series]=get_file_series(Param); 233 % if ~isempty(hdisp),delete(hdisp),end; 231 [filecell,i1_series,i2_series,j1_series]=get_file_series(Param);%series of file names organised as a single array 232 234 233 %%%%%%%%%%%% 235 234 % The cell array filecell is the list of input file names, while … … 280 279 step=nbfield_j;%case of bursts: the sliding background is shifted by the length of one burst 281 280 NbSlice_j=1; 282 %nbfield_i=floor(nbfield_i/NbSlice_i);%total number of indexes in a slice (adjusted to an integer number of slices)283 %nbfield=nbfield_i*NbSlice_i; %total number of fields after adjustement284 281 nbfield_series=nbfield_i*nbfield_j; 285 282 end … … 314 311 end 315 312 316 317 %%%%%%% LOOP ON SLICES FOR VOLUME SCAN %%%%%%% 318 for j_slice=1:NbSlice_j 313 %selection of frame indices 314 if Param.ActionInput.CheckVolume 315 nbfield=floor(nbfield/NbSlice_j)*NbSlice_j;% truncate the total number of frames in case of incomplete series 316 indselect=1:nbfield; 317 indselect=reshape(indselect,NbSlice_j,[]); 318 NbSlice=NbSlice_j; 319 else 320 NbSlice=NbSlice_i; 321 nbfield=floor(nbfield/NbSlice)*NbSlice;% truncate the total number of frames in case of incomplete series 322 indselect=reshape(1:nbfield,NbSlice,[]); 323 for j_slice=1:NbSlice 324 indselect(j_slice,:)=j_slice:step*NbSlice:nbfield;% select file indices of the slice 325 end 326 end 327 328 %%%%%%% LOOP ON SLICES %%%%%%% 329 for j_slice=1:NbSlice 319 330 %% select the series of i indices to process 320 indselect=j_slice:step*NbSlice_j:nbfield;% select file indices of the slice321 for ifield=1:step-1322 indselect=[indselect;indselect(end,:)+NbSlice_j];323 end331 % indselect=j_slice:step*NbSlice_j:nbfield;% select file indices of the slice 332 % for ifield=1:step-1 333 % indselect=[indselect;indselect(end,:)+NbSlice]; 334 % end 324 335 325 336 %% read the first series of nbaver_ima images and sort by luminosity at each pixel 326 337 for ifield = 1:nbaver_ima 327 ifile=indselect( ifield);338 ifile=indselect(jslice,ifield); 328 339 filename=filecell{1,ifile}; 329 340 Aread=read_image(filename,FileType{1},MovieObject{1},frame_index{1}(ifile)); … … 341 352 Acor=double(Ak(:,:,ifield))-double(B);%substract background to the current image 342 353 Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor 343 ifile=indselect( ifield);354 ifile=indselect(jslice,ifield); 344 355 j1=1; 345 356 if ~isempty(j1_series{1}) … … 381 392 %incorporate next burst in the current image series 382 393 for iburst=1:step 383 ifile=indselect( ifield+iburst+step*halfnbaver);394 ifile=indselect(jslice,ifield+iburst+step*halfnbaver); 384 395 j1=1; 385 396 if ~isempty(j1_series{1}) … … 400 411 Acor=double(Ak(:,:,step*halfnbaver+iburst))-double(B); %the current image has been already read ans stored as index step*halfnbaver+iburst in the current series 401 412 Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor 402 ifile=indselect( ifield+iburst);413 ifile=indselect(jslice,ifield+iburst); 403 414 if ~isempty(j1_series{1}) 404 415 j1=j1_series{1}(ifile); … … 428 439 Acor=double(Ak(:,:,ifield-nbfield_series+step*(2*halfnbaver+1)))-double(B); 429 440 Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor 430 ifile=indselect( ifield);441 ifile=indselect(jslice,ifield); 431 442 if ~isempty(j1_series{1}) 432 443 j1=j1_series{1}(ifile);
Note: See TracChangeset
for help on using the changeset viewer.