Difference between revisions of "Gitlab Repository Biofysica"

From biophysics
Jump to navigation Jump to search
 
(97 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
back to [[Programming]]
 
==Description==
 
==Description==
 
The biofysica repository is the main repository written by and used in the Biophysics Department. The code consists mainly of for matlab code for performing experiments and analysing experimental data.
 
The biofysica repository is the main repository written by and used in the Biophysics Department. The code consists mainly of for matlab code for performing experiments and analysing experimental data.
 +
 +
Experiments:
 +
*Sound Localization [[#experiments|experiments]] with TDT System 3 or RZ6
 +
*[[#EEG|EEG experiments]]
 +
*[[#NIRS|NIRS experiments]]
 +
*[[#Audiogram|Audiogram]] (arcMAA) with RZ6
 +
 +
Data analysis:
 +
*[[#Audition|Audition]]
 +
*[[#Bayesian|Bayesian data analysis]]
 +
*[[#Pupillometry|Pupillometry]]
 +
*[[#Reactiontime|Reaction time]]
 +
*[[#Saccade|Saccade  analysis]]
 +
*[[#Spike|Spike analysis]]
 +
 +
Other:
 +
*[[#utilities|utilities]]
 +
 +
N.B. The Matlab files beginning with 'pa_' are developed by '''[https://www.ru.nl/personen/wanrooij-m-van Marc van Wanrooij]''' and are originally part of the Perception and Action Toolbox (PandA).
 +
 +
==How to install the toolbox==
 +
*Download the biofysica toolbox from [https://gitlab.science.ru.nl/marcw/biofysica Gitlab] and save it in C:\Users\MyName\Documents\MATLAB\biofysica
 +
*Add to your startup.m file:
 +
<pre>
 +
addpath('C:\Users\MyName\Documents\MATLAB\biofysica');
 +
init_biofysica;
 +
</pre>
 +
 +
When you are not certain how to use Gitlab you can find more info here: [[Gitlab]].
  
 
==Repository content==
 
==Repository content==
Line 6: Line 36:
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/TDT?ref_type=heads TDT]===
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/TDT?ref_type=heads TDT]===
 
Contains all relevant TDT manuals for ActiveX programming, RZ6, system3 and RPvdsEx programming.  
 
Contains all relevant TDT manuals for ActiveX programming, RZ6, system3 and RPvdsEx programming.  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/TDT/MF1?ref_type=heads MF1]====
 
Contains info about the MF1 speaker kit of tucker davis
 
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/TDT/PM2rRBOXRZ6?ref_type=heads PM2rRBOXRZ6]====
+
*MF1: contains info about the MF1 speaker kit of tucker davis
Contains info about connecting the RBOXRZ6 to the PM2r control port (DB25 digital I/O).
+
*PM2rRBOXRZ6: contains info about connecting the RBOXRZ6 to the PM2r control port (DB25 digital I/O).
 
+
*Users/Marc van Wanrooij: contains some *.rcx files used by Marc van Wanrooij
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/TDT/Users/Marc%20van%20Wanrooij?ref_type=heads Users/Marc van Wanrooij]====
 
Contains some *.rcx files used by Marc van Wanrooij
 
  
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audiogram?ref_type=heads audiogram]===
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audiogram?ref_type=heads audiogram]===
Contains matlab and rcx code for making an audiogram.
+
<span id="Audiogram"></span>
 +
Contains matlab and rcx code for the arcMAA experiment. MAA stands for Minimum Audible Angle. The experiments is done in the NIRS-EEG lab with the speaker arc.
  
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audition?ref_type=heads audition]===
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audition?ref_type=heads audition]===
 +
<span id="Audition"></span>
 
Contains basic and advanced functions for manipulating audiological units and spectra.
 
Contains basic and advanced functions for manipulating audiological units and spectra.
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audition/HRTF?ref_type=heads HRTF]====
+
*HRTF: contains matlab functions for calculating and manipulating head-related transfer functions.
Contains matlab functions for calculating and manipulating head-related transfer functions.
+
*localization: contains matlab functions for localization of stimuli.
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audition/Localization?ref_type=heads localization]====
+
*oldpa: contains older matlab functions from the Panda toolbox.
Contains matlab functions for localization of stimuli.
 
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/audition/oldpa?ref_type=heads oldpa]====
 
Contains older matlab functions from the Panda toolbox.
 
  
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/backwards?ref_type=heads backwards]===
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/backwards?ref_type=heads backwards]===
Line 31: Line 56:
  
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis?ref_type=heads bayesdataanalysis]===
 
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis?ref_type=heads bayesdataanalysis]===
 +
<span id="Bayesian"></span>
 
Contains matlab scripts for bayesian data analysis based on programs for use with the book:
 
Contains matlab scripts for bayesian data analysis based on programs for use with the book:
  
Line 37: Line 63:
 
The codebase also includes code from JAGS (Just another Gibbs sampler ), which is a program for simulation from Bayesian hierarchical models using Markov chain Monte Carlo (MCMC), developed by Martyn Plummer
 
The codebase also includes code from JAGS (Just another Gibbs sampler ), which is a program for simulation from Bayesian hierarchical models using Markov chain Monte Carlo (MCMC), developed by Martyn Plummer
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/NHST?ref_type=heads NHST]====
+
*NHST: contains matlab script bayesfactor.m
Contains matlab script bayesfactor.m
+
*anova: contains matlab scripts for ANalysis Of VAriance (ANOVA)
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/anova?ref_type=heads anova]====
+
*binomial: contains matlab scripts for binomial analysis
Contains matlab scripts for analysis of variance (anova)
+
*correlation: contains a matlab script for Pearson Correlation
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/binomial?ref_type=heads binomial]====
+
*diagnose: contains matlab scripts for Markov Chain Monte Carlo (MCMC) diagnostics
Contains matlab scripts for binomial analysis
+
*functions: contains matlab script for several useful functions
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/correlation?ref_type=heads correlation]====
+
*psychophysics: contains matlab scripts for analysing psychometric functions (curves)
Contains a matlab script for Pearson Correlation
+
*regression: contains matlab scripts for regression analysis
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/diagnose?ref_type=heads diagnose]====
+
*reparametrization: contains matlab scripts for %todo
Contains matlab scripts for Markov Chain Monte Carlo (MCMC) diagnostics
+
*statistics: contains matlab scripts for calculating summary statistics.
 +
*HDI: contains matlab scripts for calculating Highest Density Intervals (HDI)
 +
*utilities: contains matlab scripts for several utility functions used in the bayesian data analysis code.
 +
 
 +
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/eeg?ref_type=heads eeg]===
 +
<span id="EEG"></span>
 +
Contains two EEG demos (AM tones and Oddball) with matlab code and RZ6 circuits (RPvdsEx files).
 +
 
 +
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/experiment?ref_type=heads experiment]===
 +
<span id="experiments"></span>
 +
Contains Matlab and other files for experiments and for controlling devices. See [[Gitlab Repository Biofysica/experiment]].
 +
 
 +
*Experiments: SpherePrime, SphereTTL, SphereMinor, NewSpherePrime, SLIMS, arcMAA, ripple_prt_experiment, Experiment generator (Exp), psychoILD, HRTF, EEG
 +
*Devices: Panasonic PLC Led controller, DCN-LED Led controller, Panasonic Servomotors, Pupillabs
 +
*Other: BIOX toolbox, HDF5 toolbox, Ini-file toolbox, FileIO utilities, IP utilities, Modbus utilities, Mewtocol utilities, LSL utilities
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/functions?ref_type=heads functions]====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/init.d?ref_type=heads init.d]===
Contains matlab script for several useful functions
+
Contains Matlab initialization code. Maintained by Günter Windau.
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/psychophysics?ref_type=heads psychophysics]====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/liblsl?ref_type=heads liblsl]===
Contains matlab scripts for analysing psychometric functions (curves)
+
Contains LSL (LabStreamLayer) code. Maintained by Günter Windau.
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/regression?ref_type=heads regression]====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/nirs?ref_type=heads nirs]===
Contains matlab scripts for regression analysis
+
<span id="NIRS"></span>
 +
Contains NIRS related Matlab files and a NIRS analyse document.
 +
*basics: contains Matlab files for fnirs hemodynamics
 +
*layout: contains EEG *.lay files and *.xml optode template files.
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/reparametrization?ref_type=heads reparametrization]====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/plot?ref_type=heads plot]===
Contains matlab scripts for %todo
+
Contains Matlab code for advanced plotting of figures and graphs
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/statistics?ref_type=heads statistics]====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/pupillometry?ref_type=heads pupillometry]===
Contains matlab scripts for calculating summary statistics.
+
<span id="Pupillometry"></span>
 +
Contains Matlab code for pupillometry measurements.
  
=====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/statistics/HDI?ref_type=heads HDI]=====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/reactiontime?ref_type=heads reactiontime]===
Contains matlab scripts for calculating Highest Density Intervals (HDI)
+
<span id="Reactiontime"></span>
 +
Contains Matlab files for calculating reciprobit plots of saccadic latencies.
  
====[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/bayesdataanalysis/utilities?ref_type=heads utilities]====
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/saccade?ref_type=heads saccade]===
Contains matlab scripts for several utility functions used in the bayesian data analysis code.
+
<span id="Saccade"></span>
 +
Contains Matlab code for Saccade analysis. Part of PANDA toolbox by Marc van Wanrooij.
  
===eeg===
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/spike?ref_type=heads spike]===
====RPvdsEx_demo====
+
<span id="Spike"></span>
=====AMtones=====
+
Contains Matlab code for spike analysis for neuro-physiological experiments. Part of PANDA toolbox by Marc van Wanrooij.
Contains two MATLAB file and two *.rcx files for headphone experiments.
 
======Screenshots_circuit_files======
 
Contains screenshots of circuit_files for headphone experiments.
 
======expblock======
 
Contains *.mat files for headphone experiments.
 
=====PM2rRBOXRZ6=====
 
Contains simple RBOXRZ6 response, channel select and sound output circuit.
 
======Screenshots_circuit_files======
 
Contains screenshots of the circuit files/
 
=====odd_ball_Katharina=====
 
  
===experiment===
+
===[https://gitlab.science.ru.nl/marcw/biofysica/-/tree/master/utilities?ref_type=heads utilities]===
===init.d===
+
<span id="utilities"></span>
===liblsl===
+
Contains general functions:
===nirs===
+
*Colors: get color codes from names in English, German, Dutch and Spanisch. See [[Colors in Matlab]].
===plot===
+
*Coordinates: coordinate functions, coordinate classes and coordinate transformations. See also[[Coordinate systems]].
===pupillometry===
+
*DSP: Signal processing: filters, power, smooth
===reactiontime===
+
*FileIO: file utilities
===saccade===
+
*Graphics: graphics utilities
===spike===
+
*Python: utilities for python installation and use in Matlab.
===utilities===
+
*RL_utilities: a diverse set of utilities programmed by Ruurd Lof
 +
*Statistics: utilities for statistics
 +
*Text: function for finding strings in a textcellarray
 +
*Tutorials: How2 examples of all kinds of data analysis

Latest revision as of 12:24, 23 September 2024

back to Programming

Description

The biofysica repository is the main repository written by and used in the Biophysics Department. The code consists mainly of for matlab code for performing experiments and analysing experimental data.

Experiments:

Data analysis:

Other:

N.B. The Matlab files beginning with 'pa_' are developed by Marc van Wanrooij and are originally part of the Perception and Action Toolbox (PandA).

How to install the toolbox

  • Download the biofysica toolbox from Gitlab and save it in C:\Users\MyName\Documents\MATLAB\biofysica
  • Add to your startup.m file:
addpath('C:\Users\MyName\Documents\MATLAB\biofysica'); 
init_biofysica;

When you are not certain how to use Gitlab you can find more info here: Gitlab.

Repository content

The repository has several directories:

TDT

Contains all relevant TDT manuals for ActiveX programming, RZ6, system3 and RPvdsEx programming.

  • MF1: contains info about the MF1 speaker kit of tucker davis
  • PM2rRBOXRZ6: contains info about connecting the RBOXRZ6 to the PM2r control port (DB25 digital I/O).
  • Users/Marc van Wanrooij: contains some *.rcx files used by Marc van Wanrooij

audiogram

Contains matlab and rcx code for the arcMAA experiment. MAA stands for Minimum Audible Angle. The experiments is done in the NIRS-EEG lab with the speaker arc.

audition

Contains basic and advanced functions for manipulating audiological units and spectra.

  • HRTF: contains matlab functions for calculating and manipulating head-related transfer functions.
  • localization: contains matlab functions for localization of stimuli.
  • oldpa: contains older matlab functions from the Panda toolbox.

backwards

Contains only the script loadtdt.m that reads a *.tdt file. It is no longer used.

bayesdataanalysis

Contains matlab scripts for bayesian data analysis based on programs for use with the book:

Kruschke, J. K. (2015). Doing Bayesian Data Analysis

The codebase also includes code from JAGS (Just another Gibbs sampler ), which is a program for simulation from Bayesian hierarchical models using Markov chain Monte Carlo (MCMC), developed by Martyn Plummer

  • NHST: contains matlab script bayesfactor.m
  • anova: contains matlab scripts for ANalysis Of VAriance (ANOVA)
  • binomial: contains matlab scripts for binomial analysis
  • correlation: contains a matlab script for Pearson Correlation
  • diagnose: contains matlab scripts for Markov Chain Monte Carlo (MCMC) diagnostics
  • functions: contains matlab script for several useful functions
  • psychophysics: contains matlab scripts for analysing psychometric functions (curves)
  • regression: contains matlab scripts for regression analysis
  • reparametrization: contains matlab scripts for %todo
  • statistics: contains matlab scripts for calculating summary statistics.
  • HDI: contains matlab scripts for calculating Highest Density Intervals (HDI)
  • utilities: contains matlab scripts for several utility functions used in the bayesian data analysis code.

eeg

Contains two EEG demos (AM tones and Oddball) with matlab code and RZ6 circuits (RPvdsEx files).

experiment

Contains Matlab and other files for experiments and for controlling devices. See Gitlab Repository Biofysica/experiment.

  • Experiments: SpherePrime, SphereTTL, SphereMinor, NewSpherePrime, SLIMS, arcMAA, ripple_prt_experiment, Experiment generator (Exp), psychoILD, HRTF, EEG
  • Devices: Panasonic PLC Led controller, DCN-LED Led controller, Panasonic Servomotors, Pupillabs
  • Other: BIOX toolbox, HDF5 toolbox, Ini-file toolbox, FileIO utilities, IP utilities, Modbus utilities, Mewtocol utilities, LSL utilities

init.d

Contains Matlab initialization code. Maintained by Günter Windau.

liblsl

Contains LSL (LabStreamLayer) code. Maintained by Günter Windau.

nirs

Contains NIRS related Matlab files and a NIRS analyse document.

  • basics: contains Matlab files for fnirs hemodynamics
  • layout: contains EEG *.lay files and *.xml optode template files.

plot

Contains Matlab code for advanced plotting of figures and graphs

pupillometry

Contains Matlab code for pupillometry measurements.

reactiontime

Contains Matlab files for calculating reciprobit plots of saccadic latencies.

saccade

Contains Matlab code for Saccade analysis. Part of PANDA toolbox by Marc van Wanrooij.

spike

Contains Matlab code for spike analysis for neuro-physiological experiments. Part of PANDA toolbox by Marc van Wanrooij.

utilities

Contains general functions:

  • Colors: get color codes from names in English, German, Dutch and Spanisch. See Colors in Matlab.
  • Coordinates: coordinate functions, coordinate classes and coordinate transformations. See alsoCoordinate systems.
  • DSP: Signal processing: filters, power, smooth
  • FileIO: file utilities
  • Graphics: graphics utilities
  • Python: utilities for python installation and use in Matlab.
  • RL_utilities: a diverse set of utilities programmed by Ruurd Lof
  • Statistics: utilities for statistics
  • Text: function for finding strings in a textcellarray
  • Tutorials: How2 examples of all kinds of data analysis