Search for a command to run...
Description of the code & data Here are the code and data associated to the manuscript "Correlations between rare events due to long-term memory". FOLDER « Code-for-generating-data »contains the code (in the C language) used to generate the data. Subfolders contain « Passive-process » and « Active-process ». The code generates exact sampling of the trajectories at equally spaced sampling times. To compile the code, use the following command lines: 1. To generate data for “first passage times”, use the command line: gcc -lm functions.c ScriptGenerateAndAnalyze.c -lgsl -lgslcblas Note that the above function also generates data for the last passage times which however is not described in this paper. 2. To generate data for “first passage and second passage times”, use the command line: gcc -lm secondpassagefunctions.c ScriptGenerateAndAnalyzeForSecondPassage.c -lgsl -lgslcblas The files « slurm_mcia.sh » are used to launch the C codes. Three parameters are specified, their meaning is as follows:* m is a positive integer, such that the number of sampled times t_i in the trajectories is 2^m. * tmax is the maximal time of the simulation, hence the time step will be tmax/2^m. * H is the Hurst exponent, related to alpha by alpha=2H for passive process, and alpha=2-2H for the active process Upon launching the C-program, several trajectories are generated, and the first passage times and second passage times are measured and saved in a file with automatically generated name. Note that, before launching the C-program, it is necessary to generate the correlation functions. This is done by using the Matlab program « write.m », which generates a « .txt » file containing the covariance function phi at the sampled times t_i for given values of m,tmax,H. This Matlab file calls auxiliary functions to calculate Mittag-Leffler (for the passive process) and Kummer function (for the active process). FOLDER Matlab-codes-to-analyze-data This folder contains the data and also the matlab codes used to analyze the data and generate the figures of the paper. Subdirectories indicate either the codes are for passive or active processes. Subdirectories « For-FPT-data » and « For-FPT-SPT-data » indicate whether the data refer to the problem of measuring the properties of first passage times (FPT) or those of FPT and second passage times (SPT). The subdirectories « Data » contain the data file, basically for each parameter a file contains several lines, each line corresponding to the output of the analysis of one trajectory. In each case the matlab « Data.m » is a function that can be used to extract the list of FPTs, SPTs, etc from the data files. One also provides files whose name begins by « scripts_… », these are matlab script files which were used to generate the figures of the paper.