Changeset 4350


Ignore:
Timestamp:
Mar 8, 2020 11:04:21 PM (20 months ago)
Author:
toby
Message:

add warning for azimuths with no pixels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r4349 r4350  
    12191219    #make linear interpolators; outside limits give NaN
    12201220    H0 = []
    1221     for h0msk,h2msk in zip(H0msk,H2msk):
     1221    problemEntries = []
     1222    for i,(h0msk,h2msk) in enumerate(zip(H0msk,H2msk)):
    12221223        try:
    12231224            h0int = scint.interp1d(h2msk.compressed(),h0msk.compressed(),bounds_error=False)
     
    12261227            H0.append(h0)
    12271228        except ValueError:
     1229            problemEntries.append(i)
    12281230            H0.append(np.zeros(numChans,order='F',dtype=np.float32))
    12291231    H0 = np.nan_to_num(np.array(H0))       
     
    12491251    G2fil.G2Print ("Elapsed time:","%8.3fs"%(time.time()-tbeg))
    12501252    G2fil.G2Print ('Integration complete')
     1253    if problemEntries:
     1254        msg = ""
     1255        for i in problemEntries:
     1256            if msg: msg += ', '
     1257            msg += "{:.2f}".format((H1[i+1]+H1[i])/2.)
     1258        print('\nWarning, integrations have no pixels at these azimuth(s)\n\t',msg,'\n')
    12511259    if returnN:     #As requested by Steven Weigand
    12521260        return H0,H1,H2,NST,CancelPressed
Note: See TracChangeset for help on using the changeset viewer.