Coder Social home page Coder Social logo

autocorrelate-photon-data's Introduction

This code was written for the group of Dr. Dan Higgins at Kansas State University to analyze some data they collected.

Installing

There are two ways to install the executable: installing a prebuilt binary or building from source.

Prebuilt Binary

Download the file corresponding to your system using one of the following links. If there isn't one for your system either build from source, or let me know and I can likely build a binary for you.

If on MacOS or Linux, you'll need to run the following command to make the binary executable:

chmod +x <file name>
Operating System Link
Windows https://github.com/ehiggins98/AutoCorrelate-Photon-Data/releases/download/1.0.0/TimestampAC-windows.exe
MacOS https://github.com/ehiggins98/AutoCorrelate-Photon-Data/releases/download/1.0.0/TimestampAC-macos
Ubuntu 18.04 https://github.com/ehiggins98/AutoCorrelate-Photon-Data/releases/download/1.0.0/TimestampAC-ubuntu18.04
Ubuntu 20.04 https://github.com/ehiggins98/AutoCorrelate-Photon-Data/releases/download/1.0.0/TimestampAC-ubuntu20.04

Building from Source

Linux/MacOS

First, download the source code from this repository. If you have git installed then you can do this with the following command:

git clone https://github.com/ehiggins89/AutoCorrelate-Photon-Data

Otherwise, download the code as a zip file and unzip it in your preferred location.

Then, simply run make linux for Linux, or make macos for MacOS. This will create a binary called "TimestampAC."

Optionally, you can also move the executable to a location on the system path, so it can be executed regardless of the terminal's current working directory. On MacOS, this can be done with the following command

mv TimestampAC-macos /usr/local/bin

with the command on Linux being analogous, with the corresponding binary name being used instead of the MacOS binary.

Windows

These instructions are untested: let me know if you run into any problems.

First, install a the Visual C++ compiler here (download the "Build Tools for Visual Studio 2019). Run the installer, and select the "C++ build tools" workflow to run. This should create several configurations in your Start menu - you'll want to use the "x64 Native Tools Command Prompt."

Now, download the source code from this repository. If you have git installed then you can do this with the following command:

git clone https://github.com/ehiggins89/AutoCorrelate-Photon-Data

Otherwise, download the code as a zip file and unzip it in your preferred location.

Then, run nmake windows. This will create a binary called "TimestampAC.exe."

Optionally, you can also move the executable to a location on the system path, so it can be executed regardless of the command line's current working directory. To do this, follow this guide to add the directory containing your executable to the system path.

Running the Code

Regardless of platform, the executable file takes several command line arguments:

Flag, Short Form Required Default Value Example Description
--input-file-name, -if Yes None --input-file-name NR_20_KI_25M_60uW-0.stp The name of the file containing the input data.
--output-file-name, -of Yes None --output-file-name output.csv The name of the file where output data should be written
--alpha, -a No 5 --alpha 5 Number of bins by which to shift
--start-log-time, -s No -6.5 --start-log-time -6.5 The base-10 log of the first bin size
--inc-log-time, -i No 0.1 --inc-log-time 0.1 The base-10 log of the bin size increment
--end-log-time, -e No 1 --end-log-time 1 The base-10 log of the last bin size

For example, on MacOS one might run the executable like this

./TimestampAC-macos -if NR_20_KI_25M_60uW-0.stp -of output.csv

or on Windows,

TimestampAC-windows.exe -if NR_20_KI_25M_60uW-0.stp -of output.csv

autocorrelate-photon-data's People

Contributors

ehiggins98 avatar

Watchers

James Cloos 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.