MyNixOS website logo
Description

The Analysis of Dark Adaptation Data.

The recovery of visual sensitivity in a dark environment is known as dark adaptation. In a clinical or research setting the recovery is typically measured after a dazzling flash of light and can be described by the Mahroo, Lamb and Pugh (MLP) model of dark adaptation. The functions in this package take dark adaptation data and use nonlinear regression to find the parameters of the model that 'best' describe the data. They do this by firstly, generating rapid initial objective estimates of data adaptation parameters, then a multi-start algorithm is used to reduce the possibility of a local minimum. There is also a bootstrap method to calculate parameter confidence intervals. The functions rely upon a 'dark' list or object. This object is created as the first step in the workflow and parts of the object are updated as it is processed.

Dark

Version 0.9.6

To Do

Test scripts

Build Status

Build Status

License

Introduction

This package is being developed at the University of Manchester and is used to analyse data collected in dark adaptation measurements and experiments. The data are collected in the Optometry department of the University of Manchester in the Faculty of Life Sciences. The principal investigator is Dr Ian J Murray, other members of the team include Drs Jeremiah Kelly, Humza Tahir and Laura Patryas.

Data are collected using custom built laboratory devices and computer controlled CRT units. The results are stored usually as text or spreadsheet files. The first part of the workflow is to create a script that retrieves the data and presents it within R in a format that is usable.

The suite of scripts uses a list referred to as a dark object, an initial work through of the data input is shown below. A first GetData... script is shown in GetData.R. This script can be used as a template to create a script specific to your own work.

Acknowledgement

This work presents independent research funded by the National Institute for Health Research Invention for Innovation (NIHR i4i) Programme (ref: II-LB-0712-20001). The views expressed are those of the author(s) and not necessarily those of the NHS, the NIHR or the Department of Health.

Contact

The author of the package can be contacted through jeremiah.kelly at manchester.ac.uk or emkayoh at mac.com.

Getting started

The scripts rely on the generation of a dark object, obj. This is just a list with at least two elements; obj$time and obj$thrs.

Here is a way to do that using copy and paste from a spreadsheet.

Select the time data, then in R type;

obj<-NULL

obj$time<- scan()

then paste and press return.

obj<- NULL
obj$time<- scan()
1: 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
22: 
Read 21 items

repeat for the thresholds

obj$thrs<- scan()
1: 0.1453469 -0.6968675 -1.0072369 -1.0166411 -0.6266554 -0.9923025 -1.1308808 -1.3437734 -1.5006185 -1.5132403 -1.9454982 -2.1601161 -2.3190977 -2.9759416 -2.6118030 -2.6488100 -2.4796138 -3.0221779 -2.8277825 -2.9462043 -3.1657820
22: 
Read 21 items

Finally set the class to dark

class(obj)='dark'

The output should resemble this:

> obj
$thrs
 [1]  0.1453469 -0.6968675 -1.0072369 -1.0166411 -0.6266554 -0.9923025 -1.1308808
 [8] -1.3437734 -1.5006185 -1.5132403 -1.9454982 -2.1601161 -2.3190977 -2.9759416
[15] -2.6118030 -2.6488100 -2.4796138 -3.0221779 -2.8277825 -2.9462043 -3.1657820

$time
 [1]  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20

attr(,"class")
[1] "dark"

email or raise an issue for further help.

Metadata

Version

0.9.8

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows