Changeset 922


Ignore:
Timestamp:
Apr 15, 2020 3:55:38 PM (2 years ago)
Author:
ilavsky
Message:

Bug fixes, close to version 1beta for PDDF

Location:
trunk/User Procedures/Irena
Files:
2 edited

Legend:

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

    r912 r922  
    880880                                        checkDisplayed /W=IR3J_LinDataDisplay LinModelDataIntWave
    881881                                        if(V_Flag)
     882                                                GetAxis/W=IR3J_LinDataDisplay /Q left
    882883                                                cursor /W=IR3J_LinDataDisplay A, LinModelDataIntWave, DataQstartPoint
     884                                                SetAxis /W=IR3J_LinDataDisplay left V_min, 1.05*LinModelDataIntWave[DataQstartPoint]
    883885                                        endif
    884886                                endif
     
    901903                                                tempMaxQ = LinModelDataQWave[DataQEndPoint]
    902904                                                SetAxis/W=IR3J_LinDataDisplay bottom 0,tempMaxQ*1.5
    903                                                 tempMaxQY = 0.8*LinModelDataIntWave[DataQstartPoint]
    904                                                 tempMinQY = 1.2*LinModelDataIntWave[DataQEndPoint]
     905                                                tempMaxQY = 1.1*LinModelDataIntWave[DataQstartPoint]
     906                                                tempMinQY = 0.9*LinModelDataIntWave[DataQEndPoint]
    905907                                                maxY = max(tempMaxQY, tempMinQY)
    906908                                                minY = min(tempMaxQY, tempMinQY)
  • trunk/User Procedures/Irena/IRB1_bioSAXS.ipf

    r921 r922  
    15601560        checkbox PDDFUseProtein, pos={300,155}, title="\Zr120Protein", size={120,14},proc=IRB1_PDDFCheckProc, variable=root:Packages:Irena:PDDFInterface:PDDFUseProtein, fColor=(65535,0,0), mode=1, help={"Run PDDF with setting for Proteins. Changes density and SLD"}
    15611561        checkbox PDDFUseNucleicAcid, pos={450,155}, title="\Zr120Nucleic Acid", size={120,14},proc=IRB1_PDDFCheckProc, variable=root:Packages:Irena:PDDFInterface:PDDFUseNucleicAcid, fColor=(65535,0,0), mode=1, help={"Run PDDF with settings from Nucleai acid. Changes density and SLD"}
    1562         Button CalcRgAndMolecularWeight,pos={310,180},size={170,20}, proc=IRB1_PDDFButtonProc,title="Fit Rg and calculate MW", help={"Calculate Dmax on these data"}
     1562        Button PDDFCalcRgAndMolecularWeight,pos={310,180},size={170,20}, proc=IRB1_PDDFButtonProc,title="Fit Rg and calculate MW", help={"Calculate Dmax on these data"}
    15631563        TitleBox PDDFInstructions1 title="\Zr120SAXSMoW2 & Rambo-Tainer Qmax : ",size={230,15},pos={270,220},frame=0,fColor=(0,0,65535),labelBack=0
    15641564        checkbox InvariantCalcQmax8overRg, pos={270,250}, title="Qmax 8/Rg?", size={76,14},proc=IRB1_PDDFCheckProc, variable=root:Packages:Irena:PDDFInterface:InvariantCalcQmax8overRg, mode=0, help={"Set Qmax to 8/Rg automatically"}
     
    15691569        checkbox RamboTainerAutoSetBckg, pos={270,330}, title="Auto Find Backg.?", size={76,14},proc=IRB1_PDDFCheckProc, variable=root:Packages:Irena:PDDFInterface:RamboTainerAutoSetBckg, mode=0, help={"Find Background AUtomatically background from I(Q)"}
    15701570        checkbox RamboTainerSubtractFlatBackground, pos={420,330}, title="Subtract Background?", size={76,14},proc=IRB1_PDDFCheckProc, variable=root:Packages:Irena:PDDFInterface:RamboTainerSubtractFlatBackground, mode=0, help={"Subtract background from I(Q)"}
    1571         SetVariable RamboTainerFlatBackground,pos={270,355},size={250,18}, bodyWidth=90, proc=IRB1_PDDFSetVarProc,title="Flat Background = ", variable=root:Packages:Irena:PDDFInterface:RamboTainerFlatBackground, limits={0.01,1,0.02},frame=1, help={"Flat Background"}, format="%4.2f"
     1571        NVAR RamboTainerFlatBackground=root:Packages:Irena:PDDFInterface:RamboTainerFlatBackground
     1572        SetVariable RamboTainerFlatBackground,pos={270,355},size={250,18}, bodyWidth=90, proc=IRB1_PDDFSetVarProc,title="Flat Background = ", variable=root:Packages:Irena:PDDFInterface:RamboTainerFlatBackground, limits={0.00,inf,RamboTainerFlatBackground*0.01},frame=1, help={"Flat Background"}, format="%4.2f"
    15721573
    15731574        TitleBox PDDFInstructions12 title="\Zr120Real Space/PDDF (GNOM) Mol. Weight Conc.",size={330,15},pos={270,390},frame=0,fColor=(0,0,65535),labelBack=0
     
    15821583        SetVariable ReciprocalSpaceRg,pos={480,500},size={120,17},bodyWidth=50, noproc,title="Rg [A] = ", variable=root:Packages:Irena:PDDFInterface:ReciprocalSpaceRg, noedit=1,limits={0,inf,0},frame=0, help={"Density of protein, user changeable, in g/cm3"}, format="%4.2f"
    15831584        SetVariable SAXSMoW2MWRecSpacekDa,pos={300,520},size={250,15},bodyWidth=70, noproc,title="SAXSMoW2 MW [kDa]  = ", variable=root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa, noedit=1,fstyle=1, fsize=13, limits={0,inf,0},frame=0, help={"Molecular weight calculated from SAXSMoW2 method in kDa"}, fColor=(52428,1,1), format="%8.2f"
    1584         SetVariable RamboTainerMW,pos={300,540},size={250,15},bodyWidth=70, noproc,title="Rambo-Tainer MW [kDa]  = ",variable=root:Packages:Irena:PDDFInterface:RamboTainerMW, disable=0, noedit=1,limits={0,inf,0},frame=0,fstyle=1, fsize=13, fColor=(52428,1,1), help={"Molecular weight calculated from Rambo-Tainer method in kDa"}, format="%8.2f"
     1585        SetVariable RamboTainerMWRecSpacekDa,pos={300,540},size={250,15},bodyWidth=70, noproc,title="Rambo-Tainer MW [kDa]  = ",variable=root:Packages:Irena:PDDFInterface:RamboTainerMWRecSpacekDa, disable=0, noedit=1,limits={0,inf,0},frame=0,fstyle=1, fsize=13, fColor=(52428,1,1), help={"Molecular weight calculated from Rambo-Tainer method in kDa"}, format="%8.2f"
    15851586       
    15861587        TitleBox PDDFInstructions22 title="\Zr110Real space (GNOM+abs. Int.+conc.):",size={330,15},pos={270,570},frame=0,fColor=(0,0,65535),labelBack=0
     
    17091710                                NVAR RamboTainerAutoSetBckg = root:Packages:Irena:PDDFInterface:RamboTainerAutoSetBckg
    17101711                                RamboTainerAutoSetBckg = 0
     1712                                NVAR Backg=root:Packages:Irena:PDDFInterface:RamboTainerFlatBackground
     1713                                SetVariable RamboTainerFlatBackground, limits={0.00,inf,Backg*0.05}
     1714
    17111715                                //IRB1_PDDFFitRgAndG()
    17121716                                IRB1_PDDFCalcRamboTainer()
     
    17741778        checkbox PDDFUseNucleicAcid, win=IRB1_PDDFInterfacePanel,  disable = (whichTab!=1)
    17751779        TitleBox PDDFInstructions1, win=IRB1_PDDFInterfacePanel,  disable = (whichTab!=1)
    1776         Button CalcRgAndMolecularWeight, win=IRB1_PDDFInterfacePanel,  disable = (whichTab!=1)
     1780        Button PDDFCalcRgAndMolecularWeight, win=IRB1_PDDFInterfacePanel,  disable = (whichTab!=1)
    17771781        //SetVariable ReciprocalPorodVolumeA3, win=IRB1_PDDFInterfacePanel,  disable = (whichTab!=1)
    17781782        checkbox RamboTainerAutoSetBckg,  disable = (whichTab!=1)
     
    19341938                                        IRB1_PDDFMakeResChi2()
    19351939                                        IRB1_PDDFAppendPDDFModel()
     1940                                        //update calculations...
    19361941                                        IRB1_PDDFCalculateRgI0()
    19371942                                elseif(PDDFuseMoore)
     
    19391944                                        IRB1_PDDFMakeResChi2()
    19401945                                        IRB1_PDDFAppendPDDFModel()
     1946                                        //update calculations...
    19411947                                        IRB1_PDDFCalculateRgI0()
    19421948                                else //this is autognom or gnom, handled by one function
    19431949                                        IRB1_PDDFRunGNOM()
     1950                                        //update calculations...
     1951                                        IRB1_PDDFCalcSAXSMoW2()
    19441952                                        IRB1_PDDFMakeResChi2()
    19451953                                        IRB1_PDDFAppendPDDFModel()                             
    1946                                         IRB1_PDDFCalculateRgI0()
    19471954                                endif
    19481955                        endif
     
    19701977                                IN2G_OpenWebManual("Irena/ImportData.html")                             //fix me!!                     
    19711978                        endif
    1972                         if(stringMatch(ba.ctrlName,"CalcRgAndMolecularWeight"))
     1979                        if(stringMatch(ba.ctrlName,"PDDFCalcRgAndMolecularWeight"))
    19731980                                IRB1_PDDFFitRgAndG()
    19741981                                IRB1_PDDFCalcSAXSMoW2()
     
    20282035                                        IRB1_PDDFMakeResChi2()
    20292036                                        IRB1_PDDFAppendPDDFModel()     
    2030                                         IRB1_PDDFCalculateRgI0()                       
     2037                                        IRB1_PDDFCalcSAXSMoW2()                 
    20312038                                endif
    20322039                                IRB1_PDDFSaveResultsToNotebook()
     
    20452052//
    20462053Function IRB1_PDDFCalculateRgI0()
    2047         print "IRB1_PDDFCalculateRgI0 does nothing, it needs to be used when using Irena PDDF calculations."
    2048 //
    2049 //      NVAR CalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
    2050 //      NVAR CalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
    2051 //      Wave Radius = root:Packages:Irena:PDDFInterface:pddfRadius
    2052 //      Wave Pr = root:Packages:Irena:PDDFInterface:pddfPr
    2053 //      NVAR ConcentrationForCals=root:Packages:Irena:PDDFInterface:ConcentrationForCals
    2054 //      NVAR ScattLengthDensDifference=root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
    2055 //      NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
    2056 //     
    2057 //      Duplicate/Free Pr, R2Pr
    2058 //      R2Pr = Radius^2 * Pr
    2059 //     
    2060 //      //CalcI0 = 4*pi*areaXY(Radius, Pr )
    2061 //     
    2062 //      //CalcRg = sqrt(areaXY(Radius, R2Pr )/areaXY(Radius, Pr ))
    2063 //     
    2064 //      PDDFCalculatedMW = 6.023e23*CalcI0/(ConcentrationForCals*(ScattLengthDensDifference*1e10)^2)
    2065 //
     2054
     2055        NVAR PDDFCalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
     2056        NVAR PDDFCalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
     2057        Wave Radius = root:Packages:Irena:PDDFInterface:pddfRadius
     2058        Wave Pr = root:Packages:Irena:PDDFInterface:pddfPr
     2059        NVAR ConcentrationForCals=root:Packages:Irena:PDDFInterface:ConcentrationForCals
     2060        NVAR ScattLengthDensDifference=root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
     2061        NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     2062       
     2063        Duplicate/Free Pr, R2Pr
     2064        R2Pr = Radius^2 * Pr
     2065       
     2066        PDDFCalcI0 = 4*pi*areaXY(Radius, Pr )
     2067       
     2068        PDDFCalcRg = sqrt(areaXY(Radius, R2Pr )/areaXY(Radius, Pr ))
     2069       
     2070        PDDFCalculatedMW = 6.023e23*PDDFCalcI0/(ConcentrationForCals*(ScattLengthDensDifference*1e10)^2)
     2071
    20662072end
    20672073//**********************************************************************************************************
     
    22022208        //FitScatteringProfile =  w_coef[0]*exp(-OriginalQvector^2*w_coef[1]^2/3)+(w_coef[2]/QstarVector^w_coef[3]) + w_coef[4]
    22032209        variable TempNumPoints=2000
    2204         NVAR RamboTainerMW=root:Packages:Irena:PDDFInterface:RamboTainerMW
     2210        NVAR RamboTainerMWRecSpacekDa=root:Packages:Irena:PDDFInterface:RamboTainerMWRecSpacekDa
    22052211        NVAR PDDFUseNucleicAcid=root:Packages:Irena:PDDFInterface:PDDFUseNucleicAcid
    22062212        NVAR PDDFUseProtein=root:Packages:Irena:PDDFInterface:PDDFUseProtein
     
    22452251        variable RTQr           =       (RTVc)^2 / ReciprocalSpaceRg
    22462252        if(PDDFUseProtein)
    2247                 RamboTainerMW   =       (RTQr/0.1231)^1.0
    2248                 RamboTainerMW   /=      1000                                            //convert to kDA from DA               
     2253                RamboTainerMWRecSpacekDa        =       (RTQr/0.1231)^1.0
     2254                RamboTainerMWRecSpacekDa        /=      1000                                            //convert to kDA from DA               
    22492255        elseif(PDDFUseNucleicAcid)
    22502256        //Update tag result...
    2251                 RamboTainerMW   =       (RTQr/0.00934)^0.808
    2252                 RamboTainerMW   /=      1000                                            //convert to kDA from DA               
     2257                RamboTainerMWRecSpacekDa        =       (RTQr/0.00934)^0.808
     2258                RamboTainerMWRecSpacekDa        /=      1000                                            //convert to kDA from DA               
    22532259        endif
    22542260
     
    27352741        KillPath/Z ATSASWorkPath
    27362742        //print "Delete following folder from your desktop : "+PathToATSASWorkPath
    2737         //update calculations...
    2738         IRB1_PDDFCalcSAXSMoW2()
    27392743        setDataFolder OldDf
    27402744end
     
    28282832        Moore_DetNumFncts=MooreDetNumFnctsBio
    28292833        Moore_HolDmaxSize = MooreFitMaxSizeBio
    2830         MaximumR = DmaxBio*1.5
     2834        MaximumR = DmaxBio
    28312835        NumberOfBins = NumBinsBio
    28322836        if(NumberOfBins<100)
     
    30823086        ListOfVariables += "MooreNumFunctions;MooreDetNumFunctions;MooreFitMaxSize;"   
    30833087        ListOfVariables += "RealSpaceRg;RealSpaceI0;ConcentrationForCals;ScattLengthDensDifference;PDDFCalculatedMW;RealSpacePorodVolumeA3;"   
    3084         ListOfVariables += "RamboTainerMW;InvariantCalcQmax8overRg;InvariantCalcQmax;InvariantCalcQmaxLog225;"
     3088        ListOfVariables += "RamboTainerMWRecSpacekDa;InvariantCalcQmax8overRg;InvariantCalcQmax;InvariantCalcQmaxLog225;"
    30853089        ListOfVariables += "RamboTainerSubtractFlatBackground;RamboTainerFlatBackground;RamboTainerAutoSetBckg;"
    30863090        ListOfVariables += "SaveToFolder;SaveToNotebook;SaveToWaves;SaveToGNOMOut;"     
     
    31793183        NVAR PDDFCalculatedMW = root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
    31803184        NVAR GNOMAlfaResult=root:Packages:Irena:PDDFInterface:GNOMAlfaResult
    3181         NVAR RamboTainerMW = root:Packages:Irena:PDDFInterface:RamboTainerMW
    3182         NVAR CalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
    3183         NVAR CalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
     3185        NVAR RamboTainerMWRecSpacekDa = root:Packages:Irena:PDDFInterface:RamboTainerMWRecSpacekDa
     3186        NVAR PDDFCalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
     3187        NVAR PDDFCalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
    31843188        NVAR ConcentrationForCals=root:Packages:Irena:PDDFInterface:ConcentrationForCals
    31853189        NVAR ScattLengthDensDifference=root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
     
    31893193        NVAR RealSpacePorodVolumeA3=root:Packages:Irena:PDDFInterface:RealSpacePorodVolumeA3
    31903194        //these are variables used by the control procedure
    3191         NVAR UseResults=  root:Packages:Irena:PDDFInterface:UseResults
    3192         NVAR UseUserDefinedData=  root:Packages:Irena:PDDFInterface:UseUserDefinedData
    3193         NVAR UseModelData = root:Packages:Irena:PDDFInterface:UseModelData
     3195        //NVAR UseResults=  root:Packages:Irena:PDDFInterface:UseResults
     3196        //NVAR UseUserDefinedData=  root:Packages:Irena:PDDFInterface:UseUserDefinedData
     3197        //NVAR UseModelData = root:Packages:Irena:PDDFInterface:UseModelData
    31943198        SAXSMoW2MWRealSpacekDa = 0
    31953199        RealSpacePorodVolumeA3 = 0
    3196         UseResults = 0
    3197         UseUserDefinedData = 0
    3198         UseModelData = 0
     3200        //UseResults = 0
     3201        //UseUserDefinedData = 0
     3202        //UseModelData = 0
    31993203        //delete GNOM out file, if exists...
    32003204        //Wave/Z GNOMOutFileTextWave = root:Packages:Irena:PDDFInterface:GNOMOutFileTextWave
    32013205        KillWaves /Z GNOMOutFileTextWave
    3202         CalcRg = 0
    3203         CalcI0 = 0
     3206        PDDFCalcRg = 0
     3207        PDDFCalcI0 = 0
    32043208        PDDFCalculatedMW = 0
    32053209        GNOMAlfaResult = 0
     
    32143218        ReciprocalSpaceB = 0
    32153219        ReciprocalSpacePorodSlope = 0
    3216         RamboTainerMW = 0
     3220        RamboTainerMWRecSpacekDa = 0
    32173221        MWPorodInvariant = 0
    32183222        ReciprocalPorodVolumeA3 = 0
     
    32743278        NVAR DataQstartPoint = root:Packages:Irena:PDDFInterface:DataQstartPoint
    32753279
    3276         NVAR MWPorodInvariant = root:Packages:Irena:PDDFInterface:MWPorodInvariant
     3280        //reciprocal space results, result of Guinier fitting (I(0) and Rg, Porod volume, invariant etc.)
    32773281        NVAR ReciprocalPorodVolumeA3 = root:Packages:Irena:PDDFInterface:ReciprocalPorodVolumeA3
    3278         NVAR MWMassDensityProtein = root:Packages:Irena:PDDFInterface:MWMassDensityProtein
    3279         NVAR SAXSMoW2MWRecSpacekDa = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa
    3280         NVAR GNOMAlfaResult = root:Packages:Irena:PDDFInterface:GNOMAlfaResult
    3281 
    3282         NVAR CalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
    3283         NVAR CalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
     3282        NVAR ReciprocalSpaceI0           = root:Packages:Irena:PDDFInterface:ReciprocalSpaceI0
     3283        NVAR ReciprocalSpaceRg           = root:Packages:Irena:PDDFInterface:ReciprocalSpaceRg
     3284        NVAR SAXSMoW2MWRecSpacekDa       = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa
     3285        NVAR RamboTainerMWRecSpacekDa                            = root:Packages:Irena:PDDFInterface:RamboTainerMWRecSpacekDa
     3286
     3287        //Real space results, result of GNOM (I(0), Rg, Output extrapolated data, Porod volume, invariant etc.)
     3288        NVAR RealSpacePorodVolumeA3             = root:Packages:Irena:PDDFInterface:RealSpacePorodVolumeA3
     3289        NVAR RealSpaceI0                                        = root:Packages:Irena:PDDFInterface:RealSpaceI0
     3290        NVAR RealSpaceRg                                        = root:Packages:Irena:PDDFInterface:RealSpaceRg
     3291        NVAR SAXSMoW2MWRealSpacekDa             = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRealSpacekDa
     3292        NVAR PDDFCalculatedMW                   = root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     3293        NVAR GNOMAlfaResult                             = root:Packages:Irena:PDDFInterface:GNOMAlfaResult
     3294
     3295        NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
    32843296        NVAR ConcentrationForCals=root:Packages:Irena:PDDFInterface:ConcentrationForCals
    32853297        NVAR ScattLengthDensDifference=root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
    3286         NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     3298        NVAR MWMassDensityProtein = root:Packages:Irena:PDDFInterface:MWMassDensityProtein
    32873299
    32883300        string MethodRun
     
    33083320        IR1_AppendAnyText("Error: \t"+ErrorWaveName,0) 
    33093321        IR1_AppendAnyText("Method used: \t"+MethodRun,0)       
    3310 
    3311         IR1_AppendAnyText("\rPDDF MW [kDa] = \t"+num2str(PDDFCalculatedMW),0)   
    3312         IR1_AppendAnyText("PDDF Rg [A] = \t"+num2str(CalcRg),0)
    3313         IR1_AppendAnyText("PDDF I0     = \t"+num2str(CalcI0),0)
    3314         IR1_AppendAnyText("PDDF Concentration [mg/ml] = \t"+num2str(ConcentrationForCals),0)   
    3315         IR1_AppendAnyText("PDDF SLD [10^10 cm^-2] = \t"+num2str(ScattLengthDensDifference),0)   
    3316 
    3317         IR1_AppendAnyText("\rPorod MW [kDa] = \t"+num2str(SAXSMoW2MWRecSpacekDa),0)     
     3322        IR1_AppendAnyText(" ",0)
     3323        IR1_AppendAnyText("Real space (PDDF) results, GNOM OUT or direct calcs.",0)     
     3324        IR1_AppendAnyText("Rg [A] = \t"+num2str(RealSpaceRg),0)
     3325        IR1_AppendAnyText("I0     = \t"+num2str(RealSpaceI0),0)
    33183326        IR1_AppendAnyText("Porod Volume [cm3] = \t"+num2str(ReciprocalPorodVolumeA3),0)
    3319         IR1_AppendAnyText("Porod Density prot [g/cm3] = \t"+num2str(MWMassDensityProtein),0)   
    3320         IR1_AppendAnyText("\rGNOM resulting alfa = \t"+num2str(GNOMAlfaResult),0)       
     3327        IR1_AppendAnyText("Assumed Concentration [mg/ml] = \t"+num2str(ConcentrationForCals),0)
     3328        IR1_AppendAnyText("Assumed SLD [10^10 cm^-2] = \t"+num2str(ScattLengthDensDifference),0)       
     3329        IR1_AppendAnyText("GNOM alfa final value = \t"+num2str(GNOMAlfaResult),0)       
     3330        IR1_AppendAnyText("** SAXSMoW2 MW [kDa] = \t"+num2str(SAXSMoW2MWRealSpacekDa)+" ** ",0)
     3331        IR1_AppendAnyText("** Abs. Int. Estimated MW [kDa] = \t"+num2str(PDDFCalculatedMW)+" ** ",0)   
     3332        IR1_AppendAnyText(" ",0)
     3333        IR1_AppendAnyText("Reciprocal space (Guinier fit) results",0)   
     3334        IR1_AppendAnyText("Rg [A] = \t"+num2str(ReciprocalSpaceRg),0)   
     3335        IR1_AppendAnyText("I0     = \t"+num2str(ReciprocalSpaceI0),0)   
     3336        IR1_AppendAnyText("Porod Volume [cm3] = \t"+num2str(RealSpacePorodVolumeA3),0) 
     3337        IR1_AppendAnyText("Assumed Density prot [g/cm3] = \t"+num2str(MWMassDensityProtein),0) 
     3338        IR1_AppendAnyText("** SAXSMoW2 MW [kDa] = \t"+num2str(SAXSMoW2MWRecSpacekDa)+" ** ",0) 
     3339        IR1_AppendAnyText("** Rambo-Tainer MW [kDa] = \t"+num2str(RamboTainerMWRecSpacekDa)+" ** ",0)   
    33213340       
    33223341        DoWindow/K/Z DupWindwFromPanel                                  //kill the window...
     
    33553374        endif
    33563375
    3357         NVAR CalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
    3358         NVAR CalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
     3376        SVAR DataFolderName = root:Packages:Irena:PDDFInterface:DataFolderName
     3377
     3378        //reciprocal space results, result of Guinier fitting (I(0) and Rg, Porod volume, invariant etc.)
     3379        NVAR ReciprocalPorodVolumeA3 = root:Packages:Irena:PDDFInterface:ReciprocalPorodVolumeA3
     3380        NVAR ReciprocalSpaceI0           = root:Packages:Irena:PDDFInterface:ReciprocalSpaceI0
     3381        NVAR ReciprocalSpaceRg           = root:Packages:Irena:PDDFInterface:ReciprocalSpaceRg
     3382        NVAR SAXSMoW2MWRecSpacekDa       = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa
     3383        NVAR RamboTainerMWRecSpacekDa= root:Packages:Irena:PDDFInterface:RamboTainerMWRecSpacekDa
     3384
     3385        //Real space results, result of GNOM (I(0), Rg, Output extrapolated data, Porod volume, invariant etc.)
     3386        NVAR RealSpacePorodVolumeA3             = root:Packages:Irena:PDDFInterface:RealSpacePorodVolumeA3
     3387        NVAR RealSpaceI0                                        = root:Packages:Irena:PDDFInterface:RealSpaceI0
     3388        NVAR RealSpaceRg                                        = root:Packages:Irena:PDDFInterface:RealSpaceRg
     3389        NVAR SAXSMoW2MWRealSpacekDa             = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRealSpacekDa
     3390        NVAR PDDFCalculatedMW                   = root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     3391        NVAR GNOMAlfaResult                             = root:Packages:Irena:PDDFInterface:GNOMAlfaResult
     3392
     3393        NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
    33593394        NVAR ConcentrationForCals=root:Packages:Irena:PDDFInterface:ConcentrationForCals
    33603395        NVAR ScattLengthDensDifference=root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
    3361         NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
    3362         SVAR DataFolderName = root:Packages:Irena:PDDFInterface:DataFolderName
    3363 
    3364         NVAR MWPorodInvariant = root:Packages:Irena:PDDFInterface:MWPorodInvariant
    3365         NVAR ReciprocalPorodVolumeA3 = root:Packages:Irena:PDDFInterface:ReciprocalPorodVolumeA3
    33663396        NVAR MWMassDensityProtein = root:Packages:Irena:PDDFInterface:MWMassDensityProtein
    3367         NVAR SAXSMoW2MWRecSpacekDa = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa
    3368         NVAR GNOMAlfaResult = root:Packages:Irena:PDDFInterface:GNOMAlfaResult
    33693397
    33703398        NVAR PDDFUseGNOM = root:Packages:Irena:PDDFInterface:PDDFUseGNOM
     
    33833411        endif
    33843412        NewDATAFolder/O/S root:PDDFFitResults
    3385         Wave/Z PDDF_Rg
    3386         if(!WaveExists(PDDF_Rg))
    3387                 make/O/N=0 PDDF_Rg, PDDF_I0, PDDF_MW, PDDF_Conc, PDDF_SLD, PorodInvariant, PorodTrueVolume, MassDensityProtein, InvariantPDDFCalculatedMW, GnomAlfaFinal
     3413        Wave/Z RealSpace_Rg
     3414        if(!WaveExists(RealSpace_Rg))
     3415                make/O/N=0 RealSpace_Rg, RealSpace_I0, RealSpace_MW, RealSpaceSAXSMo2_MW, RealSpace_PorodVolume, ConcForCals, ScattLengthDensDiff
     3416                make/O/N=0 GnomAlfaFinal, RecipSpace_PorodVolume, RecipSpace_I0, RecipSpace_Rg, RecipSpaceSAXSMoW2_MW, RecipSpaceRamboTainer_MW, MassDensityProtein
    33883417                make/O/N=0/T SampleName, MethodName
    3389                 SetScale/P x 0,1,"A", PDDF_Rg
    3390                 SetScale/P x 0,1,"kDa", PDDF_MW
    3391                 SetScale/P x 0,1,"1/cm", PDDF_I0
    3392                 SetScale/P x 0,1,"mg/ml", PDDF_Conc
    3393                 SetScale/P x 0,1,"10^10 cm^-2", PDDF_SLD
    3394                 SetScale/P x 0,1,"arb", PorodInvariant
    3395                 SetScale/P x 0,1,"cm3", PorodTrueVolume
     3418                SetScale/P x 0,1,"A", RealSpace_Rg
     3419                SetScale/P x 0,1,"A", RecipSpace_Rg
     3420                SetScale/P x 0,1,"kDa", RealSpace_MW
     3421                SetScale/P x 0,1,"kDa", RecipSpaceRamboTainer_MW
     3422                SetScale/P x 0,1,"kDa", RealSpaceSAXSMo2_MW
     3423                SetScale/P x 0,1,"kDa", RecipSpaceSAXSMoW2_MW
     3424                SetScale/P x 0,1,"1/cm", RealSpace_I0
     3425                SetScale/P x 0,1,"1/cm", RecipSpace_I0
     3426                SetScale/P x 0,1,"mg/ml", ConcForCals
     3427                SetScale/P x 0,1,"10^10 cm^-2", ScattLengthDensDiff
     3428                SetScale/P x 0,1,"cm3", RealSpace_PorodVolume
     3429                SetScale/P x 0,1,"cm3", RecipSpace_PorodVolume
    33963430                SetScale/P x 0,1,"g/cm3", MassDensityProtein
    3397                 SetScale/P x 0,1,"kDa", InvariantPDDFCalculatedMW
    3398         endif
    3399         variable curlength = numpnts(PDDF_Rg)
    3400         redimension/N=(curlength+1) SampleName,MethodName, PDDF_Rg, PDDF_I0, PDDF_MW, PDDF_Conc, PDDF_SLD, PorodInvariant, PorodTrueVolume, MassDensityProtein, InvariantPDDFCalculatedMW, GnomAlfaFinal
    3401         SampleName[curlength] = stringFromList(ItemsInList(DataFolderName, ":")-1, DataFolderName,":")
    3402         MethodName[curlength] = Methodused
    3403         PDDF_Rg[curlength] = CalcRg
    3404         PDDF_I0[curlength] = CalcI0
    3405         PDDF_MW[curlength] = PDDFCalculatedMW
    3406         PDDF_Conc[curlength] = ConcentrationForCals
    3407         PDDF_SLD[curlength] = ScattLengthDensDifference
    3408         PorodInvariant[curlength] = MWPorodInvariant
    3409         PorodTrueVolume[curlength] = ReciprocalPorodVolumeA3
    3410         MassDensityProtein[curlength] = MWMassDensityProtein
    3411         InvariantPDDFCalculatedMW[curlength] = SAXSMoW2MWRecSpacekDa
    3412         GnomAlfaFinal[curlength] = GNOMAlfaResult
     3431        endif
     3432        variable curlength = numpnts(RealSpace_Rg)
     3433        redimension/N=(curlength+1) SampleName,MethodName, RealSpace_Rg, RealSpace_I0, RealSpace_MW, RealSpaceSAXSMo2_MW, RealSpace_PorodVolume, ConcForCals, ScattLengthDensDiff
     3434        redimension/N=(curlength+1) GnomAlfaFinal, RecipSpace_PorodVolume, RecipSpace_I0, RecipSpace_Rg, RecipSpaceSAXSMoW2_MW, RecipSpaceRamboTainer_MW, MassDensityProtein
     3435
     3436        SampleName[curlength]                                   = stringFromList(ItemsInList(DataFolderName, ":")-1, DataFolderName,":")
     3437        MethodName[curlength]                                   = Methodused
     3438        RealSpace_Rg[curlength]                                         = RealSpaceRg
     3439        RealSpace_I0[curlength]                                         = RealSpaceI0
     3440        RealSpace_MW[curlength]                                         = PDDFCalculatedMW
     3441        RealSpaceSAXSMo2_MW[curlength]                  = SAXSMoW2MWRealSpacekDa       
     3442        RealSpace_PorodVolume[curlength]                = RealSpacePorodVolumeA3
     3443        ConcForCals[curlength]                                  = ConcentrationForCals
     3444        ScattLengthDensDiff[curlength]                  = ScattLengthDensDifference
     3445        GnomAlfaFinal[curlength]                                = GNOMAlfaResult
     3446       
     3447        RecipSpace_PorodVolume[curlength]               = ReciprocalPorodVolumeA3
     3448        RecipSpace_I0[curlength]                                = ReciprocalSpaceI0
     3449        RecipSpace_Rg[curlength]                                = ReciprocalSpaceRg
     3450        RecipSpaceSAXSMoW2_MW[curlength]                = SAXSMoW2MWRecSpacekDa
     3451        RecipSpaceRamboTainer_MW[curlength]     = RamboTainerMWRecSpacekDa
     3452        MassDensityProtein[curlength]                   = MWMassDensityProtein
     3453
    34133454        DoWindow IRB1_PDDFFitResultsTable
    34143455        if(V_Flag)
     
    34313472        SetDataFolder root:PDDFFitResults:
    34323473        Wave/T SampleName, MethodName
    3433         Wave PDDF_Rg, PDDF_I0, PDDF_MW, PDDF_Conc, PDDF_SLD,PorodInvariant, PorodTrueVolume, MassDensityProtein, InvariantPDDFCalculatedMW, GnomAlfaFinal
    3434         Edit/K=1/W=(860,772,1831,1334)/N=IRB1_PDDFFitResultsTable SampleName,PDDF_Rg, PDDF_I0, PDDF_MW, MethodName as "PDDF fitting results Table"
    3435         AppendToTable InvariantPDDFCalculatedMW, PorodInvariant, PorodTrueVolume, MassDensityProtein, PDDF_Conc, PDDF_SLD, GnomAlfaFinal
     3474        Wave RealSpace_Rg, RealSpace_I0, RealSpace_MW, RealSpaceSAXSMo2_MW, RealSpace_PorodVolume, ConcForCals, ScattLengthDensDiff
     3475        Wave GnomAlfaFinal, RecipSpace_PorodVolume, RecipSpace_I0, RecipSpace_Rg, RecipSpaceSAXSMoW2_MW, RecipSpaceRamboTainer_MW, MassDensityProtein
     3476       
     3477        Edit/K=1/W=(860,772,1831,1334)/N=IRB1_PDDFFitResultsTable SampleName,RealSpace_Rg, RealSpace_I0, RealSpace_MW, RealSpaceSAXSMo2_MW, MethodName as "PDDF fitting results Table"
     3478        AppendToTable RecipSpace_Rg, RecipSpace_I0, RecipSpaceSAXSMoW2_MW, RecipSpaceRamboTainer_MW, RecipSpace_PorodVolume, GnomAlfaFinal
     3479        AppendToTable RealSpace_PorodVolume, ConcForCals, ScattLengthDensDiff, RecipSpace_PorodVolume, MassDensityProtein
    34363480        ModifyTable format(Point)=1,width(SampleName)=150,title(SampleName)="Sample Folder"
    3437         ModifyTable width(MethodName)=100,title(MethodName)="Method"
    3438         ModifyTable alignment(PDDF_Rg)=1,sigDigits(PDDF_Rg)=4,title(PDDF_Rg)="Rg [A]"
    3439         ModifyTable alignment(PDDF_I0)=1,sigDigits(PDDF_I0)=4,width(PDDF_I0)=100,title(PDDF_I0)="I0"
    3440         ModifyTable alignment(PDDF_MW)=1,sigDigits(PDDF_MW)=4,width(PDDF_MW)=104
    3441         ModifyTable title(PDDF_MW)="MW"
    3442         ModifyTable alignment(PDDF_Conc)=1,sigDigits(PDDF_Conc)=4
    3443         ModifyTable width(PDDF_Conc)=92,title(PDDF_Conc)="Conc [mg/ml]",alignment(PDDF_SLD)=1
    3444         ModifyTable sigDigits(PDDF_SLD)=4,width(PDDF_SLD)=110,title(PDDF_SLD)="SLD [10^10 cm^2]"
    3445         ModifyTable alignment(InvariantPDDFCalculatedMW)=1,sigDigits(InvariantPDDFCalculatedMW)=4,width(InvariantPDDFCalculatedMW)=104
    3446         ModifyTable title(InvariantPDDFCalculatedMW)="MW (Porod)"
    3447         ModifyTable alignment(PorodInvariant)=1,sigDigits(PorodInvariant)=4,width(PorodInvariant)=104
    3448         ModifyTable title(PorodInvariant)="Porod Invariant"
    3449         ModifyTable alignment(PorodTrueVolume)=1,sigDigits(PorodTrueVolume)=4,width(PorodTrueVolume)=104
    3450         ModifyTable title(PorodTrueVolume)="Porod Volume"
    3451         ModifyTable alignment(MassDensityProtein)=1,sigDigits(MassDensityProtein)=4,width(MassDensityProtein)=104
    3452         ModifyTable title(MassDensityProtein)="Density Protein"
    3453         ModifyTable alignment(GnomAlfaFinal)=1,sigDigits(GnomAlfaFinal)=4,width(GnomAlfaFinal)=104
    3454         ModifyTable title(GnomAlfaFinal)="GNOM ALfa res."
    3455 
     3481//      ModifyTable width(MethodName)=100,title(MethodName)="Method"
     3482//      ModifyTable alignment(PDDF_Rg)=1,sigDigits(PDDF_Rg)=4,title(PDDF_Rg)="Rg [A]"
     3483//      ModifyTable alignment(PDDF_I0)=1,sigDigits(PDDF_I0)=4,width(PDDF_I0)=100,title(PDDF_I0)="I0"
     3484//      ModifyTable alignment(PDDF_MW)=1,sigDigits(PDDF_MW)=4,width(PDDF_MW)=104
     3485//      ModifyTable title(PDDF_MW)="MW"
     3486//      ModifyTable alignment(PDDF_Conc)=1,sigDigits(PDDF_Conc)=4
     3487//      ModifyTable width(PDDF_Conc)=92,title(PDDF_Conc)="Conc [mg/ml]",alignment(PDDF_SLD)=1
     3488//      ModifyTable sigDigits(PDDF_SLD)=4,width(PDDF_SLD)=110,title(PDDF_SLD)="SLD [10^10 cm^2]"
     3489//      ModifyTable alignment(InvariantPDDFCalculatedMW)=1,sigDigits(InvariantPDDFCalculatedMW)=4,width(InvariantPDDFCalculatedMW)=104
     3490//      ModifyTable title(InvariantPDDFCalculatedMW)="MW (Porod)"
     3491//      ModifyTable alignment(PorodInvariant)=1,sigDigits(PorodInvariant)=4,width(PorodInvariant)=104
     3492//      ModifyTable title(PorodInvariant)="Porod Invariant"
     3493//      ModifyTable alignment(PorodTrueVolume)=1,sigDigits(PorodTrueVolume)=4,width(PorodTrueVolume)=104
     3494//      ModifyTable title(PorodTrueVolume)="Porod Volume"
     3495//      ModifyTable alignment(MassDensityProtein)=1,sigDigits(MassDensityProtein)=4,width(MassDensityProtein)=104
     3496//      ModifyTable title(MassDensityProtein)="Density Protein"
     3497//      ModifyTable alignment(GnomAlfaFinal)=1,sigDigits(GnomAlfaFinal)=4,width(GnomAlfaFinal)=104
     3498//      ModifyTable title(GnomAlfaFinal)="GNOM ALfa res."
     3499//
    34563500
    34573501
     
    34873531        NVAR DataQstartPoint = root:Packages:Irena:PDDFInterface:DataQstartPoint
    34883532        //additional Porod results...
    3489         NVAR MWPorodInvariant = root:Packages:Irena:PDDFInterface:MWPorodInvariant
     3533        //reciprocal space results, result of Guinier fitting (I(0) and Rg, Porod volume, invariant etc.)
    34903534        NVAR ReciprocalPorodVolumeA3 = root:Packages:Irena:PDDFInterface:ReciprocalPorodVolumeA3
    3491         NVAR MWMassDensityProtein = root:Packages:Irena:PDDFInterface:MWMassDensityProtein
    3492         NVAR SAXSMoW2MWRecSpacekDa = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa
    3493         NVAR GNOMAlfaResult = root:Packages:Irena:PDDFInterface:GNOMAlfaResult
    3494 
    3495         NVAR CalcRg=root:Packages:Irena:PDDFInterface:RealSpaceRg
    3496         NVAR CalcI0=root:Packages:Irena:PDDFInterface:RealSpaceI0
    3497         NVAR ConcentrationForCals=root:Packages:Irena:PDDFInterface:ConcentrationForCals
    3498         NVAR ScattLengthDensDifference=root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
    3499         NVAR PDDFCalculatedMW=root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     3535        NVAR ReciprocalSpaceI0           = root:Packages:Irena:PDDFInterface:ReciprocalSpaceI0
     3536        NVAR ReciprocalSpaceRg           = root:Packages:Irena:PDDFInterface:ReciprocalSpaceRg
     3537        NVAR SAXSMoW2MWRecSpacekDa       = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRecSpacekDa
     3538        NVAR RamboTainerMWRecSpacekDa = root:Packages:Irena:PDDFInterface:RamboTainerMWRecSpacekDa
     3539
     3540        //Real space results, result of GNOM (I(0), Rg, Output extrapolated data, Porod volume, invariant etc.)
     3541        NVAR RealSpacePorodVolumeA3             = root:Packages:Irena:PDDFInterface:RealSpacePorodVolumeA3
     3542        NVAR RealSpaceI0                                        = root:Packages:Irena:PDDFInterface:RealSpaceI0
     3543        NVAR RealSpaceRg                                        = root:Packages:Irena:PDDFInterface:RealSpaceRg
     3544        NVAR SAXSMoW2MWRealSpacekDa             = root:Packages:Irena:PDDFInterface:SAXSMoW2MWRealSpacekDa
     3545        NVAR PDDFCalculatedMW                   = root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     3546        NVAR GNOMAlfaResult                             = root:Packages:Irena:PDDFInterface:GNOMAlfaResult
     3547
     3548        NVAR PDDFCalculatedMW                           =       root:Packages:Irena:PDDFInterface:PDDFCalculatedMW
     3549        NVAR ConcentrationForCals               =       root:Packages:Irena:PDDFInterface:ConcentrationForCals
     3550        NVAR ScattLengthDensDifference  =       root:Packages:Irena:PDDFInterface:ScattLengthDensDifference
     3551        NVAR MWMassDensityProtein               =       root:Packages:Irena:PDDFInterface:MWMassDensityProtein
     3552       
    35003553        string MethodRun
    35013554        NVAR PDDFUseGNOM = root:Packages:Irena:PDDFInterface:PDDFUseGNOM
     
    35163569        variable i
    35173570        //SVAR FittingResults=root:Packages:Irena:PDDFInterface:FittingResults
    3518         string ResultsComment="PDDFMetod="+MethodRun+";"+"PDDFQmin="+num2str(DataQstart)+";"
    3519         ResultsComment="PDDFMW="+num2str(PDDFCalculatedMW)+";"
    3520         ResultsComment="PDDFRg="+num2str(CalcRg)+";"
    3521         ResultsComment="PDDFI0="+num2str(CalcI0)+";"
    3522         ResultsComment="PDDFConcentration="+num2str(ConcentrationForCals)+";"
    3523         ResultsComment="PDDFSLD="+num2str(ScattLengthDensDifference)+";"
    3524         ResultsComment="PDDFAlfaFinal="+num2str(GNOMAlfaResult)+";"
    3525         ResultsComment="PorodMW="+num2str(SAXSMoW2MWRecSpacekDa)+";"
    3526         ResultsComment="PorodInvariant="+num2str(MWPorodInvariant)+";"
    3527         ResultsComment="PorodVolume="+num2str(ReciprocalPorodVolumeA3)+";"
    3528         ResultsComment="PorodMassDensityProtein="+num2str(MWMassDensityProtein)+";"
     3571        string ResultsComment="PDDFMetod="+MethodRun+";PDDFQmin="+num2str(DataQstart)+";PDDFQmax="+num2str(DataQEnd)+";"
     3572        ResultsComment="RealSpaceEstimatedMW="+num2str(PDDFCalculatedMW)+";"
     3573        ResultsComment="RealSpaceSAXSMoW2MW="+num2str(SAXSMoW2MWRealSpacekDa)+";"
     3574        ResultsComment="RealSpaceRg="+num2str(RealSpaceRg)+";"
     3575        ResultsComment="RealSpaceI0="+num2str(RealSpaceI0)+";"
     3576        ResultsComment="RealSpacePorodVolume="+num2str(RealSpacePorodVolumeA3)+";"
     3577        ResultsComment="AssumedConcentration="+num2str(ConcentrationForCals)+";"
     3578        ResultsComment="AssumedSLD="+num2str(ScattLengthDensDifference)+";"
     3579        ResultsComment="GNOMAlfaFinal="+num2str(GNOMAlfaResult)+";"
     3580        //and now real space parameters
     3581        ResultsComment="RecipSpaceSAXSMoW2MW="+num2str(SAXSMoW2MWRecSpacekDa)+";"
     3582        ResultsComment="RecipSpaceRamoTainerMW="+num2str(RamboTainerMWRecSpacekDa)+";"
     3583        ResultsComment="RecipSpaceRg="+num2str(RealSpaceRg)+";"
     3584        ResultsComment="RecipSpaceI0="+num2str(ReciprocalSpaceI0)+";"
     3585        ResultsComment="RecipSpacePorodVolume="+num2str(ReciprocalPorodVolumeA3)+";"
     3586        ResultsComment="AssumedDensityProtein="+num2str(MWMassDensityProtein)+";"
    35293587        String NewWaveNote="PDDF analysis;"+date()+";"+time()+ResultsComment
    35303588        NewWaveNote+=oldNote
Note: See TracChangeset for help on using the changeset viewer.