| Version 84 (modified by , 14 years ago) ( diff ) |
|---|
Summary of ppStack_testing_201111 ---IN PROGRESS PLEASE DO NOT EDIT---
Discovered for many inputs into ppStack (i.e., deep and even refstacks), that the PSF in the output convolved stack grows with the number of inputs beyond the initial target PSF. Had been missed due to convolved stacks really only being used for magic, but was noticed with some M31 analysis and deepstacks of MD04. Memory use has also been an issue with the deepstacks and simultaneously being investigated.
Example: some MD04 skycell.055, ~100 input warps
- FWHM input average from log = 4.48+-0.81 (pixels)
- largest input has FWHM_MAJ of ~7.2
- target FWHM from log 6.88, Kron~6.29 from convolution part of log
- convolved stack FWHM_MAJ=14.36
- for comparison, unconvolved stack FWHM_MAJ=4.32
| left to right: input warp FWHM_MAJ~6.8, unconvolved stack, convolved stack |
More specific examples:
- MD04.refstack.20111012 skycell.055-i ~92 inputs
Input FWHMs : 4.010976 +/- 0.334657 fit ext: 1.439042 sec for 225 of 225 sources fit psf: 0.395260 sec for 172 of 225 sources apresid: 0.022497 +/- 0.005780 (systematic error) from statistics of 225 psf stars (172 used) chisq vs flux fit term 0: 0.000000 +/- 0.000000 chisq vs flux fit term 1: 0.000000 +/- 0.000000 try model PS_MODEL_PS1_V1, ap-fit: 0.022497 +/- 0.005780 : sky bias: 0.000000 Target seeing FWHM: 4.706741 --> output convolved PSF, end of log fwhm (psf): 10.825166,10.697605 (moments): 0.000000,0.000000
- MD04.deeptest.20111012 skycell.055-i ~300 inputs
Input FWHMs : 4.835018 +/- 0.719810 fit ext: 1.385216 sec for 225 of 225 sources fit psf: 0.441030 sec for 171 of 225 sources apresid: 0.055969 +/- 0.001243 (systematic error) from statistics of 225 psf stars (171 used) chisq vs flux fit term 0: 0.000000 +/- 0.000000 chisq vs flux fit term 1: 0.000000 +/- 0.000000 try model PS_MODEL_PS1_V1, ap-fit: 0.055969 +/- 0.001243 : sky bias: 0.000000 Target seeing FWHM: 6.630503 --> output convolved PSF, end of log fwhm (psf): 14.636683,14.511685 (moments): 0.000000,0.000000
Other issues:
- hard limit on number of inputs (was shell descriptors limit of 1024 easily being reached with image,mask,weight,psf,cmf files for each input. Raised to 65535 now by default.)
- selection of target PSF FWHM, worse input PSF not necessarily best choice as could end up being rejected and only a few inputs may be that large (not representative)
- heavy RAM use (10-20GB typical for 100+ inputs) -- tests run unoptimized, will need to look at effect
- long run-time for 20+ inputs, 400 inputs order 12-14hr (use method similar to psphotStack?) -- tests run unoptimized, will need to look at effect
Branch for testing (currently r32161 from last summer -- needed to update) -- http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/browser/branches/meh_branches/ppstack_test
- many outputs turned on (runs slower, makes many many files)
- ppStackMatch.c -- need add a TESTING2 for reading in already processed conv images..
- ppSubMatchPSFs.c has TESTING but not ifdef at start, is a .DEBUG. used to trigger?
All modification tests now using updated branch from ipp-20120216 tag (r33407, 3/04/2012) -- testing modifications, some added to trunk already
- pmSubtractionMatch.c:
- has isfinite(sysError) rather than skyError compared to 0 - fixed +trunk
- sbrk in memCheck issue on OSX - not sure how to fix, added note +trunk
- pmSubtraction.c:
- TESTING for output conv1/2_* has problem with index now -- what supposed to be? fix removed index and add comment +trunk
- comment ConvolveStampThread footprint as stamp index is wrong -- fix +trunk
- ppStackMatch.c
- TESTING w/ and w/o using previous conv images or output samples.. need to split the two -- more explicit TESTING_REUSE_CONV case added - fix +trunk
- ppStackSetup.c -
- also conflict issue with names ZP is active, MATCH.ZERO.POINTS inactive for recipes/ppStack.config -- leaving, not sure how fix
- ppStackSources.c -
- logic issue with ZP and photometry option, if ZP false then segfault - false not work, need to be OR? -- need to trace out
- also TESTING mix again - outputs and fake added mag offsets -- wait
- ppStackConvolve.c calls with normal index but ends up odd index in kernel name - bug?
- .kernel index odd, why not seq in pmFPAfileActivateSingle - psMod/camera/pmFPAfileIO.c -- SelectSingle in pmFPAfile.c -- could use date stamp or is threading the reason?
- pmSubtractionStamps.c
- the stamp.dat output condition case is trouble, if no sources in a stamp will segfault -- set to 0 again.. -- wait
- recipes/ppSub.config
- set SYS.ERR in the STACK metedata -- ALL stacks will use this then -- fix +trunk +ipp-20120216 tag (3/16 UT)
- psLib/somewhere
- needs to be fixed if -Db option used that it fails like others in that a config option not provided and not silently go back and use one from default config files
All testing currently being dumped into /data/ipp059.0/mhuber/testppstack_deep201111/ which has reached >3TB and will need to probably clean up some soon (>2TB in 400 stk grizy test)
Test Sets
More easily setup than for testing ppSub, need a large number of various inputs and some number of similar inputs.
MD04
Sample of 20 and 100 drawn from the the MD04.V3 GR0 deepstack set for memory testing as well.
- FWHM in ppStack logs, cut and put into histogram below. Need to compare to psphot FWHM_MAJ/IQ_FW1?
Batch scripts for running in /data/ipp059.0/mhuber/testppstack_deep201111/MDdeeptest
Sim
A small variety set of four with many groups to make 20 and 100 inputs sets
Simtest setup (mostly default):
- default pixelscale ~0.26"/pixel, exptime 20s, filter r, 1k x 1k
- PSF.MODEL PS_MODEL_GAUSS
| filename | sim FWHM | FWHM_MAJ (pixel) | IQ_FW1 (pixel) |
| image.0 | 1.0 | 3.82 | 2.98 |
| image.1 | 1.1 | 4.19 | 3.28 |
| image.2 | 1.2 | 4.58 | 3.62 |
| image.3 | 1.5 | 5.69 | 4.49 |
| _and repeat_ | |||
Batch scripts for running in various /data/ipp059.0/mhuber/testppstack_deep201111/ppstack_simdeep* (needs cleanup)
Initial Tests
- do clean simulated images suffer the same problem?
- can use for more detailed testing since faster to run than MD04 skycell and not particular to GPC1 data
- is it related to the range of inputs and number
- is 20 inputs enough to reveal problem, if 100 then will be tedious
- what are the output convolved images being stacked, what is the target the images are being convolved to
- need to understand what the code does, so first test is to look at each output, add others and step through the code...
- tests indicate convolution of each input seem to be larger than expected -- appears to be also with the range of input FWHM
MD04: 20 input case:
- initially run for a memory test, but added extra outputs and some missing
- input FWHM 4.49+/-0.48 (mean)
- target seeing FWHM: 5.06, kron ~4.0
| filename | FWHM_MAJ (pixel) | IQ_FW1 (pixel) | .log Input FWHM (pixel) | .log kron (pixel) |
| real_000 | 5.38 | 4.20 | 5.40 | 4.25 |
| real_002 | 5.08 | 4.02 | 5.03 | 4.24/33 |
| real_009 | 4.27 | 3.17 | 4.19 | 3.42/33 |
| fake_000 | 5.10 | 4.09 | ||
| fake_002 | 5.13 | 4.11 | ||
| fake_009 | 5.10 | 4.09 | ||
| conv.0 | x | x | ||
| conv.2 | 8.41 | 6.37 | ||
| conv.9 | 7.91 | 6.02 | ||
| comb.initial | x | x | ||
| stack | 8.39 | 6.06 (also initially missing from header) | ||
| stack.unconv | 4.02 | 3.55 | ||
MD04: 100 input case:
- was run for memory monitoring, will need to be rerun for real/fake/conv outputs later
- input FWHM 4.84+/-0.81 (ave?)
- target seeing FWHM: 6.88, kron ~6.29
| filename | FWHM_MAJ (pixel) | IQ_FW1 (pixel) | .log Input FWHM (pixel) | .log kron (pixel) |
| real_001 | x | x | 5.40 | 4.39/35 |
| real_009 | x | x | 4.65 | 3.63/62 |
| fake_001 | x | x | ||
| fake_009 | x | x | ||
| conv.0 | x | x | ||
| conv.9 | x | x | ||
| comb.initial | x | x | ||
| stack | 14.36 | 9.75 (was missing from header) | ||
| stack.unconv | 4.31 | 4.15 | ||
Sim: 20 input case: 5 groups
Simulated inputs:
- basic set of 4 images of growing FWHM and repeated as 4 groups for 20 inputs
- input FWHM 4.57+/-0.72 (mean)
- target seeing FWHM: 5.70 -- set by worst input, Kron ~3.1 from log
- some wildly varying kron values
| filename | sim FWHM | sim FWHM_MAJ | .log Input FWHM (pixel) | .log kron (pixel) |
| _000 | 1.0 | 3.82 etc | 3.82(1) | 1.99/92,88/78,05/05,91/81 |
| _001 | 1.1 | 4.19(1) | 2.19/09 | |
| _002 | 1.2 | 4.58(1) | 2.55/48 | |
| _003 | 1.5 | 5.69(1) | 3.11/00 | |
Additional and final outputs:
| filename | FWHM_MAJ (pixel) | IQ_FW1 (pixel) |
| real_000 | 3.88 | 3.00 |
| real_003 | 5.82 | 4.54 |
| fake_000 | 5.10 | 3.69 |
| fake_003 | 5.04 | 3.68 |
| conv.1 | 6.51 | 5.10 |
| conv.3 | 6.60 | 5.19 |
| comb.initial | 6.57 | 5.58 |
| stack | 6.57 | 5.41 |
| stack.unconv | 4.33 | 3.49 |
filename descriptions:
- real_ = input warps
- fake_ = target image to convolve the real to (bit more than just that, selected target PSF sources, background, scaling)
- conv. = convolved real image
- comb.initial = initial stack w/o rejecting input images (that all?)
- stack = final convolved stack
Sim: 20 input case w/ similar inputs: 10 groups
- similar set, just created with 2 types with similar FWHM
- input FWHM 4.07+/-0.19 (ave)
- target seeing FWHM: 4.28 -- set by worst input, kron ~2.26
| filename | sim FWHM | sim FWHM_MAJ | .log Input FWHM (pixel) | .log kron (pixel) |
| _000 | 1.0 | 3.87(2) | 3.88(1) | 2.1(1) |
| _001 | 1.1 | 4.25(1) | 4.26(1) | 2.28(4) |
- oddly final stack is ~20% larger than conv and initial stack -- need to check -- seems so, may be another issue to watch for (really poor convolved input?)
- small difference in the fake_and conv. so 20 input case w/ range of inputs better
| filename | FWHM_MAJ (pixel) | IQ_FW1 (pixel) |
| real_000 | 3.87 | 3.00 |
| real_001 | 4.24 | 3.32 |
| fake_000 | 4.27 | 3.22 |
| fake_001 | 4.27 | 3.21 |
| conv.0 | 4.49 | 3.52 |
| conv.1 | 4.56 | 3.58 |
| comb.initial | 4.54 | 3.77 |
| stack | 5.37 | 4.36 |
| stack.unconv | 3.99 | 3.17 |
Sim: 100 input case: 25 groups
- same set as before, just more groups
- input FWHM 4.56+/-0.71 (mean)
- target seeing FWHM: 5.72, kron ~3.02
- an odd run mix-up in this test?
| filename | sim FWHM | sim FWHM_MAJ | .log Input FWHM (pixel) | .log kron (pixel) |
| _000 | 1.0 | 3.82(1) | 1.99/92,88/78,05/05,91/81 | |
| _001 | 1.1 | 4.19(1) | 2.19/09 | |
| _002 | 1.2 | 4.58(1) | 2.55/48 | |
| _003 | 1.5 | 5.69(1) | 3.11/00 | |
- the x/y in stack is stack.cmf versus running psphot manually on stack, IQ_FW1 is missing from stack.cmf
- stack.000/stack.0.conv.cmf has 6.26/5.37
- odd the fake_ target image is much smaller than the target seeing FWHM chosen -- while the convolved images are larger than the target still.
| filename | FWHM_MAJ (pixel) | IQ_FW1 (pixel) |
| real_000 | 3.82 | 2.11/24 |
| real_003 | 5.69 | 3.10/02 |
| fake_000 | 4.86 | 3.64 |
| fake_003 | 4.85 | 3.63 |
| conv.0 | 6.44 | 5.74 |
| conv.3 | 6.61 | 5.63 |
| comb.initial | 8.33 | 6.89 |
| stack | 7.73/8.13 | x/6.72 |
| stack.unconv | 4.40 | 3.60 |
Modification Tests
SYS.ERR/target variance
(lots of previous tracing of stages and such...) SYS.ERR setting history:
- ppSub_vs_Hotpants
- IPP_Progress_Report_20100118
- IPP_Progress_Report_20100111
- IPP_Progress_Report_20100104
- set to 0.1 since USE_WEIGHT off in pmSubtractionEquation.c -- when changed?
- looks like change from eam_branch 2/10/2010 r26893 removed
- put back in 2/13/2011 r30622 -- "psf solution uses weights to get sensible chisq values"
For now, setting the SYS.ERR=0 to not mix an N scaled model flux fraction into the variance (SYS.ERR is applied to both stamps)
- run with current ops tag (20120216), need to run with TESTING turned on or update the branch since there is still some blowup
- may still want SYS.ERR applied relative to real images, will need to look at deep modification for how/when the variance/weights are passed/calculated
| filename | sim 20 FWHM_MAJ (pixel) | sim 100 FWHM_MAJ (pixel) | MD04 20 FWHM_MAJ (pixel) | MD04 100 FWHM_MAJ (pixel) | MD04 400 FWHM_MAJ (pixel) | |
| input/target FWHM | 4.5/5.7 | 4.6/5.7 | 4.5/5.3 | 4.8/6.9 | 5.1/7.1 | |
| real_000 | ||||||
| fake_000 | ||||||
| conv.0 | ||||||
| comb.initial | ||||||
| stack (log/psphot) | 5.6/5.8 | 5.6/5.8 | 5.8/5.8 | 7.8/7.8 | 9.7/9.8 | |
| stack.unconv | 4.3 | 4.3 | 4.0 | 4.2 | 4.6 | |
A sys error on the real image may still be useful as a tuning parameter -- sim set of 100
- target~5.7, conv output ~5.6 so no growth
- selected stamps not significantly different to if sys.err=0 -- better to test on MD04 sample however, need hardcopy plot of stamps chi2 vs flux (TODO)
How does SYS.ERR=0 affect the image rejection list - seems to reject some of the worse seeing images, which are what is used to set the TARGET to begin with. (TODO)
- May have slightly greater sensitivity for rejecting input images on the worse quality (QUANTIFY).
- Could also just keep SYS.ERR applied to real image (see above) but may be a different rejection list since before was driven by huge simulated target flux..
Suspect SYS.ERR is also an issue (minor) with the single convolution diffims as well, so add back to test ppSub_testing_201201. Leads into larger development need of splitting/carrying the variances through and not dumping into a weight variable so early (see above).
Need to run larger FPA skycell sample, grizy filters of 100 - 400 to test stability
--> skycell.055 near center mem400_stack_test.fixtest_s055g/mem400.log: Input FWHMs : 6.017093 +/- 0.818257 mem400_stack_test.fixtest_s055i/mem400.log: Input FWHMs : 5.144256 +/- 0.946591 mem400_stack_test.fixtest_s055r/mem400.log: Input FWHMs : 5.681267 +/- 0.910019 mem400_stack_test.fixtest_s055y/mem400.log: Input FWHMs : 5.302593 +/- 0.957232 mem400_stack_test.fixtest_s055z/mem400.log: Input FWHMs : 5.116535 +/- 0.909322 mem400_stack_test.fixtest_s055g/mem400.log: Target seeing FWHM: 10.172999 mem400_stack_test.fixtest_s055i/mem400.log: Target seeing FWHM: 7.128121 mem400_stack_test.fixtest_s055r/mem400.log: Target seeing FWHM: 8.744406 mem400_stack_test.fixtest_s055y/mem400.log: Target seeing FWHM: 8.210619 mem400_stack_test.fixtest_s055z/mem400.log: Target seeing FWHM: 8.907239 --> convolved stack PSFs mem400_stack_test.fixtest_s055g/mem400.log: fwhm (psf): 10.278124,10.079561 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s055i/mem400.log: fwhm (psf): 9.777281,9.695623 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s055r/mem400.log: fwhm (psf): 11.805278,11.348278 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s055y/mem400.log: fwhm (psf): 8.573956,8.533222 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s055z/mem400.log: fwhm (psf): 9.877050,9.810744 (moments): 0.000000,0.000000 --> skycell.058 closer to edge mem400_stack_test.fixtest_s058g/mem400.log: Input FWHMs : 5.537649 +/- 0.747769 mem400_stack_test.fixtest_s058i/mem400.log: Input FWHMs : 5.045243 +/- 0.928610 mem400_stack_test.fixtest_s058r/mem400.log: Input FWHMs : 5.281566 +/- 0.931646 mem400_stack_test.fixtest_s058y/mem400.log: Input FWHMs : 5.341974 +/- 1.066415 mem400_stack_test.fixtest_s058z/mem400.log: Input FWHMs : 5.282053 +/- 0.859332 mem400_stack_test.fixtest_s058g/mem400.log: Target seeing FWHM: 8.574877 mem400_stack_test.fixtest_s058i/mem400.log: Target seeing FWHM: 8.097901 mem400_stack_test.fixtest_s058r/mem400.log: Target seeing FWHM: 7.353693 mem400_stack_test.fixtest_s058y/mem400.log: Target seeing FWHM: 8.535203 mem400_stack_test.fixtest_s058z/mem400.log: Target seeing FWHM: 8.813280 --> convolved stack PSFs mem400_stack_test.fixtest_s058g/mem400.log: fwhm (psf): 8.743460,8.612661 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s058i/mem400.log: fwhm (psf): 9.086349,9.011602 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s058r/mem400.log: fwhm (psf): 7.497458,7.397744 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s058y/mem400.log: fwhm (psf): 8.861631,8.803410 (moments): 0.000000,0.000000 mem400_stack_test.fixtest_s058z/mem400.log: fwhm (psf): 9.594481,9.520103 (moments): 0.000000,0.000000
How is the Target seeing FWHM selected to be >7.5 when limited to that on the input images. Are input images not being rejected? Somewhat part of next section on Target PSF, but need to trace out here. Split up 400 set into subgroups and ran, looks like is not using the rejected but is growing itself in converting to the PSF.MODEL PS_MODEL_PS1_V1?
- would be helpful to have other stats, at least min/max inputs
- s055g - in smaller sub-sets ~100, target is ~9.45 and similar output. limiting input FWHM <7.1 selects a target ~8.4. rejection for >7.5 is active.
- s055r - TODO
Target PSF: manually set and as not worst input image
Want to look at NOT setting the convolved stack target PSF based on the worst input. Have seen cases when the worse inputs are image rejected so in that case not a good idea to use anyways.
- for large N, a rerun would be of little time cost or just reject outright as little input to final stack
- for small N may want to reject anyways
- instead of a rerun of target psf, could choose median psf or such and use poorer deconvolution to reject worse images anyways
What are the convolved stacks used for
TODO
- will need to make a sample distribution of simulated PSFs, currently sample is flat. revise the making of the stack.mdc list of inputs. or will just be worse/upper limit of possible stack degrading for including deconvolved images.
SYS.ERR=0 change set, but effect comes after this stage so not important.
MD04 skycell.055,058 samples for deepstacks
manually set Target PSF
PSF.AUTOSIZE BOOL TRUE # Determine output PSF size from input PSFs? PSF.OUTPUT.FWHM F32 5.0 # Target size for output PSF (if not auto-sized)
NOTE: if wrongly called on command line with a bool -Db PSF.OUTPUT.FWHM 5.0 will silently fail and use the default configuration setting in ppStack.config
Sim set:
MD04 20 input set: input=4.5, auto selected target 5.3 (5.4 largest input PSF)
- manually set target 4.5, selects target seeing PSF to be 5.3 still.
- manually set target 4.0, selects target seeing PSF to be 4.8. conv PSF grows to 5.3 (5.4 was largest input PSF, related?)
Monitor Modifications
Should watch results of changes in nightly science products.
SYS.ERR=0 @3/15
MD nightly stacks --
- rejection 0-1 inputs similar to before the change
- convol PSF growth before 4.6->7.1 from 3/11, now 4.9->5.3 from 3/19 and growth similar to that seen when manually setting target PSF (related?)
SAS stacks don't use convolved stacks so shouldn't have affect.
LAP not yet running again (3/19) --
Attachments (7)
- md04_100warp_sample_ds9.jpg (87.5 KB ) - added by 14 years ago.
- md04teststk_inputfwhm_histo.png (11.9 KB ) - added by 14 years ago.
- md04deep_g_inputfwhm_histo.png (14.8 KB ) - added by 14 years ago.
- md04deep_i_inputfwhm_histo.png (14.4 KB ) - added by 14 years ago.
- md04deep_r_inputfwhm_histo.png (14.6 KB ) - added by 14 years ago.
- md04deep_y_inputfwhm_histo.png (14.2 KB ) - added by 14 years ago.
- md04deep_z_inputfwhm_histo.png (14.2 KB ) - added by 14 years ago.
Download all attachments as: .zip


