Changeset d6513cd in sasview for DataLoader/readers
- Timestamp:
- Aug 22, 2008 5: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/readers/cansas_reader.py
r99d1af6 rd6513cd 20 20 import numpy 21 21 import os, sys 22 from DataLoader.data_info import Data1D, Collimation, Detector, Process 22 from DataLoader.data_info import Data1D, Collimation, Detector, Process, Aperture 23 23 from xml import xpath 24 24 … … 70 70 break 71 71 72 73 74 75 72 if nodes[0].hasAttributes(): 73 for i in range(nodes[0].attributes.length): 74 attr[nodes[0].attributes.item(i).nodeName] \ 75 = nodes[0].attributes.item(i).nodeValue 76 76 except: 77 77 # problem reading the node. Skip it and return that … … 317 317 apert_list = xpath.Evaluate('aperture', item) 318 318 for apert in apert_list: 319 aperture = collim.Aperture() 320 319 aperture = Aperture() 321 320 _store_float('distance', apert, 'distance', aperture) 322 321 _store_float('size/x', apert, 'size.x', aperture) … … 426 425 data_info.dx = dx 427 426 data_info.dy = dy 427 428 data_conv_q = None 429 data_conv_i = None 430 431 if has_converter == True and data_info.x_unit != '1/A': 432 data_conv_q = Converter('1/A') 433 # Test it 434 data_conv_q(1.0, output.Q_unit) 435 436 if has_converter == True and data_info.y_unit != '1/cm': 437 data_conv_i = Converter('1/cm') 438 # Test it 439 data_conv_i(1.0, output.I_unit) 440 441 428 442 if data_conv_q is not None: 429 data_info.xaxis("\\rm{Q}", output.x_unit)443 data_info.xaxis("\\rm{Q}", data_info.x_unit) 430 444 else: 431 445 data_info.xaxis("\\rm{Q}", 'A^{-1}') 432 446 if data_conv_i is not None: 433 data_info.yaxis("\\{I(Q)}", output.y_unit)447 data_info.yaxis("\\{I(Q)}", data_info.y_unit) 434 448 else: 435 449 data_info.yaxis("\\rm{I(Q)}","cm^{-1}")
Note: See TracChangeset
for help on using the changeset viewer.