Changeset eb2dc13 in sasview for src/sas/sascalc/dataloader


Ignore:
Timestamp:
Feb 7, 2017 10:33:53 AM (8 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:
6d2b50b
Parents:
18b7ca96
Message:

Be sure 2D error data exists before trying to save it in projects and analyses.

File:
1 edited

Legend:

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

    r1905128 reb2dc13  
    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         err = ','.join([str(datainfo.err_data[i]) for i in xrange(len(datainfo.err_data))]) 
    1059         dqy = ','.join([str(datainfo.dqy_data[i]) for i in xrange(len(datainfo.dqy_data))]) 
    1060         dqx = ','.join([str(datainfo.dqx_data[i]) for i in xrange(len(datainfo.dqx_data))]) 
    1061         mask = ','.join([str(datainfo.mask[i]) for i in xrange(len(datainfo.mask))]) 
     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))]) 
    10621066 
    10631067        self.write_node(point, "Qx", qx, 
Note: See TracChangeset for help on using the changeset viewer.