Debian Codegraph @

doc/source/index.rst

raw
1 .. _pysynphot-doc-main:
2
3 **********************************
4 Astrolib PySynphot (**pysynphot**)
5 **********************************
6
7 .. note::
8
9 This package is no longer actively developed. See
10 `package roadmap <https://github.com/spacetelescope/pysynphot/blob/master/ROADMAP.md>`_
11 for more information.
12
13 Introduction
14 ============
15
16 Astrolib PySynphot (hereafter referred to only as **pysynphot**) is an
17 object-oriented replacement for STSDAS SYNPHOT synthetic photometry package in
18 IRAF. It is distributed as part of
19 `AstroConda <https://astroconda.readthedocs.io/en/latest/>`_ (preferred)
20 and also as `standalone <https://pypi.org/project/pysynphot/>`_.
21 Although this package was developed for HST, it can be utilized with other
22 observatories.
23
24 **pysynphot** simulates photometric data and spectra as they are observed with
25 the Hubble Space Telescope (HST). Passbands for standard photometric systems are
26 available, and users can incorporate their own filters, spectra, and data.
27 **pysynphot** user interface allows you to:
28
29 * Construct complicated composite spectra from various grids of model atmosphere
30 spectra, parameterized spectrum models, and atlases of stellar
31 spectrophotometry.
32 * Simulate observations.
33 * Query the resulting structures for quantities of interest, such as countrate,
34 effective wavelength, effective stimulus, as well as the wavelength and flux
35 arrays.
36 * Plot HST sensitivity curves and calibration target spectra.
37 * Compute photometric calibration parameters for any HST instrument mode.
38
39 **pysynphot** can help HST observers to perform cross-instrument simulations, to
40 examine the transmission curve of the HST Optical Telescope Assembly (OTA), and
41 spectra of HST calibration targets. Expert users can take advantage of the
42 control and data structures available in Python to easily perform repetitive
43 operations such as simulate the observation of multiple type of sources through
44 multiple observing modes.
45
46 If you use **pysynphot** in your work, please cite it as,
47 "*Lim, P. L., Diaz, R. I., & Laidler, V. 2015, PySynphot User's Guide
48 (Baltimore, MD: STScI), https://pysynphot.readthedocs.io/en/latest/*".
49 Alternately, bibcode is available from
50 `Astrophysics Source Code Library <http://ascl.net/1303.023>`_.
51
52 If you have questions or concerns regarding the software, please contact
53 STScI Help Desk via `hsthelp.stsci.edu <https://hsthelp.stsci.edu>`_.
54
55
56 .. _pysynphot-installation-setup:
57
58 Installation and Setup
59 ======================
60
61 If you have AstroConda, simply install with this command::
62
63 conda install pysynphot
64
65 To install the PyPI release::
66
67 pip install pysynphot
68
69 If missing, the following dependencies must also be installed:
70
71 * `astropy <https://pypi.org/project/astropy/>`_ 1.1 or greater
72 * `numpy <https://pypi.org/project/numpy/>`_ 1.9 or greater
73 * `matplotlib <https://matplotlib.org/>`_ (optional)
74
75 Data files for **pysynphot** are distributed separately by
76 `Calibration Reference Data System <http://www.stsci.edu/hst/instrumentation/reference-data-for-calibration-and-tools/synphot-throughput-tables.html>`_.
77 They are expected to follow a certain directory structure under the root
78 directory, identified by the ``PYSYN_CDBS`` environment variable that *must* be
79 set prior to using this package. In the example below, the root directory is
80 arbitrarily named ``/my/local/dir/trds/``.
81
82 In bash shell::
83
84 export PYSYN_CDBS=/my/local/dir/trds/
85
86 In csh shell::
87
88 setenv PYSYN_CDBS /my/local/dir/trds/
89
90 These data files are needed for calculations involving HST bandpasses:
91
92 +----------------------------+------------------------------+--------------------------------------------------+
93 | Description | Directory name | Download |
94 +============================+==============================+==================================================+
95 |Master tables | $PYSYN_CDBS/mtab/ |http://ssb.stsci.edu/trds/tarfiles/synphot1.tar.gz|
96 +----------------------------+------------------------------+ |
97 |HST/ACS throughput tables | $PYSYN_CDBS/comp/acs/ | |
98 +----------------------------+------------------------------+ |
99 |HST/COS throughput tables | $PYSYN_CDBS/comp/cos/ | |
100 +----------------------------+------------------------------+ |
101 |HST/FGS throughput tables | $PYSYN_CDBS/comp/fgs/ | |
102 +----------------------------+------------------------------+ |
103 |HST/FOC throughput tables | $PYSYN_CDBS/comp/foc/ | |
104 +----------------------------+------------------------------+ |
105 |HST/FOS throughput tables | $PYSYN_CDBS/comp/fos/ | |
106 +----------------------------+------------------------------+ |
107 |HST/HRS throughput tables | $PYSYN_CDBS/comp/hrs/ | |
108 +----------------------------+------------------------------+ |
109 |HST/HSP throughput tables | $PYSYN_CDBS/comp/hsp/ | |
110 +----------------------------+------------------------------+ |
111 |HST/NICMOS throughput tables| $PYSYN_CDBS/comp/nicmos/ | |
112 +----------------------------+------------------------------+ |
113 |HST/OTA throughput tables | $PYSYN_CDBS/comp/ota/ | |
114 +----------------------------+------------------------------+ |
115 |HST/STIS throughput tables | $PYSYN_CDBS/comp/stis/ | |
116 +----------------------------+------------------------------+ |
117 |HST/WFC3 throughput tables | $PYSYN_CDBS/comp/wfc3/ | |
118 +----------------------------+------------------------------+ |
119 |HST/WFPC1 throughput tables | $PYSYN_CDBS/comp/wfpc/ | |
120 +----------------------------+------------------------------+ |
121 |HST/WFPC2 throughput tables | $PYSYN_CDBS/comp/wfpc2/ | |
122 +----------------------------+------------------------------+ |
123 |Non-HST throughput tables | $PYSYN_CDBS/comp/nonhst/ | |
124 +----------------------------+------------------------------+--------------------------------------------------+
125
126 These data files are needed for calculations involving source spectra:
127
128 +------------------------------------------+----------------------------+--------------------------------------------------+
129 | Description | Directory name | Download |
130 +==========================================+============================+==================================================+
131 |Interstellar extinction curves |$PYSYN_CDBS/extinction/ |http://ssb.stsci.edu/trds/tarfiles/synphot2.tar.gz|
132 +------------------------------------------+----------------------------+ |
133 |AGN templates |$PYSYN_CDBS/grid/agn/ | |
134 +------------------------------------------+----------------------------+ |
135 |Bruzual-Charlot galaxy spectra |$PYSYN_CDBS/grid/bc95/ | |
136 +------------------------------------------+----------------------------+ |
137 |Buser-Kurucz stellar atlas |$PYSYN_CDBS/grid/bkmodels/ | |
138 +------------------------------------------+----------------------------+ |
139 |Bruzual-Persson-Gunn-Stryker stellar atlas|$PYSYN_CDBS/grid/bpgs/ | |
140 +------------------------------------------+----------------------------+ |
141 |Brown galaxy atlas |$PYSYN_CDBS/grid/brown/ | |
142 +------------------------------------------+----------------------------+ |
143 |Bruzual stellar atlas |$PYSYN_CDBS/grid/bz77/ | |
144 +------------------------------------------+----------------------------+ |
145 |Galactic emission line objects |$PYSYN_CDBS/grid/galactic/ | |
146 +------------------------------------------+----------------------------+ |
147 |Gunn-Stryker atlas |$PYSYN_CDBS/grid/gunnstryker| |
148 +------------------------------------------+----------------------------+ |
149 |Jacobi-Hunter-Christian stellar atlas |$PYSYN_CDBS/grid/jacobi/ | |
150 +------------------------------------------+----------------------------+ |
151 |Kinney-Calzetti galaxy spectra |$PYSYN_CDBS/grid/kc96/ | |
152 +------------------------------------------+----------------------------+ |
153 |Pickles stellar atlas |$PYSYN_CDBS/grid/pickles/ | |
154 +------------------------------------------+----------------------------+--------------------------------------------------+
155 |Castelli & Kurucz (2004) stellar atlas |$PYSYN_CDBS/grid/ck04models/|http://ssb.stsci.edu/trds/tarfiles/synphot3.tar.gz|
156 +------------------------------------------+----------------------------+--------------------------------------------------+
157 |Kurucz (1993) stellar atlas |$PYSYN_CDBS/grid/k93models/ |http://ssb.stsci.edu/trds/tarfiles/synphot4.tar.gz|
158 +------------------------------------------+----------------------------+--------------------------------------------------+
159 |Phoenix stellar atlas |$PYSYN_CDBS/grid/phoenix/ |http://ssb.stsci.edu/trds/tarfiles/synphot5.tar.gz|
160 +------------------------------------------+----------------------------+--------------------------------------------------+
161 |HST calibration spectra |$PYSYN_CDBS/calspec/ |http://ssb.stsci.edu/trds/tarfiles/synphot6.tar.gz|
162 +------------------------------------------+----------------------------+--------------------------------------------------+
163
164 Throughout this document, unless explicitly stated otherwise, the examples
165 assume that ``PYSYN_CDBS`` points to the correct location, and that the relevant
166 packages are already imported:
167
168 >>> import os
169 >>> os.environ['PYSYN_CDBS']
170 '/my/local/dir/trds/'
171 >>> import numpy as np
172 >>> import pysynphot as S
173
174 For plotting, make sure you have the optional
175 `matplotlib <https://matplotlib.org/>`_ package and turn on its interactive mode:
176
177 >>> import matplotlib.pyplot as plt
178 >>> plt.ion()
179
180 Before drawing a new plot, you must clear the existing plot:
181
182 >>> plt.clf()
183
184
185 .. _pysynphot-tree:
186
187 Using **pysynphot**
188 ===================
189
190 .. toctree::
191 :maxdepth: 1
192
193 how_works
194 using_pysynphot
195 iraf_synphot
196 bandpass
197 spectrum
198 observation
199 properties
200 refdata
201 units
202 tutorials
203 appendixa
204 appendixb
205 appendixc
206 ref_api
207
208
209 References
210 ==========
211
212 .. _synphot-ref-bessell1983:
213
214 * Bessell, M. S. 1983, PASP, 95, 480
215
216 .. _synphot-ref-bessell1988:
217
218 * Bessell, M. S. & Brett, J. M. 1988, PASP, 100, 1134
219
220 .. _synphot-ref-bohlin2001:
221
222 * Bohlin, R. C., Dickinson, M. E., & Calzetti, D. 2001, AJ, 122, 2118
223
224 .. _synphot-ref-bohlin2004:
225
226 * Bohlin, R. C. & Gilliland, R. L. 2004, AJ, 127, 3508
227
228 .. _synphot-ref-brown2014:
229
230 * Brown, M. J. I., et al. 2014, ApJS, 212, 18
231
232 .. _synphot-ref-calzetti2000:
233
234 * Calzetti, D., Armus, L., Bohlin, R. C., Kinney, A. L., Koornneef, J., & Storchi-Bergmann, T. 2000, ApJ, 533, 682
235
236 .. _synphot-ref-calzetti1994:
237
238 * Calzetti, D., Kinney, A. L., & Storchi-Bergmann, T. 1994, ApJ, 429, 582
239
240 .. _synphot-ref-cardelli1989:
241
242 * Cardelli, J. A., Clayton, G. C., & Mathis, J. S. 1989, ApJ, 345, 245
243
244 .. _synphot-ref-cohen2003:
245
246 * `Cohen, M., Wheaton, W. A., & Megeath, S. T. 2003, AJ, 126, 1090 <https://ui.adsabs.harvard.edu/abs/2003AJ....126.1090C/abstract>`_
247
248 .. _synphot-ref-demarchi2004:
249
250 * `De Marchi, G. et al. 2004, ISR ACS 2004-08: Detector Quantum Efficiency and Photometric Zero Points of the ACS (Baltimore, MD: STScI) <http://www.stsci.edu/files/live/sites/www/files/home/hst/instrumentation/acs/documentation/instrument-science-reports-isrs/_documents/isr0408.pdf>`_
251
252 .. _synphot-ref-diaz2012:
253
254 * `Diaz, R.I. 2012, ISR CDBS 2012-01: pysynphot/Synphot Throughput Files: Mapping to instrument components for ACS, COS, and WFC3 (Baltimore, MD: STScI) <http://www.stsci.edu/files/live/sites/www/files/home/hst/instrumentation/reference-data-for-calibration-and-tools/documentation/_documents/TIR-CDBS-2012-01.pdf>`_
255
256 .. _synphot-ref-francis1991:
257
258 * Francis, P. J., Hewett, P. C., Foltz, C. B., Chaffee, F. H., Weymann, R. J., & Morris, S. L. 1991, ApJ, 373, 465
259
260 .. _synphot-ref-fukugita1996:
261
262 * Fukugita, M., Ichikawa, T., Gunn, J. E., Doi, M., Shimasaku, K., & Schneider, D. P. 1996, AJ, 111, 1748
263
264 .. _synphot-ref-gordon2003:
265
266 * Gordon, K. D., Clayton, G. C., Misselt, K. A., Landolt, A. U., & Wolff, M. J. 2003, ApJ, 594, 279
267
268 .. _synphot-ref-greenfield2007:
269
270 * `Greenfield, P. & Jedrzejewski, R. 2007, Using Python for Interactive Data Analysis (Baltimore, MD: STScI) <http://ssb.stsci.edu/perry/pydatatut.pdf>`_
271
272 .. _synphot-ref-gunn2001:
273
274 * `Gunn, J. E., Hogg, D., Finkbeiner, D., & Schlegel, D. 2001, Photometry White Paper <http://www.sdss.org/dr3/algorithms/sdssphot.ps>`_
275
276 .. _synphot-ref-gunn1983:
277
278 * Gunn, J. E. & Stryker, L. L. 1983, ApJS, 52, 121
279
280 .. _synphot-ref-harris1991:
281
282 * Harris, H., Baum, W., Hunter, D., & Kreidl, T. 1991, AJ, 101, 677
283
284 .. _synphot-ref-holberg2006:
285
286 * Holberg, J. B. & Bergeron, P. 2006, AJ, 132, 1221
287
288 .. _synphot-ref-howarth1983:
289
290 * Howarth, I. D. 1983, MNRAS, 203, 301
291
292 .. _synphot-ref-jacoby1984:
293
294 * Jacoby, G. H., Hunter, D. A., & Christian, C. A. 1984, ApJS, 56, 257
295
296 .. _synphot-ref-johnson1965:
297
298 * Johnson, H. L. 1965, ApJ, 141, 923
299
300 .. _synphot-ref-kinney1996:
301
302 * Kinney, A. L., Calzetti, D., Bohlin, R. C., McQuade, K., Storchi-Bergmann, T., & Schmitt, H. R. 1996, ApJ, 467, 38
303
304 .. _synphot-ref-koornneef1986:
305
306 * Koornneef, J., Bohlin, R., Buser, R., Horne, K., & Turnshek, D. 1986, Highlights Astron., 7, 833
307
308 .. _synphot-ref-laidler2009:
309
310 * `Laidler, V. 2009, TSR 2009-01: Pysynphot Commissioning Report (Baltimore, MD: STScI) <http://ssb.stsci.edu/tsr/2009_01/>`_
311
312 .. _synphot-ref-laidler2008:
313
314 * `Laidler, V., et al. 2008, Synphot Data User's Guide, Version 1.2 (Baltimore, MD: STScI) <http://www.stsci.edu/files/live/sites/www/files/home/hst/documentation/_documents/hst_synphot.pdf>`_
315
316 .. _synphot-ref-landolt1983:
317
318 * Landolt, A. U. 1983, AJ, 88, 439
319
320 .. _synphot-ref-lub1977:
321
322 * Lub, J. & Pel, J. W. 1977, A&A, 54, 137
323
324 .. _synphot-ref-lupton1999:
325
326 * Lupton, R. H., Gunn, J. E., & Szalay A. S. 1999, AJ, 118, 1406
327
328 .. _synphot-ref-maiz2006:
329
330 * Maiz Apellaniz, J. 2006, AJ, 131, 1184
331
332 * `matplotlib Tutorial <https://matplotlib.org/users/pyplot_tutorial.html>`_
333
334 .. _synphot-ref-morrissey2007:
335
336 * Morrissey, P. et al. 2007, ApJS, 173, 682
337
338 .. _synphot-ref-oke1974:
339
340 * Oke, J. B., 1974, ApJS, 27, 21
341
342 .. _synphot-ref-oke1983:
343
344 * Oke, J. B. & Gunn, J. E. 1983, ApJ, 266, 713
345
346 .. _synphot-ref-pickles1998:
347
348 * Pickles, A. J. 1998, PASP, 110, 863
349
350 .. _synphot-ref-prevot1984:
351
352 * Prevot, M. L., Lequeux, J., Prevot, L., Maurice, E., & Rocca-Volmerange, B. 1984, A&A, 132, 389
353
354 * `pysynphot Code Repository <https://github.com/spacetelescope/pysynphot/>`_
355
356 * `pysynphot Open Issues <https://github.com/spacetelescope/pysynphot/issues>`_
357
358 .. _synphot-ref-rybicki1979:
359
360 * Rybicki, G. B., & Lightman, A. P. 1979, Radiative Processes in Astrophysics (New York, NY: Wiley)
361
362 .. _synphot-ref-savage1979:
363
364 * Savage, B. D. & Mathis, J. S. 1979, ARA&A, 17, 73
365
366 .. _synphot-ref-schneider1983:
367
368 * Schneider, D. P., Gunn, J. E., & Hoessel J. G. 1983, ApJ, 264, 337
369
370 .. _synphot-ref-seaton1979:
371
372 * Seaton, M. J. 1979, MNRAS, 187, 785
373
374 .. _synphot-ref-smith2002:
375
376 * Smith, J. A. et al. 2002, AJ, 123, 2121
377
378 .. _synphot-ref-strecker1979:
379
380 * Strecker, D. W. et al. 1979, ApJS, 41, 501
381
382 .. _synphot-ref-vanduinen1975:
383
384 * van Duinen, R. J., Aalders, J. W. G., Wesselius, P. R., Wildeman, K. J., Wu, C. C., Luinge, W., & Snel, D. 1975, A&A, 39, 159