{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "

AWAKE ANALYSIS TOOLS Tutorial

\n", "

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

\n", "
https://gitlab.cern.ch/AWAKE/AWAKE_ANALYSIS_TOOLS
\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook demonstrates accessing the AWAKE CSV compressed database and visualizing the extracted datasets \n", "***Author: Aman Singh Thakur*** \n", "***Contact: Spencer Jake Gessner / Prasanth Kothuri*** \n", " \n", "To run this notebook we used the following configuration:\n", "* *Software stack*: LCG_96 Python3\n", "* *Platform*: centos8-gcct\n", "\n", "This is developed in the context of CERN-HSF Google Summer Of Code \n", "\"Italian" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "''' Replace this line with your local AWAKE_ANALYSIS_TOOLS directory '''\n", "os.environ['AAT'] = '/eos/user/a/amthakur/SWAN_projects/AWAKE_ANALYSIS_TOOLS/'\n", "sys.path.append(os.environ['AAT']+'ntupling/')\n", "sys.path.append(os.environ['AAT']+'utilities/')\n", "sys.path.append(os.environ['AAT']+'analyses/')\n", "\n", "''' Imports from AWAKE_ANALYSIS_TOOLS '''\n", "import cutParser\n", "from bunchRotationStatus import bunchRotationStatus\n", "import returnGoodData as rgd\n", "from returnPlasmaDensity import returnPlasmaDensity\n", "import frame_analysis as fa\n", "from custom_cmap import custom_cmap" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here we specify the data we want to load with an external file.
\n", "Alternatively, we can generate this file from within the notebook." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "input_file = 'input_delay_scan.txt'\n", "input_path = os.environ['AAT']+'/examples/'\n", "InputParsed=cutParser.inputParser(input_path+input_file)\n", "file_list, file_bool = InputParsed()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "image_path = '/AwakeEventData/XMPP-STREAK/StreakImage/streakImageData'\n", "image_data = rgd.returnGoodData(image_path,file_list)\n", "\n", "window_path = '/AwakeEventData/XMPP-STREAK/StreakImage/streakImageTimeRange'\n", "window_data = rgd.returnGoodData(window_path,file_list)\n", "\n", "sps_bucket_path = '/AwakeEventData/VTUAwake2Fc/NormalModeAcq/b_offline'\n", "sps_bucket_data = rgd.returnGoodData(sps_bucket_path,file_list)\n", "\n", "sps_degree_path = '/AwakeEventData/AWAKEInjPhaseShifter/PhaseReadback/phaseACurrentValue'\n", "sps_degree_data = rgd.returnGoodData(sps_degree_path,file_list)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 2 }