Changeset 2784 for trunk/imports/G2rfd_xye.py
- Timestamp:
- Apr 15, 2017 10:46:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/imports/G2rfd_xye.py
r2783 r2784 122 122 return True 123 123 124 class txt_ nmXRayReaderClass(G2IO.ImportReflectometryData):125 'Routines to import X-ray q REFD data from a .xrfd or .xdat file, q in nm-1'124 class txt_NeutronReaderClass(G2IO.ImportReflectometryData): 125 'Routines to import neutron q REFD data from a .nrfd or .ndat file' 126 126 def __init__(self): 127 127 super(self.__class__,self).__init__( # fancy way to self-reference 128 extensionlist=('. xrfd','.xdat'),128 extensionlist=('.nrfd','.ndat'), 129 129 strictExtension=False, 130 formatName = 'q ( nm-1) step X-rayQRE data',131 longFormatName = 'q ( nm-1) stepped X-raytext data file in Q,R,E order; E optional'130 formatName = 'q (A-1) step neutron QRE data', 131 longFormatName = 'q (A-1) stepped neutron text data file in Q,R,E order; E optional' 132 132 ) 133 133 … … 176 176 try: 177 177 data = [float(val) for val in vals] 178 x.append(float(data[0]) /10.) #convert nm-1 to A-1178 x.append(float(data[0])) 179 179 f = float(data[1]) 180 180 if f <= 0.0: 181 x.pop()181 del x[-1] 182 182 continue 183 183 elif len(vals) > 2: … … 203 203 pass 204 204 self.instdict['wave'] = wave 205 self.instdict['type'] = 'R XC'205 self.instdict['type'] = 'RNC' 206 206 x = np.array(x) 207 207 self.reflectometrydata = [ … … 211 211 np.zeros(N), # calc. intensities (zero) 212 212 np.zeros(N), # obs-calc profiles 213 np.array(sq), # fix bkg213 np.array(sq), # Q FWHM 214 214 ] 215 215 self.reflectometryentry[0] = filename … … 220 220 221 221 return True 222
Note: See TracChangeset
for help on using the changeset viewer.