Giter Club home page Giter Club logo

forcer's People

Contributors

peter-t-ruehr avatar

Watchers

 avatar  avatar

forcer's Issues

Seemingly random crashes with amp_drift_corr and convert_measurement loops

Hi Peter,

I was unable to reproduce the error I got in the first run, but had a few more crashes.
It seems to be related to memory usage indeed, as memory use by RStudio keeps on increasing while the loop runs (see screenshots below).

Adding gc() within the loop seemed to help, athough the task manager still shows memory use increasing.

Here is the code run on the raw data (in blanke-nas-1, under Public/Simon/RAW_Data_Cut):

library(forceR)
library(magrittr)
library(dplyr)
library(stringr)
library(purrr)
library(ggplot2)
library(readr)

raw_fold <- "../RAW_Data_Cut"

files <- file.path(raw_fold, list.files(raw_fold, pattern = ".dat"))

for (i in 1:length(files)) {
  convert_measurement(file = files[i], path.data = "./converted_files/")
  gc(verbose = F)
} #Loop crashes R sometimes

convert_fold <- "./converted_files"

con_files <- file.path(convert_fold, list.files(convert_fold))

ampdriftcorr_folder <- "./ampdriftcorr"

for(i in 1:length(con_files)){
  filename <- con_files[i]
  print(filename)
  print(i)
  amp_drift_corr(filename = filename,
                 tau = 9400,
                 res.reduction = 10,
                 plot.to.screen = FALSE,
                 write.data = TRUE,
                 write.PDFs = TRUE,
                 write.logs = TRUE,
                 output.folder = ampdriftcorr_folder,
                 show.progress = FALSE)
  gc()
  print("***********")
} #Loop here also crashes

FroceRcrash
ForceRrun
ForceRrun3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.