New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparison with 2004 PAM #11
Comments
Certainly more discussion could be added @mackjenn. I think a short discussion would be useful in the notebook. Anything more than a short discussion might be better served on the ACS/WFC3 websites just for keeping this particular notebook simple. |
Also tagging @mcara as he will be interested in this. |
@mackjenn @tddesjardins I have tried to use data available at http://www.stsci.edu/hst/acs/analysis/PAMS I do not know how to put distortion coefficients "back" into the IDCTAB genie bottle. So, I just got the IDCTAB file |
Given that we may never see the original 2004 file, I would suggest a different test: Take a modern file and:
|
@tddesjardins @mackjenn I did a test that, in my opinion, verifies that In addition, I have modified In this comparison I got maximum relative error (%) between drizzle- and skypac-generated PAM images is The new method should be more accurate than |
@mackjenn A note of caution about |
Another test. This time I kept all distortions when drizzling. Since
These measurements exclude 5 pixels around the border of FLT images in order to avoid edge effects when drizzling. |
In my analysis, it seems that the biggest contribution to errors (differences between |
These tests are very interesting, Mihai! |
@mackjenn Just to clarify, my code does take into account velocity aberration (get the latest update to the software) AND |
I'm surprised it doesn't do NPOL and DET2IM. Can |
It has nothing to do with |
Okay, I'll have to think about that a little more to see if we can use the "WCS objects perform standard WCS transformations, and correct for SIP and distortion paper table-lookup transformations, based on the WCS keywords and supplementary data read from a FITS file." The |
@tddesjardins No way you can compute a "distortion corrected" CD matrix from |
Sorry @mcara, I didn't mean to imply you only needed those two tables. I just meant we could use |
Just getting caught up on this discussion. @tddesjardins If you construct a WCS with a hdu that contains a path to an NPOL file, the transformations that do more than just the core WCS (like all_pix2world etc...) will use those terms along with the SIP coefficients. You have to remove the link to the NPOL file in the header and create a WCS object from that if you want to turn that off (correct me if there is a better way). It has been a little tricky, in my experience, to verify after the fact if a WCS object does reference an NPOL file to use for transformations, or if it is only SIP. There doesn't see to be an attribute I can access. Again, correct me if I am missing something in the documentation. Also, I don't know what the case for ACS is but in the documentation for WFC3 PAMs it is clear that only the polynomial coefficients were used to create the maps, so I would think that users are operating under that assumption already. |
@shannnnnyyy
Yes, there is a better way. First create a w = WCS(header, hdulist) Then set non-polinomial corrections to w.cpdis1 = None
w.cpdis2 = None
w.det2im1 = None
w.det2im2 = None You cannot turn off velocity aberration correction this way but it is easy to undo it by re-scaling the CD (
That is true and that was my assumption when I wrote my script: I wanted to be able to do what calibration team did when they generated PAM for the instruments - just to do it faster without all this |
I'll have to check with Norman when he gets back then, because I think he wanted to include the full distortion model in the new PAMs for ACS at least. The goal of the PAM was to make it match the photometry of the distortion-corrected drizzle products, and I don't know about WFC3's PAMs, but ACS's were so out of date because we didn't have NPOLFILE or velocity aberration corrections etc. when we made our static files and put them up on the website. |
@mcara Yes, I understand your code accounts for velocity aberration but the static PAM did not. |
@mackjenn I think the effect of velocity aberration in relation to PAM must be negligible. That |
@tddesjardins Two points:
Well, most likely the biggest factor in being "out of date" are improved linear and polynomial corrections (if any) that calibration team may have found in recent years.
I am not sure this is would provide the correct (as opposite to a matching drizzle) PAM. That is, I am not sure that matching drizzle is the correct thing to do in relation to PAM but it may depend on the usage and I do not know how these PAMs are going to be used. |
I suggest you give more details about the 0.2% difference.
(Also I think it would be better to quote the ratio rather than the difference... making sure your PAM is generated using a dataset taken in 2004 in the F606W filter. That would tell you how much impact the improved distortion solution makes).
In 2004, a single PAM was created using the F606W distortion solution, based on polynomial fits applied by the IDCTAB reference file. The PAM did not account for filter-dependent polynomial solutions, higher order corrections applied now via the D2IMFILE and the NPOLFILE, a time-dependent skew corrections, or the effect of velocity aberration at the time of observation.
I'm not sure which of these would be the biggest effect, but you could determine it empirically by making different PAMs... one with the NPOLFILE set to N/A, one with the VAFACTOR set to 1.0, etc.
This is what I sent to WFC3 team, which puts the responsibility on the user for determining how accurate the PAM needs to be.
"These static files have not been updated to reflect improvements to the distortion model, and as the model has become more complex, a ‘one-size-fits-all’ PAM may no longer provide the accuracy required for some science goals."
The text was updated successfully, but these errors were encountered: