-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add support for time-dependent photometry to calwf3 #451
Comments
From: Michele De La Pena mdelapena@stsci.edu @mdlpstsci I gave calwf3 a cursory examination. Calwf3 does not take advantage of the time-dependent sensitivity, but the time-dependent code is in a standalone module which was originally designed for use by ACS, STIS, and WFC3. I admit that I will need to look more closely at what is going on in calwf3 and this module to become familiar with its functionality. I will also note for you the code currently only performs a linear interpolation. I discussed this issue with Warren as he developed much of the original code, and he believes that there should not be much work to have calwf3 exploit the existing time-dependent sensitivity module. I would like to perform a quick experiment just to test “integrating” an updated IMPHTTAB table with calwf3 to get a better feeling what work needs to be done myself. If you have an updated table that I could use for experiments, it would be great. The table does not have to be the real thing, it just needs to have the “time-dependent” aspects incorporated. Having a higher-order fit accommodated in the time-dependent sensitivity code would involve considerable time. The issue here is that the fit needs to be done over multiple parameters simultaneously (to my understanding). If a higher-order fit seems more appropriate, it could be worth considering having smaller time intervals so that any “fit” within an interval is well approximated by a linear fit. I suggest opening Git Issue for HSTCAL/WFC3 where we could include this conversation. |
@mackjenn Please provide a "test" IMPHTTAB that can be used for experimentation. |
Maybe @sosey remembers something about this. She did a lot of work implementing the IMPHTTAB for WFC3 back in the days. |
Thanks, Michele. We will provide a dummy IMPHTTAB for testing by the end of October. |
I have created a time dependent dummy imphttab, and here's the summary: I started with the current imphttab, which has 5 extensions, each containing a table. Those extensions are the PHOTFLAM (inverse sensitivity), PHOTPLAM (pivot wavelength), PHOTBW (bandwidth), PHTFLAM1 (Chip 1 sensitivity), PHTFLAM2 (Chip 2 sensitivity). The time dependence only appears in the PHOTFLAM, PHTFLAM1, and PHTFLAM2 extensions, as the pivot wavelength and bandwidth are not affected due to change in sensitivity. I can see this being an annoyance to deal with programatically, as now the extensions would have different numbers of rows/obsmodes, so if it is a pain, I will add the extra rows/columns (described below) to the PHOTPLAM and PHOTBW extensions, just with constant values for any time dependent parts. The time dependence is contained in the extra columns, containing the substring "MJD#" in the column name, e.g. in the PHOTFLAM extension, there are 5 extra columns with names in the form "PHOTFLAM_MJD#XXXXX", "PHOTFLAM_MJD#YYYYY", etc. where XXXXX, YYYYY, etc are the MJDS which the values in those columns are sampled at. The values of the dates are contained in the column names, as well as header keywords However, not all of the rows feature values that change across those 5 columns, as some of the rows in the tables contain OBSMODEs that are NOT time dependent. That is to say the row for the OBSMODE Lastly, for historical reasons, for every obsmode in the current imphttab (not the new one I've made) there was a duplicate obsmode with the The dummy file is located on central store at the following path: |
As there are column changes, this will likely require a CRDS update. Please open up tickets in the CRDS project for the necessary changes. Please make sure to include @eslavich and me on the ticket |
This work is very high priority for WFC3, as we intend to present the new calibration at the workshop 'Accurate Flux Calibration for 21st Century Astrophysics' on March 17, 2020. Ideally, we would like to test the new calwf3 with a dummy version of the modified reference file before the end of January, since significant code changes are required and we may need to iterate with the developer. Thanks!! |
This is just to let folks know this morning I have been examining the dummy imphttab file and calwf3 in order to clarify how many changes and how much time will be needed to implement this change. |
Sent via email: I can see the latest ACS WFC IMPHTTAB was created by Jenna Ryon using create_table() I think we should get together to discuss this issue as soon as possible. |
Thank you for the very informative meeting! We will make the necessary changes and get back to you soon. |
Varun created a new reference file for testing.
|
Sent to Varun (et al) on 03 March 2020. I have analyzed the new imphttab file and the code which accesses TO CHANGE
FYI
|
Hi Michele, |
Just confirming that I saw your email. I have been dealing with other issues and not had time to examin the situation and decide how to handle the issue of unfortunate (but understandable) naming convention. |
Abridged version of an email send to WFC3 team members.
|
@mackjenn @Vb2341 Forging ahead, I have tested the updated version of CALWF3 to make sure the new file is read and processing ends successfully (if only from a mechanical perspective). I did find a bug in very old code as the code has never been used where there are multiple Imsets and parameterization. Can you please provide just a few datasets which you know would access different rows of the new table for further testing by me? Thanks. |
@mdlpstsci By multiple imsets, does that mean multiple chips? If so any full frame UVIS image should do. Here are a couple of examples: ICAU96020 For a given filter, those should access both the UVIS1 and UVIS2 rows. |
@Vb2341 Yes and thank you for the suggested datasets. |
WFC3 delivered what should be a nearly final version to me on 24 July 2020. I need to validate it the best I can (as was done for the preliminary version of the file), and use it for testing. |
@Vb2341 @mackjenn The updated CALWF3 software is available on my branch, |
@mdlpstsci This is Harish, I'm planning to help out with the testing of the software on various datasets. I was wondering if it would be possible to set up an executable of the updated CALWF3 on plhstins1. Thanks! |
@protonchain I can do this for you later today or tomorrow in the worst case! |
@mdlpstsci Sounds great, thank you! |
I have compiled calwf3 containing the time-dependent photometry update on plhstins1 (Linux). The executable is located in /home/mdelapena/repos_tdep/hstcal/bin.Linux-2.6.32-754.31.1.el6.x86_64-x86_64-with-redhat-6.10-Santiago Just to make sure all the paths are resolved and shared objects found, I advise doing the following:
This version of the code has the Git commit hash 75af6e6. This is printed to stdout at the very beginning of CALWF3 processing. |
Git #518 which resolves this issue was closed on 20 September 2020. |
**** EDITED January 6th, 2020 ****
This work is HIGH priority for WFC3, as we intend to present these new results at the March 17th workshop 'Accurate Flux Calibration for 21st Century Astrophysics'
Ideally, we would like to test a dummy version of the new file with calwf3 by the end of January.
To: Michele De La Pena mdelapena@stsci.edu
From: Jennifer Mack mack@stsci.edu
Cc: Annalisa Calamida calamida@stsci.edu, Sylvia Baggett sbaggett@stsci.edu
Date: Tuesday, October 1, 2019 at 5:59 PM
The WFC3 team is working on an early 2020 delivery which would require calwf3 to interpret time-dependent photometry keywords from the IMPHTTAB reference file and write them to the image headers.
ACS already does this via their IMPHTTAB, which has different columns for various epochs. These define the endpoints with which calacs performs a linear interpolation of the sensitivity based on observation date .
For UVIS, the PHOTMODE values in the image header apply to all epochs: PHOTMODE= ‘WFC3 UVIS1 F475W' and with the new software would need to look something more like the ACS syntax: PHOTMODE= 'ACS WFC1 F475W MJD#54113.9559'
Does calwf3 already have the ability to handle time-dependent sensitivity (eg. is it just commented out), or do you think this is code that will need to be developed? If so, does it only support a linear interpolation, or could one apply a higher order fit?
One difference from ACS is that our IMPHTTAB contains chip-specific sensitivity values, so we have more extensions than usual. For example, below compares ACS/WFC and WFC3/UVIS:
EXT# FITSNAME FILENAME EXTVE DIMENS BITPI OBJECT
0 2391649pj_imp 2391649pj_imp.fits 8
1 BINTABLE PHOTFLAM 1 13Fx780R
2 BINTABLE PHOTPLAM 1 13Fx780R
3 BINTABLE PHOTBW 1 13Fx780R
EXT# FITSNAME FILENAME EXTVE DIMENS BITPI OBJECT
0 0bi2206ti_imp 0bi2206ti_imp.fits 16
1 BINTABLE PHOTFLAM 1 5Fx256R
2 BINTABLE PHOTPLAM 1 5Fx256R
3 BINTABLE PHOTBW 1 5Fx256R
4 BINTABLE PHTFLAM1 1 5Fx256R
5 BINTABLE PHTFLAM2 1 5Fx256R
The timing of this will be important, as we would like to deliver the solutions in early 2020 and we would need to be able to do initial testing in late-2019.
The text was updated successfully, but these errors were encountered: