Coder Social home page Coder Social logo

phsx815_week1's Introduction

PHSX815 Spring 2021 Week 1

Random number generation and data visualization

This repository contains three examples (coded in three different ways) that illustrates random number generation and simple data visualization (plotting). Three different plotting libraries are used (which requires users to independently download and setup/install these libraries - instructions at the links below)

Example usage

matplotlib (Python)

The python file python/Random_python.py can be run from the command line by typing:

<> python python/Random_python.py

This requires a working Python distribution (so that the python executable exists) with the Python package numpy also installed.

The C++ source file src/Random_matplotlib.C can be compiled into an executable by changing directories to the main folder of this repository (the folder containing the file Makefile) and typing:

<> make

In order for this to be successful, users need to edit the Makefile in order to include the correct paths to

  • the matplotlib-cpp GitHub package
  • the header files (in the include folder) for Python
  • the header files for numpy
  • the shared library for python Users can see the matplotlib (C++) documentaion for more information about where to find these folders on their machine.

This will create the Random_matplotlib.x, executable which can be run from the command line by typing:

<> ./Random_matplotlib.x

ROOT (C++)

The C++ macro macros/Random_ROOT.Cis set up to run in the ROOT command line interpreter environment. To use this functionality, users must first download and install ROOT on their machine (this will create shared libraries and header files that can be used in compiled C++ code, like the previous example, and the root executable).

To enter the ROOT command line environment users can type:

<> root

From the ROOT command line users can then run the macros/Random_ROOT.C macro by typing:

<> .x macros/Random_ROOT.C+

phsx815_week1's People

Contributors

crogan avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.