- Timestamp:
- Sep 14, 2010 10:22:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.