Week 11: A wrapper says its first word

What I completed this week:

  • Continued working on the synphot wrapper class, which we’ve renamed “Exposure” (since “Observe” is a little too close to the other synphot class “Observation”). So far this class works pretty much like how I imagined it last week, where the most simple (read: default) synthetic observation can be initiated given a source spectrum, telescope diameter, and exposure time:
>>> from synphot.spectrum import SourceSpectrum
>>> from synphot.exposure import Exposure
>>> import astropy.units as u

>>> source_spec = SourceSpectrum(...)
>>> tele_diameter = 1 * u.m
>>> exptime = 1 * u.s

>>> some_observation = Exposure(source_spec, tele_diameter, exptime)

Then attributes can be called and methods applied to view some characteristics of this observation, such as the count rate, signal to noise ratio (SNR), and the exposure time needed to obtain a specified SNR:

>>> some_observation.aperture_area
<Quantity 0.78539816 m2>

>>> some_observation.countrate
<Quantity 126398.52488845 ct / s>

>>> some_observation.snr()
<Quantity 355.52570215>

>>> desired_snr = 100
>>> some_observation.required_exptime(desired_snr)
<Quantity 0.07911485 s>
I also took a little break to see family and go “tubing”, as seen above (wee)

This week’s goals:

  • Finish the wrapper! Now taking suggestions for anything else I should include
  • Take a look at telescopy and astroplan and think how they, along with synspec and any higher order functions we come up with, can be merged (okay, I really need to do this one this week)

Longer term goals:

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