Ignore:
Timestamp:
Apr 6, 2018 3:02:01 PM (5 years ago)
Author:
srkline
Message:

corrected issues with transmission calculation where the popup menu of sample files was limited in number. this limitation has been removed.

fixed the re-calculation of transmission when the same value is to be patched to multiple sample files with the same group ID. now the transmission is calculated once, for the first file in the popup and the values are simply written to the remaining files.

when the box for the open beam is defined, the panel where it is located is written to the file in a new field under /reduction. it is later recalled in the transmission panel.

Defined a "Reference" beam center position for each carriage as the RIGHT panel center. then all other panel centers (L, T, B) can be derived from this value. if the beam center is measured on the Left panel, it is converted to "right" coordinates before reporting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Transmission.ipf

    r1084 r1094  
    259259                        gSamMatchList = quote + V_getFileIntentPurposeIDList("SAMPLE","SCATTERING",gTrnGrpID,0) + quote 
    260260                        // this resets a global string, since I can't pass a parameter (only constants) in value=fn()            
    261                         PopupMenu popup_0,mode=1,value=#gSamMatchList 
     261//                      PopupMenu popup_0,mode=1,value=#gSamMatchList 
     262                        PopupMenu popup_0,mode=1,value=V_getSamListForPopup() 
    262263                         
    263264                        break 
     
    269270End 
    270271 
     272Function/S V_getSamListForPopup() 
     273 
     274//      String quote = "\"" 
     275        NVAR gTrnGrpID = root:Packages:NIST:VSANS:Globals:Transmission:gTrnGrpID 
     276 
     277        return(V_getFileIntentPurposeIDList("SAMPLE","SCATTERING",gTrnGrpID,0)) 
     278End 
    271279 
    272280Function V_TEmpBeamPopMenuProc(pa) : PopupMenuControl 
     
    281289                        SetVariable setvar_4,value=_STR:V_getSampleDescription(popStr) 
    282290                         
    283 //                      SetVariable setvar_6,value =_STR:"ML" 
    284291 
    285292                        WAVE boxCoord = V_getBoxCoordinates(popStr) 
     
    287294                        SetVariable setvar_5,value=_STR:V_NumWave2List(boxCoord,";") 
    288295                         
     296                        String detStr = V_getReduction_BoxPanel(popStr) 
     297                        SetVariable setvar_6,value =_STR:detStr 
    289298                         
    290299                        break 
     
    373382                        for(ii=0;ii<num;ii+=1) 
    374383                                SamFile = StringFromList(ii, list, ";") 
    375                                 V_CalcOneTransmission(SamFile,TransFile,EmptyFile)                       
     384                                 
     385                                if(ii==0) 
     386                                        // calculate the transmission for the first file 
     387                                        V_CalcOneTransmission(SamFile,TransFile,EmptyFile)       
     388                                else 
     389                                        // then just write in the values (globals) that V_CalcOne determined 
     390                                        NVAR gTrans = root:Packages:NIST:VSANS:Globals:Transmission:gTrans 
     391                                        NVAR gTransErr = root:Packages:NIST:VSANS:Globals:Transmission:gTransErr 
     392                                         
     393                                        // write both out to the sample *scattering* file on disk 
     394                                        V_writeSampleTransmission(SamFile,gTrans) 
     395                                        V_writeSampleTransError(SamFile,gTransErr)       
     396 
     397                                endif            
    376398                        endfor 
    377399                         
Note: See TracChangeset for help on using the changeset viewer.