ExampleNotebookAwakeAnalysisTools.ipynb Open in SWAN Download

AWAKE ANALYSIS TOOLS Tutorial

Set of Analysis sub-routines packed for performing analysis of data discovered by AWAKE

https://gitlab.cern.ch/AWAKE/AWAKE_ANALYSIS_TOOLS

This notebook demonstrates accessing the AWAKE CSV compressed database and visualizing the extracted datasets
Author: Aman Singh Thakur
Contact: Spencer Jake Gessner / Prasanth Kothuri

To run this notebook we used the following configuration:

  • Software stack: LCG_96 Python3
  • Platform: centos8-gcct

This is developed in the context of CERN-HSF Google Summer Of Code Italian Trulli

In [ ]:
''' Replace this line with your local AWAKE_ANALYSIS_TOOLS directory '''
os.environ['AAT'] = '/eos/user/a/amthakur/SWAN_projects/AWAKE_ANALYSIS_TOOLS/'
sys.path.append(os.environ['AAT']+'ntupling/')
sys.path.append(os.environ['AAT']+'utilities/')
sys.path.append(os.environ['AAT']+'analyses/')

''' Imports from AWAKE_ANALYSIS_TOOLS '''
import cutParser
from bunchRotationStatus import bunchRotationStatus
import returnGoodData as rgd
from returnPlasmaDensity import returnPlasmaDensity
import frame_analysis as fa
from custom_cmap import custom_cmap

Here we specify the data we want to load with an external file.
Alternatively, we can generate this file from within the notebook.

In [ ]:
input_file = 'input_delay_scan.txt'
input_path = os.environ['AAT']+'/examples/'
InputParsed=cutParser.inputParser(input_path+input_file)
file_list, file_bool = InputParsed()
In [ ]:
image_path = '/AwakeEventData/XMPP-STREAK/StreakImage/streakImageData'
image_data = rgd.returnGoodData(image_path,file_list)

window_path = '/AwakeEventData/XMPP-STREAK/StreakImage/streakImageTimeRange'
window_data = rgd.returnGoodData(window_path,file_list)

sps_bucket_path = '/AwakeEventData/VTUAwake2Fc/NormalModeAcq/b_offline'
sps_bucket_data = rgd.returnGoodData(sps_bucket_path,file_list)

sps_degree_path = '/AwakeEventData/AWAKEInjPhaseShifter/PhaseReadback/phaseACurrentValue'
sps_degree_data = rgd.returnGoodData(sps_degree_path,file_list)