Changeset 16d8e5f in sasview for DataLoader/readers
- Timestamp:
- Jul 10, 2008 4:41:18 PM (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:
- 83ca047
- Parents:
- 93f0a586
- Location:
- DataLoader/readers
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/readers/IgorReader.py
r8d6440f r16d8e5f 165 165 self.center_x = center_x 166 166 self.center_y = center_y 167 168 from readInfo import ReaderInfo 169 output = ReaderInfo() 170 output.Z=Z 171 output.xmin =xmin-xstep/2.0 172 output.xmax = xmax+xstep/2.0 173 output.ymin =ymin-ystep/2.0 174 output.ymax =ymax+ystep/2.0 175 output.type ="2D" 176 167 177 logging.info("IgorReader reading %s"%self.file) 168 return Z, xmin-xstep/2.0, xmax+xstep/2.0, ymin-ystep/2.0, ymax+ystep/2.0178 return output 169 179 -
DataLoader/readers/TXT2_Reader.py
r8d6440f r16d8e5f 66 66 #msg="R1 reading: \n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n" 67 67 #return msg 68 from readInfo import ReaderInfo 69 output = ReaderInfo() 70 output.x=self.x 71 output.y=self.y 72 68 73 logging.info("TXT2_Reader reading %s\n" %path) 69 return self.x,self.y,self.dy74 return output 70 75 return None 71 76 -
DataLoader/readers/TXT3_Reader.py
r8d6440f r16d8e5f 69 69 #return msg 70 70 logging.info("TXT3_Reader reading %s \n" %path) 71 return self.x,self.y,self.dy 71 from readInfo import ReaderInfo 72 output = ReaderInfo() 73 output.x = self.x 74 output.y = self.y 75 output.dy = self.dy 76 output.type = "1D" 77 78 return output 72 79 73 80 return None -
DataLoader/readers/danse_reader.py
r8d6440f r16d8e5f 8 8 import numpy 9 9 import logging 10 class ReaderInfo: 11 """ 12 """ 13 ## Wavelength [A] 14 wavelength = 0.0 15 ## Number of x bins 16 xbins = 128 17 ## Number of y bins 18 ybins = 128 19 ## Beam center X [pixel number] 20 center_x = 65 21 ## Beam center Y [pixel number] 22 center_y = 65 23 ## Distance from sample to detector [m] 24 distance = 11.0 25 ## Qx values [A-1] 26 x_vals = [] 27 ## Qy xalues [A-1] 28 y_vals = [] 29 ## Qx min 30 xmin = 0.0 31 ## Qx max 32 xmax = 1.0 33 ## Qy min 34 ymin = 0.0 35 ## Qy max 36 ymax = 1.0 37 ## Image 38 image = None 39 ## Pixel size 40 pixel_size = 0.5 41 ## Error on each pixel 42 error = None 10 43 11 class Reader: 44 12 """ … … 193 161 194 162 itot += 1 195 163 from readInfo import ReaderInfo 196 164 output = ReaderInfo() 197 165 output.wavelength = wavelength … … 210 178 output.pixel_size = pixel 211 179 output.image = Z 212 if not fversion==1.1: 180 output.type = "2D " 181 182 if not fversion>=1.0: 213 183 #output.error = E 214 184 raise ValueError,"Danse_reader can't read this file %s"%filename -
DataLoader/readers/tiff_reader.py
r8d6440f r16d8e5f 2 2 import Image 3 3 import math,logging 4 class ReaderInfo: 5 """ 6 """ 7 ## Wavelength [A] 8 wavelength = 0.0 9 ## Number of x bins 10 xbins = 128 11 ## Number of y bins 12 ybins = 128 13 ## Beam center X [pixel number] 14 center_x = 65 15 ## Beam center Y [pixel number] 16 center_y = 65 17 ## Distance from sample to detector [m] 18 distance = 11.0 19 ## Qx values [A-1] 20 x_vals = [] 21 ## Qy xalues [A-1] 22 y_vals = [] 23 ## Qx min 24 xmin = 0.0 25 ## Qx max 26 xmax = 1.0 27 ## Qy min 28 ymin = 0.0 29 ## Qy max 30 ymax = 1.0 31 ## Image 32 image = None 33 ## Pixel size 34 pixel_size = 0.5 35 ## Error on each pixel 36 error = None 4 37 5 38 6 class Reader: … … 129 97 130 98 itot += 1 131 99 from readInfo import ReaderInfo 132 100 output = ReaderInfo() 133 101 output.wavelength = wavelength … … 145 113 output.image = Z 146 114 output.pixel_size = pixel 115 output.type ="2D" 147 116 logging.info("tiff_reader reading %s"%(filename)) 148 117
Note: See TracChangeset
for help on using the changeset viewer.