All scripts store data products in .npy arrays and use a method plotData to plot it. The output data and image files should be sent to exptDir/results/scan/ or lowFlux/ or dark/. by specifying the type of script in the constructor. Where possible, scripts should be able to load .npy data products and reproduce .png files without having to run over the data. This would also allow for different ROI plots. Or add support in-script for a list of ROIs. Probably useful to label the data output files by # of events.
Scripts
- PedScript takes a run to use for 5 ped information and a run to compare against. Currently we assume the latter is forced low. We plot a histogram of the difference between FiL and FoL as well as an image of the difference (up to +/- 3 sigma). Example call:
- persistenceCheck finds kicked shots and plots the ratio of signal on that frame to the previous frame scattered vs the flux ratio. Currently uses the approximate bykick period (hard-coded) to save time. Example call: python persistenceCheck.py -r 272 -d Epix10ka2M --maxNevents 66666
- findMinSwitchValue looks at AML data and finds the minimum switched raw value per pixel. It plots the image and a histogram of the spectrum. Example call: python findMinSwitchValue.py -r 472 --maxNevents 6 -d Epix10ka
- TimeScanROI analyzes timing scan data, plotting the (raw?) signal vs delay and also the flux-normalized signal vs delay. Example call: python TimeScanROI.py -r 472 -d Epix10ka
- ExtractWave8.py plots data from the different diodes of the wave8. How to execute it: python -i ExtractWave8.py experiment run NumberofEvents (Example: python -i ExtractWave8.py mfxx1005021 472 5000), stored here:
/sdf/data/lcls/ds/mfx/mfxx1005021/results/scripts
linearityPlotsAutoranging finds the autoranged values and fluxes for single pixels and the means for hopefully single-gain-mode ROIs and makes color-coded plots. Example call:python inearityPlotsAutoranging.py -r 472 --maxNevents 10 -d Epix10ka
- roiFromSwitched, roiFromThreshold, and roiTest show how to make region of interest files for use by the above. The combineROI script allows one to combine two files, ANDing or ORing them. It doesn't inherit from the base class. E.g. python roiFromThreshold.py -r 671 -c 1 -t 40000 --detObj calib -d Epix10ka --maxNevents 500 returns all pixels above 40000 keV in the first 500 events for camera 1.
- experimentSuiteConfig or mfxx1005021_SuiteConfig or etc. is used by basicSuiteScript to configure the basic behavior of all scripts. The individual script can override settings with helper functions in the base class or overwriting.
- simplePhotonCounter counts photons by counting pixels above a threshold over the specified number of events. It saves an array of the normalized values and prints out the total. Example call: python simplePhotonCounter.py -r 602 -d Epix10ka --maxNevents 100 -c 1. Specify --special slice to only count the slice region if there is one.
Methods
- getEvtFromRuns should be called for running over multiple runs
- getEvt is the normal call for a single run