Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying an aperture changes effective wavelength of observation #64

Open
jryon opened this issue Feb 2, 2018 · 6 comments
Open

Specifying an aperture changes effective wavelength of observation #64

jryon opened this issue Feb 2, 2018 · 6 comments

Comments

@jryon
Copy link

jryon commented Feb 2, 2018

If I create two Observation objects, one with an aperture size specified in the bandpass, and one without an aperture size specified, the effective wavelength of the two observations is different. I would expect that the effective wavelength of an observation would not depend on the aperture size used, only on the source spectrum and the system throughput.

Example:

In [1]: import pysynphot as S

In [2]: S.__version__
Out[2]: '0.9.8.8'

In [3]: bp = S.ObsBandpass('acs,wfc1,f850lp')

In [4]: source = S.Vega

In [5]: obs_no_aper = S.Observation(source, bp)

In [6]: obs_no_aper.efflam()
Out[6]: 9008.7060072214936

In [7]: bp_aper = S.ObsBandpass('acs,wfc1,f850lp,aper#0.4')

In [8]: obs_aper = S.Observation(source, bp_aper)

In [9]: obs_aper.efflam()
Out[9]: 8967.1107575100523

Note also that specifying the largest recommended aperture size for this detector, 4.0 arcsec, gives the same effective wavelength as omitting the aperture size:

In [51]: bp_aper = S.ObsBandpass('acs,wfc1,f850lp,aper#4.0')

In [52]: obs_aper = S.Observation(source, bp_aper)

In [53]: obs_aper.efflam()
Out[53]: 9008.7060072214936

Edit: Syntax highlighting

@pllim
Copy link
Collaborator

pllim commented Feb 2, 2018

Please also provide your bp.showfiles() and bp_aper_showfiles() outputs. Thanks!

@jryon
Copy link
Author

jryon commented Feb 2, 2018

In [63]: bp = S.ObsBandpass('acs,wfc1,f850lp')

In [64]: bp.showfiles()
/grp/hst/cdbs/comp/ota/hst_ota_007_syn.fits
/grp/hst/cdbs/comp/acs/acs_wfc_im123_004_syn.fits
/grp/hst/cdbs/comp/acs/acs_f850lp_wfc_007_syn.fits
/grp/hst/cdbs/comp/acs/acs_wfc_ebe_win12f_005_syn.fits
/grp/hst/cdbs/comp/acs/acs_wfc_ccd1_022_syn.fits

In [65]: bp_aper = S.ObsBandpass('acs,wfc1,f850lp,aper#0.4')

In [66]: bp_aper.showfiles()
/grp/hst/cdbs/comp/ota/hst_ota_007_syn.fits
/grp/hst/cdbs/comp/acs/acs_wfc_aper_002_syn.fits[aper#]
/grp/hst/cdbs/comp/acs/acs_wfc_im123_004_syn.fits
/grp/hst/cdbs/comp/acs/acs_f850lp_wfc_007_syn.fits
/grp/hst/cdbs/comp/acs/acs_wfc_ebe_win12f_005_syn.fits
/grp/hst/cdbs/comp/acs/acs_wfc_ccd1_022_syn.fits

@philhodge
Copy link

philhodge commented Feb 2, 2018

If you look at the wavelengths and throughputs in acs_wfc_aper_002_syn.fits for aperture APER#0.4, you'll see that the throughput of the aperture is changing in the neighborhood of 9000 angstroms. Here are a few numbers:

wavelength throughput
8000. 0.92
9000. 0.88
10000. 0.71

@pllim
Copy link
Collaborator

pllim commented Feb 2, 2018

@philhodge is right, APER throughput is not uniform across wavelength (see plot below). It is effectively shifting effective wavelength to bluer side. ETC claims that they don't use APER but rather just apply a scalar aperture correction (if I understood @vglaidler correctly), so that is why ETC result shows no change in effective wavelength.

untitled

If you want PySynphot's aper# to produce the same result as ETC, you have to make the APER# throughput uniform. But is that what you really want to do here? Why are they not uniform in the first place?

@jryon
Copy link
Author

jryon commented Feb 2, 2018

Maybe the issue here is the order of operations. Shouldn't the aperture correction be applied AFTER the source and bandpass have been convolved? It sounds like maybe pysynphot is including the aperture correction table in the total system throughput.

My understanding of what the ETC does is to calculate the effective wavelength of the observation (not including aperture correction), then use that effective wavelength to select a value from their encircled energy table (which is the same as the table in 'acs_wfc_aper_002_syn.fits'), and apply the result to the count rates.

@pllim
Copy link
Collaborator

pllim commented Feb 2, 2018

AFAIK the current behavior was inherited from IRAF SYNPHOT. @vglaidler could confirm since she did a very comprehensive commissioning campaign comparing the two.

What you are suggesting is a completely different way of treating aperture correction within PySynphot. I am not sure whether I want to support this here or not since this package is no longer being actively developed. 😬

Aperture correction is documented at http://pysynphot.readthedocs.io/en/latest/appendixb.html#pysynphot-parameterized-aper but it is unclear from the text on how it is applied technically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants