You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Content

Beginning of the "Sprint"

2017-02-24 e-mail from cpo
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
2017-02-24 fiber diffraction: to do
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
2017-02-27 Meng's peak-finder parameters
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)
2017-02-27 cpo - notes to do
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
2017-02-27 Meng - list of good/bad events
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

In peak-finding script
    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

 

Conclusion: within mask-permitted region analysis script finds the same peaks as psocake

Base-ring pixels

Base-ring-pixel map r0=10 and 6 dr=2
r0=6  dr=2
 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0
 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0
 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0
 0 0 1 1 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 1 1 0
 0 1 1 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 1 1 0
 1 1 1 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 1 1 0
 0 1 1 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 1 1 0
 0 0 1 1 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 1 1 1 0 0
 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0
 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0
 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
Number of pixels to estimate background = 88

r0=10  dr=2
 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
 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 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0
 0 0 0 0 0 1 1 1 0 0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 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

List of events from Meng
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

peak list for selected events
peaks-cxif5315-r0169-2017-03-01T12:43:00.txt

Images

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

2017-03-02 Peak selection parameters

EQU

Peak reconstruction/selection parameters
peaks_equ = alg_equ.peak_finder_v4r2(nda, thr_low=40, thr_high=60, rank=4, r0=6, dr=2)
alg_equ.set_peak_selection_pars(npix_min=3, npix_max=1000, amax_thr=0, atot_thr=500, son_min=4)

For further histograms discard peaks with pk.r<105

For further histograms discard peaks with pk.atot<600

Tentative peak selection criteria

        if pk.atot<600  : return False
        if pk.npix>60   : return False
        if pk.rms<10    : return False
        if pk.rms>25    : return False
        if math.fabs(pk.bkgd)>15 : return False
pk.npix ?
pk.son ?
sigma_hov ?

ARC

alg_arc.set_peak_selection_pars(npix_min=3, npix_max=1000, amax_thr=0, atot_thr=500, son_min=4)
peaks_arc = alg_arc.peak_finder_v4r2(nda, thr_low=40, thr_high=60, rank=8, r0=10, dr=2)

Further discard peaks with pk.atot<1000

 

Tentative peak selection criteria

 

Tentative peak selection criteria
        if pk.atot<1000 : return False
        if pk.npix>200  : return False
        if pk.r<435     : return False
        if pk.r>443     : return False
        if pk.rms<10    : return False
        if pk.rms>30    : return False
        if math.fabs(pk.bkgd)>15: return False

pk.npix ?
pk.son ?
sigma_hov ?

 

 

 

 

 

 

 

 

 

 

  • No labels