...
Anything struck-through has not been tested.
Noise,
...
pedestal
To make a fake pedestal: python CalcNoiseAndMean.py -r 91. (Re the below, If 'CommonMode' is not in special it reverts to raw.)
To assess noise in keV:
python CalcNoiseAndMean.py -r 91 -e rixx1005922 --special regionCommonMode,slice --label common_testforSept
This calculation needs to be multiplied by 2 to handle the bit shift.python CalcNoiseAndMean.py -r 91 --special regionCommonMode,slice --label common_testforSept (n.b. -e is not needed if one is using the run defined by setup.sh.)
To make a fake pedestal: python CalcNoiseAndMean.py -r 91. If 'CommonMode' is not in special it reverts to raw.
...
python simplePhotonCounter.py -r 101 -e rixx1005922 --fakePedestal fakePedestalFile $OUTPUT_ROOT/dark/CalcNoiseAndMean_mean_common_testforSept_r91_step0.npy
If you have a sensible pedestal, no need to use fakePedestal fakePedestalFile flag.
To make the h5 files, assuming the normal pedestal works, dopython SimpleClustersParallelSlice.py --special regionCommonMode,FH -r 389
Else use flag after doing CalcNoiseandMean
or in parallel : sbatch -p milano --nodes 10 --ntasks-per-node 10 --account lcls:rixx1005922 --wrap="mpirun python -u -m mpi4py.run SimpleClustersParallelSlice.py --special regionCommonMode,FH -r 389"r 123 --fakePedestalFile $OUTPUT_ROOT/dark/CalcNoiseAndMean_mean_common_testforSept_r91_step0.npy"
Else do --fakePedestals ... after doing CalcNoiseAndMean
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 AnalyzeH5.py -r 123 -f $OUTPUT_ROOT/lowFlux/SimpleClusters__c0_r123_n666.h5 -p $OUTPUT_ROOT/lowFlux
python runAnalyzeH5.py /sdf/data/lcls/ds/rix/rixx1003721/results/lowFlux 384 SimpleClusters 384,385,386,387,388,389This 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.display ../lowFlux/*384*285*62*pngdisplay ../lowFlux/*384*gain*png
LinearityScans
python LinearityPlotsParallelSlice.py -r 84 -e rixx1005922 --label testforSept
python LinearityPlotsParallelSlice.py -r 84 -e rixx1005922 --label testforSept -f $OUTPUT_ROOT/scan/LinearityPlotsParallel_testforSept_c0_r84_n1.h5
...
To analyze the .npy file and make maps of slopes, fit r**2, ..., and slope ratios:
in the standalone_scripts directory:
python analyze_npy.py $OUTPUT_ROOT/scan/LinearityPlotsParallel_r84_sliceFits_testforSept_raw.npy → "TypeError: Invalid shape (3, 192, 13) for image data"npy 3 for e.g. asic 3:
display ../scan/LinearityPlotsParallel_r325_sliceFits_residualTest2_raw_g1slope_g0slope_ratio_map_and_histo.png
...
python AnalyzeH5.py -r 470 -f /sdf/data/lcls/ds/rix/rixx1003721/results/lowFlux/SimpleClusters_c0_r468_n1.h5,/sdf/data/lcls/ds/rix/rixx1003721/results/lowFlux/SimpleClusters_c0_r469_n1.h5,/sdf/data/lcls/ds/rix/rixx1003721/results/lowFlux/SimpleClusters_c0_r470_n1.h5 -p $OUTPUT_ROOT/lowFlux