Changeset 664


Ignore:
Timestamp:
Jun 25, 2018 4:51:18 PM (4 years ago)
Author:
ilavsky
Message:

Fixed Unified fit Analyze Uncertainty error on Igor 8.

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/User Procedures/Irena/IR1_FormFactors.ipf

    r663 r664  
    19591959        DoWindow HelpForUserFF
    19601960        if(!V_Flag)
    1961                 NewNotebook/K=3/N=$nb/F=1/V=1/K=0/W=(221.25,52.25,712.5,530) as "HowToUseUserFF"
     1961                NewNotebook/K=1/N=$nb/F=1/V=1/K=0/W=(221.25,52.25,812.5,830) as "HowToUseUserFF"
    19621962                Notebook $nb defaultTab=36, statusWidth=238, pageMargins={72,72,72,72}
    19631963                Notebook $nb showRuler=1, rulerUnits=1, updating={1, 60}
     
    19651965                Notebook $nb ruler=Normal, fSize=12, fStyle=1, text="How to use \"User\" form factor\r"
    19661966                Notebook $nb fSize=-1, fStyle=-1, text="\r"
     1967                Notebook $nb text="User contributed form factors you can use are now available on Github:\r"
     1968                Notebook $nb fStyle=4, textRGB=(0,0,65535)
     1969                Notebook $nb text="https://github.com/jilavsky/SAXS_IgorCode/tree/master/User%20form%20factors%20for%20Irena\r"
     1970                Notebook $nb fStyle=-1, textRGB=(0,0,0), text="\r"
     1971                Notebook $nb text="\r"
    19671972                Notebook $nb text="To use \"User\" form factor you will need to supply two functions:\r"
    19681973                Notebook $nb fStyle=6, text="1. Form factor itself\r"
  • trunk/User Procedures/Irena/IR1_Unified_Fit_Fncts.ipf

    r635 r664  
    51165116
    51175117        variable LevelUsed=str2num(ParamName[5])
    5118         TabControl DistTabs win=IR1A_ControlPanel, value=(LevelUsed-1)
    5119         IR1A_TabPanelControl("",LevelUsed-1)
    5120         //DoUpdate
     5118        if(numtype(LevelUsed)==0 && LevelUsed>0 && LevelUsed<6)
     5119                TabControl DistTabs win=IR1A_ControlPanel, value=(LevelUsed-1)
     5120                IR1A_TabPanelControl("",LevelUsed-1)
     5121        endif
    51215122
    51225123        KillWIndow/Z ChisquaredAnalysis
     
    53245325        print GetDataFOlder(1)
    53255326        SVAR SampleFullName=root:Packages:Irena_UnifFit:DataFolderName
    5326         NVAR CoefEVNumSteps=root:Packages:Irena_UnifFit:CoefEVNumSteps
     5327        NVAR ConfEVNumSteps=root:Packages:Irena_UnifFit:ConfEVNumSteps
    53275328        Wave ConfEvStartValues=$("ConfEvStartValues")
    53285329        Wave ConfEvEndValues=$("ConfEvEndValues")
     
    53465347        IR1_AppendAnyText(SampleFullName, 2)   
    53475348        IR1_AppendAnyText("  ", 0)
    5348         IR1_AppendAnyText("Run "+num2str(CoefEVNumSteps)+" fittings using data modified by random Gauss noise within \"Errors\" ", 2)
     5349        IR1_AppendAnyText("Run "+num2str(ConfEVNumSteps)+" fittings using data modified by random Gauss noise within \"Errors\" ", 2)
    53495350        IR1_AppendAnyText("To get following statistical results ", 0)
    53505351        wavestats/Q ChiSquareValues
  • trunk/User Procedures/Irena/IR1_Unified_Panel_Fncts.ipf

    r613 r664  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version=2.24
     2#pragma version=2.25
    33
    44//*************************************************************************\
     
    88//*************************************************************************/
    99
     10//2.25 modifed handling of limits and steps in the arrows to avoid loosing the arrows altogether when user inputs 0.
    1011//2.24 added better Graph size control using IN2G_GetGraphWidthHeight function
    1112//2.23 added getHelp button function.
     
    770771                        testVariableHL = 5     
    771772                endif
    772                 SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,5,0.05*testVariable}             
     773                SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,5,0.05*IR1A_FixZeroesForLimits(testVariable)}           
    773774        elseif(stringmatch(VarName,"*Pack"))
    774775                testVariableLL = 0.4*testVariable
     
    777778                        testVariableHL =10
    778779                endif
    779                 SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,(testVariableHL),(0.05*testVariable)}           
     780                if(testVariableHL<0.1)
     781                        testVariableHL = 0.1
     782                endif
     783                SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,(testVariableHL),(0.05*IR1A_FixZeroesForLimits(testVariable))}           
    780784        elseif(stringmatch(VarName,"*Rg"))
    781785                testVariableLL = 0.4*testVariable
     
    784788                        testVariableLL=2
    785789                endif
    786                 SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.05*testVariable)}         
     790                if(testVariableHL<10)
     791                        testVariableHL = 10
     792                endif
     793                SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.05*IR1A_FixZeroesForLimits(testVariable))}               
    787794        elseif(stringmatch(VarName,"*G"))
    788795                testVariableLL = 0.1*testVariable
    789796                testVariableHL = testVariable/0.1
    790                 SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.1*testVariable)} 
     797                if(testVariableHL<1e-20)
     798                        testVariableHL = 1e-20
     799                endif
     800                SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.1*IR1A_FixZeroesForLimits(testVariable))}
    791801        elseif(stringmatch(VarName,"*ETA"))//**DWS
    792802                testVariableLL = 0.5*testVariable
    793803                testVariableHL = 2*testVariable
    794                 SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.01*testVariable)}
     804                if(testVariableHL<10)
     805                        testVariableHL = 10
     806                endif
     807                SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.01*IR1A_FixZeroesForLimits(testVariable))}
    795808        else   
    796                 SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.05*testVariable)}
     809                SetVariable $(VarName),win=IR1A_ControlPanel,limits={0,inf,(0.05*IR1A_FixZeroesForLimits(testVariable))}
    797810                testVariableLL = 0.2*testVariable
    798811                testVariableHL = 5*testVariable
     
    800813end
    801814
     815//************************************************************************************************************
     816static Function IR1A_FixZeroesForLimits(ValueIn)
     817        variable ValueIn
     818        if(ValueIn<1e-30)
     819                return 1
     820        else   
     821                return ValueIn
     822        endif
     823end
    802824//************************************************************************************************************
    803825//************************************************************************************************************
     
    19731995       
    19741996        NVAR NumOfDist=root:Packages:Irena_UnifFit:NumberOfLevels
    1975        
    1976        
    19771997        //and now return us back to original tab...
    19781998        NVAR ActTab=root:Packages:Irena_UnifFit:ActiveTab
     1999        if(numtype(ActTab)!=0)
     2000                ActTab = 1
     2001        endif
    19792002        IR1A_TabPanelControl("Checkbox",ActTab-1)
    19802003        variable SetToTab
  • trunk/User Procedures/Irena/IR3_GuinierPorodModel.ipf

    r613 r664  
    33823382        print GetDataFOlder(1)
    33833383        SVAR SampleFullName=root:Packages:Irena:GuinierPorod:DataFolderName
    3384         NVAR CoefEVNumSteps=root:Packages:Irena:GuinierPorod:ConfEVNumSteps
     3384        NVAR ConfEVNumSteps=root:Packages:Irena:GuinierPorod:ConfEVNumSteps
    33853385        Wave ConfEvStartValues=$("ConfEvStartValues")
    33863386        Wave ConfEvEndValues=$("ConfEvEndValues")
     
    34043404        IR1_AppendAnyText(SampleFullName, 2)   
    34053405        IR1_AppendAnyText("  ", 0)
    3406         IR1_AppendAnyText("Run "+num2str(CoefEVNumSteps)+" fittings using data modified by random Gauss noise within \"Errors\" ", 2)
     3406        IR1_AppendAnyText("Run "+num2str(ConfEVNumSteps)+" fittings using data modified by random Gauss noise within \"Errors\" ", 2)
    34073407        IR1_AppendAnyText("To get following statistical results ", 0)
    34083408        wavestats/Q ChiSquareValues
  • trunk/User Procedures/Irena/Modification history.txt

    r661 r664  
    1414Size distribution - added power law slope to Background so one can subtract also low-q power law slope. Added buttons to perform power law fit and background fit. Added option to fit the parameters when data are added to the tool.
    1515Nexus exporter - changed to use 1/angstrom for Q as sasView below 4.1.2 (probably below 4.3 at least) cannot convert Q units on import.
     16Unified fit - modified how the limits and steps are handled when user set value to 0. Fixed Uncertainty analysis in Unified fit which seems to have failed on Igor 8.
    1617
    17182.66 1/27/2018
Note: See TracChangeset for help on using the changeset viewer.