Ignore:
Timestamp:
Jan 2, 2019 3:57:45 PM (6 years ago)
Author:
GitHub <noreply@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
Children:
ef74a8b, a13c41b, 462e019
Parents:
cb9640f (diff), d96744de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Butler <butlerpd@…> (01/02/19 15:57:45)
git-committer:
GitHub <noreply@…> (01/02/19 15:57:45)
Message:

Merge pull request #180 from SasView?/ticket-1111

Multiple data loader and writer updates - NXcanSAS compliance, data conversion, saving as NXcanSAS, plus more

Fixes #976
Fixes #1129
Fixes #1111
Fixes #1221

File:
1 edited

Legend:

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

    rbd5c3b1 rd96744de  
    4848        detector = Detector() 
    4949        data_line = 0 
     50        x_index = 4 
    5051        self.reset_data_list(len(lines)) 
    5152        self.current_datainfo.detector.append(detector) 
     
    6364        for line in lines: 
    6465            # Information line 1 
     66            if line.find(".bt5") > 0: 
     67                x_index = 0 
    6568            if is_info: 
    6669                is_info = False 
     
    171174 
    172175                try: 
    173                     _x = float(toks[4]) 
     176                    _x = float(toks[x_index]) 
    174177                    _y = float(toks[1]) 
    175178                    _dy = float(toks[2]) 
     
    225228            raise ValueError("ascii_reader: could not load file") 
    226229 
     230        self.current_dataset = self.set_default_1d_units(self.current_dataset) 
    227231        if data_conv_q is not None: 
    228232            self.current_dataset.xaxis("\\rm{Q}", base_q_unit) 
    229         else: 
    230             self.current_dataset.xaxis("\\rm{Q}", 'A^{-1}') 
    231233        if data_conv_i is not None: 
    232234            self.current_dataset.yaxis("\\rm{Intensity}", base_i_unit) 
    233         else: 
    234             self.current_dataset.yaxis("\\rm{Intensity}", "cm^{-1}") 
    235235 
    236236        # Store loading process information 
Note: See TracChangeset for help on using the changeset viewer.