Content
Beginning of the Revision
O'Grady, Paul Christopher
Fri 2/24/2017 12:16 PM
To: Liang, Mengning;
Cc: Dubrovin, Mikhail;
Suggested Meetings
Hi Meng,
I talked with Mikhail about the fiber-diffraction “sprint” to get
results for Germany that you have strong confidence in. We’ll come by
your office around 4 today to launch.
We’ll also touch base Monday, Tuesday, Wednesday, Thursday next week at
3pm to make sure we’re headed in the right direction. Those are allowed
to be brief (more important to do real work).
chris
O'Grady, Paul Christopher
Fri 2/24/2017 5:06 PM
To: Liang, Mengning <mliang@slac.stanford.edu>; Dubrovin, Mikhail <dubrovin@slac.stanford.edu>;
meng provides "100 events” (good and bad) in run 169
meng provides her current psocake-peak-params
meng provides problematic l=0,l=1 indexing output, mikhail fixes code
mikhail: move to psocake-consistent parameters to make life easier for meng
mikhail: do fraser_xyz and fraser have same conventions and yield same results?
mikhail: peak-fit needs to output qh and qv for the *peak* (not lattice) for images that don't index for the 100 bad events
mikhail: check after event-selection most things should fit (70-80%) and most should index
mikhail: as a longer-term target modify the pipeline so that meng can look at outputs at various stages more easily
all: tweak peak-finding parameters for the 100 events
all: ask chuck what should we use for background
Liang, Mengning
Mon 2/27/2017 3:14 PM
To: Dubrovin, Mikhail;
Cc: O'Grady, Paul Christopher;
Peakfinding parameters :
For arc:
peaks_arc = alg_arc.peak_finder_v1(nda, thr_low=40, thr_high=160, radius=8, dr=0.5)
For equator:
peaks_equ = alg_equ.peak_finder_v4(nda, thr_low=60, thr_high=100, rank=4, r0=4, dr=0.5)
-----------------------------------------------------------------------------
Peak selection:
For arc:
alg_arc = PyAlgos(windows=winds_arc, mask=mask_arc, pbits=0)
alg_arc.set_peak_selection_pars(npix_min=20, npix_max=150, amax_thr=100, atot_thr=2000, son_min=5)
For equator:
alg_equ = PyAlgos(windows=winds_equ, mask=mask_equ, pbits=0)
alg_equ.set_peak_selection_pars(npix_min=5, npix_max=150, amax_thr=100, atot_thr=600, son_min=4)
O'Grady, Paul Christopher
Mon 2/27/2017 3:46 PM
Adding notes from today:
for peak-finding we will standardize on:
- median filter.
- peakfinderv4
good events should have 2-4 equatorial peaks, 0-2 arc peaks, OR 2 arc peaks and 1-3 eq peaks
80% of the good events should be found, with tuned peak-finding and the above event-selection criteria
switch to mode 5 common-mode (unbonded pixels)
meng file with equatorial peaks incorrectly indexed as l=1:
~mliang/analysis/rel-cxif5315/work1/index3d/test1/peak-idx-cxif5315-r0169-2017-01-23T10:39:03.txt
Liang, Mengning
Mon 2/27/2017 3:48 PM
To: Dubrovin, Mikhail;
Cc: O'Grady, Paul Christopher;
Here is a list of good events (psocake event numbers)
They will have 2-4 peaks in the equatorial region
or
2 peaks in the arc region + 1-4 peaks in the equatorial region.
Thanks,
Meng
2017-02-27-cxif5315-r0169-good-events.txt
2017-02-27-cxif5315-r0169-bad-events.txt
Comparison of analysis script with psocake
alg_arc = PyAlgos(windows=winds_arc, mask=mask_arc, pbits=2)
alg_arc.set_peak_selection_pars(npix_min=20, npix_max=1000, amax_thr=0, atot_thr=2000, son_min=5)
alg_equ = PyAlgos(windows=winds_equ, mask=mask_equ, pbits=0)
alg_equ.set_peak_selection_pars(npix_min=5, npix_max=1000, amax_thr=0, atot_thr=600, son_min=5)
for i, evt in enumerate(ds.events()) :
nda_data = det.calib(evt, cmpars=(5,50))
if nda_data is not None :
nda = np.array(nda_data, dtype=np.float32, copy=True)
if BKG_MODE == BKG_MODE_NORMAL :
nda = subtract_bkgd(nda, nda_bkgd, mask=nda_smask, winds=winds_bkgd, pbits=0)
peaks_arc = alg_arc.peak_finder_v4r2(nda, thr_low=40, thr_high=160, rank=8, r0=10, dr=2)
peaks_equ = alg_equ.peak_finder_v4r2(nda, thr_low=60, thr_high=100, rank=4, r0=6, dr=2)
Running scripts
sit_setup ~yoon82/ana2 # some problem fixed in this local release
psocake -e cxif5315 -r 169 -d CxiDs2.0:Cspad.0 -n 468 -o psocake
python cxif5315/proc-cxif5315-r0169-data-pfvn-2017-02-27.py
Base-ring pixels
r0=6 dr=2
0 0 0 0 0 0 0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0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
1 1 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 1 1 1
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0
0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0
0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0
0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Number of pixels to estimate background = 136
Event list
Liang, Mengning
Tue 2/28/2017 4:09 PM
To: Dubrovin, Mikhail;
148 – double hit in equator – 3 peaks
162 – no peaks
525 – double hit in equator - 6 peaks
1456 – should find multiple arc peaks
1521 – double hit equator – 4 total peaks
2551 – no peaks
I could not find parameters to find the right peaks in these events – can see by eye where the peaks are.
Thanks,
Meng
2017-03-01 Images for 6 events selected by Meng
Example of commands for updated scripts
News
Session initialization
cd ~/LCLS/rel-mengning
sit_setup
Run peak-finder (by default for cxif5315 run 169)
cxif5315/proc-cxif5315-r0169-data-pfvn-2017-02-27.py -h # help
cxif5315/proc-cxif5315-r0169-data-pfvn-2017-02-27.py -n 20 -m 10 -i # plot images
cxif5315/proc-cxif5315-r0169-data-pfvn-2017-02-27.py # run over all events and find peaks
Run filter for all/good100/bad100/6events events
With peak-finder have generated files with peaks. Now filter tham.
cxif5315/filter-peaks-2017-03-07.py -h
cxif5315/filter-peaks-2017-03-07.py -i work/xpfv4r2-cxif5315-r0169-2017-03-03-e085409.txt -p # -p - plot histograms
cxif5315/filter-peaks-2017-03-07.py -i work/xpfv4r2-cxif5315-r0169-2017-03-03-bad100.txt
cxif5315/filter-peaks-2017-03-07.py -i work/xpfv4r2-cxif5315-r0169-2017-03-03-good100.txt
cxif5315/filter-peaks-2017-03-07.py -i work/xpfv4r2-cxif5315-r0169-2017-03-03-esix.txt
See list of selected peaks and filter logbook
less ./results/peaks.txt
less ./results/peaks-filtered-log.txt
Plot event
cxif5315/proc-cxif5315-r0169-data-pfvn-2017-02-27.py -m 525 -n 1 -i
Meng's events (148, 162, 525, 1456, 1521, 2551)
148 – double hit in equator – 3 peaks
162 – no peaks
525 – double hit in equator - 6 peaks
1456 – should find multiple arc peaks
1521 – double hit equator – 4 total peaks
2551 – no peaks
Filtering results
- run 169 sample - selected 9735 of 83727 (saved after peak-finder pf4r2)
- 6-event sample - selected 0
- 100-good-event-sample - selected 82
- 100-bad-event-sample - selected 19
2017-03-17 mtg w Meng
- ask Kurtik about smoothing and other event processing stages
- median background ?
- class0 background - no equ peaks, no arc peaks, water ring yrs
- radial background
- fudge factor on existing subtraction
- learm more about pattern_sim from Chuck
References