Changeset 1fac6c0 in sasview for src/sas/sascalc/dataloader/readers/sesans_reader.py
- Timestamp:
- Oct 10, 2016 4:32:09 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 392056d
- Parents:
- 51a4d78
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/sesans_reader.py
r1b82623 r1fac6c0 84 84 tdx = numpy.zeros(0) 85 85 # print "all good" 86 output = Data1D(x=x, y=y, lam=lam, dy=dy, dx=dx, dlam=dlam )86 output = Data1D(x=x, y=y, lam=lam, dy=dy, dx=dx, dlam=dlam, isSesans=True ) 87 87 # print output 88 88 self.filename = output.filename = basename … … 121 121 paramvals.append(toks[1]) 122 122 if len(toks)>5: 123 #zvals.append(toks[0]) 124 #dzvals.append(toks[1]) 125 #lamvals.append(toks[2]) 126 #dlamvals.append(toks[3]) 127 #Pvals.append(toks[4]) 128 #dPvals.append(toks[5]) 129 123 130 zvals.append(toks[0]) 124 dzvals.append(toks[ 1])125 lamvals.append(toks[ 2])126 dlamvals.append(toks[ 3])127 Pvals.append(toks[ 4])128 dPvals.append(toks[ 5])131 dzvals.append(toks[3]) 132 lamvals.append(toks[4]) 133 dlamvals.append(toks[5]) 134 Pvals.append(toks[1]) 135 dPvals.append(toks[2]) 129 136 else: 130 137 continue … … 140 147 default_z_unit = "A" 141 148 data_conv_P = None 142 default_p_unit = " " 149 default_p_unit = " " # Adjust unit for axis (L^-3) 143 150 lam_unit = lam_header[1].replace("[","").replace("]","") 151 if lam_unit == 'AA': 152 lam_unit = 'A' 144 153 varheader=[zvals[0],dzvals[0],lamvals[0],dlamvals[0],Pvals[0],dPvals[0]] 145 154 valrange=range(1, len(zvals)) … … 161 170 output.x, output.x_unit = self._unit_conversion(x, lam_unit, default_z_unit) 162 171 output.y = y 172 output.y_unit = 'pol' # output y_unit erbij 163 173 output.dx, output.dx_unit = self._unit_conversion(dx, lam_unit, default_z_unit) 164 174 output.dy = dy … … 166 176 output.dlam, output.dlam_unit = self._unit_conversion(dlam, lam_unit, default_z_unit) 167 177 168 output.xaxis("\ rm{z}", output.x_unit)169 output.yaxis("\\rm{P/P0}", output.y_unit) 178 output.xaxis("\\rm{z}", output.x_unit) 179 output.yaxis("\\rm{P/P0}", output.y_unit) # Adjust label to ln P/(lam^2 t), remove lam column refs 170 180 # Store loading process information 171 181 output.meta_data['loader'] = self.type_name 172 output.sample.thickness = float(paramvals[6])182 #output.sample.thickness = float(paramvals[6]) 173 183 output.sample.name = paramvals[1] 174 184 output.sample.ID = paramvals[0] 175 185 zaccept_unit_split = paramnames[7].split("[") 176 186 zaccept_unit = zaccept_unit_split[1].replace("]","") 177 if zaccept_unit.strip() == '\AA^-1' :187 if zaccept_unit.strip() == '\AA^-1' or zaccept_unit.strip() == '\A^-1': 178 188 zaccept_unit = "1/A" 179 189 output.sample.zacceptance=(float(paramvals[7]),zaccept_unit)
Note: See TracChangeset
for help on using the changeset viewer.