Changeset 1172


Ignore:
Timestamp:
Feb 24, 2025, 7:49:59 PM (3 weeks ago)
Author:
sommeria
Message:

bug add points geometry_calib repaired

Location:
trunk/src
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified 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%=====================================================================
    213% Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
    314%   http://www.legi.grenoble-inp.fr
  • TabularUnified trunk/src/mouse_down.m

    r1127 r1172  
    493493        h_ListCoord=hh_geometry_calib.ListCoord; %findobj(h_geometry_calib,'Tag','ListCoord');
    494494        Coord=get(h_ListCoord,'Data');
     495        Coord=Coord(:,1:6);
    495496        %data=read_geometry_calib(Coord);%transform char cell to numbers
    496497        xlim=get(haxes,'XLim');
  • TabularUnified trunk/src/series/sub_background.m

    r1128 r1172  
    229229NomType=Param.InputTable(:,4);
    230230FileExt=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
    234233%%%%%%%%%%%%
    235234    % The cell array filecell is the list of input file names, while
     
    280279    step=nbfield_j;%case of bursts: the sliding background is shifted by the length of one burst
    281280    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 adjustement
    284281    nbfield_series=nbfield_i*nbfield_j;
    285282end
     
    314311end
    315312
    316 
    317 %%%%%%%  LOOP ON SLICES FOR VOLUME SCAN %%%%%%%
    318 for j_slice=1:NbSlice_j
     313%selection of frame indices
     314if 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;
     319else
     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
     326end
     327
     328%%%%%%%  LOOP ON SLICES %%%%%%%
     329for j_slice=1:NbSlice
    319330    %% select the series of i indices to process
    320     indselect=j_slice:step*NbSlice_j:nbfield;% select file indices of the slice
    321     for ifield=1:step-1
    322         indselect=[indselect;indselect(end,:)+NbSlice_j];
    323     end
     331 %   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
    324335   
    325336    %% read the first series of nbaver_ima images and sort by luminosity at each pixel
    326337    for ifield = 1:nbaver_ima
    327         ifile=indselect(ifield);
     338        ifile=indselect(jslice,ifield);
    328339        filename=filecell{1,ifile};
    329340        Aread=read_image(filename,FileType{1},MovieObject{1},frame_index{1}(ifile));
     
    341352        Acor=double(Ak(:,:,ifield))-double(B);%substract background to the current image
    342353        Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor
    343         ifile=indselect(ifield);
     354        ifile=indselect(jslice,ifield);
    344355        j1=1;
    345356        if ~isempty(j1_series{1})
     
    381392            %incorporate next burst in the current image series
    382393            for iburst=1:step
    383                 ifile=indselect(ifield+iburst+step*halfnbaver);
     394                ifile=indselect(jslice,ifield+iburst+step*halfnbaver);
    384395                j1=1;
    385396                if ~isempty(j1_series{1})
     
    400411                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
    401412                Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor
    402                 ifile=indselect(ifield+iburst);
     413                ifile=indselect(jslice,ifield+iburst);
    403414                if ~isempty(j1_series{1})
    404415                    j1=j1_series{1}(ifile);
     
    428439        Acor=double(Ak(:,:,ifield-nbfield_series+step*(2*halfnbaver+1)))-double(B);
    429440        Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor
    430         ifile=indselect(ifield);
     441        ifile=indselect(jslice,ifield);
    431442        if ~isempty(j1_series{1})
    432443            j1=j1_series{1}(ifile);
Note: See TracChangeset for help on using the changeset viewer.