
speclite Documentation Release 0.14dev391 Speclite Developers Jan 18, 2021 Contents I Overview 3 II Installation7 III Filter Response Curves 11 IV Reference/API 37 i ii speclite Documentation, Release 0.14dev391 This package provides a set of lightweight utilities for working with spectroscopic data in astronomy. Contents 1 speclite Documentation, Release 0.14dev391 2 Contents Part I Overview 3 speclite Documentation, Release 0.14dev391 Speclite is a lightweight package for performing basic operations on spectral data contained in numpy arrays. The basic philosophy of this package is to: • Use spectral data in numpy arrays “as-is” rather than requiring users to reformat their data or wrap it in objects. • Minimize the number of assumptions about what quantities are used to define a spectrum. For example, we do not assume that spectra are sampled in wavelength rather than frequency. • Support operations on masked arrays and correctly propagate the effects of invalid samples. • Use per-sample weights (inverse variances) when these are available. • Do not introduce any dependencies beyond numpy, scipy, and astropy. • Be compatible with python versions 2.6, 2.7, 3.3, 3.4 and numpy versions >= 1.8. • Be fully documented and unit tested, with 100% test coverage. • Use the astropy affiliated package template to benefit from its sophisticated configuration and integration with other services (TravisCI, coveralls.io, readthedocs.io) and for possible future distribution with astropy. Speclite provides functions to perform the following basic manipulations of spectroscopic data: • redshift(): transforms from one redshift to another. • resample(): resamples from one sampling grid to another using interpolation. • downsample(): downsamples by combining bins in consecutive groups. • accumulate(): combines two spectra on the same grid, and can efficiently stack many spectra. • filters module: convolutions and magnitude calculations for some reference filters. Operations that are planned for future versions include: • Signal-to-noise estimation. The results of the redshift, resample, downsample and accumulate operations are always numpy structured arrays and these operations also accept structured arrays these as inputs. Some operations also accept un-structured arrays as inputs, but structured arrays should generally be preferred since they have negligible overhead and significantly reduce the burden on users to keep track of which columns correspond to which quantities. In cases where the source data is not already in a structured array, the necessary metadata can be added without copying the underlying array data, for example: >>> import numpy as np >>> data= np.arange(9, dtype=float).reshape(3,3) >>> sdata= data.view([( 'wlen', float), ('flux', float), ... ('ivar', float)]).reshape(3) >>> np.all(sdata == ... np.array([(0.0, 1.0, 2.0), (3.0, 4.0, 5.0), (6.0, 7.0, 8.0)], ... dtype=[('wlen', '<f8'), ('flux', '<f8'), ('ivar', '<f8')])) True >>> sdata.base is data.base True You should normally use dictionary notation to refer to individual fields of a structured array: >>> sdata['wlen'][1] 3.0 You can also use the more convenient dot notation using this recarray recipe. However, this is generally slower so speclite results are not automatically converted to numpy recarrays. Examples of using speclite with BOSS data are included with the bossdata package. 5 speclite Documentation, Release 0.14dev391 6 Part II Installation 7 speclite Documentation, Release 0.14dev391 Install the latest stable release using: pip install speclite Alternatively, you can install the latest developer version from github: github clone https://github.com/dkirkby/speclite.git cd speclite python setup.py install 9 speclite Documentation, Release 0.14dev391 10 Part III Filter Response Curves 11 speclite Documentation, Release 0.14dev391 The data/filters/ subdirectory contains small files with tabulated filter response curves. All files contain a single curve stored in the ASCII enhanced character-separated value format, which is used to specify the wavelength units and provide the following metadata: Key Description group_name Name of the group that this filter response belongs to, e.g., sdss2010. band_name Name of the filter pass band, e.g., r. airmass Airmass used for atmospheric transmission, or zero for no atmosphere. url URL with more details on how this filter response was obtained. description Brief description of this filter response. The following sections summarize the standard filters included with the speclite code distribution. Refer to the filters module API docs for details and examples of how to load an use these filters. See below for instructions on working with your own custom filters. 13 speclite Documentation, Release 0.14dev391 14 CHAPTER 1 SDSS Filters SDSS filter responses are taken from Table 4 of Doi et al, “Photometric Response Functions of the SDSS Imager”, The Astronomical Journal, Volume 139, Issue 4, pp. 1628-1648 (2010), and calculated as the reference response multiplied by the reference APO atmospheric transmission at an airmass 1.3. See the paper for details. The group name sdss2010 is used to identify these response curves in speclite. The plot below shows the output of: sdss= speclite.filters.load_filters( 'sdss2010-*') speclite.filters.plot_filters(sdss, wavelength_limits=(3000, 11000)) 15 speclite Documentation, Release 0.14dev391 16 Chapter 1. SDSS Filters CHAPTER 2 DECam DR1 Filters The DECam DR1 filter curves are documented in T. M. C. Abbott et al 2018 ApJS 239 18 and available from this NOAO DECam page. These represent the total system throughput and average instrumental response across the science CCDs. The official curves have arbitrary normalization, but the values used here have reasonable normalization factors applied for throughput calculations, provided Douglas Tucker (Jan 2021, private communication). There are two versions of the DR1 curves: decamDR1 with an airmass 1.2 reference atmosphere, and decamDR1noatm with no atmospheric extinction: with_atm= speclite.filters.load_filters( 'decamDR1-*') speclite.filters.plot_filters(with_atm) without_atm= speclite.filters.load_filters( 'decamDR1noatm-*') speclite.filters.plot_filters(without_atm) 17 speclite Documentation, Release 0.14dev391 18 Chapter 2. DECam DR1 Filters CHAPTER 3 DECam 2014 Filters The DECam 2014 filter responses are taken from this Excel spreadsheet created by William Wester in September 2014 and linked to this NOAO DECam page. Throughputs include a reference atmosphere with airmass 1.3 provided by Ting Li. These are the most recent publicly available DECam throughputs as of Feb 2016. The group name decam2014 is used to identify these response curves in speclite. The plot below shows the output of: decam= speclite.filters.load_filters( 'decam2014-*') speclite.filters.plot_filters( decam, wavelength_limits=(3000, 11000), legend_loc='upper left') 19 speclite Documentation, Release 0.14dev391 20 Chapter 3. DECam 2014 Filters CHAPTER 4 WISE Filters WISE filter responses are taken from files linked to this page containing the weighted mean relative spectral responses described in Wright et al, “The Wide-field Infrared Survey Explorer (WISE): Mission Description and Initial On-orbit Performance”, The Astronomical Journal, Volume 140, Issue 6, pp. 1868-1881 (2010). Note that these responses are based on pre-flight measurements but the in-flight responses of the W3 and W4 filters are observed to have effective wavelengths that differ by -(3-5)% and +(2-3)%, respectively. Refer to Section 2.2 of Wright 2010 for details. See also Section 2.1.3 of Brown 2014 for further details about W4. The group name wise2010 is used to identify these response curves in speclite. The plot below shows the output of the command below, and matches Figure 6 of the paper: wise= speclite.filters.load_filters( 'wise2010-*') speclite.filters.plot_filters(wise, wavelength_limits=(2, 30), wavelength_unit=astropy.units.micron, wavelength_scale='log') plt.gca().set_xticks([2,5, 10, 20, 30]) plt.gca().set_xticklabels([2,5, 10, 20, 30]) 21 speclite Documentation, Release 0.14dev391 22 Chapter 4. WISE Filters CHAPTER 5 HSC Filters HSC filter responses are taken from here. These throughputs include a reference atmosphere with airmass 1.2. Refer to Kawanamoto et al. 2017 (in prep). The group name hsc2017 is used to identify these curves in speclite. The plot below shows the output of the following command: hsc= speclite.filters.load_filters( 'hsc2017-*') speclite.filters.plot_filters(hsc) 23 speclite Documentation, Release 0.14dev391 24 Chapter 5. HSC Filters CHAPTER 6 LSST Filters LSST filter responses are taken from tag 12.0 of the LSST simulations throughputs package and include a standard atmosphere with airmass 1.2 that is also tabulated in the same package. The group name lsst2016 is used to identify these response curves in speclite. The plot below shows the output of the command below, and matches Figure 6 of the paper: lsst= speclite.filters.load_filters( 'lsst2016-*') speclite.filters.plot_filters( lsst, wavelength_limits=(3000, 11000), legend_loc='upper left') 25 speclite Documentation, Release 0.14dev391 26 Chapter 6. LSST Filters CHAPTER 7 Johnson/Cousins Filters Reference definitions of the Johnson/Cousins “standard” filters are taken from Table 2 of Bessell, M. S., “UBVRI passbands,” PASP, vol. 102, Oct. 1990, p. 1181-1199. We use the band name “U” for the response that Table 2 refers to as “UX”. Note that these do not represent the response of any actual instrument. Response values are normalized to have a maximum
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages75 Page
-
File Size-