From 3ce23df59d3cd75feff3495877c746003d9f7300 Mon Sep 17 00:00:00 2001 From: Andrea Tugores <tugoresa@jupyterMiLAB> Date: Wed, 12 May 2021 16:30:20 -0500 Subject: [PATCH] update --- ...hon-13-TeV-framework-script-analysis.ipynb | 61 ++++++++++++------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb b/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb index f4592c8..2a163cb 100644 --- a/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb +++ b/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb @@ -32,19 +32,19 @@ "### Import some Python packages\n", "\n", "<p style='text-align: justify;'>\n", - "The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system-dependent functionality.It is possible to automatically perform many operating system tasks. The OS module provides functions for creating and removing a directory (folder), fetching its contents, changing and identifying the current directory, etc.\n", + "The <strong>OS module</strong> in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system-dependent functionality.It is possible to automatically perform many operating system tasks. The OS module provides functions for creating and removing a directory (folder), fetching its contents, changing and identifying the current directory, etc.\n", "</p>\n", "\n", "<p style='text-align: justify;'>\n", - "The datetime module supplies classes for manipulating dates and times. These classes provide a number of functions to deal with dates, times and time intervals. Date and datetime are an object in Python, so when you manipulate them, you are actually manipulating objects and not string or timestamps. \n", + "The <strong>datetime module</strong> supplies classes for manipulating dates and times. These classes provide a number of functions to deal with dates, times and time intervals. Date and datetime are an object in Python, so when you manipulate them, you are actually manipulating objects and not string or timestamps. \n", "</p>\n", "\n", "<p style='text-align: justify;'>\n", - "With PyROOT, ROOT’s Python-C++ bindings, you can use ROOT from Python. PyROOT is HEP’s entrance to all C++ from Python, for example, for frameworks and their steering code. The PyROOT bindings are automatic and dynamic: no pre-generation of Python wrappers is necessary. With PyROOT you can access the full ROOT functionality from Python while benefiting from the performance of the ROOT C++ libraries.\n", + "With PyROOT, ROOT’s Python-C++ bindings, you can use <strong>ROOT</strong> from Python. PyROOT is HEP’s entrance to all C++ from Python, for example, for frameworks and their steering code. The PyROOT bindings are automatic and dynamic: no pre-generation of Python wrappers is necessary. With PyROOT you can access the full ROOT functionality from Python while benefiting from the performance of the ROOT C++ libraries.\n", "</p>\n", "\n", "\n", - "TMath encapsulate most frequently used Math functions. NB. The basic functions Min, Max, Abs and Sign are defined in TMathBase." + "**TMath** encapsulate most frequently used Math functions. The basic functions Min, Max, Abs and Sign are defined in TMathBase." ] }, { @@ -65,10 +65,25 @@ "source": [ "<p style='text-align: justify;'>\n", "One of the classes defined in the datetime module is datetime class. Its a combination of date and time along with the attributes year, month, day, hour, minute, second, microsecond, and tzinfo. We then used now() method to create a datetime object containing the current local date and time.\n", - "</p>\n", - "\n", + "</p>\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "starttime = datetime.datetime.now()\n", + "print(starttime)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "<p style='text-align: justify;'>\n", - " os.popen(): This method opens a pipe to or from command. The return value can be read or written depending on whether mode is ‘r’ or ‘w’. The mode parameter is not required, if not provided, the default \"r\" is taken for the mode. \n", + "<strong>os.popen():</strong> This method opens a pipe to or from command. The return value can be read or written depending on whether mode is ‘r’ or ‘w’. The mode parameter is not required, if not provided, the default \"r\" is taken for the mode. \n", "</p>" ] }, @@ -78,8 +93,6 @@ "metadata": {}, "outputs": [], "source": [ - "starttime = datetime.datetime.now()\n", - "\n", "myCmd = os.popen('date').read()\n", "print(myCmd)" ] @@ -91,10 +104,10 @@ "## Get the code the 13TeV analysis\n", "\n", "<p style='text-align: justify;'>\n", - "Create folder named 'atlas-data' where the information of twelve physics analysis examples inspired by the published results of ATLAS Collaboration will be cloned and stored to demonstrate the wide range of scenarios. The folder will be created and the data will be cloned only the first time the notebook is run.\n", + "Create folder named <strong>'atlas-data'</strong> where the information of twelve physics analysis examples inspired by the published results of ATLAS Collaboration will be cloned and stored to demonstrate the wide range of scenarios. The folder will be created and the data will be cloned only the first time the notebook is run.\n", "</p>\n", "\n", - "Setting the path as a variable. To get the location of the current working directory os.getcwd() is used." + "Setting the path as a variable. To get the location of the current working directory <strong>os.getcwd()</strong> is used." ] }, { @@ -112,10 +125,10 @@ "metadata": {}, "source": [ "<p style='text-align: justify;'>\n", - "os.system(command) method execute the command (a string) in a subshell. This method is implemented by calling the Standard C function system. If command generates any output, it is sent to the interpreter standard output stream. Whenever this method is used then the respective shell of the Operating system is opened and the command is executed on it. The command parameter indicates which command to execute.\n", + "<strong>os.system(command)</strong> method execute the command (a string) in a subshell. This method is implemented by calling the Standard C function system. If command generates any output, it is sent to the interpreter standard output stream. Whenever this method is used then the respective shell of the Operating system is opened and the command is executed on it. The command parameter indicates which command to execute.\n", "</p>\n", "\n", - "The mkdir command allows users to create or make new directories. mkdir stands for “make directoryâ€." + "The <strong>mkdir</strong> command allows users to create or make new directories. mkdir stands for “make directoryâ€." ] }, { @@ -144,7 +157,7 @@ "'ls' with no option list files and directories in bare format where we won’t be able to view details like file types, size, modified date and time, permission and links etc.\n", "</p>\n", "\n", - "The command 'ls lhrt' shows the last modified documents." + "The command <strong>'ls lhrt'</strong> shows the last modified documents." ] }, { @@ -163,7 +176,7 @@ "source": [ "Print the current path/location.\n", "<p style='text-align: justify;'>\n", - "The pwd command stands for print working directory. When invoked the command prints the complete path of the current working directory.\n", + "The <strong>pwd</strong> command stands for print working directory. When invoked the command prints the complete path of the current working directory.\n", "</p>" ] }, @@ -183,7 +196,7 @@ "source": [ "Get into the folder which we just created. \n", "\n", - "Use the chdir command to change to another directory. The syntax is chdir followed by the name of the directory you want to go to." + "Use the <strong>chdir</strong> command to change to another directory. The syntax is chdir followed by the name of the directory you want to go to." ] }, { @@ -235,7 +248,9 @@ "source": [ "#### Clone the analysis code\n", "\n", - "If it is the first time the notebook is run, the data is cloned. Otherwise, it warns that the data already exists." + "If it is the first time the notebook is run, the data is cloned. Otherwise, it warns that the data already exists.\n", + "\n", + "The frameworks implement the protocols needed for reading the datasets, making an analysis selection, writing out histograms and plotting the results." ] }, { @@ -309,9 +324,9 @@ "\n", "The framework consists of two main parts:\n", "<p style='text-align: justify;'>\n", - "The analysis part, located within the \"Analysis\" directory: it performs the particular object selection and stores the output histograms.\n", + " The analysis part, located within the <strong>Analysis directory</strong>: it performs the particular object selection and stores the output histograms.\n", "\n", - "The plotting part, located within the \"Plotting\" directory: it makes the final Data / Prediction plots.\n", + "The plotting part, located within the <strong>Plotting directory</strong>: it makes the final Data / Prediction plots.\n", "</p>" ] }, @@ -352,11 +367,11 @@ "</p>\n", "\n", "<p style='text-align: justify;'>\n", - "echo command is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.\n", + "<strong>echo</strong> command is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.\n", "</p>\n", "\n", "<p style='text-align: justify;'>\n", - "\"echo \\\"1\\\" | ./welcome.sh\" : 1 indicates that you want to automatically create all output directories in the 12 analysis subfolders, if you put 0 instead you can delete content if necessary.\n", + "<strong>\"echo \\\"1\\\" | ./welcome.sh\"</strong> : 1 indicates that you want to automatically create all output directories in the 12 analysis subfolders, if you put 0 instead you can delete content if necessary.\n", "</p>" ] }, @@ -477,7 +492,7 @@ "</p>\n", "\n", "<p style='text-align: justify;'>\n", - "\"echo \\\"0\\n0\\\" | ./run.sh >log\" : the first 0 indicates run all data and MC one after another. The second 0 indicates that you don't want to use PROOF.\n", + "<strong>\"echo \\\"0\\n0\\\" | ./run.sh >log\"</strong> : the first 0 indicates run all data and MC one after another. The second 0 indicates that you don't want to use PROOF.\n", "</p>\n", "\n", "\n", @@ -581,7 +596,7 @@ "</p>\n", "\n", "<p style='text-align: justify;'>\n", - "**\"echo \\\"9\\n0\\\" | ./plotme.sh\"** : The first number indicates which of the 12 analyzes you want to use and the second, in this case, 0 indicates that the location of the directory is Output_NNAnalysis.\n", + "<strong>\"echo \\\"9\\n0\\\" | ./plotme.sh\"</strong> : The first number indicates which of the 12 analyzes you want to use and the second, in this case, 0 indicates that the location of the directory is Output_NNAnalysis.\n", "</p>" ] }, -- GitLab