Skip to content

Instantly share code, notes, and snippets.

View RFQED's full-sized avatar
💭
🪨

Will Turner RFQED

💭
🪨
View GitHub Profile
@RFQED
RFQED / weather.sh
Last active August 29, 2015 14:19 — forked from lubosz/weather.sh
#!/bin/sh
DOWNLOAD_DIR=~/Downloads/weather
REGION=txgulf
# make download dir if not available
if [ ! -d "$DOWNLOAD_DIR" ]; then
mkdir -p $DOWNLOAD_DIR
fi
import Image
import numpy as np
import pylab
import mahotas as mh
import csv
import operator
########
# Takes in data formatted as
# CaloNum,Hits
# CaloNum,Hits
# loads the standard ring image from
# inspirehep.net/record/1338588/files/ringoverhead.png
# and displays a heat map over the top of the correct calo num.
#
# Will Turner - 2015
# wturner@hep.ph.liv.ac.uk
@RFQED
RFQED / HeatMap2.py
Last active October 29, 2015 14:31
HeatMap2.py
########
# Will Turner - 2015
# wturner@hep.ph.liv.ac.uk
#
# Takes in data formatted as
# CaloNum,Hits
# CaloNum,Hits
# loads an image of the ring taken in Paraview, can be found here
# http://hep.ph.liv.ac.uk/~wturner/images/ParaviewRingBig.png and displays
# a heat map over the top of the correct calo num will need to keep
int analogPin= 0;
int raw= 0;
int Vin= 5;
float Vout= 0;
float R1= 1000; //this is the known resistor
float R2= 0; // this is the unknown resistor
float buffer= 0;
void setup()
{
import serial
import plotly.plotly as py
import json
import time
import datetime
with open('/home/pi/Desktop/config.json') as config_file:
plotly_user_config = json.load(config_file)
url = py.plot([
{
"plotly_streaming_tokens": [ "******"],
"plotly_api_key": "********",
"plotly_username": "*****"
}
/***
* _ ______ _ _ _ _ _____ _ _ _
* | | | ___| | | | (_) | | / ___| | (_) |
* __| | ___ | |_ ___ _ _ _ __ | |_| |_ ___| |_ ___ \ `--. _ __ | |_| |_
* / _` |/ _ \ | _/ _ \| | | | '__| | _ | / __| __/ _ \ `--. \ '_ \| | | __|
* | (_| | (_) | | || (_) | |_| | | | | | | \__ \ || (_) | /\__/ / |_) | | | |_
* \__,_|\___/ \_| \___/ \__,_|_| \_| |_/_|___/\__\___/ \____/| .__/|_|_|\__|
* | |
* --------------------------------------------------------------- |_| -----------
////////////////////////////////////////////////////////////////////////
// Class: trackFinderFilter *** UNFINISHED
// Module Type: filter
// File: trackFinderFilter_module.cc
//
// Generated at Mon Feb 8 16:48:53 2016 by Will Turner using artmod
// from cetpkgsupport v1_08_04.
////////////////////////////////////////////////////////////////////////
#include "art/Framework/Core/EDFilter.h"
////////////////////////////////////////////////////////////////////////
// Backup file of NumberOfStrawHitsPerTrack - with early trajectory R plotting
////////////////////////////////////////////////////////////////////////
#include "art/Framework/Core/EDAnalyzer.h"
#include "art/Framework/Core/ModuleMacros.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Principal/Run.h"
#include "art/Framework/Principal/SubRun.h"