Ignore:
Timestamp:
Sep 22, 2017 4:01:32 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
34d7b35
Parents:
9706d88
Message:

convert sascalc to python 2/3 syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/fit/MultiplicationModel.py

    r7432acb r574adc7  
    109109        """ 
    110110        ##set dispersion only from p_model 
    111         for name , value in self.p_model.dispersion.iteritems(): 
     111        for name , value in self.p_model.dispersion.items(): 
    112112            self.dispersion[name] = value 
    113113 
     
    135135        """ 
    136136 
    137         for name , value in self.p_model.params.iteritems(): 
     137        for name , value in self.p_model.params.items(): 
    138138            if not name in self.params.keys() and name not in self.excluded_params: 
    139139                self.params[name] = value 
    140140 
    141         for name , value in self.s_model.params.iteritems(): 
     141        for name , value in self.s_model.params.items(): 
    142142            #Remove the radius_effective from the (P*S) model parameters. 
    143143            if not name in self.params.keys() and name not in self.excluded_params: 
     
    155155        this model's details 
    156156        """ 
    157         for name, detail in self.p_model.details.iteritems(): 
     157        for name, detail in self.p_model.details.items(): 
    158158            if name not in self.excluded_params: 
    159159                self.details[name] = detail 
    160160 
    161         for name , detail in self.s_model.details.iteritems(): 
     161        for name , detail in self.s_model.details.items(): 
    162162            if not name in self.details.keys() or name not in self.exluded_params: 
    163163                self.details[name] = detail 
     
    245245                    return 
    246246 
    247         raise ValueError, "Model does not contain parameter %s" % name 
     247        raise ValueError("Model does not contain parameter %s" % name) 
    248248 
    249249 
Note: See TracChangeset for help on using the changeset viewer.