desihub/speclite

Add support for basic filter operations

Closed this issue · 9 comments

This issue has two components:

  • code to calculate filter-weighted integrals and
  • data files with tabulated filter curves.

Existing python implementations of the code are in:

Filter curves are collected in several places:

This issue is to implement the code in the same style as other speclite methods, so that others can try it out and give feedback, and to collect a basic set of filter curves sufficient for doing work now (SDSS, DES, LSST, WISE, UVB ?)

@moustakas Anything to add to this?

There's also some filter code in

  • desispec.fluxcalibration
  • desispec.io.filters

Other than that, this issue has been well-described. Thanks.

I just noticed that the sdss curves in kcorrect and dessim seems to have a different provenance than those in desimodel and idlutils. They both date to 2001, but have different headers and wavelength sampling. Any idea if I should prefer one over the other? For example: here and here.

I don't know -- this pre-dates me. Mike Blanton and @djschlegel would presumably know.

Here is a graph of the r-band curves from these two sources:
sdss_r

@djschlegel pointed me to more recent work in arxiv:1002.3701 and recommended that we use, so that is now the plan. Specifically, we will adopt the average (over camcols 1-6) reference responses of Table 4, which include an assumed airmass 1.3 APO atmosphere (as was also the case for the 2001 curves).

I got the average response curves from Doi (which are not available online, but he plans to fix this). The next question is what format they should be stored in:

  • Binary vs ASCII: I vote for ASCII since it is human readable and the values are relatively low precision (so portability of machine-precision values is not an issue).
  • How to capture table and column metadata in a standard way? This astropy note has a nice comparison of the existing ASCII options and opted for a new ECSV format.

Here is an example ECSV format header:

# %ECSV 0.9
# ---
# datatype:
# - {name: wavelength, unit: Angstrom, datatype: float64}
# - {name: response, datatype: float64}
# meta: !!omap
# - {url: 'http://dx.doi.org/10.1088/0004-6256/139/4/1628'}
# - {band: u}
# - {airmass: 1.3}
# - {description: 'SDSS 2.5m telescope reference u-band response function at adopted
#     1.3 airmass APO atmospheric transmission.
# 
#     Values are the product of the u and atmospheric transmission columns from Table
#     4 of:
# 
#     Doi et al, "Photometric Response Functions of the SDSS Imager",
# 
#     The Astronomical Journal, Volume 139, Issue 4, pp. 1628-1648 (2010).
# 
#     All response values outside the wavelength range covered here are zero.'}
wavelength response
2930.0 0.0
2940.0 0.0001
2960.0 0.0003
2980.0 0.0005
...

Whatever the format, these files are small enough to keep in the repo under speclite/data/filters/.

@moustakas @sbailey @weaverba137 Comments / opinions?

I agree ASCII and the ECSV format looks fine/great.

Sounds good to me, especially since speclite is already astropy-affiliated (or at least going down that path).

Closed with #10, which will be included in the soon-to-be-released v0.3.