Changeset 4fdcc65 in sasview for src/sas/sascalc/file_converter


Ignore:
Timestamp:
Sep 12, 2018 3:13:34 PM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
2ca5d57b
Parents:
8d5e11c
Message:

File loader fixes and code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/file_converter/nxcansas_writer.py

    rcf29187 r4fdcc65  
    109109        sasentry.attrs['version'] = '1.0' 
    110110 
    111         i = 1 
    112  
    113         for data_obj in dataset: 
    114             data_entry = sasentry.create_group("sasdata{0:0=2d}".format(i)) 
     111        for i, data_obj in enumerate(dataset): 
     112            data_entry = sasentry.create_group("sasdata{0:0=2d}".format(i+1)) 
    115113            data_entry.attrs['canSAS_class'] = 'SASdata' 
    116114            if isinstance(data_obj, Data1D): 
     
    118116            elif isinstance(data_obj, Data2D): 
    119117                self._write_2d_data(data_obj, data_entry) 
    120             i += 1 
    121118 
    122119        data_info = dataset[0] 
Note: See TracChangeset for help on using the changeset viewer.