... | ... | @@ -68,20 +68,19 @@ where : |
|
|
|
|
|
_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.
|
|
|
_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.
|
|
|
|
|
|
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)`
|
|
|
`PPU_open=em.get_PPU_open(run)\\ data,trains=em.get_array(run,diag_nickname,PPU=PPU_open)`
|
|
|
|
|
|
If you want to get some other trains, you can call
|
|
|
If you want to get some other trains, you can call
|
|
|
|
|
|
`data,trains=em.get_array(run,diag_nickname,trainId)`
|
|
|
|
|
|
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.
|
|
|
|
... | ... | @@ -89,13 +88,13 @@ 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.
|
|
|
|
|
|
**Caching:** In order to speedup the function, all data you request are cached, i.e. stored as a tiff or pickles in the experimental folder on GPFS `.../ scratch/extra_mmm/` This is supposed to work fine and you shall be happy about it. If that would be for any reason not the case, you can use parameter **recalc=1**, then the eventual content of the cache is ignored and the data are freshly loaded from the system, or you could even use **save=0**, and then it is not trying to save into the cache. The files are stored as pickles if you use the get_array function, or as tiff images if you use the get_image function. You are very welcome to grab the images from the cache yourself and use as you need. The filename typically looks like
|
|
|
**Caching:** In order to speedup the function, all data you request are cached, i.e. stored as a tiff or pickles in the experimental folder on GPFS `.../ scratch/extra_mmm/` This is supposed to work fine and you shall be happy about it. If that would be for any reason not the case, you can use parameter **recalc=1**, then the eventual content of the cache is ignored and the data are freshly loaded from the system, or you could even use **save=0**, and then it is not trying to save into the cache. The files are stored as pickles if you use the get_array function, or as tiff images if you use the get_image function. You are very welcome to grab the images from the cache yourself and use as you need. The filename typically looks like
|
|
|
|
|
|
`p3129_r0706_JF2_PPU.tif,` where on beginning you have the proposal and run numbers, then the nickname of the diagnostics, and last identification of trains used. It can be either PPU, mean, sum, or particular trainId. If you use the lower thershold, its value is also appended at the end of the filename.
|
|
|
|
|
|
The **debug** parameter (boolean) can just turn on verbose output.
|
|
|
|
|
|
The **dictionary** with the diagnostics can be avoided and the source name provided directly. In that case, no trainId offset is used, i.e. Jungfrau_image=em.get_image(run,runNo,diag_nickname='whatever', diag=”HED_IA1_JF500K1/DET/JNGFR01:daqOutput”, trainId=trainId,debug=debug,recalc=recalc) _not tested._
|
|
|
The **dictionary** with the diagnostics can be avoided and the source name provided directly. In that case, no trainId offset is used, i.e. Jungfrau_image=em.get_image(run,runNo,diag_nickname='whatever', diag=”HED_IA1_JF500K1/DET/JNGFR01:daqOutput”, trainId=trainId,debug=debug,recalc=recalc) _not tested._
|
|
|
|
|
|
### Diagnostics
|
|
|
|
... | ... | @@ -103,7 +102,7 @@ This dictionary contains list of diagnostics used. Each item contains: |
|
|
|
|
|
**nickname, source, trainId offset, key**
|
|
|
|
|
|
`diags=\\\[\\\]\\ diags.append(\\\['JF1',"HED_IA1_JF500K1/DET/JNGFR01:daqOutput",0\\\])\\ diags.append(\\\['JF2',"HED_IA1_JF500K2/DET/JNGFR02:daqOutput",0\\\])\\ diags.append(\\\['JF3',"HED_IA1_JF500K3/DET/JNGFR03:daqOutput",0\\\])\\ diags.append(\\\['JF4',"HED_IA1_JF500K4/DET/JNGFR04:daqOutput",0\\\])\\ diags.append(\\\['ePix1',"HED_IA1_EPX100-1/DET/RECEIVER:daqOutput",0\\\])\\ diags.append(\\\['Zyla',"HED_EXP_ZYLA/CAM/5:daqOutput",1,'data.image.pixels'\\\])\\ diags.append(\\\['Electrons',"HED_IA1_LT/CAM/CAM_3:daqOutput",0\\\])\\ diags.append(\\\['HIDG1',"HED_EXP_HIDG/CAM/CAM1:daqOutput",0\\\])\\ diags.append(\\\['HIDG2',"HED_EXP_HIDG/CAM/CAM2:daqOutput",0\\\])\\ diags.append(\\\['HIDG3',"HED_EXP_HIDG/CAM/CAM3:daqOutput",0\\\])\\ diags.append(\\\['ILM',"HED_IA1_LT/CAM/CAM_2:daqOutput",0\\\])\\ diags.append(\\\['CRL_Z',"HED_IA1_NFS/MOTOR/CRL_Z",0\\\])\\ diags.append(\\\['XGM_HED',"HED_XTD6_XGM/XGM/DOOCS:output",0,'data.intensityTD'\\\])\\ diags.append(\\\['XGM_SA2',"SA2_XTD1_XGM/XGM/DOOCS:output",0,'data.intensityTD'\\\])\\ diags.append(\\\['LC_AXIS_4',"HED_IA1_DETM/MOTOR/LC_AXIS_4",0,"actualPosition.value"\\\])\\ diags.append(\\\['SCAN_Y',"HED_IA1_FSSS/MOTOR/SCAN_Y",0,"actualPosition.value"\\\])\\ diags.append(\\\['SCAN_Y_enc',"HED_IA1_FSSS/MOTOR/SCAN_Y",0,"encoderPosition.value"\\\])\\ diags.append(\\\['SCAN_X',"HED_IA1_FSSS/MOTOR/SCAN_X",0,"actualPosition.value"\\\])\\ diags.append(\\\['ATT_SA2',"SA2_XTD1_ATT/MDL/MAIN",0,"actual.transmission.value"\\\])\\ diags.append(\\\['ATT_HED',"HED_OPT_ATT/MDL/ATT",0,"actual.transmission.value"\\\])\\ diags.append(\\\['delay',"HED_HPLAS_HIL/DOOCS/OPTICALDELAY",0,"actualPosition.value"\\\])\\ diags.append(\\\['IPM_OPT_ch2',"HED_OPT_IPM/ADC/1:channel_2.output",0,'data.peaks'\\\])\\ diags.append(\\\['IPM_OPT_ch3',"HED_OPT_IPM/ADC/1:channel_3.output",0,'data.peaks'\\\])\\ diags.append(\\\['IPM_OPT_ch4',"HED_OPT_IPM/ADC/1:channel_4.output",0,'data.peaks'\\\])\\ diags.append(\\\['IPM_OPT_ch5',"HED_OPT_IPM/ADC/1:channel_5.output",0,'data.peaks'\\\])`
|
|
|
![Screenshot_20220919_171501](uploads/c60b0dbe64b00878b6f5a9b00f77829f/Screenshot_20220919_171501.png)
|
|
|
|
|
|
## Obsolete functions:
|
|
|
|
... | ... | |