Changeset 747334d in sasview


Ignore:
Timestamp:
Apr 6, 2017 4:27:22 AM (8 years ago)
Author:
Adam Washington <adam.washington@…>
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
d3bce8c
Parents:
0ac6e11
Message:

Add yacceptance

Needed to correspond to zacceptance for 2D sesans

Location:
src/sas/sascalc/dataloader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/data_info.py

    r9a5097c r747334d  
    354354    ## SESANS zacceptance 
    355355    zacceptance = None 
     356    yacceptance = None 
    356357 
    357358    def __init__(self): 
  • src/sas/sascalc/dataloader/readers/cansas_constants.py

    rad4632c r747334d  
    135135                             "Sesans": {"storeas": "content"}, 
    136136                             "zacceptance": {"storeas": "float"}, 
     137                             "yacceptance": {"storeas": "float"}, 
    137138                             "<any>" : ANY 
    138139                            } 
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    r8434365 r747334d  
    290290                elif tagname == 'Sesans': 
    291291                    self.current_datainfo.isSesans = bool(data_point) 
     292                elif tagname == 'yacceptance': 
     293                    self.current_datainfo.sample.yacceptance = (data_point, unit) 
    292294                elif tagname == 'zacceptance': 
    293295                    self.current_datainfo.sample.zacceptance = (data_point, unit) 
     
    10551057            sesans.text = str(datainfo.isSesans) 
    10561058            node.append(sesans) 
     1059            self.write_node(node, "yacceptance", datainfo.sample.yacceptance[0], 
     1060                             {'unit': datainfo.sample.yacceptance[1]}) 
    10571061            self.write_node(node, "zacceptance", datainfo.sample.zacceptance[0], 
    10581062                             {'unit': datainfo.sample.zacceptance[1]}) 
Note: See TracChangeset for help on using the changeset viewer.