Merge pull request 'development' (#1) from development into master
Reviewed-on: http://192.168.0.88:3000/Ruben/OpusData/pulls/1
This commit is contained in:
commit
a1bd5a98e4
35
OpusData.R
Normal file
35
OpusData.R
Normal file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env Rscript
|
||||
|
||||
# Package installation, execute once
|
||||
#if (!require("remotes")) install.packages("remotes")
|
||||
#remotes::install_github("philipp-baumann/simplerspec")
|
||||
|
||||
# Attach package to workspace, execute with every new session
|
||||
library("simplerspec")
|
||||
|
||||
file_path <- "D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\"
|
||||
file_name <- "Rng02_Rng2630_01.0"
|
||||
|
||||
data <- read_opus_univ(paste(file_path, file_name, sep = ""), extract = "spc",
|
||||
atm_comp_minus4offset = FALSE)
|
||||
|
||||
data_x_values <- data$`D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\Rng02_Rng2630_01.0`$wavenumbers
|
||||
data_y_values <- as.numeric(data$`D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\Rng02_Rng2630_01.0`$spc[1,])
|
||||
|
||||
|
||||
print(data_x_values)
|
||||
# Set working directory to path where the result should appear
|
||||
setwd(paste(file_path, "..\\DPT", sep = ""))
|
||||
|
||||
# Replace last "." with "_", add ".DPT" and create file
|
||||
file_name <- paste(sub(".([^.]*)$", "_\\1", file_name), ".DPT", sep = "")
|
||||
file.create(file_name)
|
||||
|
||||
# Convert data into dataframe
|
||||
data <- data.frame(data_x_values, data_y_values, row.names = NULL)
|
||||
|
||||
# Fill file with dataframe
|
||||
write.table(data, file_name, row.names = FALSE, col.names = FALSE, sep=",")
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -1,20 +0,0 @@
|
||||
VARIABLES SECTION
|
||||
|
||||
BUTTON <Knopf 1> = Goto (erster);
|
||||
BUTTON <Knopf 2> = Goto (zweiter);
|
||||
|
||||
PROGRAM SECTION
|
||||
|
||||
Label (anfang);
|
||||
UserDialog ('0', STANDARD, BUTTON:'<Knopf 1>+<Knopf 2>', BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK, BLANK);
|
||||
Goto (ende);
|
||||
Label (erster);
|
||||
Message ('Erster Knopf gedrückt', ON_SCREEN, 5);
|
||||
Goto (anfang);
|
||||
Label (zweiter);
|
||||
Message ('Zweiter Knopf gedrückt', ON_SCREEN, 5);
|
||||
Label (ende);
|
||||
|
||||
PARAMETER SECTION
|
||||
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
.mac: OPUS-OS/2 macro
|
||||
.mtb: Not an OPOUS file
|
||||
.mtx: OPUS Macro
|
||||
.obs: OPUS Basic script
|
Loading…
Reference in New Issue
Block a user