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

Review sky brightness calculation #18

Open
dkirkby opened this issue Nov 15, 2016 · 5 comments
Open

Review sky brightness calculation #18

dkirkby opened this issue Nov 15, 2016 · 5 comments

Comments

@dkirkby
Copy link
Member

dkirkby commented Nov 15, 2016

We currently apply extinction to the sky brightness before converting it to elec/sec via Survey.get_flux. Is this the right thing to do?

@dkirkby
Copy link
Member Author

dkirkby commented Nov 15, 2016

The relevant code from survey.py is:

        # Calculate the mean sky background level in detected electrons per pixel.
        self.mean_sky_level = self.get_flux(self.sky_brightness)*self.pixel_scale**2

and:

    def get_flux(self,ab_magnitude):
        """Convert source magnitude to flux.

        The calculation includes the effects of atmospheric extinction.

        Args:
            ab_magnitude(float): AB magnitude of source.

        Returns:
            float: Flux in detected electrons.
        """
        ab_magnitude += self.extinction*(self.airmass - 1.)
        return self.exposure_time*self.zero_point*10**(-0.4*(ab_magnitude-24))

@fjaviersanchez
Copy link
Collaborator

If I change the zero_points and I write ab_magnitude += self.extinction*(self.airmass - 1.2) it is slightly better than: ab_magnitude += self.extinction*(self.airmass - 1.0) but the flux is still ~0.5% off recomputing the zero_points for the new airmass conditions.

@fjaviersanchez
Copy link
Collaborator

I think we can't recompute the zero-points for the different conditions since we have the model for LSST but this might be (probably will be) different for DES and CFHTLS. What do you think @dkirkby?

@dkirkby
Copy link
Member Author

dkirkby commented Mar 16, 2017

Our DES & CFHTLS zero points are simply rescaled from the LSST zero points, so should have the same airmass scaling. In other words, I think we want to use:

self.extinction*(self.airmass - zeropt_airmass)

Since the zero-point already includes extinction at zeropt_airmass.

This reminds me that we need to update the DES & CFHTLS zeropoints, now that the LSST ones have changed!

@fjaviersanchez
Copy link
Collaborator

I updated these zero-points in PR #20. I also added DECAM g and DECAM z filters.

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

2 participants