This is a tool to scrape information from the exposure time calculator website hosted by STScI. It is intented to provide a convenient and automated way to perform the task of clicks, inputs, and selections without the user having to interact with the web interface, allowing one to perform repeated simulations for various parameter settings/multiple objects/both (e.g. using the apply()
method from Pandas
to the rows of a dataframe, where each row corresponds to an object with corresponding input properties). Currently, this is only setup for use with COS G130M and G160M gratings. It returns the COS request ID, time on source, and buffer times. See function help for more information.
Refer to the Installation documentation
This program sends HTTP requests to the source website using Selenium and then parses the HTML content using Beautiful Soup. Astroquery is used to determine the extinction value in the direction of object of interest.
numpy
astropy
astroquery
bs4
selenium
Chrome driver
Ensure version match of your Google Chrome. It can be found under Settings > About Chrome. At least version 112.x is needed to be compatible with the latest version of Selenium.Chrome binary location
Edit the chromepaths.py
file (located inside etc
folder) to point to the paths of both the Chrome driver and Chrome binary location.
import etc
help(etc.cosetc)
etc.cosetc(detector="fuv",grating = "g130m",aperturetype="PSA",snrval=12.0,redshift_qso=0.1,qso_ra=8.565,qso_dec=35.902,redshift_abs=0,fuvval=19.0,wav_int=1206)
- Spectrum: Non-stellar Objects QSO (COS based) [473, 1784 Å z=0]
- Extinction: Milky Way Diffuse (Rv=3.1) = (Parameter input) applied before normalization
- Normalization: Renormalized to abmag = (Parameter input) in filter Galex/FUV
- Emission Lines: None
- Earth Shine: Average
- Zodiacal Light: Average
- Air Glow: Average
pyETC.mp4
The information retrieved by this code is obtained by scraping data from the COS Spectroscopy ETC. The content used here abides by the content use policy of the source.