Changeset b99ac227 in sasview for DataLoader/readers/danse_reader.py
- Timestamp:
- Aug 6, 2008 10:54:02 AM (16 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 17a6843
- Parents:
- 99d1af6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/readers/danse_reader.py
r99d1af6 rb99ac227 1 1 """ 2 2 DANSE/SANS file reader 3 """ 4 5 """ 6 This software was developed by the University of Tennessee as part of the 7 Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 8 project funded by the US National Science Foundation. 9 10 If you use DANSE applications to do scientific research that leads to 11 publication, we ask that you acknowledge the use of the software with the 12 following sentence: 13 14 "This work benefited from DANSE software developed under NSF award DMR-0520547." 15 16 copyright 2008, University of Tennessee 3 17 """ 4 18 … … 24 38 type = ["DANSE files (*.sans)|*.sans"] 25 39 ## Extension 26 ext = ['.sans' ]40 ext = ['.sans', '.SANS'] 27 41 28 42 def read(self, filename=None): … … 140 154 xmax = None 141 155 142 #x = numpy.zeros(size_x)143 #y = numpy.zeros(size_y)144 #X, Y = pylab.meshgrid(x, y)145 #Z = copy.deepcopy(X)146 #E = copy.deepcopy(X)147 itot = 0148 i_x = 0149 i_y = 0150 151 156 # Qx and Qy vectors 152 157 for i_x in range(size_x): … … 179 184 180 185 # Store the data in the 2D array 186 itot = 0 187 i_x = 0 188 i_y = -1 189 181 190 for i_pt in range(len(data)): 182 191 try: … … 188 197 189 198 # Get bin number 190 if math.fmod(i tot, size_x)==0:199 if math.fmod(i_pt, size_x)==0: 191 200 i_x = 0 192 201 i_y += 1 … … 194 203 i_x += 1 195 204 196 output.data[size_y-1-i_y][i_x] = value 205 output.data[i_y][i_x] = value 206 #output.data[size_y-1-i_y][i_x] = value 197 207 if fversion>1.0: 198 output.err_data[ size_y-1-i_y][i_x] = error[i_pt]199 200 itot += 1208 output.err_data[i_y][i_x] = error[i_pt] 209 #output.err_data[size_y-1-i_y][i_x] = error[i_pt] 210 201 211 202 212 # Store all data ######################################
Note: See TracChangeset
for help on using the changeset viewer.