Noise, bad pedestal
To assess noise:
python CalcNoiseAndMean.py -r 383 --special noCommonMode,slice --label calib
python CalcNoiseAndMean.py -r 383 --special regionCommonMode,slice --label common
This calculation needs to be multiplied by 2 to handle the bit shift.
To make a fake pedestal, just call python CalcNoiseAndMean.py -r 383. If 'CommonMode' is not in special it reverts to raw.
Standard pedestal
(No evskip 6000 and events 100k unless we're taking 6k + 2 events)
epix10ka_pedestals_calibration -k exp=ascdaq18,run=407 -d epixhr --evskip 6000 --events 100000
epix10ka_deploy_constants -k exp=ascdaq18,run=407 -d epixhr -D
Check for deployed pedestal:
python nonBasicScript.py rixx1003721 407
Timing scan
sbatch -p milano --nodes 10 --ntasks-per-node 10 --wrap="mpirun python -u -m mpi4py.run TimeScanParallelSlice.py -r 305"
python MapCompEnOn.py -f ../scan/TimeScanParallel_c0_r216_n1.h5
which computes the Onset, the Onset of CompEnOn and the length of a transfer function for each pixel. The first figure displays the map of these 3 parameters and this map is clickable in order to see each pixel's transfer function in a separate window. Close the figures to stop the program. The picture of the maps is saved here: /sdf/data/lcls/ds/rix/rixx1003721/results/scan/ (.png format)
SinglePhotons
To estimate the occupancy, do e.g.
python simplePhotonCounter.py -r 329 --special slice
This assumes a sensible pedestal.
To make the h5 files, assuming the normal pedestal works, do
python SimpleClustersParallelSlice.py --special regionCommonMode,FH -r 389
Else do --fakePedestals ... after doing Calc
where you'll want FM for FM and AML-M. Eventually we'll want to have specialized cluster cuts for all modes, but for now check that the seedCut in SimpleClustersParallelSlice.py is about 0.5 photons.
When all the runs are done, you can go to the rix directory and run e.g.
python runAnalyzeH5.py /sdf/data/lcls/ds/asc/ascdaq18/results/lowFlux 384 SimpleClusters 384,385,386,387,388,389
This makes plots and .npy labelled run 384 using the SimpleClusters analysis for the listed runs.
Let me know if this makes sense and works for you. At the end you can do e.g.
(ps-4.6.1) display ../test/*384*285*62*png
(ps-4.6.1) display ../test/*384*gain*png
LinearityScans
python LinearityPlotsParallelSlice.py -r 325
python LinearityPlotsParallelSlice.py -r 325 -f ../scan/LinearityPlotsParallel_c0_r325_n1.h5 --label fooBar
Currently configuring some behavior using
self.saturated = [True, False][0]
self.residuals = [True, False][0]
self.profiles = [True, False][0]
self.seabornProfiles = [True, False][1]
To analyze the .npy file and make maps of slopes, fit r**2, ..., and slope ratios:
python analyze_npy.py ../scan/LinearityPlotsParallel_r325_sliceFits_residualTest2_raw.npy
display ../scan/LinearityPlotsParallel_r325_sliceFits_residualTest2_raw_g1slope_g0slope_ratio_map_and_histo.png