Changeset 1045


Ignore:
Timestamp:
Aug 29, 2013 12:52:36 PM (8 years ago)
Author:
vondreele
Message:

fix Fourier map problems - didn't like Fo<0.
use ErrorDialog? for some errors.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1010 r1045  
    14171417                phasem = complex(a,-b)
    14181418                if 'Fobs' in mapData['MapType']:
    1419                     F = np.sqrt(Fosq)
     1419                    F = np.where(Fosq>0.,np.sqrt(Fosq),0.)
    14201420                    h,k,l = hkl+Hmax
    14211421                    Fhkl[h,k,l] = F*phasep
     
    14291429                    Fhkl[h,k,l] = F*phasem
    14301430                elif 'delt-F' in mapData['MapType']:
    1431                     dF = np.sqrt(Fosq)-np.sqrt(Fcsq)
     1431                    dF = np.where(Fosq>0.,np.sqrt(Fosq),0.)-np.sqrt(Fcsq)
    14321432                    h,k,l = hkl+Hmax
    14331433                    Fhkl[h,k,l] = dF*phasep
     
    14351435                    Fhkl[h,k,l] = dF*phasem
    14361436                elif '2*Fo-Fc' in mapData['MapType']:
    1437                     F = 2.*np.sqrt(Fosq)-np.sqrt(Fcsq)
     1437                    F = 2.*np.where(Fosq>0.,np.sqrt(Fosq),0.)-np.sqrt(Fcsq)
    14381438                    h,k,l = hkl+Hmax
    14391439                    Fhkl[h,k,l] = F*phasep
  • trunk/GSASIIphsGUI.py

    r1042 r1045  
    15991599                    G2stMn.PrintDistAngle(DisAglCtls,DisAglData)
    16001600            except KeyError:        # inside DistAngle for missing atom types in DisAglCtls
    1601                 print '**** ERROR - try again but do "Reset" to fill in missing atom types ****'
     1601                G2frame.ErrorDialog('Distance/Angle calculation','try again but do "Reset" to fill in missing atom types')
    16021602        else:
    16031603                print "select one or more rows of atoms"
     
    45684568            Histograms = data['Histograms']
    45694569        except KeyError:
    4570             print '**** Error - no histograms defined for this phase ****'
     4570            G2frame.ErrorDialog('Pawley estimate','No histograms defined for this phase')
    45714571            return
    45724572        HistoNames = Histograms.keys()
     
    46104610            Histograms = data['Histograms']
    46114611        except KeyError:
    4612             print '**** Error - no histograms defined for this phase ****'
     4612            G2frame.ErrorDialog('Pawley update','No histograms defined for this phase')
    46134613            return
    46144614        HistoNames = Histograms.keys()
     
    47754775        indx = MapPeaks.GetSelectedRows()
    47764776        if not indx:
    4777             print '***** ERROR - no peaks selected'
     4777            G2frame.ErrorDialog('Set viewpoint','No peaks selected')
    47784778            return
    47794779        mapPeaks = data['Map Peaks']
     
    47864786        indx = MapPeaks.GetSelectedRows()
    47874787        if not indx:
    4788             print '***** ERROR - no peaks selected'
     4788            G2frame.ErrorDialog('Peak distance','No peaks selected')
    47894789            return
    47904790        generalData = data['General']
     
    48074807        indx = MapPeaks.GetSelectedRows()
    48084808        if len(indx) not in [2,3]:
    4809             print '**** ERROR - wrong number of atoms for distance or angle calculation'
     4809            G2frame.ErrorDialog('Peak distance/angle','Wrong number of atoms for distance or angle calculation')
    48104810            return
    48114811        generalData = data['General']
     
    48244824        mapData = generalData['Map']
    48254825        reflName = mapData['RefList']
     4826        if not reflName:
     4827            G2frame.ErrorDialog('Fourier map','No reflections defined for Fourier map')
     4828            return
    48264829        phaseName = generalData['Name']
    48274830        if 'PWDR' in reflName:
  • trunk/GSASIIstrIO.py

    r1042 r1045  
    11# -*- coding: utf-8 -*-
    2 '''
    3 *GSASIIstrIO: structure I/O routines*
    4 -------------------------------------
    5 
    6 '''
    72########### SVN repository information ###################
    83# $Date: 2013-05-17 12:13:15 -0500 (Fri, 17 May 2013) $
     
    127# $Id: GSASIIstrIO.py 920 2013-05-17 17:13:15Z vondreele $
    138########### SVN repository information ###################
     9'''
     10*GSASIIstrIO: structure I/O routines*
     11-------------------------------------
     12
     13'''
    1414import sys
    1515import os
  • trunk/exports/G2cif.py

    r1044 r1045  
    113113            #WriteCIFitem('_refine_ls_shift/su_max',DAT1)
    114114            #WriteCIFitem('_refine_ls_shift/su_mean',DAT2)
     115            #WriteCIFitem('_refine_diff_density_max',rhomax)    #these need to be defined for each phase!
     116            #WriteCIFitem('_refine_diff_density_min',rhomin)
    115117            WriteCIFitem('_computing_structure_refinement','GSAS-II (Toby & Von Dreele, 2013)')
    116118            try:
Note: See TracChangeset for help on using the changeset viewer.