Changeset d6513cd in sasview for DataLoader/data_info.py
- Timestamp:
- Aug 22, 2008 3:13:34 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:
- 48882d1
- Parents:
- 533550c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/data_info.py
rb99ac227 rd6513cd 104 104 distance_unit = 'mm' 105 105 ## Offset of this detector position in X, Y, (and Z if necessary) [Vector] [mm] 106 offset = Vector()106 offset = None 107 107 offset_unit = 'm' 108 108 ## Orientation (rotation) of this detector in roll, pitch, and yaw [Vector] [degrees] 109 orientation = Vector()109 orientation = None 110 110 orientation_unit = 'degree' 111 111 ## Center of the beam on the detector in X and Y (and Z if necessary) [Vector] [mm] 112 beam_center = Vector()112 beam_center = None 113 113 beam_center_unit = 'mm' 114 114 ## Pixel size in X, Y, (and Z if necessary) [Vector] [mm] 115 pixel_size = Vector()115 pixel_size = None 116 116 pixel_size_unit = 'mm' 117 117 ## Slit length of the instrument for this detector.[float] [mm] 118 118 slit_length = None 119 119 slit_length_unit = 'mm' 120 121 def __init__(self): 122 """ 123 Initialize class attribute that are objects... 124 """ 125 self.offset = Vector() 126 self.orientation = Vector() 127 self.beam_center = Vector() 128 self.pixel_size = Vector() 129 120 130 121 131 def __str__(self): … … 136 146 return _str 137 147 148 class Aperture: 149 # Aperture size [Vector] 150 size = None 151 size_unit = 'mm' 152 # Aperture distance [float] 153 distance = None 154 distance_unit = 'mm' 155 156 def __init__(self): 157 self.size = Vector() 158 138 159 class Collimation: 139 160 """ 140 161 Class to hold collimation information 141 162 """ 142 class Aperture:143 # Aperture size [Vector]144 size = Vector()145 size_unit = 'mm'146 # Aperture distance [float]147 distance = None148 distance_unit = 'mm'149 163 150 164 ## Length [float] [mm] … … 152 166 length_unit = 'mm' 153 167 ## Aperture 154 aperture = [] 168 aperture = None 169 170 def __init__(self): 171 self.aperture = [] 155 172 156 173 def __str__(self): … … 172 189 radiation = '' 173 190 ## Beam size [Vector] [mm] 174 beam_size = Vector()191 beam_size = None 175 192 beam_size_unit = 'mm' 176 193 ## Beam shape [string] … … 189 206 wavelength_spread_unit = 'percent' 190 207 208 def __init__(self): 209 self.beam_size = Vector() 210 211 191 212 def __str__(self): 192 213 _str = "Source:\n" … … 229 250 temperature_unit = 'C' 230 251 ## Position [Vector] [mm] 231 position = Vector()252 position = None 232 253 position_unit = 'mm' 233 254 ## Orientation [Vector] [degrees] 234 orientation = Vector()255 orientation = None 235 256 orientation_unit = 'degree' 236 257 ## Details 237 details = [] 258 details = None 259 260 def __init__(self): 261 self.position = Vector() 262 self.orientation = Vector() 263 self.details = [] 238 264 239 265 def __str__(self): … … 264 290 date = '' 265 291 description= '' 266 term = [] 267 notes = [] 292 term = None 293 notes = None 294 295 def __init__(self): 296 self.term = [] 297 self.notes = [] 268 298 269 299 def __str__(self): … … 293 323 filename = '' 294 324 ## Notes 295 notes = []325 notes = None 296 326 ## Processes (Action on the data) 297 process = []327 process = None 298 328 ## Instrument name 299 329 instrument = '' 300 330 ## Detector information 301 detector = []331 detector = None 302 332 ## Sample information 303 sample = Sample()333 sample = None 304 334 ## Source information 305 source = Source()335 source = None 306 336 ## Collimation information 307 collimation = []337 collimation = None 308 338 ## Additional meta-data 309 meta_data = {}339 meta_data = None 310 340 ## Loading errors 311 errors = []341 errors = None 312 342 313 343 def __init__(self): … … 583 613 584 614 ## Vector of Q-values at the center of each bin in x 585 x_bins = []615 x_bins = None 586 616 587 617 ## Vector of Q-values at the center of each bin in y 588 y_bins = []618 y_bins = None 589 619 590 620 591 621 def __init__(self, data=None, err_data=None): 622 self.y_bins = [] 623 self.x_bins = [] 592 624 DataInfo.__init__(self) 593 625 plottable_2D.__init__(self, data, err_data)
Note: See TracChangeset
for help on using the changeset viewer.