Changeset 734 for sans/Dev/trunk/NCNR_User_Procedures
- Timestamp:
- Sep 14, 2010 10:22:42 AM (13 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/WriteModelData_v40.ipf
r708 r734 178 178 NVAR/Z dQv = USANS_dQv 179 179 if(NVAR_Exists(dQv) == 0) 180 SetDataFolder root: 180 181 Abort "It's USANS data, and I don't know what the slit height is." 181 182 endif -
sans/Dev/trunk/NCNR_User_Procedures/Common/DataSetHandling.ipf
r732 r734 1442 1442 //If we are here, the folder (now) exists and the user has agreed to overwrite 1443 1443 //either in the function call or from the alert. 1444 1445 // here, GetIndexedObjectName copies all of the waves 1446 index = 0 1444 1447 do 1445 1448 objName = GetIndexedObjName(basestr,1,index) … … 1451 1454 index+=1 1452 1455 while(1) 1456 1457 // -- for USANS data, we need the slit height. copy all of the "USANS_*" variables 1458 // may need to augment this for other situations 1459 index = 0 1460 do 1461 objName = GetIndexedObjName(basestr,2,index) 1462 if (strlen(objName) == 0) 1463 break 1464 endif 1465 if(stringmatch(objName,"USANS*") == 1) 1466 objname = ":"+basestr+":"+objname 1467 NVAR tmp = $objName 1468 Variable/G $(ReplaceString(basestr,objName,newName))= tmp 1469 endif 1470 index+=1 1471 while(1) 1472 1453 1473 1454 1474 SetDataFolder root: -
sans/Dev/trunk/NCNR_User_Procedures/Common/NIST_XML_v40.ipf
r732 r734 1003 1003 /// See WriteModelData_v40.ipf for 6 column equivalent 1004 1004 // 1005 // this only handles 6-column data, will abort if resolution wave is missing 1005 // will abort if resolution wave is missing 1006 // switches for USANS data if the proper global is found, otheriwse treats as SANS data 1006 1007 // 1007 1008 Function ReWrite1DXMLData(folderStr) … … 1038 1039 endif 1039 1040 1040 Duplicate/O qw qbar,sigQ,fs 1041 sigq = resw[p][0] 1042 qbar = resw[p][1] 1043 fs = resw[p][2] 1044 1045 1046 //Data 1047 Wave nf.Q = qw 1048 nf.unitsQ = "1/A" 1049 Wave nf.I = iw 1050 nf.unitsI = "1/cm" 1051 Wave nf.Idev = sw 1052 nf.unitsIdev = "1/cm" 1053 Wave nf.Qdev = sigQ 1054 nf.unitsQdev = "1/A" 1055 Wave nf.Qmean = qbar 1056 nf.unitsQmean = "1/A" 1057 Wave nf.Shadowfactor = fs 1058 nf.unitsShadowfactor = "none" 1059 1060 1061 //write out the standard header information 1062 //fprintf refnum,"FILE: %s\t\t CREATED: %s\r\n",textw[0],textw[1] 1063 1064 //AJJ to fix with sensible values 1065 nf.run = "" 1066 nf.nameSASinstrument = "NIST IGOR Procedures" 1067 nf.SASnote = "" 1068 // 1069 nf.sample_ID = baseStr 1070 nf.title = baseStr 1071 nf.radiation = "neutron" 1072 //Do something with beamstop (rw[21]) 1073 nf.detector_name = "Re-written data" 1074 1075 nf.SASprocessnote = "Modified data written from folder "+baseStr+" on "+(date()+" "+time()) 1076 1077 nf.nameSASProcess = "NIST IGOR" 1078 1079 //Close refnum 1041 1042 // if (USANS) 1043 // else (SANS is assumed) 1044 // endif 1045 NVAR/Z dQv = USANS_dQv // in current DF 1046 if (NVAR_Exists(dQv)) 1047 //USANS data, proceed 1048 //Use the evil extra column for the resolution "information". Should probably switch to using slit_length in collimation. 1049 Duplicate/O qw,dumWave 1050 dumWave = - dQv 1051 1052 //Data 1053 Wave nf.Q = qw 1054 nf.unitsQ = "1/A" 1055 Wave nf.I = iw 1056 nf.unitsI = "1/cm" 1057 Wave nf.Idev = sw 1058 nf.unitsIdev = "1/cm" 1059 // for slit-smeared USANS, set only a 4th column to -dQv 1060 Wave nf.dQl = dumWave 1061 nf.unitsdQl= "1/A" 1062 1063 //AJJ to fix with sensible values 1064 nf.run = "" 1065 nf.nameSASinstrument = "NIST IGOR Procedures" 1066 nf.SASnote = "" 1067 // 1068 nf.sample_ID = baseStr 1069 nf.title = baseStr 1070 nf.radiation = "neutron" 1071 //Do something with beamstop (rw[21]) 1072 nf.detector_name = "Re-written USANS data" 1073 1074 nf.SASprocessnote = "Modified data written from folder "+baseStr+" on "+(date()+" "+time()) 1075 1076 nf.nameSASProcess = "NIST IGOR" 1077 1078 else 1079 //assume SANS data 1080 Duplicate/O qw qbar,sigQ,fs 1081 sigq = resw[p][0] 1082 qbar = resw[p][1] 1083 fs = resw[p][2] 1084 1085 1086 //Data 1087 Wave nf.Q = qw 1088 nf.unitsQ = "1/A" 1089 Wave nf.I = iw 1090 nf.unitsI = "1/cm" 1091 Wave nf.Idev = sw 1092 nf.unitsIdev = "1/cm" 1093 Wave nf.Qdev = sigQ 1094 nf.unitsQdev = "1/A" 1095 Wave nf.Qmean = qbar 1096 nf.unitsQmean = "1/A" 1097 Wave nf.Shadowfactor = fs 1098 nf.unitsShadowfactor = "none" 1099 1100 1101 //write out the standard header information 1102 //fprintf refnum,"FILE: %s\t\t CREATED: %s\r\n",textw[0],textw[1] 1103 1104 //AJJ to fix with sensible values 1105 nf.run = "" 1106 nf.nameSASinstrument = "NIST IGOR Procedures" 1107 nf.SASnote = "" 1108 // 1109 nf.sample_ID = baseStr 1110 nf.title = baseStr 1111 nf.radiation = "neutron" 1112 //Do something with beamstop (rw[21]) 1113 nf.detector_name = "Re-written data" 1114 1115 nf.SASprocessnote = "Modified data written from folder "+baseStr+" on "+(date()+" "+time()) 1116 1117 nf.nameSASProcess = "NIST IGOR" 1118 1119 endif 1120 1080 1121 1081 1122 if(dialog) … … 1095 1136 Print "XML File written: ", GetFileNameFromPathNoSemi(fullPath) 1096 1137 KillWaves/Z tempShortProto 1138 1139 SetDataFolder root: 1140 1097 1141 Return(0) 1098 1142 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf
r693 r734 620 620 endif 621 621 //Print fname 622 if(strlen(fileWave[ii]) > 0 ) //make sure that this is not a click in blank space622 if(strlen(fileWave[ii]) > 0 && ii < numpnts(fileWave)) //make sure that this is not a click in blank space 623 623 err = LoadBT5File(fname,"RAW") 624 624 if(err) … … 706 706 endif 707 707 //Print fname 708 if(strlen(fileWave[ii]) > 0 ) //make sure that this is not a click in blank space708 if(strlen(fileWave[ii]) > 0 && ii < numpnts(fileWave)) //make sure that this is not a click in blank space 709 709 ReadBT5Header(fname) 710 710 endif
Note: See TracChangeset
for help on using the changeset viewer.