prints information about the run in the following format:
SCINT RUN STARTED: 2014-08-29 11:55 AM
SCINT RUN ENDED: 2014-08-31 02:43 PM
TOTAL TIME: 2.1 days
TOTAL EVENTS: 49064
PHONE RUN STARTED: 2014-08-29 11:56 AM
PHONE RUN ENDED: 2014-08-31 02:43 PM
TOTAL TIME: 2.1 days
TOTAL EVENTS: 535
SCINT/PHONE EVENT RATIO: 91.0
-
Check to see if the arduino is seeing hits (the device location may differ):
$ python arduinoLogTime.py /dev/ttyACM0 -o "Output file name"
You should get a "starting!" -
Run
$ nohup python arduinoLogTime.py /dev/ttyACM0 -o "Output file name" &
which pipes the output to a text file in the background. This code must be running for the entire run.nohup
keeps the program running even if the shell is closed for whatever reason, unlike the ampersand alone.
-
Run
$ sudo su brandon
andsteal his wife, kids, and fortunerun$ /storage/crayfis/dataMerge.sh
to update the local storage from the crayfis server. Thenexit
back to youraccount. -
Look in /storage/crayfis/txtData/year.month/day/ for the uploaded data packets. The format is yourPhoneID_yourRunID_timeOfUpload.txt. Copy the runID you want.
-
Copy /storage/crayfis/runID/yourRunID/yourRunID.combined to the run folder with the arduino.txt
-
Run
$ python brandon_code/main.py runDir/yourRunID.combined
and check that it outputs a stream of timestamps. Then run$ python brandon_code/main.py runDir/yourRunID.combined >> runDir/phone.txt
to write them to a text file.
Finds the closest scintillator timestamp to each phone timestamp, and creates a list of the differences. Makes a histogram showing the spread of the deltas.
Same as above, but includes not only the smallest delta ts but all of them.
Takes the delta ts from whatever mode you are working in, then sums them together. This is recalculated for different timestamp offsets. Produces a plot of sums over offsets.
Works in three modes:
- Sums the smallest delta ts
- Sums all delta ts
- Sums the smallest delta ts, but only if they are under the tolerance specified
First calculates the smallest delta t for each phone timestamp, then tallies up how many of them are under the desired tolerance. This is calculated for timestamp offsets. Produces a plot of counts over offsets.
Working on it...
This takes in the (runID).combined file and outputs a sorted list of timestamps for LED hits. The syntax for the command is:
$bash LED.sh -x 25 -y 25 -t 20 < runID.combined > LED.txt
Here -x and -y set the coordinates for which pixels are identified as LED pixels and -t sets how many of these pixels must be lit up at once to qualify as an LED hit. All parameters are required, and it is likely to fail spectacularly if you enter a non-integer, so avoid that if possible.
This takes in the (runID).combined file and outputs a similar file (in the same format) with pixels outside the range of interest removed. The syntax for the command is:
$bash nonLED.sh -x 100 -y 100 < runID.combined > nonLED.combined
This has the effect of greatly decreasing the file size of the file that must be analyzed by min3.py.
Used like main.py to input data from nonLED.sh.