Changeset 3970


Ignore:
Timestamp:
May 12, 2019 10:57:38 AM (2 years ago)
Author:
toby
Message:

Py3 bug on Pawley Estimate; Scriptable corrections

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3956 r3970  
    88778877        if generalData['Modulated']:
    88788878            im = 1
    8879         HistoNames = filter(lambda a:Histograms[a]['Use']==True,list(Histograms.keys()))
     8879        HistoNames = list(filter(lambda a:Histograms[a]['Use']==True,list(Histograms.keys())))
    88808880        if not len(HistoNames):
    88818881            G2frame.ErrorDialog('Pawley estimate','No histograms defined for this phase')
  • trunk/GSASIIscriptable.py

    r3959 r3970  
    756756
    757757    # initialize exports
    758     for obj in exportersByExtension:
     758    for obj in G2fil.LoadExportRoutines(None):
    759759        try:
    760760            obj.Writer
     
    18431843                raise Exception('Histogram object (G2PwdrData) is not in current project')
    18441844        if histname in self.data:
    1845             return G2PwdrData(self.data[histname], self)
     1845            return G2PwdrData(self.data[histname], self, histname)
    18461846        try:
    18471847            # see if histname is an id or ranId
     
    25892589class G2PwdrData(G2ObjectWrapper):
    25902590    """Wraps a Powder Data Histogram."""
    2591     def __init__(self, data, proj):
     2591    def __init__(self, data, proj, name):
    25922592        self.data = data
    25932593        self.proj = proj
     2594        self.name = name
    25942595
    25952596    @staticmethod
     
    25992600        return key in valid_keys
    26002601
    2601     @property
    2602     def name(self):
    2603         return self.data['data'][-1]
     2602    #@property
     2603    #def name(self):
     2604    #    return self.data['data'][-1]
    26042605
    26052606    @property
     
    28122813        obj.SetFromArray(hist=self.data,histname=self.name)
    28132814        obj.Writer(self.name,fil)
    2814            
     2815        return fil
     2816   
    28152817    def plot(self, Yobs=True, Ycalc=True, Background=True, Residual=True):
    28162818        try:
Note: See TracChangeset for help on using the changeset viewer.