Updates, additions and fixes
Current stable version: v0.28 (main downloads page)
v0.29 (not-yet-released )
-
fixed
stratify-by-phase
output to avoid double-couting -
added
bins
options toS2A
andbins-label
- givenbins=min,max,n
to maken
bins of equal span, to make annotsB1
,B2
, etc...Bn
(orbins-label
instead ofB
) -
added
REC_DUR_SEC
andREC_DUR_HMS
inHEADERS
which used to beTOT_*
. Now,TOT_DUR_SEC
andTOT_DUR_HMS
reflect the full duration, including any gaps (i.e. if EDF+D) -
RESAMPLE
has a newdownsample
argument; only channels with rates above thesr
value -
can now correctly take
.edfz
and.edf.gz
file on the command line (versus a sample list) -
SPINDLES
and phsae-coupling -
PEAKS
now output annotatons (annot
) as well as cache; can includew
to add window (sec) around each point -
upgraded Eigen library to 3.4.0
-
upgraded to sqlite library v3.41.2
-
added
EDGER
tool: (slides/ for opts) -
added
ngaus
option toFILTER
to implement narrow-band filter via a frequency-domain Gaussian (parameters: frequency domain central mean and FWHM of the Gaussian,ngaus=11,2
)
v0.28 (10-Apr-2023)
Moonlight
-
new interactive Moonlight viewer (public demostration host: http://remnrem.net)
-
extended tutorial that uses Moonlight to recapitulate the prior Luna/lunaR tutorials
Vignettes
-
new vignette on merging EDFs and working with EDF+D files
-
new vignette on how Luna expects time/date information in annotation files
Major new functionality
-
new
FREEZE
andTHAW
commands to make and revert to prior snapshots of the in-memory dataset -
new
TABULATE
option to summarize channels with discrete sets of values, e.g. body position -
new
MOVING-AVERAGE
command -
major improvements to
--merge
which can now handle gaps between consecutive files and will generate EDF+Ds -
new
add
option forMTM
to generate a new signal (with the same sample rate as the original); also,MTM
now outputs estimates of the spectral slope as well asPSD
andIRASA
. -
new
SET-TIMESTAMPS
utility command -
new
annot
option for theSEGMENTS
command; as demo'ed in this vignette, it is useful when making standard EDF from EDF+D files -
for
WRITE-ANNOTS
we now make as defaultno-specials=T
; i.e. add optionsspecials
instead ofno-specials
; and likewiseheaders
fromno-headers
. We've also addeddhms
andminimal
options. -
added
impulse
option to [SIGGEN
]( (T,A,D) andadd
not clear; makes new channle, or updates/replaces an existing one. -
new
REMAP
command to perform annotation remapping on _already-loaded_x data; -
new
EXE
optionrepresentative
to extract K examplar epochs via a clustering heuristic based on permutation distribution clustering
Minor changes/additions
-
added
starttime
andstartdate
command-line special variables to force EDF header changes (prior to attaching annotations) -
new
anon=T
special variable to set EDF headers to null values upon loading; this is similar to runnongANON
, althoughANON
allows a few extra options); as withstarttime
andstartdate
, this setting is enacted before attaching annotations (i.e. and so can influence how annotations are aligned) -
added support for dates in annotation files, e.g. dd-mm-yyy-hh:mm:ss, as illustrated in this vignette
-
added the
pct
option toSTATS
to avoid calculation of percentilespct=F
. Alsomin=T
will only give the mean. -
SOAP
now respects lights on (L
) epochs, i.e. unlike for missing (?
) epochs, it completely excludes them -
new
offset
option forWRITE-ANNOT
-
Luna now gives a warning message to the console if looking at an etnire signal (e.g. from
FILTER
) but some epochs are masked - i.e. as this means that those epochs will be included in that step (if not runningRE
beforehand to remove them) -
added
annot
feature toDUMP-MASK
to create annotation based on the mask (as well asoutput=F
andannot-unmasked=T
) -
added
file
option toRENAME
- takes a file of tab-delimited old/new channel name pairs instead ofsig
/new
from the command line -
added the
xbg
option to specify intervals to excise certain intervals from the background inOVERLAP
-
offset
option ofEPOCH
can now take hh:mm and hh:mm:ss arguments, as well as elasped seconds -
now gives an error if specified filename for a new EDF file (e.g. from
WRITE
) is the same as the input EDF. (This was allowed previously, but could cause problems and lead to corrupt outputs...) -
anchor
argument forSPINDLES
to specify between -1 and +1 for spindle start stop (0 = midpoint) for SO-coupling analysis. If not specified, default is the point of maximal CWT (i.e. typically, but not necessarily near the middle);offset=0.1
(-N ro +N seconds, default = 0) adds offset to above anchor for SO-coupling, i.e. can be combined withcouple
, i.e. look at SO phase and overlap 0.2 seconds before the start of a spindle; Gives newANCHOR
strata in output for coupling analyses. Can specify multiple anchor/offsets. -
EEG microstates
--label-maps
command now outputsand (will) add a message if match is not highest correl SPCID KT FLIP K1 MAPPED SPC . D 0 1 1 0.994548052142096 . C 0 2 1 0.972204262924326 . A 0 3 1 0.988131018834142 . B 0 4 1 0.996294406621555
OPTIMAL == 0
-
also, it now allows to matching on the minimum sum
(1-r)^p
wherep = 2
by default; this is now also the default stat forcompare-maps
(perm.) tests; addedverbose
option for info to the log -
for EEG microstate analysis, added a
grouped
option to allow A/a --> 'A' two-group mappings (i.e. case-invariant analysis, if K = 4 + 4 = 8
Misc. fixes
-
HYPNO
now outputs proper epoch time, i.e. if used EPOCH align so that epochs are not starting from 0; (as is, it assumes epoch 1 starts at 0 sec); also note thatMINS
is the elapsed time since epoch #1, not necessarily EDF start under these conditions -
annotation class/instance delimiter has been changed to have a default value of
:
(rather than/
as before) -
NSRR automatic-remapping is now turned off by default: enable with
nsrr-remap=T
; addedannot-remap
to separately control remapping of stage annotations -
automatic sanitization of annotation labels is now on by default
-
changed behavior of
keep-spaces
andsanitize
to be similar for both channel and annotation labels; also, labels are now always trimmed on both whitespace and sanitized insert character (underscore by default) -
stopped the
HEADERS
command from writing out EDF Annotation channels -
changed lunaR to attach EDF+ annotations on attaching an EDF+
v0.27 (27-Sep-2022)
In addition to multiple smaller fixes and modifications, this release contains a number of major new additions including: 1) revised macro-architecture summary statistics, 2) the SOAP and POPS tools for automated prediction/evaluation/manipulation of sleep stages, 3) new tools for assessing temporal coupling of annotation events, and 4) new signal processing tools including IRASA. Major changes are noted below:
Macro-architecture
-
revised and expanded hypnogram summary metrics, and improved documentation for the
HYPNO
command including: bout number/duration metrics, better incorporation of lights out markers, a heuristic to handle excessive leading/trailing WASO, revised calculation of total persistent sleep time (nowTST_PER
), renamed sleep efficiency/latency (SE
,SME
andSOL
), added final wake time (FWT
). -
added a new
annot-cycles
option forHYPNO
, to add an annotation indicating which NREM cycle an epoch belongs to -
fixed an issue when
HYPNO
is called twice on the same EDF -
added
first
(mins) andfirst-anchor
(T0
,T1
orT2
) options, to report hypnogram stats for only the first N minutes (setting the rest toL
) -
fixed a bug impacting some of the elapsed time metrics from
HYPNO
(E_*
etc) if the recording started at or after midnight -
added and documented the new
SOAP
,REBASE
andPLACE
stage evaluation/manipulation commands -
added a new automated staging command:
POPS
- POPulation-based Staging that implements a flexible syntax for model specification. Internally, POPS uses Microsoft's popular open-source C/C++ LightGBM library for machine learning -
Internal: have depreciated the older (but still experimental) SUDS stager; previously, we had added some new features, including a canonical correlation based routine.
Data manipulation/handling
-
major new implementation and syntax for the
CANONICAL
command -
new
SET-HEADERS
command to directly edit EDF header values -
new
ENFORCE-SR
command -
new
fix-edf
option, to allow (i.e. ignore) truncated final records of a trivially corrupted EDF -
new
--merge
command to aggregate multiple EDFs -
the
--repath
utility now accepts.
as first character, meaning always append the second argument if (and only if) the sample list has a relative path -
new
SET-VAR
command to set individual-level variables from within a script -
new
RENAME
command to rename channels (unlike signal aliases, this command can accept variables) -
HEADERS
now outputsSTOP_TIME
-
added
pairwise
option toREFERENCE
-
new
RECTIFY
command -
new
REVERSE
command
Micro-architecture/signal processing
-
new
IRASA
command, to implement Irregular-Resampling Auto-Spectral Analysis -
new prototype/alpha implementation of detrended fluctuation analysis via the
DFA
command -
added Petrosian fractal dimension and permutation entropy (
pe
, withpe-m
andpe-t
options) toSIGSTATS
-
new prototype
ASYMM
command to evaluate (stage-specific) (regional) asymmetries (e.g. inter-hemispheric differences) in derived signal metrics -
new
Z-PEAKS
command to make annotations based on peak finding in signals -
added
segment-median
andsegment-sd
toPSD
-
added
precomputed
function toSPINDLES
-
added
ch-median
ch-epoch
ch-spatial-threshold
ch-spatial-weight
toCORREL
, which now also prints out disjoint sets of "high corr" channels (CHS
) -
added
OTSU
and--otsu
commands; changed Otsu implementation -
added the
--ftt
command -
added the
same-channel
option forTLOCK
to constrain output for whenCH
==sCH
Annotations
-
new
OVERLAP
command to evaluate enrichment of overlap/locality of annotations, in both single- and multi-sample contexts; it can also produce new annotations based on overlap with other annotations -
added the
collapse
argument forWRITE-ANNOTS
which can be used with an EDF+D if an EDF will be output (i.e. changes the times as if collapsing discontinuities) -
currently largely for internal development use, a new
A2C
command to convert sample points (ints) in annotation meta-data to a cache store -
EPOCH align
now works for EDF+D - will align the first epoch at the start of each segment, i.e. still assuming uniform epochs after that (within each segment) -
skip-edf-annots
now still reads time-track for EDF+D fromEDF Annotations
channels -
added the
numeric-inst
argument toA2S
, to set a signal to a numeric-valued instance ID (i.e. not just 0/1) -
when creating a set of epoch-level sleep stages, Luna will automatically detect if the stage annotation are 0-duration change-points (as is often the case in EDF+ stage annotations) and will extend those new signals up until the next stage annotaiton encountered (or the end of the recording)
-
alternatively, unless
assume-stage-duration=F
, if sleep stages have 0 duration (e.g. markers for change) assume they have the default epoch duration length (currently only for EDF+ embedded annotations) -
added the
add-ellipsis
option (for zero-duration annotations) -- this impactsWRITE-ANNOTS
.annot
format files only -
for EDF+ annotations, added
edf-annot-class
special variable, to make these annots classes (instead ofedf_annot_t
instanes) e.g.edf-annot-class=N1,N2,N3,R,W
Microstate analysis
-
the EEG microstates command
MS
has a neww
argument for--kmer
analysis, which performs local shuffling of microstate sequences (i.e. only within N states) -
the microstate
--kmer
command will now automatically splice out?
states, and reduce adjacent states to one e.g.AAA??AABBBCCC
->ABC
-
a new
--label-maps
command assign labels for a microstate mapsol
file, given a labelled canonical/templatesol
file (template, file, new) -
new
--cmp-maps
command to test for differences between maps, either at the group or individual (one versus all others) level, using a permutation procedure -
new
--correl-maps
to print spatial correlations for a map (from a text file)
Misc
-
added
--options
command to allow command-line functions to take args either from stdin OR from command line args (following --options) -
changed parameter parsing to include added signals when no
sig
specified (i.e. match all) in the case whensig
was specified as an initial, top-level special variable -
param files have
+group
and-group
flags. // +group include only if matches group, otherwise skip // -group exclude if matches group, otherwise parse -
IF
andIFNOT
(orENDIF
/FI
) -
fixed bug in within-record interval offset calculation for EDF+D when gaps present that are fractions of a record duration (i.e. and so record start time-points are no longer multiples of the EDF record size)
v0.26 (29-Nov-2021)
New functionality
-
TRANS
supports arbitrary transformations of signal data -
SIMUL
simulates time-series data given a power spectrum -
FFT
performs basic discrete Fourier transform (DFT) via the FFT -
HEAD
shows one epoch of data (requires same SR for selected channels) -
ZC
mean-centers signals, andROBUST-NORM
performs robust normalization (by median & IQR) -
upated the
EMD
(empirical mode decomposition) command -
--repath
convenience sample-list function -
prototype
ALTER
command to perform reference-channel, regression-based artifact removal -
peaks
andslope
options forPSD
andMTM
-
REBASE
, which adopts theSOAP
framework to (probabilistically) re-estimate sleep stages using a different epoch duration (e.g. to translate from 20-second manually scored datasets to 30-second epochs) given a) manual staging in the original epoch duration, and b) one or more signals (i.e. EEG) that are expected to encode sleep stage information well (i.e. have a high kappa from the originalSOAP
command).
Annotation format modifications/extensions
-
.annot
format now allows key=value meta-data to be specified; also, you can have fewer meta-data terms than expected (but not more), assuming order is as header; all fields still are required to be in the header; now WRITE-ANNOTS always writes meta-data as key=value pairs -
new
+
and-
options to turn on/off @includes (e.g.alias
,remap
); note, the variable must be specified before the relevant @include on the command line, i.e. as command-line arguments are processed in left-to-right order -
added a check for pipe (
|
) characters in annotation primary names (in aremap
) -
annotation times can now include AM/PM modifiers (otherwise assumes 24-hour clock)
-
new
annot-whitelist
option, such that annotations are only accepted if they appear in theremap
list (either as aliases or primaries); -
new
annot-unmapped
option to skip if the annotation is on the whitelist (i.e. complement of behavior withannot-whitelist
alone) -
if remapping an annotation to
ABD/DEF|XYZ
form (i.e. with a/
delimiter) then for the classXYZ
, it is set toABC
and instance ID is set toDEF
. If there was an existing instance value (non-null), a text meta-tag of_inst=
is added. The delimiter character can be changed from/
withclass-inst-delimiter=X
(although this only works for annot files currently, and is not generally recommended, i.e. as sanitization of labels respects/
for annotations, etc) -
added
combine-annots
option to merge class and instance identifiers. It accepts a character argument but is_
by default ); this sets the annotationclass
toclass_inst
(and setsinst
to '.' ) -
added the
skip-sl-annots
option to skip all SL-attached annotations; i.e. if wanting to only load annotations from an alternate, explicitly referenced annot file -
added the
interval
option to theEVAL
command, to generate new interval-level annotations based on eval expressions
EEG microstates
-
MS
has newadd-spc-sig
option to add spatial correlations as new EDF channels (instead of 0/1 binary variable, as peradd-sig
) -
MS
has newcanonical
option to specify a file definining canonical microstates -
MS
solutions now always have a header row; you cannot extract based on sol=file,A,B,C,D; also, 'unassigned' states are labeled 1,2,3, etc not A,B,C,... -
new
--cmp-maps
command to compare (spatial correlation) EEG microstates -
--kmer
command takes optionsreq-len
(only analyse first N sequences) andindiv-enrichment
Other fixes, minor modifications and new features
-
added ability to specify an empty EDF (
--nr
,--rs
and filename equals '.' ) -
added 1st, 2nd, 5th and 10th percentiles to
STATS
-
added transition frequency to slow oscillation output (
SPINDLES
,SO
) -
fixed bug in
flanked
mask option (e.g.flanked=W,1
) -
made
CANONICAL
definition file format more flexible: 1) it now allows whitespace, not just tab-delimitation; 2) only the first three fields are required now; if not given, the latter fields/columns will be set to.
; 3)CANONICAL
now respects the order of canonical signals (i.e. rather than processing things alphabetical); this allows multi-stage definitions, e.g. to first mapS1
, thenS2
, and then apply a rule such asS3 = S1 - S2
. -
eval syntax takes
{
and}
instead of'
to delimit strings; it allows nesting, but can also be handy on the command line (i.e. if already using-s ''
form) -
added
drop
andkeep
options to thePSC
command -
added
import=file.txt
command toCACHE
to read from destrat output; can takefactors
andv
param (as well as requiredcache=
) -
added
MASK epoch=all
to set a MASK but have it all empty ; i.e. to trim records not in an epoch -
(for .annot only) added
align
option : given list of annots (or *) for all, align-annots-on=N1,N2, etc... if not specified, find first instance of this annot, then align with 1 second boundary (oralign-annots-res=X
if given) align /all/ annots with this offset (bound at 0); i.e all records beforehand will be skipped if subsequentMASK
/WRITE
commands are applied -
added
pick
option toSIGNALS
to pick first of pick=a,b,c that is present, and drop the rest; can map with 'rename' to rename the pick -
allow sample-lists to have a comma-delim list of annotations, or '.' to denote no data; in this way, we can have a fixed width sample list (i.e. three tab-delimited columns), making it easier to parse (case in point: lunaR
lsl()
was broken if fewer than 3 columns were found after first five rows, reflecting how Rread.table()
works) -
CANONICAL
does not now need an explicit GROUP to be specified; the file must still have a first col, it is just ignored now; also, new 'drop-originals' option to drop all original (non-CANONICAL) signals after making the new signals; matches case-insentive -
changed
epoch-check
to accept number of.eannot
epochs that are different from expected; default is 5; only stops is absolute greater than this; otherwise writes warning to log; i.e. set to 0 for an exact match -
CONTAINS
can now skip to the next EDF (rather than alter the return code), if the optionskip
is given -
check for whether an ID contains the ID-wildcard character (by default, ^) and reports an error if it does; added the
wildcard
option to specify an alternate character
v0.25.5 (24-May-2021)
Major new functionality
-
Major changes to the epoch-wise artifact detection via
SIGSTATS
, which is now implemented via theCHEP-MASK
andCHEP
commands, as illustrated in this vignette -
Significant speed improvements for spectral analyses (
PSD
and especiallyMTM
) and other (e.g.PSC
,SUDS
,ICA
,CPT
) commands through code refactoring, tweaking our use of FFTW and the incorporation of the Eigen matrix library -
A beta-version of our new Luna-powered NAP (NSRR Automated Pipeline) cloud-based portal, described here, and available for testing from this URL http://remnrem.net/nap/ populated with public Sleep-EDF dataset.
-
Principal spectral components analysis via the
PSC
command -
Phase slope index connectivity via the
PSI
command -
Epoch-wise spherical spline interpolation via the
INTERPOLATE
command -
Independent components analysis via the
ICA
andADJUST
commands -
EEG microstate analysis via the
MS
command -
Time-series clustering of epochs and/or channels via the
EXE
command -
Cluster-based non-parametric linear models for association analysis via the
CPT
command
Other new commands/functionality
-
added
DUPES
command to find flat signals and digital duplicates -
Added
cache-metrics
options forPSD
,MTM
,COH
,PSI
,SPINDLES
andSO
(i.e. primarily for use with thePSC
command) -
SO
caches negative peaks (with thecache
option) -
New
MEANS
command to give signal means conditional on annotations -
New special variables describing topographical EEG 64-channel groups, e.g.
${anterior}
,${midline}
, etc, -
Find peaks in signals and subsequently produced peak-locked averages across other channels, via the
PEAKS
command and theTLOCK
command -
Cross-correlation and phase synchrony metrics, via the new
TSYNC
command -
New
A2S
andS2A
commands to convert anntotations to binary EDF signals channels, and vice versa -
Restructure EDFs to align records, annotations and epochs via the
ALIGN
command -
Added the
EDF
command to convert EDF+C and EDF+D to standard EDF -
Added the
LINE-DENOISE
command, using spectrum interpolation to reduce line noise -
Added the
SEDF
command to produce thumbnail-like summary EDFs (to be used in future NAP iterations) -
Added a simple
SIGGEN
command to generate test signals (currently only sine waves) -
Added the
CONTAINS
command that indicates (via Luna's exit code) whether one or more signals are present in the EDF (i.e. helps guide programmatic driving of Luna pipelines, to be used in future NAP iterations) -
new output/options for the
HYPNO
command: 1) stage transition counts and probabilities, withPRE
andPOST
factors; also with conditional probabilitiesP_PRE_COND_POST
andP_POST_COND_PRE
; 2) it now outputs epoch-level stage transition information in full and with different naming scheme:TR_NR2REM
, etc andTOT_NR2REM
. 3)FLANKING_MIN
andFLANKING_ALL
instead ofFLANKING_SIM
; 4) optionflanking-collapse-nrem
(default T), i.e. flank based on any NREM stage (1, 2 or 3) 4) optionreq-pre-post
, to only consider stage transitions that haveFLANKING_ALL
>=x
for thePOST
stage; defaults to 4 (2 mins). Added 'CONF' andOTHR
outputs.
Minor modifications/fixes
- the
epoch
argument ofMASK
acceptsend
as the final epoch number -
added the
force-edf
andEDF+D
options toWRITE
to force writing as EDF (or EDF+D); this command also now properly supports EDF+C, EDF+D files properly (e.g. in how the EDF start time is changed, etc) -
one can now add generic canonical signals via
CANONICAL
; it will not change theSR
if set to missing (.
); the canonical signal definition now includes units -
channel types now include specific reference and independent component types; further, channel type variables are now automatically updated after adding new channels (e.g. added
IC
to types; when channels added, now they are typed (i.e. the variable is updated by any commands that add channels, ICA --> ${ic} will be available afterwards to match on IC_1, IC_2, etc). -
we now allow
.eannot
to be attached with EDF+C but not EDF+D files -
SPINDLES
now has anannot
function to generate an internal annotation track (which should be used byWRITE-ANNOTS
but can also be used by, e.g.TLOCK
, etc. The oldftr
format is now retired. -
all commands that use epoch-level sleep stages (
SOAP
,HYPNO
,STAGE
, etc) will note if an epoch has multiple spanning stage annotations (i.e. which might happen if stages and epochs are not temporally well-aligned); it now reports tjeCONF
variable describing the overlap -
fixed an issue in selecting ranges when annotations do not align with sample points (fixed for continuous EDFs; need to check whether EDF+D requires additional tweaks)
-
added the
epoch
option toHYPNO
, which now give less verbose output by default -
added
offset
andalign
toEPOCH
-
added
annot
output for theSOAP
command -
added a
regional
MASK which masks epochs surrounded by masked epochs -
added
annot
,hms
andno-specials
options toWRITE-ANNOTS
-
added date-time support for annotations (in clocktime_t) and
dhms
flag forWRITE-ANNOTS
-
added test for non-integer sample rates
-
now the
HEADERS
command respects thesig
option; also, some changes to variable output names -
fixed the
mkdir
system call duringWRITE
for the Windows platform -
the
ANON
command now conforms with EDF+ specifications for the null ID -
added the
root
option to theANON
command, to specify "dummy" IDs, in the formroot_N
whereN
is 1, 2, 3, etc. As theN
count is always from 1 for a given run of luna, this can be inconvenient if splitting a sample-list and running in parallel: thus theids
option as above is also given. -
added the
ids
command-line option to supply an ID mapper [ old -> new , tab-delim file ]; this can be used with theANON
to set the EDF header IDs -
--build
has an option to add quotes around file paths if they contain spaces -
the
CLOCS
command now has an optionverbose
, to dump pairwise channel distances -
multiple changes to the
.annot
file format: allow durations (+seconds); allow hh:mm:ss elapsed time (0+hh:mm:ss offsets); allow fractional seconds in hh:mm:ss specfication; added channel labels and six-column format (but allowing reduced 3-col and 4-col formats for backwards compatibility); headers now optional; allow space/tab or tab-only delimiters; fixed an off-by-one-time-point glitch with clocktime specification; now fully allow 0-duration annotations [a,a); allow...
in the stop field to read until the start of the next; in all imports, times are scalled to 1/1000th second resolution to avoid floating-point nastiness to cause too much trouble; addedsep-dp=N
option to control the decimal place in.annot
outputs; -
added
fac
instead ofbin
for PSD (but, in general, removing support/documentation around this). -
for
SIGNALS
command, added thereq
option to require that specified signals are present/kept; in contrast, the originalkeep
option now will not complain if a requested signal is not present (i.e.keep
implies keep if present) -
added the
id
command-line option, so that a numeric ID can be specified (i.e. and not be interpreted as a sample-list line number) -
added a
min
option toEPOCH
, which gives minimal output: just the epoch count to standard output -
added a
dump
option toSTAGE
to write stages to standard out (i.e. parallelseannot
option, but does not write to a file) -
added
guess
(andeeg
) options to theCANONICAL
command, to guesscsEEG
without a file/group specified
Internal
-
added
cache_t
forPSC
commandSPINDLES
/SO
, and [in flight] adding aCOUPL
command to separate out spindle/SO detection from coupling analyses -
trims trailing whitespace from the physical dimension and transducer type fields in the EDF header; this was already done for channel labels
-
swapped in functions and classes from the Eigen matrix library for many numerical intensive procedures
-
added a runs test to the stats helper function library
v0.24 (22-August-2020)
New commands
-
ALIASES
command to list any channel/annotation aliases done for that individual -
MINMAX
command to set EDF header digital/physical min/max to same values across multiple channels -
TYPES
command and accompanying optionsch-match
,ch-exact
andch-clear
, which groups channels by types (e.g. EEG, EMG, respiratory effort, etc) and defines correspondong automatic variables (e.g.${eeg}
and${emg}
); theHEADERS
command now also outputs aTYPE
field -
CANONICAL
command to generate canonical signals,cs_EEG
,cs_LOC
,cs_ROC
,cs_EMG
andcs_ECG
-
VARS
command to output all variables defined for a given individual (designed to be paired with the new individual-level variables feature, via thevars
option) -
CC
command for connectivity and coupling statistics -
ACF
command to calculate signal autocorrelation
New options/behaviors for existing commands
-
added
SENS
andPOS
variables toHEADERS
channel-level output -
added
flat
andmax
options toSIGSTATS
-
CWT-DESIGN
now outputs FWHM in time and frequency domains, and accepts newer FWHM-basewd specification (instead of cycles); see this manuscript -
added the
wrapped
andfwhm
options toCWT
-
added the
fft
option toFILTER
for FFT convolution -
FILTER
andFILTER-DESIGN
can now read a FIR from afile
; also, instead of Kaiser windows to design a FIR, one can now fix the filter order and specify the type of window (e.g. Hamming, Blackman, etc) -
added a
new
option for theREFERENCE
command, and the ability to specify.
as a reference (i.e. to do nothing, to facilitate automatic processing) -
added summaries to
CORREL
, and improved the speed of this command -
allow now a comma-delimited list when defining stage labels for
STAGE
andHYPNO
, e.g.N1=n1,NREM2
-
added
epoch
andper-spindle
options to theSPINDLES
, making this level of output optinal, and omitted by default (i.e. forE
xF
xCH
andN
xF
xCH
) -
new added
cstats
andastats
options forSIGSTATS
-
added the
channels
option to theDESC
command (to write a simple list of all channel labels to standard output) -
the
ANNOTS
command now outputsSTART_HMS
/STOP_HMS
andSTART_ELAPSED_HMS
/STOP_ELAPSED_HMS
underANNOT
xINST
xT
output strata, which are the hh:mm:ss version of clock-time and elapsed time since EDF start, respectively
Other changes
-
default log output is now less verbose (unless
verbose=1
set) -
small fixes in processing EDF fields: the reserved field is now set to space (rather than null) characters; also, all EDF header fields (including the reserved field) are now checked for being within the 7-bit US-ASCII range 32-126 (any character outside this range is changed to a
?
character) -
changed behavior to replace spaces in channel names with underscore (
_
) characters for ease of processing; setting thespaces
variable can specify alternate replacement characters;keep-spaces
option, if true, means that spaces are retained -
added support for individual-level variables to be loaded from a file (via the
vars
option) -
added automatic special variable
${id}
, which can act in the same manner as the^
special character in scripts, i.e. to represent the current EDF ID -
added the
add=
option to turn on/off conditional blocks -
added a check that any variable defined in a script does not clash with a special variable (i.e. command line option).
-
added
include={file list}
option, to mirrorexclude={file list}
(nb. you cannot have both exclude and include) -
Luna can now read gzipped (compressed) ASCIIs directly
-
added a check that named
TAG
s do not clash with existing, internal tags, e.g.F
orCH
-
fixed an issue with 0-duration annotations, e.g. as may occur with marks from
EDF Annotations
channel -
fixed an issue with the
ANNOTS
command not reporting all output if theEPOCH
command hadn't been explicitly called first -
Luna now explicitly gives an error message if trying to use an
.eannot
file (ore:1
notation in an.annot
file) with EDF+ (i.e. which may be discontinuous). That is, if the input file is an EDF+, Luna requires annotation formats with exact times (i.e. either seconds elapsed since the start of the EDF, or hh:mm:ss format). -
added EDF+ Annotation parsing; Luna now reads all
EDF Annotations
events as an annotation track, which is automatically combined with any other annotations (e.g. from XML or.annot
files). Currently, all annotations have the classedf_annot
, which values are instance IDs/label. -
added new options to force/skip annotations:
force-edf
,skip-annots
,skip-edf-annots
andskip-all-annots
. -
added support for using braces
{
and}
instead of'
to denote string literals in eval expressions (i.e. which can be convenient if writing expressions on the command line with-s
where'
is already used) -
changed formatting of
-t
text table file names; added--tt-prepend
and--tt-append
options (equivalently,--tt-prefix
and--tt-suffix
) -
SPANNING
now works on EDF+D files -
HEADERS
now reportsEDF_TYPE
v0.23 (15-Jan-2020)
-
new help function (
-h
command line argument), to list commands, parameters and their output tables/variables -
new spindle/slow oscillation coupling permutation option and output variables
-
provisional support for text-table output mode with
-t
option, optionally writing gzipped text (with corresponding lunaRltxttab()
function -
new option to read data from a plain text file rather than an EDF
-
automatically generate sample lists with a new --build option, i.e. to recursively find all EDFs and match annotation files in a set of folders
-
added support to read and write compressed EDF files, via the EDFZ format, as highlighed in this vignette
-
new scripting features: command files now allow conditional clauses, via the
[[var
syntax, within-script variable definitions, via the${var=xyz}
syntax, and expanding numeric sequences, e.g.[ICA][1:10]
expands toICA1,ICA2,ICA3,...
-
new
SEGMENTS
command to show contiguous time intervals within a discontinuous EDF+ -
can now write EDF+ files
-
new experimental commands for multi-channel EEG:
CLOCS
(to read channel locations),CHEP
(channel/epoch masks),INTERPOLATE
(to interpolate missing channels/epoch based on spherical splines),SL
(to compute the surface Laplacian), andICA
(implementation of the fastICA algorithm). -
added individual-ID wildcards in the specification of output database names (
-o
or-a
), i.e. to write to a separate database for each EDF/individual, e.g.-o path/to/out-^.db
-
COH
performance has increased, and it now reports imaginary and lagged coherence; also, can acceptsig1
andsig2
parameters to more flexibly specify which pairs of channels are considered -
the
CHS
output factor is now split into two separate factors,CH1
andCH2
, forCOH
CORREL
andMI
-
added
SPANNING
command to report on "coverage" of an EDF by one or more annotations -
added special variables
silent
to turn off all console logging -
added
--xml2
command line option for verbose view of XML tree -
removed the
skip-annots
special variable; replaced with two new variables:skip-edf-annots
andskip-all-annots
-
the
MASK
epoch
andmask-epoch
parameters can now take comma-delimited lists of ranges, e.g.epoch=1,6,8-10,22
-
changed the behavior of
assume-pm-start
; it is now off by default, and accepts a time parameter to define whether ambiguous times are assigned AM or PM values -
added
START_TIME
,START_DATE
and (optionally)SIGNALS
output variables to theHEADERS
command -
now make new, unique labels for any duplicate channel labels found in an EDF (e.g. EEG, EEG.1, EEG.2, etc) and writes a message to the log
-
now check whether the same channel alias points to more than one channel, and if so, will give an error message
-
can now use hh:mm:ss clock-time format in
.annot
files (assumes 24 hour; requires start & stop specified) -
changed clock-time format from
hh:mm:ss
tohh.mm.ss
for compliance with the EDF spec; Luna can still read clock-times with the colon-delimiter however -
new mode (
-a
instead of-o
) to append to, rather than overwrite, output databases -
fixed an issue with the
MTM
command'sepoch
option, when used with multiple signals -
fixed issue with command parameters not being recorded in the output database
-
added the
nsrr-remap
option to turn off auto-remapping of NSRR annotations -
new
RECS
andSEGMENTS
commands to dump basic EDF record and interval info to stdout -
added a
fail-list
option [note: need to check implementation] -
fixed issue with
ANNOTS
where an annotation was flagged as overlapping a region/epoch is it ended exactly 1 time-unit beforehand (i.e. ignored convention that intervals are internally represented as [start] to [one past the end] of the interval).
v0.22 (31-March-2019)
Initial public release.