... | ... | @@ -76,6 +76,18 @@ _run_ - the run object you got from open_run |
|
|
|
|
|
_diag_nickname_ - name of the diagnostics you are interested in, as defined in the local dictionary, e.g. 'JF4', 'XGM_HED',... The dictionary of nicknames can be seen below, or eventually at the beginning of the source code. It is to be graduallye exteded to follow status of HED. In this simplest case, the function would return and average of all trains within this run.
|
|
|
|
|
|
train_selection:
|
|
|
|
|
|
The parameter train selection shall make the 'PPU' obsolete. train_selection can have various values, like:
|
|
|
|
|
|
"PPU" - the same as if you used to call with get_PPU_open
|
|
|
|
|
|
"JP" - trains staysfying the Jet pointing conditions
|
|
|
|
|
|
"JPnot" - trins not satysfying the jet pointing conditions
|
|
|
|
|
|
....further might come or be easily added.
|
|
|
|
|
|
If you want to get an average value over all trains where PPU was open (very standard and smart thing), you will first get the trainIds from PPU, and then call the function as:
|
|
|
|
|
|
`PPU_open=em.get_PPU_open(run)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ data,trains=em.get_array(run,diag_nickname,PPU=PPU_open)`
|
... | ... | @@ -86,11 +98,11 @@ If you want to get some other trains, you can call |
|
|
|
|
|
where trainId is either:
|
|
|
|
|
|
\-1 -> you'll get average over all trains,
|
|
|
\-1 -\> you'll get average over all trains,
|
|
|
|
|
|
0 -> you will get all trains in the run, then the return value 'trains' will give you trainIds of the returned trains.
|
|
|
0 -\> you will get all trains in the run, then the return value 'trains' will give you trainIds of the returned trains.
|
|
|
|
|
|
positive value -> you will get data for this particular trainId
|
|
|
positive value -\> you will get data for this particular trainId
|
|
|
|
|
|
**Thresholding:** You can use the parameters to process the data. If you set **threshold_lower**, all pixel with values below this value will be zeroed. And this is done before averaging over trains, so very useful for removing noise on long accumulations. **threshold_upper** works similarly, just zero pixels with values above this one, could be useful to remove bad pixels or hard hits on some detectors.
|
|
|
|
... | ... | @@ -157,7 +169,7 @@ Somehow similar to get_image. gets you a numpy array of diagnostics given by dia |
|
|
|
|
|
### get_shot_I (run,trainId=None,threshold=1e99,debug=0,average=True)
|
|
|
|
|
|
get the intensity of either shot (if trainId>0) or average intensity in run (if trainId=-1)...works similar as get_image.
|
|
|
get the intensity of either shot (if trainId\>0) or average intensity in run (if trainId=-1)...works similar as get_image.
|
|
|
|
|
|
The intensity is taken from XGM_SASE2, i.e x-ray gas monitor very far upstream, above attenuators and everything.
|
|
|
|
... | ... | |