spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
560 stars 167 forks source link

Testing Residual Fringe Correction using astropy replacement for BayesicFitting #6488

Open stscijgbot-jp opened 2 years ago

stscijgbot-jp commented 2 years ago

Issue JP-2344 was created on JIRA by Jane Morrison:

JP-2284  and #⁠6739 (replacement for #⁠6475)  addresses the first step to removing the dependence on the 3rd party package - BayesicFitting. For this ticket a comparison of the two methods will be done with an emphasis on evaluating with method removes the fringes better. 

Update: received new information and updated algorithms from Patrick Kavanagh on 12/22/21. Patrick has updated the method routine to derive the fringes (update to fit_1d_fringes_bayes_evdience). This new method uses new CDP files.  Patrick also supplied some test data where the number of fringes and their frequencies and amplitudes are known. We can use these in a test. They are three files with " The header of each file is a dict which contains the number of fringes included and their parameters. The parameters in order are freq_1, cos_amp_1, sin_amp_1, freq_2, cos_amp_2, sin_amp_2, ..., freq_n, cos_amp_n, sin_amp_n. Note that the frequencies are straight from the best fit model and have not been multiplied by the scaling factor as is done at the end of fit_1d_fringes_bayes_evidence. The columns are wavenumber, flux, weights. 

This ticket may be broken into separate tickets. The works that needs to be done includes: [0.5] 1. Add unit tests - (could we use the data Patrick has made in a unit test) A unit test for  the background was added as part of #⁠6739. . Need to add a unit test to when evidence function is part of astropy

[X] 2. Add regression tests - added in #⁠6771

[X] 3. Test JP-2284 to confirm astropy routines for fit_1d_background_complex work as well as Bayesic Fitting routines (#⁠6739)  [X] 4. Replace the fit_1d_fringes_bayes_evidence function with new routine from Patrick

[] 5. Compare the second part of removing the dependence of the BayesFitting package which involves replacing the routines in fit_1d_fringes_bayes_evidence with astropy routines

stscijgbot-jp commented 1 year ago

Comment by Howard Bushouse on JIRA:

Now that #6739 has been merged, which resulted in closing JP-2284, can this ticket also be closed? Is there any other work left to do for it?

stscijgbot-jp commented 1 year ago

Comment by Jane Morrison on JIRA:

No I am working on the last part of this - step 5 (above) removing the evidence function use from the Bayesic package and using astropy

stscijgbot-jp commented 6 months ago

Comment by David Law on JIRA:

Jane Morrison Remind me where we are with this?  Things that you're actively working on still or is this one of many potential long-term tweaks?