You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am computing the counts from an extended source and the general equation includes the filter bandwidth. I don't know if the effstim method in Observation Class already includes the filter bandwidth when computing flux. Need to know so I don't apply the same operation twice.
Here is a test example:
# get zero point for V filter and peakLambda for V filterdefzeroPoint_V():
vegaSpectra=SourceSpectrum.from_vega()
Vfilter=SpectralElement.from_filter('johnson_v')
peakLambda=Vfilter.wpeak()
obs=Observation(vegaSpectra, Vfilter)
zero_point_flux_V=obs.effstim(flux_unit='flam')
returnzero_point_flux_V, peakLambda# get flux from magdefstarflux(mag, zeroPointFlux):
f=zeroPointFlux*10** (-.4*mag)
returnf.to(u.W/ (u.m**2*u.nm))
# get photon energy at peakLambdadefphotonEnergy(peakLambda):
h=const.hc=const.cE= (h*c) /peakLambda.to(u.meter)
E_convert=E.to(u.watt*u.s)
returnE_convert# counts for extended objectdefcounts(flux, photonE, filterBandwidth,aperture,pixelSurface, QE):
targetPhotons=QE*flux/photonE*filterBandwidth*aperture*pixelSurfacereturntargetPhotons
parameters
zp=zeroPoint_V()[0]
flux=starflux(22.9, zp)
pe=photonEnergy(zeroPoint_V()[1])
filterBandwidth=80.7*u.nmQE=0.8aperture=2*u.m**2pixelSurface=0.3# is image scale**2, where image scale = 0.15 arcsec/pixelc=counts(flux, pe, filterBandwidth,aperture,pixelSurface, QE)
print(np.round(c,0))
Thank you
System Details (optional)
The text was updated successfully, but these errors were encountered:
Not sure what all your code is doing there. Theoretically, you can normalize your source first if you want, pass that and the bandpass into Observation, and it should give you count rate, so all that extra conversion seems unnecessary.
Description
I am computing the counts from an extended source and the general equation includes the filter bandwidth. I don't know if the effstim method in Observation Class already includes the filter bandwidth when computing flux. Need to know so I don't apply the same operation twice.
Here is a test example:
parameters
Thank you
System Details (optional)
The text was updated successfully, but these errors were encountered: