| 1 |
PROBLEM: |
| 2 |
======= |
| 3 |
|
| 4 |
Throughput files containing filter throughput curves that decay to a |
| 5 |
very small number, but not actually zero (ie, are not "pinned at zero" |
| 6 |
at the ends) cause problems for Pysynphot that they did not cause for |
| 7 |
SYNPHOT. |
| 8 |
|
| 9 |
|
| 10 |
WHY? |
| 11 |
==== |
| 12 |
|
| 13 |
Differences in waveset handling. |
| 14 |
|
| 15 |
- SYNPHOT takes the intersection of all wavelength sets defined for all |
| 16 |
elements of a calculation, and discards all data falling outside the |
| 17 |
defined range of the intersection. |
| 18 |
|
| 19 |
- Pysynphot takes the union of all wavelength sets defined for all |
| 20 |
elements of a calculation, and preserves all data. |
| 21 |
|
| 22 |
Thus, if the last datapoint in a throughput file is at lambda=20000, |
| 23 |
throughput=1e-9: |
| 24 |
|
| 25 |
- SYNPHOT discards all data longward of lambda=20000 |
| 26 |
- Pysynphot extrapolates a constant throughput of 1e-9 instead |
| 27 |
|
| 28 |
|
| 29 |
HOW DOES THE PROBLEM MANIFEST? |
| 30 |
============================= |
| 31 |
|
| 32 |
We have identified two areas in which the problem manifests: |
| 33 |
- countrate calculations will integrate over the full wavelength domain of |
| 34 |
the spectrum domain, so the resulting countrate will be larger. |
| 35 |
|
| 36 |
- renormalization calculations will be performed over the full |
| 37 |
wavelength domain of the spectrum being renormalized, so the |
| 38 |
renormalization constant will be smaller |
| 39 |
|
| 40 |
However, there may be more manifestations. The fundamental problem is |
| 41 |
that the throughput curve for these filters are shaped differently for |
| 42 |
Pysynphot than they were for SYNPHOT. This is likely to ripple |
| 43 |
throughout the system. |
| 44 |
|
| 45 |
WHICH INSTRUMENTS ARE AFFECTED? |
| 46 |
=============================== |
| 47 |
Only a preliminary estimate has been made by checking for the |
| 48 |
existence of throughput files that are not precisely equal to zero at |
| 49 |
both endpoints. This is an overestimate, because some files, such as |
| 50 |
longpass filters and internal optics, should not in fact fall to zero. |
| 51 |
|
| 52 |
According to this preliminary estimate, |
| 53 |
ACS, NICMOS, and STIS have many files that are affected. |
| 54 |
COS has a few. WFPC3 has only 2 aperture files. |
| 55 |
WFPC2 has many; so do FOC,FOS,HRS,HSP. |
| 56 |
|
| 57 |
All supported non-HST modes (Johnson, etc) are unaffected. |
| 58 |
|
| 59 |
|
| 60 |
WHY SHOULD WE CHANGE THE FILES? |
| 61 |
WHY DON'T YOU JUST CHANGE THE CODE INSTEAD? |
| 62 |
=========================================== |
| 63 |
|
| 64 |
- Taking the union, rather than the intersection, of the wavesets is a |
| 65 |
fundamental design feature of Pysynphot that was introduced in order to |
| 66 |
solve other problems with SYNPHOT. |
| 67 |
|
| 68 |
- The throughput files in their current state are not well defined. |
| 69 |
If the throughput goes to 1e-9 at 20000A, what does it do at 25000? |
| 70 |
|
| 71 |
- You as the instrument teams will have better control over what |
| 72 |
Pysynphot should do outside the currently defined ranges if you |
| 73 |
actually tell it (ie, modify the files so that the behavior is |
| 74 |
welldefined) than allow it to guess (ie, let the software extrapolate). |
| 75 |
|
| 76 |
|
| 77 |
WHAT ARE THE OPTIONS FOR MODIFICATION? |
| 78 |
====================================== |
| 79 |
|
| 80 |
Option 1: Update the throughput tables so they are well defined. |
| 81 |
**This option is preferred by the NICMOS team. |
| 82 |
|
| 83 |
Pros: |
| 84 |
- gives you complete control over the throughput behavior |
| 85 |
- requires no code changes for us |
| 86 |
- is "the right thing to do" |
| 87 |
|
| 88 |
Cons: |
| 89 |
- requires thinking, editing, testing, and delivering a lot of |
| 90 |
files |
| 91 |
- thinking: what is the correct extrapolation behavior? |
| 92 |
- editing: updating the tables to include them |
| 93 |
- testing: testing new throughput tables (how?) |
| 94 |
|
| 95 |
|
| 96 |
How can we minimize the work required? |
| 97 |
-------------------------------------- |
| 98 |
The NICMOS team recommends the following actions to minimize the work |
| 99 |
required by the teams: |
| 100 |
|
| 101 |
- In changing the files: |
| 102 |
|
| 103 |
- define a standard modification, eg, "add an extra point 0.001A |
| 104 |
from the current end of the table with throughput=0". Then SSB |
| 105 |
could write a script that would apply this change, and the teams |
| 106 |
would only need to provide a list of affected files. |
| 107 |
|
| 108 |
It would be possible to selectively hand-edit files that warrant |
| 109 |
more sophisticated extrapolation. |
| 110 |
|
| 111 |
- In reducing the testing/validation load: |
| 112 |
|
| 113 |
- The algorithm described above, by essentially making a step |
| 114 |
function just past the current end of the defined data, would |
| 115 |
come closest to the current SYNPHOT behavior, which would in |
| 116 |
turn minimize the expected change, thus making it easier to |
| 117 |
validate the test results. |
| 118 |
|
| 119 |
- Using the ETC regression tests (ie, the last public release of |
| 120 |
the ETC software, using synphot) as the pre-delivery tests would |
| 121 |
preclude the need to invent new tests. |
| 122 |
|
| 123 |
- Establishing an appropriately small difference threshold, below |
| 124 |
which the tests would be validated, would further make the |
| 125 |
validation stage easier. |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
Option 2: Add a header keyword that will tell Pysynphot to taper the |
| 130 |
throughput curve to zero when the file is read in. |
| 131 |
**This option has been rejected by the NICMOS team. |
| 132 |
|
| 133 |
Pros: |
| 134 |
- requires less thinking, editing, and testing: |
| 135 |
- thinking: which files should do this? |
| 136 |
- editing: identical for all affected files => scripted |
| 137 |
- testing: easier to test files with a new header keyword that |
| 138 |
most software ignores, than to test files with actual data table |
| 139 |
changes |
| 140 |
|
| 141 |
Cons: |
| 142 |
- gives you less control over the behavior |
| 143 |
- requires some well-localized code changes for us |
| 144 |
- is a bit of a hack |
| 145 |
|
| 146 |
|
| 147 |
How would the tapering be done? |
| 148 |
------------------------------- |
| 149 |
|
| 150 |
One extra point would be added to each end of the table. |
| 151 |
The wavelengths to use for these extra points are |
| 152 |
calculated by using the same ratio as for the 2 interior points |
| 153 |
wcopy[0] = wcopy[1]*wcopy[1]/wcopy[2] |
| 154 |
wcopy[-1] = wcopy[-2]*wcopy[-2]/wcopy[-3] |
| 155 |
|
| 156 |
The throughput of the new points would be set to zero. |
| 157 |
|
| 158 |
This change would be implemented when the file was read in, so that |
| 159 |
it would be sure to propagate through the entire system. |
| 160 |
|
| 161 |
When the resulting throughput curve was used in any calculations, |
| 162 |
it would be linearly interpolated between the last defined point in |
| 163 |
the file, and zero at the extra point; longward/shortward of the |
| 164 |
extra points would then be extrapolated at the constant value of |
| 165 |
zero. |