Weeks 6 and 7: Synspec and SNR

What I completed these last two weeks:

  • Trying to solve the offset problem for example 2:
    • Do the same analysis for multiple objects. Is the systematic error still there?
      The systematic error persists strongly for both objects, as you can see in the Figure 1 below. So it’s not object-specific, and I think this also means it’s not weather related (assuming the two objects were observed on different nights).
    • Plot bandpasses on top of spectrum
      Figure 2 shows spectra of both objects ontop of the bandpasses, where we’ve removed the u ad z bands because they don’t fully overlap with the spectrum, which resulted in underestimated magnitudes for the u and z bands since synphot has to guess what the spectrum looks like to fill in the gaps. Other than that, I can’t see a reason why the filter models would be responsible for the systematic offset.
    • How systematic is this offset? Plot the fractional error in each band to see.
      Figure 3 shows the fractional error between the synphot fluxes and the observed fluxes. The offset isn’t quite as systematic as I thought, since the three objects are affected to different degrees. Could this mean that the error *is* weather related…?
    • Add a “boring” elliptical galaxy for comparison.
      The offset persists for the elliptical galaxy, and is in the same ballpark as the others in terms of fractional error. I’m still unsure why synphot would be overestimating the photometric flux…
Figure 1. Photometry of two different H-alpha emission galaxies and one elliptical galaxy observed by SDSS, with a persistant systematic offset between synphot fluxes and observed fluxes.
Figure 2. Spectra of three objects in relation to the bandpass models.
Figure 3. Fractional error between the synphot fluxes and the observed fluxes in each band.
  • Wrote a signal-to-noise predictor based on “the CCD equation” in Steve Howell’s “Handbook of CCD Astronomy”, 2000. I would like to make a pull request to implement this into synphot, possibly as a method on Observation, e.g.:
>>> from synphot.observation import Observation
>>> import astropy.units as u
>>> observation = Observation(spectrum, bandpass)
>>> countrate = observation.countrate()
>>> counts = countrate * 10 * u.s
>>> snr = observation.snr(counts)
>>> snr
  • Also wrote a function which returns the exposure time needed to reach a desired signal to noise ratio.
    • I’m not really sure what to name it, exposure_time_from_snr() seems too long…
    • In the case where the error due to the background estimation and gain are significant, solving for t can not be done analytically, so I use scipy.optimize.fsolve to solve it numerically. However, fsolve doesn’t preserve quantity types, so I have to add some annoying conditional statements to convert t back to a quantity… is there a better way to do this?

This week’s goals:

  • Make a pull request to synphot for the signal-to-noise predictor
  • Begin working on “synspec” (synthetic spectroscopy)
    • Is there an easy way to use synphot for synthetic spectroscopy?
    • See how long each run takes – ideally it should be fast, for people who want to run this on thousands of spectra

Longer term goals:

  • Make 4-5 notebooks which explore different use cases in order to get an idea of how we want to implement any changes or enhancements to synphot:
    1. Model spectrum -> Synthetic photometry
      • Ground-based example: existing APO notebook
      • Space-based example: existing APO notebook + Kepler
    2. Empirical spectrum -> Synthetic photometry
      • Example: Galaxy with high H-alpha emission observed by SDSS
    3. Model spectrum -> synthetic spectroscopy
      • Example: Observations of a G dwarf with CHEOPS at R~1k vs 100k – what count rates do you get?
    4. Empirical spectrum -> synthetic spectroscopy
      • Possible example: Some HII region spectrum -> how many hours to a S/N of X
  • Make a pull request to synphot for the signal-to-noise predictor
  • Create a pull request to Astroquery to enable queries to the filter VO service for filter transmittance curves Is this still on the table given tynt‘s existence?
Oh and it was also the 4th of July sometime in between the coding


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s