Changeset 5e6df0e in sasview


Ignore:
Timestamp:
Feb 7, 2017 11:39:39 AM (4 years ago)
Author:
krzywon
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
bcabf4e
Parents:
6d2b50b
Message:

Simplified the check for data error bars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    reb2dc13 r5e6df0e  
    10561056        qy = ','.join([str(datainfo.qy_data[i]) for i in xrange(len(datainfo.qy_data))]) 
    10571057        intensity = ','.join([str(datainfo.data[i]) for i in xrange(len(datainfo.data))]) 
    1058         if datainfo.err_data is not None: 
    1059             err = ','.join([str(datainfo.err_data[i]) for i in xrange(len(datainfo.err_data))]) 
    1060         if datainfo.dqy_data is not None: 
    1061             dqy = ','.join([str(datainfo.dqy_data[i]) for i in xrange(len(datainfo.dqy_data))]) 
    1062         if datainfo.dqx_data is not None: 
    1063             dqx = ','.join([str(datainfo.dqx_data[i]) for i in xrange(len(datainfo.dqx_data))]) 
    1064         if datainfo.mask is not None: 
    1065             mask = ','.join([str(datainfo.mask[i]) for i in xrange(len(datainfo.mask))]) 
    10661058 
    10671059        self.write_node(point, "Qx", qx, 
     
    10721064                        {'unit': datainfo._zunit}) 
    10731065        if datainfo.err_data is not None: 
     1066            err = ','.join([str(datainfo.err_data[i]) for i in 
     1067                            xrange(len(datainfo.err_data))]) 
    10741068            self.write_node(point, "Idev", err, 
    10751069                            {'unit': datainfo._zunit}) 
    10761070        if datainfo.dqy_data is not None: 
     1071            dqy = ','.join([str(datainfo.dqy_data[i]) for i in 
     1072                            xrange(len(datainfo.dqy_data))]) 
    10771073            self.write_node(point, "Qydev", dqy, 
    10781074                            {'unit': datainfo._yunit}) 
    10791075        if datainfo.dqx_data is not None: 
     1076            dqx = ','.join([str(datainfo.dqx_data[i]) for i in 
     1077                            xrange(len(datainfo.dqx_data))]) 
    10801078            self.write_node(point, "Qxdev", dqx, 
    10811079                            {'unit': datainfo._xunit}) 
    10821080        if datainfo.mask is not None: 
     1081            mask = ','.join( 
     1082                [str(datainfo.mask[i]) for i in xrange(len(datainfo.mask))]) 
    10831083            self.write_node(point, "Mask", mask) 
    10841084 
Note: See TracChangeset for help on using the changeset viewer.