My first OpenSource contribution with Go-HEP

Jay Batra
2 min readFeb 14, 2019

--

Hi, I am Jay Batra and in this blog I will be telling you about my first contribution in OpenSource , an attempt to bag internship at Google Summer of Code(GSOC) with Cern.

Before anything, Let me introduce myself. I am first year MCA student and GSOC aspirant. I have deep interests in Data Science. So, my first priority was to find something where I can get the opportunity to advance myself in Data Science. On going previous GSOC organizations, I found out that CERN has been a regular participant organization at GSOC. Going through the project list, I found out about Go-Hep

Enough about me. Let us move on to learn what is Go-HEP, about my contribution.

Hep is a set of libraries and tools to perform High Energy Physics analyses with ease and Go.

My first Contribution:

I was keen on contributing , so I approached the project mentor’s Sebastein and Lukas . Both of them are extremely humble and helpful. They helped me kickstart my contribution by pointing me to the material to learn. They also suggested me to take up some good first issues to understand the workflow.

Going through the list of issues, I found out a good first issue where, there was a need to add an example on How to create 2D histogram from a CSV ? The examples run as a part of go test which is an exceptional good feature provisioned by Go.

The example made use of hbooks.NewH2D function in order to create the 2 Dimensional Histogram. It uses binning.

Data Binning/Bucketing is a data pre-processing technique used to reduce the effects of minor observation errors. The original data values which fall in a given small interval, a bin, are replaced by a value representative of that interval, often the central value.

The code involved creating a Normal distribution of X and Y.

Then drawing some random values from the standard normal distribution.

Eventually printing the mean rms standard deviation standard error .

For examples, comment the result like this:

The example is run by the following command

go test -run=Example -v

Here is the link of the actual PR.

That’s all folks for today. I’ll soon be back with some more information about Hep . Do keep an eye.

--

--