Index: /trunk/src/get_file_info.m
===================================================================
--- /trunk/src/get_file_info.m	(revision 1169)
+++ /trunk/src/get_file_info.m	(revision 1170)
@@ -127,4 +127,14 @@
         FileInfo.BitDepth=BitmapInfoHeader.biBitCount;
         FileInfo.TimeName='video';
+    case '.hcc'
+        %cd 'TelopsToolbox_20230707(r20340)'
+         installToolboxIRCAM
+        [~,InfoArray]=readIRCam(fileinput,'HeadersOnly',true);
+         FileInfo.FileType='telopsIR';
+         FileInfo.Height=InfoArray(1).Height;
+         FileInfo.Width=InfoArray(1).Width;
+         FileInfo.FrameRate=InfoArray(1).AcquisitionFrameRate;
+         FileInfo.NumberOfFrames=numel(InfoArray);
+         FileInfo.TimeName='video';
     otherwise
         if ~isempty(FileExt)% exclude empty extension
@@ -253,5 +263,5 @@
 FileInfo.FieldType=FileInfo.FileType;%default
 switch FileInfo.FileType
-    case {'image','multimage','video','mmreader','rdvision','image_DaVis','cine_phantom'}
+    case {'image','multimage','video','mmreader','rdvision','image_DaVis','cine_phantom','telopsIR'}
         FileInfo.FieldType='image';
     case {'civx','civdata','pivdata_fluidimage'}
Index: /trunk/src/installToolboxIRCAM.m
===================================================================
--- /trunk/src/installToolboxIRCAM.m	(revision 1170)
+++ /trunk/src/installToolboxIRCAM.m	(revision 1170)
@@ -0,0 +1,58 @@
+function installToolbox
+% configure MATLAB paths for the Telops Toolbox.
+%   installToolbox
+%
+%   Drop this file into MATLAB command line window. It will configure the 
+%   required paths to run with the Telops Toolbox.
+
+% moveright Telops 2009
+% $Revision: 9106 $
+% $Author: ssavary $
+% $LastChangedDate: 2014-11-03 14:16:48 -0500 (lun., 03 nov. 2014) $
+if ~exist('readIRCam.p','file')
+    if ~exist('Library_IRCAM','dir')
+        unzip('Library_IRCAM.zip')
+        disp('Library_IRCAM created')
+    end
+    root = fileparts(mfilename('fullpath'));
+    
+    D = [{root}; extractSubTree(root)];
+    
+    v2007_exceptions = {'GUILayout'};
+    exceptions = {'Documentation', 'ReleasePackages'};
+    
+    disp('installToolbox: Installing Toolbox...')
+    disp('installToolbox: Adding directories to the MATLAB path:')
+    
+    V = ver('matlab');
+    for ii=1:length(D)
+        if ~isempty(V) && (str2double(V.Version(1)) == 7 && str2double(V.Version(3:end)) < 10) && ...
+                any(arrayfun(@(x)~isempty(strfind(D{ii},x{1})), v2007_exceptions)) || ...
+                any(arrayfun(@(x)~isempty(strfind(D{ii},x{1})), exceptions)) || ...
+                any(D{ii} == '+')
+        else
+            disp(['path ' D{ii} ' added'])
+            addpath(D{ii})
+        end
+    end
+    
+    disp('installToolbox: Installation complete.')
+end
+
+
+function D = extractSubTree(root)
+% Recursively build the list of subdirectories under 'root'.
+%   extractSubTree
+%
+
+DD = dir(root);
+
+idx = find([DD.isdir]);
+D = [];
+for ii=idx
+    if  strncmp(DD(ii).name,'.',1)==0 && isempty(strfind(DD(ii).name,'@')) &&  isempty(strfind(DD(ii).name,'private'))
+        % skip '.', '..', and invisible folders
+        subdir = fullfile(root, DD(ii).name);
+        D = [D; {subdir}; extractSubTree(subdir)]; %#ok<AGROW>
+    end
+end
Index: /trunk/src/read_field.m
===================================================================
--- /trunk/src/read_field.m	(revision 1169)
+++ /trunk/src/read_field.m	(revision 1170)
@@ -239,4 +239,8 @@
             A=read(ParamOut,frame_index);
         end
+    case 'telopsIR'
+         [A,Header]=readIRCam(FileName,'Frames',frame_index);
+         A=(reshape(A,Header(1).Width,Header(1).Height))';
+         A=flip(A,1);
     case 'mmreader'
         if isa(ParamIn,'mmreader')
Index: /trunk/src/read_image.m
===================================================================
--- /trunk/src/read_image.m	(revision 1169)
+++ /trunk/src/read_image.m	(revision 1170)
@@ -79,3 +79,7 @@
         A=Input.Frames{num}.Components{1}.Planes{1}';
                 end
+    case 'telopsIR'     
+        [A,Header]=readIRCam(FileName,'Frames',num);
+         A=(reshape(A,Header(1).Width,Header(1).Height))';
+         A=flip(A,1);
 end
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 1169)
+++ /trunk/src/series.m	(revision 1170)
@@ -140,11 +140,11 @@
 end
 if exist(xmlfile,'file')
-    SeriesData.SeriesParam=xml2struct(xmlfile);
-    if ~(isfield(SeriesData.SeriesParam,'ClusterParam')&& isfield(SeriesData.SeriesParam.ClusterParam,'LaunchCmdFcn'))
+    SeriesData=xml2struct(xmlfile);
+    if ~(isfield(SeriesData,'ClusterParam')&& isfield(SeriesData.ClusterParam,'LaunchCmdFcn'))
         [success,message]=copyfile(xmlfile,fullfile(path_series,'series_old.xml'));% update the file series.xml inot correctly documented
         delete(xmlfile);
         [success,message]=copyfile(fullfile(path_series,'series.xml.default'),xmlfile);
     end
-    SeriesData.SeriesParam=xml2struct(xmlfile);
+    SeriesData=xml2struct(xmlfile);
 end
 
@@ -160,5 +160,10 @@
 ActionPathList(:)={path_series_fct}; % set the default path to series fcts to all list members
 RunModeList={'local';'background'}; % default choice of extensions (Matlab fct .m or compiled version .sh)
-[s,w]=system(SeriesData.SeriesParam.ClusterParam.ExistenceTest); % look for cluster system presence
+if isfield(SeriesData.ClusterParam.ExistenceTest,'Text')
+    oarcommand=SeriesData.ClusterParam.ExistenceTest.Text;
+else
+    oarcommand=SeriesData.ClusterParam.ExistenceTest;
+end
+[s,w]=system(oarcommand); % look for cluster system presence
 if isequal(s,0)
     RunModeList=[RunModeList;{'cluster'}];
@@ -1533,6 +1538,6 @@
 %     case 'cluster'
 %         %proposed number of cores to reserve in the cluster
-%         NbCoreAdvised=SeriesData.SeriesParam.ClusterParam.NbCoreAdvised;
-%         NbCoreMax=min(NbProcess,SeriesData.SeriesParam.ClusterParam.NbCoreMax);
+%         NbCoreAdvised=SeriesData.ClusterParam.NbCoreAdvised;
+%         NbCoreMax=min(NbProcess,SeriesData.ClusterParam.NbCoreMax);
 %         if NbCoreMax~=1
 %             if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
@@ -1824,6 +1829,6 @@
                 Param.Action.CPUTime=CPUTime;
             end
-            JobNumberMax=SeriesData.SeriesParam.ClusterParam.JobNumberMax;
-            JobCPUTimeAdvised=SeriesData.SeriesParam.ClusterParam.JobCPUTimeAdvised;
+            JobNumberMax=SeriesData.ClusterParam.JobNumberMax;
+            JobCPUTimeAdvised=SeriesData.ClusterParam.JobCPUTimeAdvised;
             if isempty(Param.IndexRange.NbSlice)% if NbSlice is not defined
                 BlockLength= ceil(JobCPUTimeAdvised/(CPUTime*nbfield_j)); % iterations are grouped in sets with length BlockLength  such that the typical CPU time of a job is JobCPUTimeAdvised.
@@ -1835,6 +1840,6 @@
 
             %         %proposed number of cores to reserve in the cluster
-            NbCoreAdvised=SeriesData.SeriesParam.ClusterParam.NbCoreAdvised;
-            NbCoreMax=min(NbProcess,SeriesData.SeriesParam.ClusterParam.NbCoreMax);% reduces the number of cores if it exceeds the number of processes
+            NbCoreAdvised=SeriesData.ClusterParam.NbCoreAdvised;
+            NbCoreMax=min(NbProcess,SeriesData.ClusterParam.NbCoreMax);% reduces the number of cores if it exceeds the number of processes
             if NbCoreMax~=1
                 if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
@@ -2101,5 +2106,5 @@
             end
             CPUTimeProcess=CPUTime*BlockLength*nbfield_j; % estimated CPU time for one individual process (in minutes)
-            LaunchCmdFcn=SeriesData.SeriesParam.ClusterParam.LaunchCmdFcn;% command obtained from the function 
+            LaunchCmdFcn=SeriesData.ClusterParam.LaunchCmdFcn;% command obtained from the function 
             oar_command=feval(LaunchCmdFcn,ListProcess,ActionFullName,DirLog,NbProcess, NbCore,CPUTimeProcess)
             [status,result]=system(oar_command)% execute system command and show the result (ID number of the launched job) on the Matlab command window
@@ -2632,29 +2637,4 @@
     end
 end
-
-% status_j='on'; % default
-% if isfield(SeriesData,'j1_series') && isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)) % case of empty j indices
-%     status_j='off'; % no j index needed
-% elseif strcmp(get(handles.PairString,'Visible'),'on')
-%     check_burst=cellfun(@isempty,regexp(get(handles.PairString,'Data'),'^j')); % =0 for burst case, 1 otherwise
-%     if isempty(find(check_burst, 1))% if all pair string begins by j (burst)
-%         status_j='off'; % no j index needed for bust case
-%     end
-% end
-% enable_j(handles,status_j) % no j index needed
-% if isfield(ParamOut,'j_index_1')&& isfield(ParamOut,'j_index_2')%strcmp(ParamOut.Desable_j_index,'on')
-%     %status_j='off';
-%     set(handles.num_first_j,'String',num2str(ParamOut.j_index_1))
-%     set(handles.num_last_j,'String',num2str(ParamOut.j_index_2))
-%     % set(handles.num_first_j,'enable','off')
-%     % set(handles.num_last_j,'enable','off')
-%     set(handles.num_first_j,'visible','off')
-%     set(handles.num_last_j,'visible','off')
-%     set(handles.num_incr_j,'visible','off')
-% else
-%     set(handles.num_first_j,'visible','on')
-%     set(handles.num_last_j,'visible','on')
-%     set(handles.num_incr_j,'visible',status_j)
-% end
 
 %% NbSlice visibility
@@ -3963,5 +3943,5 @@
 function DiskQuota_Callback(hObject, eventdata, handles)
 SeriesData=get(handles.series,'UserData');
-system(SeriesData.SeriesParam.DiskQuotaCmd)
+system(SeriesData.DiskQuotaCmd)
 
 
Index: /trunk/src/series/civ_input.m
===================================================================
--- /trunk/src/series/civ_input.m	(revision 1169)
+++ /trunk/src/series/civ_input.m	(revision 1170)
@@ -877,5 +877,11 @@
 ref_j=[];
 if isequal(mode_selected,'pair j1-j2')%|isequal(mode,'st_pair j1-j2')
-    ref_j=0;
+     ref_j=0;
+    MinIndex_j=str2num(get(handles.MinIndex_j,'String'));
+        MaxIndex_j=str2num(get(handles.MaxIndex_j,'String'));
+        if MaxIndex_j-MinIndex_j>10
+            mode_selected= 'series(Dj)';
+           ref_j= str2double(get(handles.ref_j,'String'));
+        end
 elseif strcmp(get(handles.ref_j,'Visible'),'on')
     ref_j=str2double(get(handles.ref_j,'String'));
@@ -935,6 +941,10 @@
         end
     case 'pair j1-j2'%case of pairs
-        MinIndex_j=str2num(get(handles.MinIndex_j,'String'));
-        MaxIndex_j=str2num(get(handles.MaxIndex_j,'String'));
+%         MinIndex_j=str2num(get(handles.MinIndex_j,'String'));
+%         MaxIndex_j=str2num(get(handles.MaxIndex_j,'String'));
+%         if MaxIndex_j-MinIndex_j>10
+%             disp('too many pairs, switch to mode series(Dj)')
+%             return
+%         end
         index_pair=0;
         %get all the Time intervals in bursts
Index: /trunk/src/series/civ_series.m
===================================================================
--- /trunk/src/series/civ_series.m	(revision 1169)
+++ /trunk/src/series/civ_series.m	(revision 1170)
@@ -73,5 +73,5 @@
     Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
     Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
-    if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices') && strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
+    if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices') && isequal(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
         Data.IndexRange_j='off';%no j index display in series
     else
@@ -346,7 +346,10 @@
                     [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A);
                     FileType_A=FileInfo_A.FileType;
-                    if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom'}), 1))% case of video input
-                        Time=zeros(FileInfo_A.NumberOfFrames+1,2);
+                    if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video input
+                        Time=zeros(FileInfo_A.NumberOfFrames+1,2);                  
                         Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
+                           if ~isempty(j1_series_Civ1) && j1_series_Civ1~=1
+                               Time=Time';
+                           end
                     end
                     if ~isempty(FileType_A) && isempty(Time)% Time = index i +0.001 index j by default
