Changeset 62160509 in sasview


Ignore:
Timestamp:
Sep 25, 2017 4:26:30 PM (7 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
48154abb
Parents:
ffb6474
Message:

Check for units saved in v4.1.0 and convert to current.

File:
1 edited

Legend:

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

    r7b07fbe r62160509  
    592592        if 'unit' in attr and attr.get('unit') is not None: 
    593593            try: 
    594                 local_unit = attr['unit'] 
     594                unit = attr['unit'] 
     595                unit_list = unit.split("|") 
     596                if len(unit_list) > 1: 
     597                    self.current_dataset.xaxis(unit_list[0].strip(), 
     598                                               unit_list[1].strip()) 
     599                    local_unit = unit_list[1] 
     600                else: 
     601                    local_unit = unit 
    595602                unitname = self.ns_list.current_level.get("unit", "") 
    596603                if "SASdetector" in self.names: 
Note: See TracChangeset for help on using the changeset viewer.