Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonster/plx.jl
Julia module for reading Plexon PLX files
https://github.com/simonster/plx.jl
Last synced: about 1 month ago
JSON representation
Julia module for reading Plexon PLX files
- Host: GitHub
- URL: https://github.com/simonster/plx.jl
- Owner: simonster
- License: agpl-3.0
- Created: 2012-12-16T20:20:20.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-01-26T18:05:32.000Z (almost 8 years ago)
- Last Synced: 2024-10-13T19:33:06.119Z (2 months ago)
- Language: Julia
- Size: 29.3 KB
- Stars: 4
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PLX.jl
PLX.jl reads Plexon PLX files in Julia. It is several times faster than the MATLAB SDK provided by Plexon Inc.
## Quick Start
Because PLX.jl loads the entire contents of a given Plexon file into memory, you will want at least as much RAM as your largest Plexon file.
To read a Plexon file:
```julia
load("PLX")
using PLX
plx = PLXFile("/path/to/plexon/file.plx")
```To read a Plexon file without LFPs:
```julia
load("PLX")
using PLX
plx = PLXFile("/path/to/plexon/file.plx", lfps=false)
```To read a Plexon file including spike waveforms:
```julia
load("PLX")
using PLX
plx = PLXFile("/path/to/plexon/file.plx", waveforms=true)
```To access spike times:
```julia
plx.spike_channels[n].units[m].spike_times
```To access encodes and encode times:
```julia
plx.event_channels[257].times
plx.event_channels[257].codes
```To find samples around given time points in a continuous channel, use:
```julia
channel = plx.continuous_channels[n]
channel.data[sample_index(channel.times, index_or_indices)]
```For further documentation of the PLXFile type, read the source or use `idump(PLXFile)`.
## Implementation Notes
PLX.jl relies heavily on the functionality provided by `mmap_array` to read files. I'm not actually sure if this works on Windows. However, it provides a large (~2X) performance boost on Linux.
PLX.jl implements its own object (`SampleTimes`) to handle the timestamps on continuous channels, both to save memory and to optimize searching for sample indices corresponding to specific time points.
Documentation of the PLX format is available on Plexon's [website](http://www.plexon.com/downloads.html), or in PDF form [here](http://hardcarve.com/wikipic/PlexonDataFileStructureDocumentation.pdf).