| Version 9 (modified by , 13 years ago) ( diff ) |
|---|
2013-10-25
Validation tests using ppSim images
2013-10-16
2013-09-03
Repeated background subtraction
For a set of 465 i-filter warp images, I ran psphot to obtain a background level estimate. This was done in three passes, to provide the standard background level (what we normally use), a second pass (showing the residual background remaining), and a third pass (checking that the residual had been removed). The following table shows some statistics for these runs:
| Pass | Average background | Average background_sigma | Median background | Median background_sigma |
| 1 | 2.14126 | 30.48071 | 1.931080 | 28.195907 |
| 2 | -0.0381096 | 30.51861 | -0.030491 | 28.232888 |
| 3 | 0.00361354 | 30.52406 | 0.003190 | 28.226071 |
This suggests that we are leaving a residual background on the images, and only after three iterations is this background effectively fully removed.
2013-08-28
As the statistics and fitsio both seem to be working largely as expected, I began looking through the ppStack code to attempt to identify an issue there. It appears that the important sequence in the code is as follows:
- Input images are matched against the target PSF, and convovled to match that target.
- After convolution, a single ROBUST_MEDIAN background level is subtracted from the convolved images.
- The convolved images are written to a temporary disk file.
- Initial and final convolved stacks are constructed, using the disk files to ease the threading of these steps.
- For the final unconvolved stacks, the list of input original files is passed to the convolution step. These input files have an unknown (to ppStack), possibly non-zero background level.
I believe this explains the deviations in the background behavior between the convolved and unconvolved stacks. As the warps retain a small non-zero background level, failing to remove this results in a stack background level that scales as the number of exposures/exposure time/input proxy. The solution is to retain a set of background level values for the unconvolved inputs, and optionally apply them during the stacking stage. This will require a bit of development work to implement.
For an illustration of the input dependence, I've plotted up the measured background level for a set of SAS_22 stacks, separated by filter.
From the behavior of the convolved stack background levels, it appears that there is a small statistical issue remaining, on the order of 0.25DN/input (0.5DN/input in y?).
2013-08-27
Summary of previous discussion of this issue ==
2013-05-13 Confluence page
2013-05-20 Non-zero SKY on stacks
2013-06-03 Update to non-zero sky issue
2013-06-17 More on SKY residuals on stacks
Initial checks
The initial thought for this issue is that the stack sky levels are incorrect either due to an error in the sky statistics, or due to an error in the fitsio data storage. To investigate this, I used the set of warps for a very deep stack (~450 inputs) and pulled statistics out of logs and compared them with direct measurements.
- Internal background code check. Manually run psphot to fit the background level, and confirm that this matches the value recorded in the stack log.
- External background code check. Compare the psphot background levels to a Gaussian fit to the histogram of image values.
- Database check. The GPC1 database contains a background value recorded for the warps. I do not have a good explanation as to why these match so badly.
- BSCALE check. If the fitsio routines are to blame, it's likely an issue with the quantization. There's a correlation here, but it is more likely due to the fact that the background level is correlated with the distribution width (bg_sigma), as is BSCALE.
Attachments (48)
- psphot_internal_check.png (7.3 KB ) - added by 13 years ago.
- psphot_offset_sigma.png (8.4 KB ) - added by 13 years ago.
- psphot_external_check.png (7.0 KB ) - added by 13 years ago.
- psphot_database_check.png (7.8 KB ) - added by 13 years ago.
- psphot_bscale_check.png (7.6 KB ) - added by 13 years ago.
- ninput_unconvolved_check.png (12.1 KB ) - added by 13 years ago.
- ninput_convolved_check.png (10.0 KB ) - added by 13 years ago.
- cdfs.png (11.6 KB ) - added by 13 years ago.
- histogram.png (10.6 KB ) - added by 12 years ago.
- differences.png (13.0 KB ) - added by 12 years ago.
- differences.2.png (11.3 KB ) - added by 12 years ago.
- comparison.png (6.2 KB ) - added by 12 years ago.
- multiple_stack_runs.2.png (6.9 KB ) - added by 12 years ago.
- sigma_bias_cor.png (5.2 KB ) - added by 12 years ago.
- sigma_bias.png (6.0 KB ) - added by 12 years ago.
- warp_stack_comparison.png (15.2 KB ) - added by 12 years ago.
- staticsky_comp-3365975.png (11.3 KB ) - added by 12 years ago.
- warp_stack_pixel_comp.png (27.4 KB ) - added by 12 years ago.
- multiple_stack_runs.png (9.2 KB ) - added by 12 years ago.
- md04deep_v2_skyplot.png (3.5 KB ) - added by 12 years ago.
- md04deep_v2_sigmaplot_scaled.png (4.7 KB ) - added by 12 years ago.
- 00_raw_o6543g0266oXY33.comp.png (6.9 KB ) - added by 12 years ago.
- 01_raw_o6543g0266oXY33.comp.log.png (9.4 KB ) - added by 12 years ago.
- 02_raw_o6543g0266oXY33.nocomp.png (7.3 KB ) - added by 12 years ago.
- 03_raw_o6543g0266oXY33.nocomp.log.png (10.1 KB ) - added by 12 years ago.
- 04_raw_mean_deltamean.png (5.3 KB ) - added by 12 years ago.
- 05_raw_mean_deltasigma.png (5.5 KB ) - added by 12 years ago.
- 06_raw_sigma_deltasigma.png (5.5 KB ) - added by 12 years ago.
- 06a_raw_sigma_deltasigma.png (5.4 KB ) - added by 12 years ago.
- 07_raw_sigma_deltamean.png (5.4 KB ) - added by 12 years ago.
- 10_chip_o6543g0266oXY33.comp.png (7.9 KB ) - added by 12 years ago.
- 11_chip_o6543g0266oXY33.comp.log.png (7.4 KB ) - added by 12 years ago.
- 12_chip_o6543g0266oXY33.nocomp.png (8.3 KB ) - added by 12 years ago.
- 13_chip_o6543g0266oXY33.nocomp.log.png (7.6 KB ) - added by 12 years ago.
- 14_chip_mean_deltamean.png (5.3 KB ) - added by 12 years ago.
- 15_chip_mean_deltasigma.png (5.7 KB ) - added by 12 years ago.
- 16_chip_sigma_deltasigma.png (5.9 KB ) - added by 12 years ago.
- 17_chip_sigma_deltamean.png (5.7 KB ) - added by 12 years ago.
- 20_warp_o6543g0266oXY33.comp.png (11.2 KB ) - added by 12 years ago.
- 21_warp_o6543g0266oXY33.comp.log.png (7.9 KB ) - added by 12 years ago.
- 22_warp_o6543g0266oXY33.nocomp.png (11.4 KB ) - added by 12 years ago.
- 23_warp_o6543g0266oXY33.nocomp.png (8.0 KB ) - added by 12 years ago.
- 24_warp_mean_deltamean.png (5.1 KB ) - added by 12 years ago.
- 25_warp_mean_deltasigma.png (5.2 KB ) - added by 12 years ago.
- 26_warp_sigma_deltasigma.png (5.5 KB ) - added by 12 years ago.
- 27_warp_sigma_deltamean.png (5.4 KB ) - added by 12 years ago.
- 30_stack.comp.png (9.4 KB ) - added by 12 years ago.
- 31_stack.nocomp.png (8.5 KB ) - added by 12 years ago.
Download all attachments as: .zip







