Changeset 627

Show
Ignore:
Timestamp:
09/18/08 14:06:45 (2 months ago)
Author:
laidler
Message:

#149: Verify that the throughput resulting from this obsmode goes to zero at both ends. If not, print a warning.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pysynphot/lib/obsbandpass.py

    r550 r627  
    4444        self.name=self.obsmode._obsmode #str(self.obsmode) 
    4545 
     46        #Check for valid bounds 
     47        self._checkbounds() 
     48 
    4649    def __str__(self): 
    4750        """Defer to ObservationMode component """ 
     
    5659        return self.obsmode.showfiles() 
    5760 
    58      
    59              
     61 
     62    def _checkbounds(self): 
     63        thru=self.throughput 
     64        if thru[0] != 0 or thru[-1] != 0: 
     65            print "Warning: throughput for this obsmode is not bounded by zeros. Endpoints: thru[0]=%g, thru[-1]=%g"%(thru[0],thru[-1]) 
    6066