Ignore:
Timestamp:
Jul 11, 2018 11:33:00 AM (12 months 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:
7fd5e2a
Parents:
b799f09
Message:

Save process and transmission spectrum and fix issues with loading them.

File:
1 edited

Legend:

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

    r02c1608e rac38ab4  
    420420        :param key: class name data_point was taken from 
    421421        """ 
     422        term_match = re.compile(u'^term[0-9]+$') 
    422423        if key == u'Title':  # CanSAS 2.0 
    423424            self.process.name = data_point 
     
    428429        elif key == u'date': 
    429430            self.process.date = data_point 
    430         elif key == u'term': 
    431             self.process.term = data_point 
     431        elif term_match.match(key): 
     432            self.process.term.append(data_point) 
    432433        else: 
    433434            self.process.notes.append(data_point) 
     
    473474            spectrum_list = [] 
    474475            for spectrum in self.current_datainfo.trans_spectrum: 
    475                 spectrum.transmission = np.delete(spectrum.transmission, [0]) 
    476476                spectrum.transmission = spectrum.transmission.astype(np.float64) 
    477                 spectrum.transmission_deviation = np.delete( 
    478                     spectrum.transmission_deviation, [0]) 
    479477                spectrum.transmission_deviation = \ 
    480478                    spectrum.transmission_deviation.astype(np.float64) 
    481                 spectrum.wavelength = np.delete(spectrum.wavelength, [0]) 
    482479                spectrum.wavelength = spectrum.wavelength.astype(np.float64) 
    483480                if len(spectrum.transmission) > 0: 
Note: See TracChangeset for help on using the changeset viewer.