Changeset 13


Ignore:
Timestamp:
Mar 31, 2013 8:48:08 PM (9 years ago)
Author:
ilavsky
Message:

Added Indra calibration options, modified Plotting tool to handle Intensity calibrations and also modified ASCII import to handle the different choices on calibration.
Hopefully fixed Indra 2 calibration for weight calibration.

Location:
User Procedures
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • User Procedures/CanSAS/cansasXML_GUI.ipf

    r6 r13  
    129129
    130130        CheckBox UseFileNameAsFolder,pos={10,380},size={16,14},proc=CS_XMLGUICheckProc,title="Use File Nms As Fldr Nms?",variable= root:Packages:CS_XMLreader_GUI:UseFileNameAsFolder, help={"Use names of imported files as folder names for the data?"}
    131         CheckBox UseIndra2Names,pos={10,395},size={16,14},proc=CS_XMLGUICheckProc,title="Use Indra 2 data names?",variable= root:Packages:CS_XMLreader_GUI:UseIndra2Names, help={"Use wave names using Indra 2 name structure? (DSM_Int, DSM_Qvec, DSM_Error)"}
     131        CheckBox UseIndra2Names,pos={10,395},size={16,14},proc=CS_XMLGUICheckProc,title="Use USAXS names?",variable= root:Packages:CS_XMLreader_GUI:UseIndra2Names, help={"Use wave names using Indra 2 name structure? (DSM_Int, DSM_Qvec, DSM_Error)"}
    132132        CheckBox UseQRSNames,pos={10,410},size={16,14},proc=CS_XMLGUICheckProc,title="Use QRS data names?",variable= root:Packages:CS_XMLreader_GUI:UseQRSNames, help={"Use QRS name structure? (Q_filename, R_filename, S_filename)"}
    133133        CheckBox UseQISNames,pos={230,395},size={16,14},proc=CS_XMLGUICheckProc,title="Use QIS data names?",variable= root:Packages:CS_XMLreader_GUI:UseQISNames, help={"Use NIST QIS naming structure? (filename_Q, filename_I, filename_S etc..)"}
  • User Procedures/Indra 2/IN3_Calculations.ipf

    r12 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version=1.05
    3 
     2#pragma version=1.06
     3
     4//1.06 modified for weight calibration
    45//1.05 FIxed bump to Compiler when no data selected in Data selection popup.
    56//1.04 2/2013, JIL: modified to enable calibration per weight
     
    489490        NVAR CalibrateToWeight=root:Packages:Indra3:CalibrateToWeight
    490491        NVAR CalibrateToVolume=root:Packages:Indra3:CalibrateToVolume
     492        NVAR CalibrateArbitrary=root:Packages:Indra3:CalibrateArbitrary
    491493
    492494       
     
    499501
    500502        endif
     503        NVAR CalculateWeight=root:Packages:Indra3:CalculateWeight
     504        NVAR CalculateThickness=root:Packages:Indra3:CalculateThickness
    501505        if (cmpstr("CalculateThickness",ctrlName)==0)
    502                 NVAR CalculateThickness=root:Packages:Indra3:CalculateThickness
    503506                SetVariable SampleThickness, win=USAXSDataReduction, noedit=CalculateThickness, frame=!CalculateThickness
    504507                SetVariable SampleLinAbsorption, win=USAXSDataReduction, noedit=!CalculateThickness, frame=CalculateThickness
     
    507510        endif
    508511        if (cmpstr("CalculateWeight",ctrlName)==0)
    509                 NVAR CalculateWeight=root:Packages:Indra3:CalculateWeight
    510512                SetVariable SampleWeightInBeam, win=USAXSDataReduction, noedit=CalculateWeight, frame=!CalculateWeight
    511                 SetVariable SampleWeightAbsorption, win=USAXSDataReduction, noedit=!CalculateWeight, frame=CalculateWeight
     513                SetVariable SampleDensity, win=USAXSDataReduction, frame=CalculateWeight
     514                SetVariable SampleThickness, win=USAXSDataReduction, noedit=CalculateThickness, frame=!CalculateThickness
    512515                SetVariable BeamExposureArea, win=USAXSDataReduction, noedit=!CalculateWeight, frame=CalculateWeight
    513516                IN3_CalculateSampleThickness()
     
    517520                if(checked)
    518521                        CalibrateToWeight = 0
     522                        CalibrateArbitrary = 0
    519523                else
    520                         CalibrateToWeight=1
     524                        if((CalibrateToWeight+CalibrateArbitrary)!=1)
     525                                CalibrateArbitrary = 1
     526                                CalibrateToWeight = 0
     527                        endif
    521528                endif
    522529                NI3_TabPanelControl("",0)
     530                SetVariable BeamExposureArea, win=USAXSDataReduction, noedit=!(CalculateWeight&&CalibrateToWeight), frame=!CalculateWeight
    523531        endif
    524532       
     
    526534                if(checked)
    527535                        CalibrateToVolume = 0
     536                        CalibrateArbitrary = 0
    528537                else
    529                         CalibrateToVolume=1
     538                        if((CalibrateToVolume+CalibrateArbitrary)!=1)
     539                                CalibrateArbitrary = 0
     540                                CalibrateToVolume = 1
     541                        endif
    530542                endif
    531543                NI3_TabPanelControl("",0)
     544                SetVariable BeamExposureArea, win=USAXSDataReduction, noedit=!(CalculateWeight&&CalibrateToWeight), frame=!CalculateWeight
     545        endif
     546
     547        if(stringmatch("CalibrateArbitrary",ctrlName) )
     548                if(checked)
     549                        CalibrateToVolume = 0
     550                        CalibrateToWeight = 0
     551                else
     552                        if((CalibrateToVolume+CalibrateToWeight)!=1)
     553                                CalibrateToWeight = 0
     554                                CalibrateToVolume = 1
     555                        endif
     556                endif
     557                NI3_TabPanelControl("",0)
     558                SetVariable BeamExposureArea, win=USAXSDataReduction, noedit=!(CalculateWeight&&CalibrateToWeight), frame=!CalculateWeight
    532559        endif
    533560       
     
    13061333        setDataFolder OldDf
    13071334End
    1308 /*****************************************************************************************************************
     1335//*****************************************************************************************************************
    13091336//*****************************************************************************************************************
    13101337//*****************************************************************************************************************
     
    13261353        NVAR CalibrateToWeight=root:Packages:Indra3:CalibrateToWeight
    13271354        NVAR CalibrateToVolume=root:Packages:Indra3:CalibrateToVolume
     1355        NVAR CalibrateArbitrary=root:Packages:Indra3:CalibrateArbitrary
    13281356
    13291357        Button RecoverDefault,win=USAXSDataReduction, disable=(tab!=0 || IsBlank)
    13301358        CheckBox CalibrateToVolume,win=USAXSDataReduction, disable=(tab!=0 || IsBlank)
    13311359        CheckBox CalibrateToWeight,win=USAXSDataReduction, disable=(tab!=0 || IsBlank)
    1332 
    1333         CheckBox CalculateThickness,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToVolume)
     1360        CheckBox CalibrateArbitrary,win=USAXSDataReduction, disable=(tab!=0 || IsBlank)
     1361
     1362        CheckBox CalculateThickness,win=USAXSDataReduction, disable=(tab!=0 || IsBlank)
    13341363        CheckBox CalculateWeight,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToWeight )
    1335         SetVariable SampleThickness,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToVolume)
    1336         SetVariable SampleWeightInBeam,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToWeight)
     1364        SetVariable SampleThickness,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || CalibrateArbitrary), noedit=!(CalculateThickness||CalculateWeight), frame=CalculateThickness
     1365        SetVariable SampleWeightInBeam,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToWeight || CalibrateArbitrary)
    13371366        SetVariable SampleTransmission,win=USAXSDataReduction, disable=(tab!=0 || IsBlank)
    1338         SetVariable SampleLinAbsorption,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToVolume), noedit=!CalculateThickness, frame=CalculateThickness
    1339         SetVariable SampleWeightAbsorption,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToWeight), noedit=!CalculateWeight, frame=CalculateWeight
    1340         SetVariable SampleFilledFraction,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToVolume),noedit=!CalculateThickness, frame=CalculateThickness
    1341         SetVariable BeamExposureArea,win=USAXSDataReduction, disable=(tab!=0 || IsBlank), noedit=!CalculateWeight, frame=CalculateWeight
     1367        SetVariable SampleLinAbsorption,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || CalibrateArbitrary), noedit=!CalculateThickness, frame=CalculateThickness
     1368        SetVariable SampleDensity,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToWeight || CalibrateArbitrary), frame=CalculateWeight
     1369        SetVariable SampleFilledFraction,win=USAXSDataReduction, disable=(tab!=0 || IsBlank || !CalibrateToVolume || CalibrateArbitrary),noedit=!CalculateThickness, frame=CalculateThickness
     1370        SetVariable BeamExposureArea, win=USAXSDataReduction, disable=(tab!=0 || IsBlank || CalibrateArbitrary), noedit=!(CalculateWeight&&CalibrateToWeight), frame=!CalculateWeight
    13421371
    13431372
  • User Procedures/Indra 2/IN3_Main.ipf

    r6 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version = 1.78
    3 
    4 
     2#pragma version = 1.79
     3
     4//1.79 improved weight calibration
    55//1.78, 2/2013, JIL: Added option to calibrate by weight. Needed for USAXS users.
    66
     
    6060        ListOfVariables+="SampleQOffset;DisplayPeakCenter;DisplayAlignSaAndBlank;SampleAngleOffset;"
    6161
    62         ListOfVariables+="CalibrateToWeight;CalibrateToVolume;SampleWeightInBeam;CalculateWeight;BeamExposureArea;SampleWeightAbsorption;"
     62        ListOfVariables+="CalibrateToWeight;CalibrateToVolume;CalibrateArbitrary;SampleWeightInBeam;CalculateWeight;BeamExposureArea;SampleDensity;"
    6363
    6464        ListOfVariables+="BlankWidth;MSAXSCorrection;UseMSAXSCorrection;"
     
    193193        NVAR CalibrateToWeight=root:Packages:Indra3:CalibrateToWeight
    194194        NVAR CalibrateToVolume=root:Packages:Indra3:CalibrateToVolume
    195 
    196         CheckBox CalibrateToVolume,pos={20,230},size={90,14},proc=IN3_MainPanelCheckBox,title="Calibrate [cm2/cm3]"
     195        NVAR CalibrateArbitrary=root:Packages:Indra3:CalibrateArbitrary
     196
     197        CheckBox CalibrateArbitrary,pos={20,225},size={90,14},proc=IN3_MainPanelCheckBox,title="Calibrate Arbitrary"
     198        CheckBox CalibrateArbitrary,variable= root:Packages:Indra3:CalibrateArbitrary, help={"Check, if you not want to calibrate data"}
     199        CheckBox CalibrateToVolume,pos={20,240},size={90,14},proc=IN3_MainPanelCheckBox,title="Calibrate [cm2/cm3]"
    197200        CheckBox CalibrateToVolume,variable= root:Packages:Indra3:CalibrateToVolume, help={"Check, if you want to calibrate data to sample volume"}
    198         CheckBox CalibrateToWeight,pos={220,230},size={90,14},proc=IN3_MainPanelCheckBox,title="Calibrate [cm2/g]"
     201        CheckBox CalibrateToWeight,pos={20,255},size={90,14},proc=IN3_MainPanelCheckBox,title="Calibrate [cm2/g]"
    199202        CheckBox CalibrateToWeight,variable= root:Packages:Indra3:CalibrateToWeight, help={"Check, if you want to calibrate data to sample weight"}
    200203
    201         CheckBox CalculateThickness,pos={20,252},size={90,14},proc=IN3_MainPanelCheckBox,title="Calculate Thickness", disable=CalibrateToWeight
     204        CheckBox CalculateThickness,pos={220,230},size={90,14},proc=IN3_MainPanelCheckBox,title="Calculate Thickness"
    202205        CheckBox CalculateThickness,variable= root:Packages:Indra3:CalculateThickness, help={"Check, if you want to calculate sample thickness from transmission"}
    203206
     
    205208        CheckBox CalculateWeight,variable= root:Packages:Indra3:CalculateWeight, help={"Check, if you want to calculate sample weight from transmission"}
    206209
    207         SetVariable SampleThickness,pos={5,275},size={280,22},title="Sample Thickness [mm] =", bodyWidth=100
     210        SetVariable SampleThickness,pos={5,285},size={280,22},title="Sample Thickness [mm] =", bodyWidth=100
    208211        SetVariable SampleThickness,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged
    209         SetVariable SampleThickness,limits={0,Inf,0},variable= root:Packages:Indra3:SampleThickness, noedit=CalculateThickness, frame=!CalculateThickness
    210 
    211         Button RecoverDefault,pos={290,273},size={80,20},font="Times New Roman",fSize=10,proc=IN3_InputPanelButtonProc,title="Spec value", help={"Reload original value from spec record"}
    212 
    213         SetVariable SampleWeightInBeam,pos={5,300},size={280,22},title="Sample weight [g] ="
     212        SetVariable SampleThickness,limits={0,Inf,0},variable= root:Packages:Indra3:SampleThickness, noedit=(CalculateThickness||CalculateWeight)//, frame=!(CalculateThickness&&CalculateWeight)
     213
     214        Button RecoverDefault,pos={290,283},size={80,20},font="Times New Roman",fSize=10,proc=IN3_InputPanelButtonProc,title="Spec value", help={"Reload original value from spec record"}
     215
     216        SetVariable SampleTransmission,pos={5,335},size={280,22},title="Sample Transmission ="
     217        SetVariable SampleTransmission,font="Times New Roman",fSize=14, bodyWidth=100
     218        SetVariable SampleTransmission,limits={0,Inf,0},variable= root:Packages:Indra3:SampleTransmission, noedit=0, frame=0
     219
     220        SetVariable SampleLinAbsorption,pos={5,360},size={280,22},title="Sample absorp. coef [1/cm] ="
     221        SetVariable SampleLinAbsorption,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
     222        SetVariable SampleLinAbsorption,limits={0,Inf,0},variable= root:Packages:Indra3:SampleLinAbsorption, noedit=!CalculateThickness, frame=CalculateThickness
     223
     224        SetVariable SampleDensity,pos={5,385},size={280,22},title="Sample density [g/cm3] ="
     225        SetVariable SampleDensity,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
     226        SetVariable SampleDensity,limits={0,Inf,0},variable= root:Packages:Indra3:SampleDensity, noedit=!CalculateWeight, frame=CalculateWeight
     227
     228        SetVariable SampleWeightInBeam,pos={5,410},size={280,22},title="Sample weight [g] ="
    214229        SetVariable SampleWeightInBeam,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
    215230        SetVariable SampleWeightInBeam,limits={0,Inf,0},variable= root:Packages:Indra3:SampleWeightInBeam, noedit=CalculateWeight, frame=!CalculateWeight
    216231
    217 
    218         SetVariable SampleTransmission,pos={5,325},size={280,22},title="Sample Transmission ="
    219         SetVariable SampleTransmission,font="Times New Roman",fSize=14, bodyWidth=100
    220         SetVariable SampleTransmission,limits={0,Inf,0},variable= root:Packages:Indra3:SampleTransmission, noedit=0, frame=0
    221 
    222 
    223 
    224         SetVariable SampleLinAbsorption,pos={5,350},size={280,22},title="Sample absorp. coef [1/cm] ="
    225         SetVariable SampleLinAbsorption,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
    226         SetVariable SampleLinAbsorption,limits={0,Inf,0},variable= root:Packages:Indra3:SampleLinAbsorption, noedit=!CalculateThickness, frame=CalculateThickness
    227 
    228         SetVariable SampleWeightAbsorption,pos={5,375},size={280,22},title="Sample absorp. coef [1/g] ="
    229         SetVariable SampleWeightAbsorption,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
    230         SetVariable SampleWeightAbsorption,limits={0,Inf,0},variable= root:Packages:Indra3:SampleWeightAbsorption, noedit=!CalculateWeight, frame=CalculateWeight
    231 
    232         SetVariable SampleFilledFraction,pos={5,400},size={280,22},title="Sample filled fraction =", help={"amount of sample filled by material, 1 - porosity as fraction"}
     232        SetVariable SampleFilledFraction,pos={5,410},size={280,22},title="Sample filled fraction =", help={"amount of sample filled by material, 1 - porosity as fraction"}
    233233        SetVariable SampleFilledFraction,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
    234234        SetVariable SampleFilledFraction,limits={0,Inf,0},variable= root:Packages:Indra3:SampleFilledFraction, noedit=!CalculateThickness, frame=CalculateThickness
    235235
    236         SetVariable BeamExposureArea,pos={5,425},size={280,22},title="Beam area [mm\\S2\\M]  =", help={"Calculated area of the beam from slit positions, do not change unless it is error"}
     236        SetVariable BeamExposureArea,pos={5,435},size={280,22},title="Beam area [mm2]  =", help={"Calculated area of the beam from slit positions, do not change unless it is error"}
    237237        SetVariable BeamExposureArea,font="Times New Roman",fSize=14,proc=IN3_ParametersChanged, bodyWidth=100
    238238        SetVariable BeamExposureArea,limits={0,Inf,0},variable= root:Packages:Indra3:BeamExposureArea, noedit=!CalculateWeight, frame=CalculateWeight
  • User Procedures/Indra 2/IN3_SupportFnct.ipf

    r6 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 
    3 
     2#pragma version =1.01
     3
     4//1.01 modified for weight calibration
    45
    56//***********************************************************************************************************************************
     
    6162        Wave/Z PD_range=$(DataFolderName+"PD_Range")
    6263        //set PdRanges to 1 to have colored main data in correct colors., 0 to uncolor
    63         if(WaveExists(PD_range))
     64        DoWIndow RcurvePlotGraph
     65        if(WaveExists(PD_range)&&V_Flag)
    6466                if(PdRanges)
    6567                        Duplicate/O PD_range, root:Packages:USAXS:MyColorWave                                                   //creates new color wave
    6668                        IN3_MakeMyColors(PD_range,root:Packages:USAXS:MyColorWave)                                              //creates colors in it
    67                         ModifyGraph /W=RcurvePlotGraph mode=4, zColor(R_Int)={root:Packages:USAXS:MyColorWave,0,10,Rainbow}
     69                        ModifyGraph /W=RcurvePlotGraph/Z mode=4, zColor(R_Int)={root:Packages:USAXS:MyColorWave,0,10,Rainbow}
    6870                else
    69                         ModifyGraph /W=RcurvePlotGraph  mode=4, zColor(R_Int)=0
     71                        ModifyGraph /W=RcurvePlotGraph/Z  mode=4, zColor(R_Int)=0
    7072                endif
    7173        endif
     
    205207        NVAR CalibrateToWeight  =       root:Packages:Indra3:CalibrateToWeight
    206208        NVAR CalibrateToVolume  =       root:Packages:Indra3:CalibrateToVolume
     209        NVAR CalibrateArbitrary         =       root:Packages:Indra3:CalibrateArbitrary
    207210        NVAR SampleWeightInBeam         =       root:Packages:Indra3:SampleWeightInBeam
     211        NVAR SampleDensity              =       root:Packages:Indra3:SampleDensity
     212        NVAR SampleWeightInBeam         =       root:Packages:Indra3:SampleWeightInBeam
     213        NVAR BeamExposureArea   =       root:Packages:Indra3:BeamExposureArea
    208214        NVAR BLPeakWidth                        =       root:Packages:Indra3:BlankFWHM
    209215        NVAR BLPeakMax                  =       root:Packages:Indra3:BlankMaximum
     
    285291                Kfactor = Kfactor*SampleThickness*0.1
    286292                ASBParameters=ReplaceStringByKey("CalibrationUnit",ASBParameters,"cm2/cm3","=")
    287         else                                    //use weight. Assume the weight in the beam is already scaled per beam area?
     293        elseif(CalibrateArbitrary)              //arbitrary, use thickness 1mm, data are on relative scale anyway.
     294                Kfactor = Kfactor*1*0.1
     295                ASBParameters=ReplaceStringByKey("CalibrationUnit",ASBParameters,"Arbitrary","=")
     296        else                            //use weight. Assume the weight in the beam is already scaled per beam area?
     297                //first calculate the amount of sample in the beam...
    288298                Kfactor = Kfactor * SampleWeightInBeam          //SampleWeightInBeam should be in g and be real weight of sample [g/in beam area], not unit weight [g/cm2]
    289299                ASBParameters=ReplaceStringByKey("CalibrationUnit",ASBParameters,"cm2/g","=")
    290         endif
    291        
    292        
    293        
     300        endif   
    294301        ASBParameters=ReplaceNumberByKey("Kfactor",ASBParameters,Kfactor,"=")
    295302        ASBParameters=ReplaceNumberByKey("OmegaFactor",ASBParameters,OmegaFactor,"=")
    296 
    297 //      IN2G_AppendAnyText("Blank width :\t"+num2str(BLPeakWidthL))
    298 //      IN2G_AppendAnyText("Sample thickness :\t\t"+num2str(SampleThickness))
    299 //      IN2G_AppendAnyText("K factor :\t\t"+num2str(Kfactor))
    300 //      IN2G_AppendAnyText("Omega Factor :\t"+num2str(Omegafactor))
    301303        setDataFolder OldDf     
    302304
     
    483485        SVAR ListOfASBParametersL=root:Packages:Indra3:ListOfASBParameters
    484486
     487        NVAR CalibrateArbitrary=root:Packages:Indra3:CalibrateArbitrary
    485488        NVAR CalibrateToWeight=root:Packages:Indra3:CalibrateToWeight
    486489        NVAR CalibrateToVolume=root:Packages:Indra3:CalibrateToVolume
     
    488491        NVAR CalculateWeight=root:Packages:Indra3:CalculateWeight
    489492        NVAR BeamExposureArea=root:Packages:Indra3:BeamExposureArea
    490         NVAR SampleWeightAbsorption=root:Packages:Indra3:SampleWeightAbsorption
     493        NVAR SampleDensity=root:Packages:Indra3:SampleDensity
    491494       
    492495        ///////////
     
    583586                        if(CalculateWeight)
    584587                                IN2G_AppendAnyText("Calculated weight :\t\t")
    585                                 IN2G_AppendAnyText("SampleWeightAbsorption :\t\t"+num2str(SampleWeightAbsorption))
     588                                IN2G_AppendAnyText("SampleDensity :\t\t"+num2str(SampleDensity))
    586589                                IN2G_AppendAnyText("SampleTransmission :\t\t"+num2str(SampleTransmission))
    587590                                IN2G_AppendAnyText("SampleTransmissionPeakToPeak :\t\t"+num2str(SampleTransmissionPeakToPeak))
     
    589592                        else
    590593                                IN2G_AppendAnyText("Sample weight :\t\t"+num2str(SampleWeightInBeam))
     594                                IN2G_AppendAnyText("SampleTransmission :\t\t"+num2str(SampleTransmission))
     595                                IN2G_AppendAnyText("SampleTransmissionPeakToPeak :\t\t"+num2str(SampleTransmissionPeakToPeak))
    591596                        endif
    592                 else //(CalibrateToVolume, default)
     597                elseif(CalibrateArbitrary) //calibrate arbitrary...
     598                                IN2G_AppendAnyText("SampleTransmission :\t\t"+num2str(SampleTransmission))
     599                                IN2G_AppendAnyText("SampleTransmissionPeakToPeak :\t\t"+num2str(SampleTransmissionPeakToPeak))         
     600                else            //(CalibrateToVolume, default)
    593601                        if(CalculateThickness)
    594602                                IN2G_AppendAnyText("Calculated thickness :\t\t")
     
    600608                        else
    601609                                IN2G_AppendAnyText("Sample Thickness :\t\t"+num2str(SampleThickness))
     610                                IN2G_AppendAnyText("SampleTransmission :\t\t"+num2str(SampleTransmission))
     611                                IN2G_AppendAnyText("SampleTransmissionPeakToPeak :\t\t"+num2str(SampleTransmissionPeakToPeak))
    602612                        endif
    603613                endif
     
    618628                                if(CalibrateToWeight)
    619629                                        IN2G_AppendorReplaceWaveNote("M_SMR_Int","Units","cm2/g")
     630                                elseif(CalibrateArbitrary)
     631                                        IN2G_AppendorReplaceWaveNote("M_SMR_Int","Units","Arbitrary")
    620632                                else
    621633                                        IN2G_AppendorReplaceWaveNote("M_SMR_Int","Units","cm2/cm3")
     
    640652                                if(CalibrateToWeight)
    641653                                        IN2G_AppendorReplaceWaveNote("SMR_Int","Units","cm2/g")
     654                                elseif(CalibrateArbitrary)
     655                                        IN2G_AppendorReplaceWaveNote("SMR_Int","Units","Arbitrary")
    642656                                else
    643657                                        IN2G_AppendorReplaceWaveNote("SMR_Int","Units","cm2/cm3")
     
    665679                                if(CalibrateToWeight)
    666680                                        IN2G_AppendorReplaceWaveNote("M_DSM_Int","Units","cm2/g")
     681                                elseif(CalibrateArbitrary)
     682                                        IN2G_AppendorReplaceWaveNote("M_DSM_Int","Units","Arbitrary")
    667683                                else
    668684                                        IN2G_AppendorReplaceWaveNote("M_DSM_Int","Units","cm2/cm3")
     
    687703                                if(CalibrateToWeight)
    688704                                        IN2G_AppendorReplaceWaveNote("DSM_Int","Units","cm2/g")
     705                                elseif(CalibrateArbitrary)
     706                                        IN2G_AppendorReplaceWaveNote("DSM_Int","Units","Arbitrary")
    689707                                else
    690708                                        IN2G_AppendorReplaceWaveNote("DSM_Int","Units","cm2/cm3")
     
    724742                        if(CalculateWeight)
    725743                                IN2G_AppendNoteToAllWaves("CalculateWeight",num2str(CalculateWeight))
    726                                 IN2G_AppendNoteToAllWaves("SampleWeightAbsorption",num2str(SampleWeightAbsorption))
     744                                IN2G_AppendNoteToAllWaves("SampleDensity",num2str(SampleDensity))
    727745                                IN2G_AppendNoteToAllWaves("SampleWeight",num2str(SampleWeightInBeam))
    728746                        else
     
    10661084Function IN3_CalculateSampleThickness()
    10671085
     1086        NVAR CalibrateToWeight = root:Packages:Indra3:CalibrateToWeight
    10681087        NVAR CalculateThickness = root:Packages:Indra3:CalculateThickness
    10691088        NVAR SampleThickness = root:Packages:Indra3:SampleThickness
     
    10711090        NVAR SampleLinAbsorption = root:Packages:Indra3:SampleLinAbsorption
    10721091        NVAR SampleFilledFraction = root:Packages:Indra3:SampleFilledFraction
    1073        
     1092        NVAR CalculateWeight= root:Packages:Indra3:CalculateWeight
     1093        NVAR SampleDensity= root:Packages:Indra3:SampleDensity
     1094        NVAR SampleWeightInBeam= root:Packages:Indra3:SampleWeightInBeam
     1095        NVAR SampleFilledFraction= root:Packages:Indra3:SampleFilledFraction
     1096        NVAR BeamExposureArea= root:Packages:Indra3:BeamExposureArea   
    10741097        //transm =  exp(-mu * T)
    10751098        // T =  (1/SampleFilledFraction) *(- ln(transm)/mu )
    10761099        //mu = (1/SampleFilledFraction) *(- ln(transm)/T )
    1077         if(CalculateThickness)
    1078                 SampleThickness = -10*(1/SampleFilledFraction) *( ln(SampleTransmission)/SampleLinAbsorption )
    1079         else
    1080                 SampleLinAbsorption =  -10*(1/SampleFilledFraction) *( ln(SampleTransmission)/SampleThickness )
    1081         endif
    1082        
    1083 end
    1084 
    1085 //***********************************************************************************************************************************
    1086 //***********************************************************************************************************************************
    1087 //***********************************************************************************************************************************
    1088 //***********************************************************************************************************************************
    1089 //***********************************************************************************************************************************
    1090 //***********************************************************************************************************************************
     1100        if(CalibrateToWeight)
     1101                if(CalculateWeight)
     1102                        if(CalculateThickness)
     1103                                SampleThickness = -10 *( ln(SampleTransmission)/SampleLinAbsorption )
     1104                        endif
     1105                        SampleWeightInBeam = BeamExposureArea * SampleThickness * SampleDensity
     1106                endif
     1107        else   
     1108                if(CalculateThickness)
     1109                        SampleThickness = -10*(1/SampleFilledFraction) *( ln(SampleTransmission)/SampleLinAbsorption )
     1110                else
     1111                        SampleLinAbsorption =  -10*(1/SampleFilledFraction) *( ln(SampleTransmission)/SampleThickness )
     1112                endif
     1113        endif   
     1114end
     1115
     1116//***********************************************************************************************************************************
     1117//***********************************************************************************************************************************
     1118//***********************************************************************************************************************************
     1119//***********************************************************************************************************************************
     1120//***********************************************************************************************************************************
     1121//***********************************************************************************************************************************
  • User Procedures/Indra 2/Readme.txt

    r12 r13  
    1010______________________________________________________________________________________
    1111xxxxx
    12 Added calibration to weight, for now cannot calculate weight of sample in the beam,
     12Added calibration to weight, can calculate weight of sample in the beam, and can use transmission to calculate also thickness of 100% dense sample. Therefore it can use area of the beam with transmission, line absorption coefficient and density of the material for  cm2/g calibration.
    1313Modified to compile on computers even without xop and abort & produce message when xop is called with instructions.
    1414
  • User Procedures/Irena/IR1_GeneralGraph.ipf

    r6 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version=2.13
     2#pragma version=2.14
    33#include <KBColorizeTraces>
    44Constant IR1PversionNumber=2.13
     
    1010//*************************************************************************/
    1111
     12//2.14 Modified to handle different units for Intensity calibration. Addec control in Change Graph details panel.
    1213//2.13 Added vertical scrolling
    1314//2.12 fix in Scripting tool call which caused problems when starting with no data type chosen. Defaults properly to qrs now.
     
    11971198        CheckBox GraphLegendShortNms proc=IR1P_GenPlotCheckBox, help={"Check to have legend use only last folder name."}       
    11981199
     1200        CheckBox CheckYAxisUnits pos={170,220},title="Do not check Y data units?", variable=root:Packages:GeneralplottingTool:DoNotCheckYAxisUnits
     1201        CheckBox CheckYAxisUnits proc=IR1P_GenPlotCheckBox, help={"Check to skip checking the units for Y wave. Will not warn when different are loaded"}       
     1202
     1203
    11991204        CheckBox DisplayTimeAndDate pos={170,280},title="Date & time stamp?", variable=root:Packages:GeneralplottingTool:DisplayTimeAndDate
    12001205        CheckBox DisplayTimeAndDate proc=IR1P_GenPlotCheckBox, help={"Display date and time in the lower right corner"}
     
    16211626        SVAR GraphXAxisName=root:Packages:GeneralplottingTool:GraphXAxisName
    16221627        SVAR GraphYAxisName=root:Packages:GeneralplottingTool:GraphYAxisName
     1628        SVAR ListOfDataFormating=root:Packages:GeneralplottingTool:ListOfDataFormating
     1629        string Units=stringbykey("Units",ListOfDataFormating,"=",";")
    16231630        string NewLabel
    16241631       
     
    16401647                       
    16411648        elseif (cmpstr(which,"Y")==0)
     1649                        if(strlen(Units)<1)
     1650                                Units="cm\S2\M/cm\S3\M"
     1651                        else
     1652                                Units=ReplaceString("cm2/g", Units, "cm\S2\M/g")
     1653                                Units=ReplaceString("cm2/cm3", Units, "cm\S2\M/cm\S3\M")
     1654                        endif
    16421655
    16431656                if(cmpstr(WhatTypeSelected,"Y")==0)
    1644                         NewLabel="Intensity [cm\S-1\M]"
     1657                        NewLabel="Intensity ["+Units+"]"
    16451658                elseif(cmpstr(WhatTypeSelected,"Y^2")==0)
    1646                         NewLabel="Intensity\S2\M [cm\S-2\M]"
     1659                        NewLabel="Intensity\S2\M [("+Units+")\S2\M]"
    16471660                elseif(cmpstr(WhatTypeSelected,"Y^3")==0)
    1648                         NewLabel="Intensity\S3\M [cm\S-3\M]"
     1661                        NewLabel="Intensity\S3\M [("+Units+")\S3\M]"
    16491662                elseif(cmpstr(WhatTypeSelected,"Y^4")==0)
    1650                         NewLabel="Intensity\S4\M [cm\S-4\M]"
     1663                        NewLabel="Intensity\S4\M [("+Units+")\S4\M]"
    16511664                elseif(cmpstr(WhatTypeSelected,"1/Y")==0)
    1652                         NewLabel="Intensity\S-1\M [cm]"
     1665                        NewLabel="Intensity\S-1\M [("+Units+")\S-1\M]"
    16531666                elseif(cmpstr(WhatTypeSelected,"sqrt(1/Y)")==0)
    1654                         NewLabel="sqrt(Intensity\S-1\M) [cm\S-0.5\M]"
     1667                        NewLabel="sqrt(Intensity\S-1\M) [sqrt("+Units+")]"
    16551668                elseif(cmpstr(WhatTypeSelected,"ln(Y*X^2)")==0)
    16561669                        NewLabel="ln(Intensity * q\S2\M)"
     
    16601673                        NewLabel="ln(Intensity * q)"
    16611674                elseif(cmpstr(WhatTypeSelected,"Y*X^2")==0)
    1662                         NewLabel="Intensity * q\S2\M [cm\S-1\M * A\S-2\M]"
     1675                        NewLabel="Intensity * q\S2\M ["+Units+" * A\S-2\M]"
    16631676                elseif(cmpstr(WhatTypeSelected,"Y*X^4")==0)
    1664                         NewLabel="Intensity * q\S4\M [cm\S-1\M * A\S-4\M]"
     1677                        NewLabel="Intensity * q\S4\M ["+Units+" * A\S-4\M]"
    16651678                else
    16661679                        NewLabel=""
     
    17111724        ListOfVariables+="ModifyDataBackground;ModifyDataMultiplier;ModifyDataQshift;ModifyDataErrorMult;"
    17121725        ListOfVariables+="TrimPointLargeQ;TrimPointSmallQ;FittingParam1;FittingParam2;FittingParam3;FittingParam4;FittingParam5;"
    1713         ListOfVariables+="FitUseErrors;Xoffset;Yoffset;"
     1726        ListOfVariables+="FitUseErrors;Xoffset;Yoffset;DoNotCheckYAxisUnits;"
    17141727        //3D graphs special controls
    17151728        ListOfVariables+="Graph3DClrMin;Graph3DClrMax;Graph3DAngle;Graph3DAxLength;Graph3DLogColors;Graph3DColorsReverse;"
  • User Procedures/Irena/IR1_GeneralGraph2.ipf

    r6 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version=2.08
     2#pragma version=2.10
    33
    44//*************************************************************************\
     
    1010
    1111//to do: need to handle better the symbols and line types, limit for 8 types is just way too little.
    12 
     12//2.10 modified to handle different Intensity units for calibration
     13//2.09 added units to lookup string so we can propagate them forward.
    1314//2.08 changed rainbow colorization method to produce prettier color scheme. based on Data manipulation II method (Tishler likely).
    1415//2.07 modified name of backup waves to use only _B at the end increasing length of names to 30. Should match enforced user length on import now.
     
    161162        SVAR ListOfDataFolderNames=root:Packages:GeneralplottingTool:ListOfDataFolderNames
    162163        SVAR ListOfDataOrgWvNames=root:Packages:GeneralplottingTool:ListOfDataOrgWvNames
    163 //      SVAR ListOfDataFormating=root:Packages:GeneralplottingTool:ListOfDataFormating
     164        SVAR ListOfDataFormating=root:Packages:GeneralplottingTool:ListOfDataFormating
    164165       
    165166        variable NumberOfDataPresent,i
     
    175176       
    176177        ListOfDataFolderNames+=DFloc+DFInt+";"
     178        //now add any units in teh last wave added to
     179        Wave InputIntWv=$(DFloc+DFInt)
     180        string NewInputUnit=StringByKey("Units", note(InputIntWv), "=" , ";")
     181        string LastInputUnit = StringByKey("Units", ListOfDataFormating, "=")
     182        NVAR DoNotCheckYAxisUnits = root:Packages:GeneralplottingTool:DoNotCheckYAxisUnits
     183        if(!DoNotCheckYAxisUnits && NumberOfDataPresent>0 && strlen(LastInputUnit)>0 && !stringmatch(LastInputUnit, newInputUnit))
     184                DoAlert 0, "Units for Y data do not match; prior data: "+LastInputUnit+", new data : "+NewInputUnit+". This message can be disabled in \"Change graph details\"."
     185        endif
     186        ListOfDataFormating=ReplaceStringByKey("Units", ListOfDataFormating, newInputUnit , "=")
    177187        ListOfDataOrgWvNames=ReplaceStringByKey("IntWave"+num2str(NumberOfDataPresent), ListOfDataOrgWvNames, DFloc+DFInt , "=")
    178188        ListOfDataOrgWvNames=ReplaceStringByKey("QWave"+num2str(NumberOfDataPresent), ListOfDataOrgWvNames, DFloc+DFQ , "=")
     
    203213        //ListOfGraphFormating contains info, which data should be ploted...
    204214       
    205         variable i, imax=ItemsInList(ListOfDataOrgWvNames)/3            //there should be always 3 items in each list per data set ploted
     215        variable i, imax=floor(ItemsInList(ListOfDataOrgWvNames)/3)             //there should be always 3 items in each list per data set ploted + common units added later
    206216        string DataX=stringByKey("DataX", ListOfGraphFormating,"=")
    207217        string DataY=stringByKey("DataY", ListOfGraphFormating,"=")
     
    13181328        PopupMenu XAxisDataType, win=IR1P_ControlPanel,mode=1,popvalue=StringByKey("DataX", FormatingStr, "=") //,value= "Q;Q^2;Q^3;Q^4;"
    13191329        PopupMenu YAxisDataType,win=IR1P_ControlPanel, mode=1,popvalue=StringByKey("DataY", FormatingStr, "=")//,value= "I;I^2;I^3;I^4;I*Q^4;1/I;ln(Q^2*I);"
    1320        
     1330        IR1P_UpdateAxisName("Y",StringByKey("DataY", FormatingStr, "="))
     1331        IR1P_UpdateAxisName("X",StringByKey("DataX", FormatingStr, "="))
    13211332        NVAR GraphUseBW = root:Packages:GeneralplottingTool:GraphUseBW
    13221333        if(GraphUseBW+GraphUseColors+GraphUseRainbow!=1)
     
    13301341                IR1P_GraphUseRainbow(GraphUseRainbow, GraphUseBW)
    13311342        endif
     1343        variable i
    13321344        if (GraphUseSymbols)
    1333                         FormatingStr=ReplaceStringByKey("mode[0]",FormatingStr, "4","=")
    1334                         FormatingStr=ReplaceStringByKey("mode[1]",FormatingStr, "4","=")
    1335                         FormatingStr=ReplaceStringByKey("mode[2]",FormatingStr, "4","=")
    1336                         FormatingStr=ReplaceStringByKey("mode[3]",FormatingStr, "4","=")
    1337                         FormatingStr=ReplaceStringByKey("mode[4]",FormatingStr, "4","=")
    1338 
    1339                         FormatingStr=ReplaceStringByKey("marker[0]",FormatingStr, "8","=")
    1340                         FormatingStr=ReplaceStringByKey("marker[1]",FormatingStr, "17","=")
    1341                         FormatingStr=ReplaceStringByKey("marker[2]",FormatingStr, "5","=")
    1342                         FormatingStr=ReplaceStringByKey("marker[3]",FormatingStr, "12","=")
    1343                         FormatingStr=ReplaceStringByKey("marker[4]",FormatingStr, "16","=")
     1345                For(i=0;i<62;i+=1)
     1346                        FormatingStr=ReplaceStringByKey("mode["+num2str(i)+"]",FormatingStr, "4","=")
     1347                        //FormatingStr=ReplaceStringByKey("mode[1]",FormatingStr, "4","=")
     1348                        //FormatingStr=ReplaceStringByKey("mode[2]",FormatingStr, "4","=")
     1349                        //FormatingStr=ReplaceStringByKey("mode[3]",FormatingStr, "4","=")
     1350                        //FormatingStr=ReplaceStringByKey("mode[4]",FormatingStr, "4","=")
     1351
     1352                        FormatingStr=ReplaceStringByKey("marker["+num2str(i)+"]",FormatingStr, num2str(i),"=")
     1353                        //FormatingStr=ReplaceStringByKey("marker[1]",FormatingStr, "17","=")
     1354                        //FormatingStr=ReplaceStringByKey("marker[2]",FormatingStr, "5","=")
     1355                        //FormatingStr=ReplaceStringByKey("marker[3]",FormatingStr, "12","=")
     1356                        //FormatingStr=ReplaceStringByKey("marker[4]",FormatingStr, "16","=")
     1357                endfor 
    13441358        else
    1345                         FormatingStr=ReplaceStringByKey("mode[0]",FormatingStr, "0","=")
    1346                         FormatingStr=ReplaceStringByKey("mode[1]",FormatingStr, "0","=")
    1347                         FormatingStr=ReplaceStringByKey("mode[2]",FormatingStr, "0","=")
    1348                         FormatingStr=ReplaceStringByKey("mode[3]",FormatingStr, "0","=")
    1349                         FormatingStr=ReplaceStringByKey("mode[4]",FormatingStr, "0","=")               
     1359                For(i=0;i<62;i+=1)
     1360                        FormatingStr=ReplaceStringByKey("mode["+num2str(i)+"]",FormatingStr, "0","=")
     1361                        //FormatingStr=ReplaceStringByKey("mode[1]",FormatingStr, "0","=")
     1362                        //FormatingStr=ReplaceStringByKey("mode[2]",FormatingStr, "0","=")
     1363                        //FormatingStr=ReplaceStringByKey("mode[3]",FormatingStr, "0","=")
     1364                        //FormatingStr=ReplaceStringByKey("mode[4]",FormatingStr, "0","=")     
     1365                endfor 
    13501366        endif
    13511367end
  • User Procedures/Irena/IR1_ImportData.ipf

    r11 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version=2.16
    3 Constant IR1IversionNumber = 2.15
     2#pragma version=2.17
     3Constant IR1IversionNumber = 2.17
    44Constant IR1TrimNameLength = 28
    55//*************************************************************************\
     
    99//*************************************************************************/
    1010
     11//2.17 added controls for Units - Arbitrary, cm2/cm3, and cm2/g are known units for now...
    1112//2.16 added cleanup of weird characters (,),%, {, } of names. Allowed by igor but cause problems to my opther code.
    1213//2.15 added vertical scrolling for panel.
     
    7172Proc IR1I_ImportData()
    7273        PauseUpdate; Silent 1           // building window...
    73         NewPanel /K=1 /W=(3,40,430,700) as "Import data"
     74        NewPanel /K=1 /W=(3,40,430,720) as "Import data"
    7475        DoWindow/C IR1I_ImportData
    7576//      SetDrawLayer UserBack
     
    192193        CheckBox UseFileNameAsFolder,pos={10,420},size={16,14},proc=IR1I_CheckProc,title="Use File Nms As Fldr Nms?",variable= root:Packages:ImportData:UseFileNameAsFolder, help={"Use names of imported files as folder names for the data?"}
    193194        CheckBox IncludeExtensionInName,pos={240,420},size={16,14},proc=IR1I_CheckProc,title="Include Extension in fldr nm?",variable= root:Packages:ImportData:IncludeExtensionInName, help={"Include file extension in imported data foldername?"}, disable=!(root:Packages:ImportData:UseFileNameAsFolder)
    194         CheckBox UseIndra2Names,pos={10,436},size={16,14},proc=IR1I_CheckProc,title="Use Indra 2 wave names?",variable= root:Packages:ImportData:UseIndra2Names, help={"Use wave names using Indra 2 name structure? (DSM_Int, DSM_Qvec, DSM_Error)"}
     195        CheckBox UseIndra2Names,pos={10,436},size={16,14},proc=IR1I_CheckProc,title="Use USAXS names?",variable= root:Packages:ImportData:UseIndra2Names, help={"Use wave names using Indra 2 name structure? (DSM_Int, DSM_Qvec, DSM_Error)"}
    195196        CheckBox ImportSMRdata,pos={150,436},size={16,14},proc=IR1I_CheckProc,title="Slit smeared?",variable= root:Packages:ImportData:ImportSMRdata, help={"Check if the data are slit smeared, changes suggested Indra data names to SMR_Qvec, SMR_Int, SMR_error"}
    196197        CheckBox ImportSMRdata, disable= !root:Packages:ImportData:UseIndra2Names
     
    222223//      PopupMenu SelectFolderNewData,mode=1,popvalue="---",value= #"\"---;\"+IR1_GenStringOfFolders(0, 0,0,0)"
    223224
    224         SetVariable NewDataFolderName, pos={5,550}, size={410,20},title="New data folder:", proc=IR1I_setvarProc
     225        CheckBox DataCalibratedArbitrary,pos={10,547},size={16,14},mode=1,proc=IR1I_CheckProc,title="Calibration Arbitrary",variable= root:Packages:ImportData:DataCalibratedArbitrary, help={"Data not calibrated (on relative scale)"}
     226        CheckBox DataCalibratedVolume,pos={150,547},size={16,14},mode=1,proc=IR1I_CheckProc,title="Calibration cm2/cm3",variable= root:Packages:ImportData:DataCalibratedVolume, help={"Data calibrated to volume"}
     227        CheckBox DataCalibratedWeight,pos={290,547},size={16,14},mode=1,proc=IR1I_CheckProc,title="Calibration cm2/g",variable= root:Packages:ImportData:DataCalibratedWeight, help={"Data calibrated to weight"}
     228
     229        SetVariable NewDataFolderName, pos={5,570}, size={410,20},title="New data folder:", proc=IR1I_setvarProc
    225230        SetVariable NewDataFolderName value= root:packages:ImportData:NewDataFolderName,help={"Folder for the new data. Will be created, if does not exist. Use popup above to preselect."}
    226         SetVariable NewQwaveName, pos={5,570}, size={320,20},title="Q wave names ", proc=IR1I_setvarProc
     231        SetVariable NewQwaveName, pos={5,590}, size={320,20},title="Q wave names ", proc=IR1I_setvarProc
    227232        SetVariable NewQwaveName, value= root:packages:ImportData:NewQWaveName,help={"Input name for the new Q wave"}
    228         SetVariable NewIntensityWaveName, pos={5,590}, size={320,20},title="Intensity names", proc=IR1I_setvarProc
     233        SetVariable NewIntensityWaveName, pos={5,610}, size={320,20},title="Intensity names", proc=IR1I_setvarProc
    229234        SetVariable NewIntensityWaveName, value= root:packages:ImportData:NewIntensityWaveName,help={"Input name for the new intensity wave"}
    230         SetVariable NewErrorWaveName, pos={5,610}, size={320,20},title="Error wv names", proc=IR1I_setvarProc
     235        SetVariable NewErrorWaveName, pos={5,630}, size={320,20},title="Error wv names", proc=IR1I_setvarProc
    231236        SetVariable NewErrorWaveName, value= root:packages:ImportData:NewErrorWaveName,help={"Input name for the new Error wave"}
    232         SetVariable NewQErrorWaveName, pos={5,630}, size={320,20},title="Q Error wv names", proc=IR1I_setvarProc
     237        SetVariable NewQErrorWaveName, pos={5,650}, size={320,20},title="Q Error wv names", proc=IR1I_setvarProc
    233238        SetVariable NewQErrorWaveName, value= root:packages:ImportData:NewQErrorWaveName,help={"Input name for the new Q data Error wave"}
    234239
     
    459464        NVAR QvectInNM=root:Packages:ImportData:QvectInNM
    460465
     466        NVAR DataCalibratedArbitrary=root:Packages:ImportData:DataCalibratedArbitrary
     467        NVAR DataCalibratedVolume=root:Packages:ImportData:DataCalibratedVolume
     468        NVAR DataCalibratedWeight=root:Packages:ImportData:DataCalibratedWeight
     469
    461470        IR1_CreateLoggbook()            //this creates the logbook
    462471        SVAR nbl=root:Packages:SAS_Modeling:NotebookName
     
    487496        elseif(QvectInNM)
    488497                IR1L_AppendAnyText("Q was in nm, scaled to A ")
     498        endif
     499        if(DataCalibratedArbitrary)
     500                IR1L_AppendAnyText("Intensity was imported on relative scale") 
     501        elseif(DataCalibratedVolume)
     502                IR1L_AppendAnyText("Intensity was imported with volume calibration [cm2/cm3]") 
     503        elseif(DataCalibratedWeight)
     504                IR1L_AppendAnyText("Intensity was imported with weight calibration [cm2/g]")   
    489505        endif
    490506        if(SkipLines)
     
    631647                endif
    632648        endif
     649        //lets insert here thre Units intot he wave notes...
     650        NVAR DataCalibratedArbitrary=root:Packages:ImportData:DataCalibratedArbitrary
     651        NVAR DataCalibratedVolume=root:Packages:ImportData:DataCalibratedVolume
     652        NVAR DataCalibratedWeight=root:Packages:ImportData:DataCalibratedWeight
     653        if(DataCalibratedWeight)
     654                note/NOCR TempIntensity, "Units=cm2/g;"
     655        elseif(DataCalibratedVolume)
     656                note/NOCR TempIntensity, "Units=cm2/cm3;"       
     657        elseif(DataCalibratedArbitrary)
     658                note/NOCR TempIntensity, "Units=Arbitrary;"     
     659        endif
     660       
    633661        //here we will deal with erros, if the user needs to create them
    634662        NVAR CreateSQRTErrors=root:Packages:ImportData:CreateSQRTErrors
     
    12361264        SVAR NewQErrorWaveName= root:packages:ImportData:NewQErrorWaveName
    12371265
     1266        NVAR DataCalibratedArbitrary = root:Packages:ImportData:DataCalibratedArbitrary
     1267        NVAR DataCalibratedVolume = root:Packages:ImportData:DataCalibratedVolume
     1268        NVAR DataCalibratedWeight = root:Packages:ImportData:DataCalibratedWeight
     1269        if(cmpstr(ctrlName,"DataCalibratedArbitrary")==0)       
     1270                //DataCalibratedArbitrary = 0
     1271                DataCalibratedVolume = 0
     1272                DataCalibratedWeight = 0
     1273        endif
     1274        if(cmpstr(ctrlName,"DataCalibratedVolume")==0) 
     1275                DataCalibratedArbitrary = 0
     1276                //DataCalibratedVolume = 0
     1277                DataCalibratedWeight = 0
     1278        endif
     1279        if(cmpstr(ctrlName,"DataCalibratedWeight")==0) 
     1280                DataCalibratedArbitrary = 0
     1281                DataCalibratedVolume = 0
     1282                //DataCalibratedWeight = 0
     1283        endif
     1284
    12381285        if(cmpstr(ctrlName,"UseFileNameAsFolder")==0)   
    12391286                CheckBox IncludeExtensionInName, disable=!(checked)
     
    18011848        ListOfVariables += "TrimData;TrimDataQMin;TrimDataQMax;ReduceNumPnts;TargetNumberOfPoints;ReducePntsParam;"     
    18021849        ListOfVariables += "NumOfPointsFound;TrunkateStart;TrunkateEnd;"       
     1850        ListOfVariables += "DataCalibratedArbitrary;DataCalibratedVolume;DataCalibratedWeight;"
    18031851
    18041852                //and here we create them
     
    18501898                endif
    18511899        endfor         
     1900       
     1901        NVAR DataCalibratedArbitrary
     1902        NVAR DataCalibratedVolume
     1903        NVAR DataCalibratedWeight
     1904        if(DataCalibratedArbitrary+DataCalibratedVolume+DataCalibratedWeight!=1)
     1905                DataCalibratedArbitrary = 1
     1906                DataCalibratedVolume = 0
     1907                DataCalibratedWeight = 0
     1908        endif
    18521909        NVAR TrunkateStart
    18531910        NVAR TrunkateEnd
  • User Procedures/Irena/IR1_LSQF_UserPanel.ipf

    r6 r13  
    4848
    4949        //Experimental data input
    50         CheckBox UseIndra2Data,pos={217,26},size={141,14},proc=IR1U_InputPanelCheckboxProc,title="Use Indra 2 data structure"
     50        CheckBox UseIndra2Data,pos={217,26},size={141,14},proc=IR1U_InputPanelCheckboxProc,title="Use USAXS structure"
    5151        CheckBox UseIndra2Data,value= root:packages:SAS_Modeling:UseIndra2data, help={"Check, if you are using Indra 2 produced data with the orginal names, uncheck if the names of data waves are different"}
    5252        CheckBox UseQRSData,pos={217,40},size={141,14},proc=IR1U_InputPanelCheckboxProc,title="Use QRS data structure"
  • User Procedures/Irena/IR2_PanelCntrlProcs.ipf

    r6 r13  
    11#pragma rtGlobals=1             // Use modern global access method.
    2 #pragma version = 1.24
     2#pragma version = 1.25
    33
    44
     
    99//*************************************************************************/
    1010
     11//1.25 changed "Indra 2" to "USAXS" to make bit more sense for human beings.
    1112//1.24 added Guinier-Porod data type
    1213//1.23 fixed user defined data types of QIS type (with type at the end
     
    483484//      //Experimental data input
    484485        if(strlen(AllowedIrenaTypes)>0)
    485                 CheckBox UseIndra2Data,pos={100,25},size={141,14},proc=IR2C_InputPanelCheckboxProc,title="Indra 2 data"
    486                 CheckBox UseIndra2Data,variable= $(CntrlLocation+":UseIndra2data"), help={"Check, if you are using Indra 2 produced data with the orginal names, uncheck if the names of data waves are different"}
     486                CheckBox UseIndra2Data,pos={100,25},size={141,14},proc=IR2C_InputPanelCheckboxProc,title="USAXS"
     487                CheckBox UseIndra2Data,variable= $(CntrlLocation+":UseIndra2data"), help={"Check, if you are using USAXS - Indra 2 - produced data with the orginal names, uncheck if the names of data waves are different"}
    487488        endif
    488489        CheckBox UseQRSData,pos={100,39},size={90,14},proc=IR2C_InputPanelCheckboxProc,title="QRS (QIS)"
  • User Procedures/Irena/IR2_ScriptingTool.ipf

    r9 r13  
    335335        PopupMenu StartFolderSelection,mode=1,popvalue=root:Packages:Irena:ScriptingTool:StartFolderName,value= #"\"root:;\"+IR2S_GenStringOfFolders2(root:Packages:Irena:ScriptingTool:UseIndra2Data, root:Packages:Irena:ScriptingTool:UseQRSdata,2,1)"
    336336
    337         CheckBox UseIndra2data,pos={302,45},size={76,14},proc=IR2S_CheckProc,title="Indra 2 data?"
     337        CheckBox UseIndra2data,pos={302,45},size={76,14},proc=IR2S_CheckProc,title="USAXS?"
    338338        CheckBox UseIndra2data,variable= root:Packages:Irena:ScriptingTool:UseIndra2Data
    339339        CheckBox UseQRSdata,pos={302,63},size={64,14},proc=IR2S_CheckProc,title="QRS data?"
  • User Procedures/Irena/Modification history.txt

    r12 r13  
    99Control procedures - modified to show only last folder but work transparently for the tools.
    1010Control procedures - added G(r) as data type of Irena results. 
     11Control procedures - changed "Indra 2 data" to "USAXS". More human readable.
    1112Unified fit - fixed Checking of validity levels not to declare level without Guinier part to be invalid.
    1213Unified fit - added "No limits" checkbox and support code to fit without limits.
     
    1617Added panel version control for: Fractals tool, Small-angle diffraction, ASCII export, ASCII Import
    1718Data Manipulation II - modified to add ability to create errors (=uncertainties), scale and rebin to number of points. Modified GUI to separate processing, errors generation and post processing (scaling/rebinning).
    18 Plotting tool II - changed how error bars are displayed and enables SMR data error bars.
     19Plotting tool II - changed how error bars are displayed and enables SMR data error bars.
     20Plotting tool I - added ability to use calibration unit (arbitrary, cm2/cm3 or cm2/g) from the USAXS data. Added checkbox to avoid units checking. 
     21ASCII Import data - added controls to select import units for Intensity [options: Arbitrary, VolumeÉcm2/cm3, WeightÉcm2/g]
    1922
    2023
Note: See TracChangeset for help on using the changeset viewer.