Changes in / [a629d8e:c1c37d5] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
example/sesansfit.py
r170ea69 r89ab393 2 2 from sasmodels import core, bumps_model, sesans 3 3 from sas.sascalc.dataloader.loader import Loader 4 5 HAS_CONVERTER = True6 try:7 from sas.sascalc.data_util.nxsunit import Converter8 except ImportError:9 HAS_CONVERTER = False10 11 4 12 5 def get_bumps_model(model_name): … … 30 23 data = loader.load(file) 31 24 if data is None: raise IOError("Could not load file %r"%(file)) 32 if HAS_CONVERTER == True:33 default_unit = "A"34 data_conv_q = Converter(data._xunit)35 for x in data.x:36 print x37 data.x = data_conv_q(data.x, units=default_unit)38 for x in data.x:39 print x40 data._xunit = default_unit41 25 42 26 except:
Note: See TracChangeset
for help on using the changeset viewer.