Skip to content

Command Reference

Below is 1) a list of command domains, and 2) a full list of all commands.

The pages that are linked to describe the Luna command language, which can be used either via the terminal-based lunaC tool or the R extension library lunaR. Under each section, we tabulate the relevant commands, along with their input parameters and output variables. We give examples using a mixture of lunaC and lunaR; also see lunaC's help function.


Domain/Section Description
Summaries Basic summary commands
Annotations Adding and displaying annotations
Expressions Evaluating more advanced annotation-based expressions
Epochs Epoching signals and epoch-level annotations
Masks Masking epochs based on annotations and other criteria
Canonical signals Harmonizing EDFs through canonical signal specification
Manipulations Manipulating signal data
Outputs Commands to output signals in different formats
FIR filters FIR filter design and application
Artifacts Artifacts detection/correction routines
Hypnograms Characterizations of hypnograms
POPS Sleep staging & evaluation
Time/frequency analyses Power spectral density estimation and other T/F decompositions
Spindles and SO Spindles and slow oscillations
Coupling/connectivity Phase/amplitude coupling, coherence and other multi-signal analyses
Interval-based Time/event-locked signal averaging, peak detection, enrichment
Spatial/topographical Channel locations, spatial filtering and interpolation
ICA Independent components analysis
MS EEG microstate analysis
Clustering Time-series clustering
Association Association analysis (linear models)
Simulation Simulation of time-series data
Helpers Auxiliary helper commands
Experimental Experimental features, under heavy development / for internal use only

All commands

Summaries: DESC: simple EDF description, SUMMARY: EDF description, HEADERS: EDF header information; CONTAINS: Indicate whether signals present, ALIASES: show channel/annotation aliases, TYPES: show channel types, VARS: show individual-level variables, TAG: add output tags, STATS: basic signal statistics, SIGSTATS: signal Hjorth parameters. Annotations: Formats: overview of annotations, --xml & --xml2: view NSRR XMLs, ANNOTS: tabulate annotations, WRITE-ANNOTS: write annotation files, SPANNING: annotation coverage stats, A2S: make signal from annotation, S2A: make annotation from signal. Expressions: Expressions: overview of expressions, EVAL: annotation-based expressions, TRANS: channel-based expressions. Epochs: EPOCH: specify epochs, EPOCH-ANNOT: attach epoch annotations. Masks: MASK: mask epochs, DUMP-MASK: output epoch masks, RESTRUCTURE: remove masked epochs, CHEP: channel/epoch masks. Manipulations: SIGNALS: drop signals, COPY: copy signals, RESAMPLE: resample signals, ENFORCE-SR: check for sufficient sample rate, REFERENCE: re-reference signals, MINMAX: set channel min/max, EDF: force basic EDF, TIME-TRACK: add time-track, RECORD-SIZE: change record size, ALIGN: realign records, ANON: anonymize EDF, uV: force microvolts, mV: force millivolts, FLIP: flip signal, ZC: zero-center signal, ROBUST-NORM: robust normalization, SET-HEADERS: set EDF headers, SET-VAR: set Luna variables. RECTIFY: rectify a signal, REVERSE: reverse a signal. Canonical signals: CANONICAL: make canonical signals. Outputs: WRITE: write EDF, MATRIX: signals to text, HEAD: signals snippet to text, DUMP-RECORDS: dump by record, RECS: info on EDF record structure, SEGMENTS: continuous intervals, SEDF: write summary EDF. Filters: FILTER: apply FIR, FILTER-DESIGN: FIR properties. Artifacts: CHEP-MASK: CHannel/EPoch masking, ARTIFACTS: bad EEG epochs, LINE-DENOISE: line denoising, SUPPRESS-ECG: correct ECG artifact, ALTER: correct artifacts. Hypnograms: STAGE: dump stages, HYPNO: stage summaries. SOAP: SOAP: single observation model, RESOAP: iterative SOAP, REBASE: change epoch length, PLACE: align stages, POPS: POPS: predict sleep stages, --pops: train model, --priors: derive stage priors, EVAL-STAGES: evaluate external stages, --eval-stages: evaluate external stages. Time/frequency analysis: PSD: Welch PSD, MTM: Multi-taper PSD, FFT: Fourier transform, HILBERT: Hilbert transform, CWT: wavelet transform, CWT-DESIGN: CWT properties, EMD: Empirical mode decompositon, MSE: Multi-scale entropy, LZW: LZW compression, 1FNORM: remove the 1/f trend, TV: total variation denoiser, ACF: autocorrelation function Spindles and SO: SPINDLES: spindles, SO: slow oscillations. Coupling/connectivity: COH: coherence, CORREL: correlation, CC: phase-amplitude coupling & phase lag, PSI: phase slope index, MI: mutual information, TSYNC: cross-correlation & phase delay, GP: Granger prediction. Interval-based: OVERLAP: single-sample overlap analysis, --overlap: multi-sample overlap analysis, MEANS: signal mean by annotation, PEAKS: detect/cache peaks, TLOCK: time-locked averaging. Spatial/topographical: CLOCS: set channel locations, SL: surface Laplacian, INTERPOLATE: epoch/channel interpolation. PSC: --psc: estimate components, PSC: project new samples. ICA: ICA: fit ICA, ADJUST: adjust given ICs. Microstates: MS: EEG microstates, --kmer: sequence motifs, --cmp-maps: group/indiv map spatial analysis, --label-maps: label maps given a template, --correl-maps: spatial correlations. Clustering: EXE: time-series clustering. Association: CPT: association models. Simulation: SIMUL: simulate signals. Helpers: --build: build sample-lists, --repath: alter sample-lists, --merge: merge EDFs, --otsu: Otsu thresholding (file), OTSU: Otsu thresholding (EDF).

Experimental: Various: misc. experimental commands.

Back to top