Changeset 1135 for trunk


Ignore:
Timestamp:
Apr 23, 2024, 3:03:38 PM (8 months ago)
Author:
sommeria
Message:

fct for python added

Location:
trunk/src
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/filter_tps.m

    r1127 r1135  
    44%
    55% OUTPUT:
    6 % SubRange(NbCoord,NbSubdomain,2): range (min, max) of the coordiantes x and y respectively, for each subdomain
     6% SubRange(NbCoord,2,NbSubdomain): range (min, max) of the coordinates x and y respectively, for each subdomain
    77% NbCentre(NbSubdomain): number of source points for each subdomain
    88% FF: false flags
     
    1414% INPUT:
    1515% coord=[X Y]: matrix whose first column is the x coordinates of the initial data, the second column the y coordiantes
    16 % U,V: set of velocity components of the initial data
     16% U,V, possibly W: set of velocity components of the initial data
     17% SubdomainSize: estimated number of data points in each subdomain
    1718% Rho: smoothing parameter
    1819% Threshold: max diff accepted between smoothed and initial data
    19 % Subdomain: estimated number of data points in each subdomain
     20
    2021
    2122%=======================================================================
  • trunk/src/proj_field.m

    r1127 r1135  
    938938                        vec_B(ind_out)=zeros(size(ind_out));
    939939                        A_out=reshape(vec_B,npY,npX);
    940                         ProjData.(FieldData.ListVarName{ivar}) =sum(A_out,1)/npY;
     940                      %  ProjData.(FieldData.ListVarName{ivar}) =sum(A_out,1)/npY;
     941                      ProjData.(FieldData.ListVarName{ivar}) =mean(A_out,1,'omitnan');
    941942                    elseif nbcolor==3
    942943                        vec_B(ind_in,1:3)=vec_A(ICOMB,:);
  • trunk/src/read_civdata.m

    r1127 r1135  
    3232% FileName: file name (string).
    3333% FieldNames =cell of field names to get, which can contain the strings:
    34 %             'ima_cor': image correlation, vec_c or vec2_C
    35 %             'vort','div','strain': requires velocity derivatives DUDX...
    36 %             'error': error estimate (vec_E or vec2_E)
    37 %             
     34% 'U','V','norm(U,V)','curl(U,V)','div(U,V)','strain(U,V)'
    3835% VelType : character string indicating the types of velocity fields to read ('civ1','civ2'...)
    3936%            if vel_type=[] or'*', a  priority choice, given by vel_type_out{1,2}, is done depending
     
    6865    VelType='';
    6966end
    70 if isequal(VelType,'*')
     67if isempty(VelType)||strcmp(VelType,'*')
    7168    VelType='';
    7269end
    73 if isempty(VelType)
    74     VelType='';
    75 end
    7670if ~exist('FieldNames','var')
    77     FieldNames=[]; %default
     71    FieldNames={}; %default
    7872end
    7973Field=[];
     
    194188
    195189%% default input values
    196 if ~exist('vel_type','var'),vel_type='';end;
    197 if iscell(vel_type),vel_type=vel_type{1}; end;%transform cell to string if needed
     190if ~exist('vel_type','var'),vel_type='';end
     191if iscell(vel_type),vel_type=vel_type{1}; end%transform cell to string if needed
    198192errormsg='';
    199193
  • trunk/src/series.m

    r1134 r1135  
    156156[path_series,name,ext]=fileparts(which('series')); % path to the GUI series
    157157path_series_fct=fullfile(path_series,'series'); % path of the functions in subdirectroy 'series'
    158 command = ['LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | pyp "l = x.split('':''); l = [s for s in l if ''matlab'' not in s]; print('':''.join(l))") ' ...
    159             'python -c "import fluidimage"'];
    160 [code, ~] = system(command);
    161 if code==0
     158% % command = ['LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | pyp "l = x.split('':''); l = [s for s in l if ''matlab'' not in s]; print('':''.join(l))") ' ...
     159% %             'python -c "import fluidimage"'];
     160% % [code, ~] = system(command);
     161% % if code==0
    162162    ActionExtList={'.m';'.sh';'.py (in dev.)'}; % default choice of extensions (Matlab fct .m or compiled version .sh
    163 else
    164     ActionExtList={'.m';'.sh'};  % python options not installed
    165 end
     163% % else
     164% %     ActionExtList={'.m';'.sh'};  % python options not installed
     165% % end
    166166ActionPathList=cell(NbBuiltinAction,1); % initiate the cell matrix of Action fct paths
    167167ActionPathList(:)={path_series_fct}; % set the default path to series fcts to all list members
     
    22942294            msgbox_uvmat('CONFIRMATION',[num2str(currJobIndex-1) ' jobs launched on queue ' qstat_Queue '.'])
    22952295        case 'python'
    2296             command = ['LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | pyp "l = x.split('':''); l = [s for s in l if ''matlab'' not in s]; print('':''.join(l))") ' ...
    2297                 'python -m fluidimage.run_from_xml ' filexml{iprocess}];
     2296            ActionName='fluidimage.run_from_xml';% name of the function to launch
     2297             command = command_launch_python('','',ActionName,filexml{iprocess});
     2298            % ['LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | pyp "l = x.split('':''); l = [s for s in l if ''matlab'' not in s]; print('':''.join(l))") ' ...
     2299            %     'python -m fluidimage.run_from_xml ' filexml{iprocess}];
    22982300            fprintf(['command:\n' command '\n\n'])
    2299             system(command, '-echo');
     2301            errorcheck=system(command, '-echo')
    23002302    end
    23012303    if exist(OutputDir,'dir')
  • trunk/src/series/merge_proj.m

    r1134 r1135  
    6868    ParamOut.FieldTransform = 'on';%can use a transform function
    6969    %%%%% list of possible transform functions (needed only for compilation)
    70         ListTransform={'phys','phys_polar','sub_field'};%list of possible transform functions (needed only for compilation)
    71         if 0==1 %never satisfied but trigger compilation with the appropriate transform functions
     70%         ListTransform={'phys','phys_polar','sub_field'};%list of possible transform functions (needed only for compilation)
     71        % if 0==1 %never satisfied but trigger compilation with the appropriate transform functions
     72        %     phys
     73        %     phys_polar
     74        %     sub_field
     75        try
    7276            for ilist=1:numel(ListTransform)
    73                 eval(ListTransform)
    74             end
    75         end
     77                eval(ListTransform{ilist})
     78            end
     79        end
     80
    7681    ParamOut.TransformPath=fullfile(fileparts(which('uvmat')),'transform_field');% path to transform functions
    7782    %%%%%%%%
     
    319324        if ~isempty(transform_fct)
    320325            checksub=nargin(transform_fct);
    321             if checksub==2
     326            if checksub>=2
    322327                Data{iview}=transform_fct(Data{iview},XmlData{iview});
    323328            elseif checksub==1
     
    351356
    352357    %% merge the NbView fields
    353     if checksub<=2
     358%     if checksub<=2
    354359        [MergeData,errormsg]=merge_field(Data);%concatene all the input field series by fct merge_data
    355     elseif checksub==3
    356         MergeData=transform_fct(Data{1},XmlData{1},Data{2}); %combine the two input file series
    357     else
    358         MergeData=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});%combine the two input file series with calibration parameters
    359     end
     360%     elseif checksub==3
     361%         MergeData=transform_fct(Data{1},XmlData{1},Data{2}); %combine the two input file series
     362%     else
     363%         MergeData=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});%combine the two input file series with calibration parameters
     364%     end
    360365    if ~isempty(errormsg)
    361366        disp_uvmat('ERROR',errormsg,checkrun);
Note: See TracChangeset for help on using the changeset viewer.