Skip to content

Commit bda3172

Browse files
committed
read: take only half of the sweepwidth
The sweepwith is the total scanning range. From the centerfield it is only half of the sweepwith in either direction.
1 parent 402259f commit bda3172

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/read_Spectrum.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ read_Spectrum <- function(file, ...) {
8282
center_field <- as.numeric(par[par==cf, 2])
8383
if (is.na(sweep_width))
8484
sweep_width <- as.numeric(par[par==sw, 2]) / div
85-
start <- center_field - sweep_width[1] # DSC can contain duplicate entries
86-
end <- center_field + sweep_width[1]
85+
start <- center_field - sweep_width[1] / 2 # DSC can contain duplicate entries
86+
end <- center_field + sweep_width[1] / 2
8787

8888
if (length(sweep_width) == 0)
8989
stop("Couldn't find information on sweep width, importing file cancelled.", call. = FALSE)

0 commit comments

Comments
 (0)