- Timestamp:
- Apr 24, 2018 3:55:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Transmission.ipf
r1096 r1097 42 42 String/G gEmptyBoxCoord="1;2;3;4;",gEmptyPanel="ENTER PANEL" 43 43 String/G gSamMatchList = "_none_" 44 String/G gTransMatchList = "_none_" 44 45 45 46 … … 56 57 // ShowTools/A 57 58 PopupMenu popup_0,pos={16.00,359.00},size={104.00,23.00},fstyle=1,fsize=12,proc=V_TSamFilePopMenuProc,title="Sample" 58 PopupMenu popup_0,mode=1,popvalue="_none_",value= #"root:Packages:NIST:VSANS:Globals:Transmission:gSamMatchList 59 PopupMenu popup_0,mode=1,popvalue="_none_",value= #"root:Packages:NIST:VSANS:Globals:Transmission:gSamMatchList" 59 60 PopupMenu popup_1,pos={12.00,229.00},size={195.00,23.00},fstyle=1,fsize=12,proc=V_TTransmFilePopMenuProc,title="Transmission" 60 PopupMenu popup_1,mode=1,popvalue=" sans3584.nxs.ngv",value= V_getFilePurposeList("TRANSMISSION",0)61 PopupMenu popup_1,mode=1,popvalue="_none_",value = #"root:Packages:NIST:VSANS:Globals:Transmission:gTransMatchList"//value= V_getFilePurposeList("TRANSMISSION",0) 61 62 PopupMenu popup_2,pos={17.00,79.00},size={188.00,23.00},fstyle=1,fsize=12,proc=V_TEmpBeamPopMenuProc,title="Open Beam" 62 PopupMenu popup_2,mode=1,popvalue="sans 3584.nxs.ngv",value= V_getFileIntentList("OPEN BEAM",0)63 PopupMenu popup_2,mode=1,popvalue="sans1.nxs.ngv",value= V_getFileIntentList("OPEN BEAM",0) 63 64 Button button_0,pos={34.00,499.00},size={100.00,20.00},proc=V_CalcTransmButtonProc,title="Calculate" 64 65 Button button_2,pos={349.00,13.00},size={30.00,20.00},proc=V_HelpTransmButtonProc,title="?" … … 156 157 return(0) 157 158 158 // switch( pa.eventCode )159 // case 2: // mouse up160 // Variable popNum = pa.popNum161 // String popStr = pa.popStr162 //163 // Variable ii,np164 //165 // WAVE/T fileNameW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Filenames166 // WAVE/T labelW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Labels167 // WAVE groupIDW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Group_ID168 // WAVE transmW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Transmission169 // WAVE/T intentW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Intent170 //171 // // TODO172 // // I don't have a wave for the transmission error value, so it's not displayed here173 // // -- do I read it in, or just ignore it...174 // np = numpnts(labelW) //fileNameW is LONGER - so don't use numpnts(fileWave)175 // for(ii=0;ii<np;ii+=1)176 // if(cmpstr(fileNameW[ii],popStr)==0)177 //178 // SetVariable setvar_0,value=labelW[ii]179 // SetVariable setvar_1,value=groupIDW[ii]180 // SetVariable setvar_7,value=transmW[ii]181 // break //found, get out182 // endif183 // endfor184 //185 // // loop back through to find the transmission file with the matching group id186 // // TODO x- set the popup string to the matching name on exit187 // Variable targetID = groupIDW[ii]188 //// String list = V_getFilePurposeList("TRANSMISSION",0)189 // String list = V_getFileIntentPurposeList("SAMPLE","TRANSMISSION",0)190 //191 // WAVE/T purposeW = root:Packages:NIST:VSANS:CatVSHeaderInfo:Purpose192 // for(ii=0;ii<np;ii+=1)193 // if(cmpstr(purposeW[ii],"TRANSMISSION")==0 && cmpstr(intentW[ii],"SAMPLE")==0 && groupIDW[ii] == targetID)194 // Print "transmission file match at ",filenameW[ii]195 // SetVariable setvar_2,value=labelW[ii]196 // SetVariable setvar_3,value=groupIDW[ii]197 // PopupMenu popup_1,mode=WhichListItem(fileNameW[ii], list )+1,popValue=fileNameW[ii]198 // break199 // endif200 // endfor201 //202 // // now loop back through to find the empty beam file203 // // TODO204 // // x- fill in the XY box205 // // x- Detector Panel field is hard-wired for "B"206 // // -- do I use "EMPTY BEAM", "OPEN BEAM" or both?? I think "OPEN BEAM" is what NICE will use in a drop-down menu207 // //208 //// list = V_getFileIntentList("EMPTY BEAM",0)209 // list = V_getFileIntentList("OPEN BEAM",0)210 //211 // for(ii=0;ii<np;ii+=1)212 // if(cmpstr(intentW[ii],"OPEN BEAM")==0)213 // Print "Open beam match at ",filenameW[ii]214 // SetVariable setvar_4,value=labelW[ii]215 // PopupMenu popup_2,mode=WhichListItem(fileNameW[ii], list )+1,popValue=fileNameW[ii]216 //217 //// SetVariable setvar_6,value =_STR:"ML"218 //219 // WAVE boxCoord = V_getBoxCoordinates(filenameW[ii])220 // Print boxCoord221 // SetVariable setvar_5,value=_STR:V_NumWave2List(boxCoord,";")222 //223 //224 // break225 // endif226 // endfor227 //228 // break229 // case -1: // control being killed230 // break231 // endswitch232 233 return 0234 159 End 235 160 … … 255 180 gTrnGrpID = V_getSample_GroupID(popStr) 256 181 257 SVAR gSamMatchList = root:Packages:NIST:VSANS:Globals:Transmission:gSamMatchList258 String quote = "\""259 gSamMatchList = quote + V_getFileIntentPurposeIDList("SAMPLE","SCATTERING",gTrnGrpID,0) + quote182 // SVAR gSamMatchList = root:Packages:NIST:VSANS:Globals:Transmission:gSamMatchList 183 // String quote = "\"" 184 // gSamMatchList = quote + V_getFileIntentPurposeIDList("SAMPLE","SCATTERING",gTrnGrpID,0) + quote 260 185 // this resets a global string, since I can't pass a parameter (only constants) in value=fn() 261 186 // PopupMenu popup_0,mode=1,value=#gSamMatchList … … 279 204 // and be sure to add in the empty cell, since it's not a "sample" 280 205 retStr += V_getFileIntentPurposeIDList("EMPTY CELL","SCATTERING",gTrnGrpID,0) 281 282 return(retStr) 206 207 // now filter through the string to refine the list to only scattering files that match 208 // the transmission file conditions 209 String newList="",item 210 Variable num,ii 211 212 String transStr 213 ControlInfo popup_1 //the transmission file popup 214 transStr = S_Value 215 216 num=ItemsInList(retStr) 217 for(ii=0;ii<num;ii+=1) 218 item = StringFromList(ii, retStr,";") 219 if(V_Scatter_Match_Trans(transStr,item)) 220 newList += item + ";" 221 endif 222 endfor 223 224 return(newList) 225 End 226 227 228 Function/S V_getTransListForPopup() 229 230 String retStr = V_getFilePurposeList("TRANSMISSION",0) 231 232 // now filter through the string to refine the list to only transmission files that match 233 // the open beam file conditions 234 String newList="",item 235 Variable num,ii 236 237 String openStr 238 ControlInfo popup_2 //the open beam popup 239 openStr = S_Value 240 241 num=ItemsInList(retStr) 242 for(ii=0;ii<num;ii+=1) 243 item = StringFromList(ii, retStr,";") 244 if(V_Trans_Match_Open(openStr,item)) 245 newList += item + ";" 246 endif 247 endfor 248 249 return(newList) 250 283 251 End 284 252 … … 301 269 String detStr = V_getReduction_BoxPanel(popStr) 302 270 SetVariable setvar_6,value =_STR:detStr 271 272 PopupMenu popup_1,mode=1,value=V_getTransListForPopup() 303 273 304 274 break
Note: See TracChangeset
for help on using the changeset viewer.