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

add sdss2010 filters which include the atmosphere #76

Merged
merged 10 commits into from
Jul 19, 2022

Conversation

moustakas
Copy link
Member

@moustakas moustakas commented Jul 12, 2022

This PR addresses #39 and #66 by adding SDSS filters which include the atmosphere at an airmass of 1.3. The group name nor the names of the individual filters are great, but let me know if you'd like something different @dkirkby.

This PR is a blocking factor for some of my other DESI work, so it'd be great if we could merge this within a day or two.

sdss2010atm filters

Screen Shot 2022-07-12 at 3 16 01 PM

sdss2010 filters

Screen Shot 2022-07-12 at 3 18 29 PM

For reference, this is the bit of code I wrote to parse the Doi et al. Table 4 (after mildly editing the file to only include the column names as a simple header):

#!/usr/bin/env python

import numpy as np
from astropy.table import Table

tt = Table.read('aj330387t4_ascii.txt', format='ascii.commented_header')

for band in ['u', 'g', 'r', 'i', 'z']:
    filt = tt[tt[band] != '...']['lambda', band, 'T13']
    filt['resp'] = filt[band].astype('f8') * filt['T13']
    I = np.where(filt['resp'] > 0)[0]
    with open('sdss2010atm-{}.ecsv'.format(band), 'w') as F:
        F.write('# %ECSV 1.0\n')
        F.write('# ---\n')
        F.write('# datatype:\n')
        F.write('# - {name: wavelength, unit: Angstrom, datatype: float64}\n')
        F.write('# - {name: response, datatype: float64}\n')
        F.write('# meta: !!omap\n')
        F.write("# - {url: 'http://dx.doi.org/10.1088/0004-6256/139/4/1628'}\n")
        F.write('# - {{band_name: {}}}\n'.format(band))
        F.write('# - {airmass: 1.3}\n')
        F.write("# - {{description: 'SDSS 2.5m telescope reference {}-band response function\n".format(band))
        F.write('#     (through airmass 1.3) from Table 4 of:\n')
        F.write('#\n')
        F.write('#     Values are the product of the {} and atmospheric transmission columns from Table\n'.format(band))
        F.write('#     4 of:\n')
        F.write('#\n')
        F.write('#     Doi et al, "Photometric Response Functions of the SDSS Imager",\n')
        F.write('#\n')
        F.write('#     The Astronomical Journal, Volume 139, Issue 4, pp. 1628-1648 (2010).\n')
        F.write('#\n')
        F.write("#     All response values outside the wavelength range covered here are zero.'}\n")
        F.write('# - {group_name: sdss2010atm}\n')
        F.write('wavelength response\n')
        F.write('{} 0.0\n'.format(filt['lambda'][I[0]]-1))
        for lam, resp in zip(filt['lambda'][I], filt['resp'][I]):
            F.write('{} {:.6g}\n'.format(lam, resp))
        F.write('{} 0.0\n'.format(filt['lambda'][I[-1]]+1))

@sbailey
Copy link
Collaborator

sbailey commented Jul 13, 2022

@dkirkby @moustakas as a heads up, I've added this to the DR1/Iron project to keep it on our radar for including in the code release for the Iron production.

@dkirkby
Copy link
Member

dkirkby commented Jul 18, 2022

This looks good, thanks! Can you also update docs/filters.rst to describe the changes?

Regarding the naming, any reason not to use sdss2010 and sdss2010noatm to be parallel with the existing decamDR1(noatm) names?

@moustakas
Copy link
Member Author

Regarding the naming, any reason not to use sdss2010 and sdss2010noatm to be parallel with the existing decamDR1(noatm) names?

Thanks for the suggestion. My concern was the backwards-incompatibility: That if someone has been using the sdss2010 filters and applying the atmosphere themselves and we now make those the default, that it would cause issues. But if you're happy with making these the default (which is my preference) then I can make this change and also update the documentation.

@dkirkby
Copy link
Member

dkirkby commented Jul 18, 2022

I think this is the best solution overall since the docs always claimed sdss2010 included an atmosphere (so that hypothetical user presumably already knew they were wrong). Perhaps include a note in the doc page that this was wrong earlier?

@moustakas
Copy link
Member Author

@dkirkby I think this is ready for final review and merging.

@dkirkby dkirkby merged commit ec4bdc9 into master Jul 19, 2022
@dkirkby dkirkby deleted the sdss2010atm-filters branch July 19, 2022 17:34
@moustakas moustakas mentioned this pull request Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants