IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3813 for trunk/pois/python


Ignore:
Timestamp:
Apr 29, 2005, 10:53:49 AM (21 years ago)
Author:
rhl
Message:

Make poisRejectStamps return a list of rejected stamps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pois/python/pois.py

    r3811 r3813  
    218218        for s in range(0, stamps.n):
    219219            stamp = pois.poisStamp_Cast(stamps.get_data(s)) # Stamp of interest
    220             if stamp.status == pois.POIS_STAMP_BAD:
    221                 ctype = "red"; dotType = "x"
    222             else:
    223                 ctype = "green"; dotType = "+"
    224                 numStamps += 1
    225 
    226             if display['stamps']:
    227                 ds9.dot(dotType, stamp.x, stamp.y, size = 5, ctype = ctype, frame = 1)
     220            if stamp:
     221                if stamp.status == pois.POIS_STAMP_BAD:
     222                    ctype = "red"; dotType = "x"
     223                else:
     224                    ctype = "green"; dotType = "+"
     225                    numStamps += 1
     226                   
     227                if display['stamps']:
     228                    ds9.dot(dotType, stamp.x, stamp.y, size = 5, ctype = ctype, frame = 1)
    228229
    229230        psTrace("pois.time", 1, ("%d stamps found at %f sec\n" % (numStamps, getTime() - startTime)))
     
    266267                                                       kernelBasisFunctions, solution, config)
    267268        # Have we converged?
    268         if not pois.poisRejectStamps(stamps, mask, deviations, config):
     269        rejected = pois.poisRejectStamps(stamps, mask, deviations, config)
     270
     271        if rejected == None:
    269272            break
    270 
     273       
    271274        if display['stamps']:
    272             for s in range(0, stamps.n):
    273                 stamp = pois.poisStamp_Cast(stamps.get_data(s)) # Stamp of interest
    274                 if stamp.status == pois.POIS_STAMP_RESET:
    275                     ds9.dot("o", stamp.x, stamp.y, size = 5, ctype = "red", frame = 1)
     275            iter = psLib.psListIteratorAlloc(rejected, psLib.PS_LIST_HEAD, False)
     276            while True:
     277                stamp = pois.poisStamp_Cast(psLib.psListGetAndIncrement(iter))
     278                if not stamp:
     279                    break
     280                ds9.dot("o", stamp.x, stamp.y, size = 5, ctype = "red", frame = 1)
    276281
    277282        if display['pause']:
Note: See TracChangeset for help on using the changeset viewer.