Changeset 666

Show
Ignore:
Timestamp:
10/07/08 16:40:10 (1 month ago)
Author:
laidler
Message:

Tweak string rep of gaussian source & corresponding doctest; added stubs for spectrum.effstim() and bandpass.fwhm().

Files:

Legend:

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

    r634 r666  
    7676>>> g1=S.GaussianSource(18.3,18000,2000,fluxunits='abmag') 
    7777>>> print g1 
    78 Gaussian: mu=18000.000000,fwhm=2000.000000,flux=18.300000 abmag 
     78Gaussian: mu=18000.000000,fwhm=2000.000000,flux=18.3 abmag 
    7979 
    8080>>> unitflux=S.FlatSpectrum(18,fluxunits='abmag') 
  • trunk/pysynphot/lib/spectrum.py

    r618 r666  
    397397        return StdRenorm(self,band,RNval,RNUnits) 
    398398 
     399    def effstim(self,fluxunits='photlam'): 
     400        print "?? %s"%fluxunits 
     401        raise NotImplementedError("Ticket #140: calcphot.effstim functionality") 
     402 
    399403class CompositeSourceSpectrum(SourceSpectrum): 
    400404    '''Composite Source Spectrum object, handles addition, multiplication 
     
    726730        self.sigma = fwhm / math.sqrt(8.0 * math.log(2.0)) 
    727731        self.factor = flux / (math.sqrt(2.0 * math.pi) * self.sigma) 
    728         self.name ='Gaussian: mu=%f,fwhm=%f,flux=%f %s'%(self.center,self.input_fwhm,self.input_flux,self._input_units) 
     732        self.name ='Gaussian: mu=%f,fwhm=%f,flux=%g %s'%(self.center,self.input_fwhm,self.input_flux,self._input_units) 
    729733 
    730734    def __str__(self): 
     
    10561060    throughput = property(GetThroughput, doc='Throughput for bandpass') 
    10571061 
     1062    def fwhm(self): 
     1063        raise NotImplementedError("#139: Implement calcband functionality") 
     1064 
    10581065 
    10591066class CompositeSpectralElement(SpectralElement):