Merge pull request #215 from RobertGawron/develop

fix #209
pull/234/head
Robert 2019-08-19 20:15:19 +02:00 zatwierdzone przez GitHub
commit 93ce674c19
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
10 zmienionych plików z 45 dodań i 59 usunięć

Wyświetl plik

@ -42,7 +42,7 @@ matrix:
before_install:
- sudo apt-get install -y python3-pip
- pip3 install pyflakes
- cd ./software/DataAcquisitionFromDevice
- cd ./software/DataAcquisition
script:
- pyflakes *.py

Wyświetl plik

@ -0,0 +1,44 @@
inputFileName ="DataNoSample.csv"
fileNoSample <- read.delim(inputFileName, , sep=",")
inputFileName ="DataAmSample1.csv"
fileAmSample1 <- read.delim(inputFileName, , sep=",")
inputFileName ="DataRaSample2.csv"
fileAmSample2 <- read.delim(inputFileName, , sep=",")
backgroundLevel = fileNoSample$Counter
AmIsotope = fileAmSample1$Counter
RaIsotope = fileAmSample2$Counter
# date column should be type of date, not string, so parse it
png(filename = paste0("results-", format(Sys.time(), "%d_%b_%Y_%H_%M"), ".png"), width = 800, height = 900, bg = "white")
verticalLabels <- c("background level\nradiation", "Am isotope\n(somke detector)", "Ra isotope\n(old compass)")
boxplot(backgroundLevel, AmIsotope, RaIsotope,
col="grey",
names=verticalLabels,
horizontal = FALSE,
main = "Radioactivity of different samples meassured using Ionization Chamber",
xlab = "Measurement",
ylab = "Sensor voltage",
boxwex=0.2)
# no X grid, Y grid grid aligns with the tick marks
grid(NA, NULL)
boxplot(backgroundLevel, AmIsotope, RaIsotope,
col="grey",
names=verticalLabels,
horizontal = FALSE,
main = "Radioactivity of different samples meassured using Ionization Chamber",
xlab = "Measurement",
ylab = "Sensor voltage",
boxwex=0.2,
add=T)

Wyświetl plik

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.6" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="R User Library" level="project" />
<orderEntry type="library" name="R Skeletons" level="application" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

Wyświetl plik

@ -1,43 +0,0 @@
library(latticeExtra)
require(gridExtra)
require(grid)
# set error messages test to english
Sys.setenv(LANG = "en")
#load samples
samples <- read.delim("SampleOutputFile.csv", , sep=",")
# date column should be type of date, not string, so parse it
# sample row: 2018-09-28 11:51:08.340037
samples$Timestamp = as.POSIXct(samples$Timestamp, format="%Y-%m-%d %H:%M:%S.%OS")
# create representation of a picture
png(filename = "results.png", width = 800, height = 900, bg = "white")
# create graphs
plotValueVsTime <- xyplot(Measurement ~ Timestamp,
samples,
type = "l",
grid = TRUE,
col.line = "black",
ylab = "V DC",
xlim=c(min(samples$Timestamp), max(samples$Timestamp)),
main = "Change over time")
plotHistogram <- histogram(samples$Measurement,
color = "white",
col = "grey",
xlab = "V DC",
ylab = "percentage",
main = "Histogram")
# show graphs
grid.arrange(plotValueVsTime, plotHistogram, nrow = 2)
# add timestamp
trellis.focus("toplevel")
pictureCreationTimestamp <- as.POSIXlt(Sys.time())
panel.text(0.85, 0.03, pictureCreationTimestamp, cex = 1.2, font = 2)
trellis.unfocus()