========================================================
    Wearable Sensing EEGLAB Extension 1.16
========================================================

OVERVIEW
--------

This plug-in allows EEGLAB to read .CSV files produced by Wearable Sensing's DSI-Streamer software, enabling you to leverage EEGLAB's powerful data processing features with data collected from Wearable Sensing's dry electrode EEG systems.

*** NEW IN VERSION 1.16 ***
This version features UNIVERSAL COMPATIBILITY with CSV files from ANY version of DSI-Streamer, eliminating the need to re-export older recordings. Major enhancements include packet loss detection, DSI-Flex support, integrated batch import, and comprehensive input validation.


For more information:
- Wearable Sensing support: http://www.wearablesensing.com/support
- EEGLAB documentation: http://sccn.ucsd.edu/eeglab/


========================================================
WHAT'S NEW - VERSION 1.16 (MAJOR UPDATE)
========================================================

UNIVERSAL COMPATIBILITY
-----------------------
	✓ Compatible with CSV files from ANY version of DSI-Streamer
	✓ Automatic detection and parsing of all header formats
	✓ No need to re-export files from older DSI-Streamer versions
NEW FEATURES
------------
	• Highpass Filter Option
	  - Added highpass FIR filter with 0.1 Hz default
	  - Can be applied independently or combined with lowpass filter
	
	• Data Integrity Checking (Packet Loss Detection)
	  - Automatically detects gaps in time-series data caused by packet loss
	  - Displays detailed gap statistics in console and summary dialog
	  - Inserts boundary events at discontinuities to prevent filter artifacts
	  - Reports total time lost and number of gap instances
	
	• Automatic Auxiliary Channel Removal (DSI-24)
	  - Optional removal of auxiliary channels (X1, X2, X3) for DSI-24 headsets
	  - GUI automatically detects headset type and shows option when appropriate
	
	• Automatic Channel Location Lookup
	  - Channel locations automatically populated using standard_1005.elc
	  - Eliminates manual channel location setup
	
	• Reference Scheme Options
	  - "Linked Ears" reference (A1/A2 for DSI-24, LE for other headsets)
	  - "Hardware Reference" option preserves original reference
	  - Default set to "Linked Ears" for optimal analysis
	
	• Smart Input File Validation
	  - Validates that uploaded files are raw (unfiltered, non-montage) CSVs
	  - Rejects filtered files (ending in _filtered) and montage files (ending in _M)
	  - Clear error messages guide users to correct file format
	
	• DSI-Flex Support
	  - Automatically normalizes channel names (strips "S1:", "S2:" prefixes)
	  - Ensures consistent naming across all DSI headset types
	  - Example: "S1: F3" → "F3"
	
	• Batch Import
	  - Select multiple files in the file picker for batch processing
	  - Apply same import settings to all selected files
	  - Summary statistics displayed after import completes

IMPROVEMENTS
------------
	• Enhanced GUI Organization
	  - Reordered elements for intuitive workflow
	  - Cleaner interface with reduced explanatory text
	  - Blocking dialogs ensure proper user acknowledgment
	
	• Robust Header Parsing
	  - Improved compatibility across all DSI-Streamer versions
	  - Better reference channel identification
	  - Handles multiple header format variations

BUGFIXES
--------
	• Fixed: Data range (blockrange) parameter caused crash due to undefined variable
	• Fixed: Boundary events now properly adjusted when data is time-sliced
	• Fixed: Improved EEGLAB 2025 menu visibility


========================================================
CHANGELOG - PREVIOUS VERSIONS
========================================================

1.15 - Compatible with DSI-Streamer 1.08.120+ header format

1.14 - Compatible with DSI-Streamer 1.08.90+ header format

1.13 - EEGLAB GUI no longer appears when using command line

1.12 - Fixed: Command line sampling rate loading crash

1.11 - Fixed: Event loading and event label handling

1.10 - Improved: Faster CSV upload performance

1.09 - Improved: MATLAB backwards compatibility (pre-2013 versions)

1.08 - Compatible with DSI-Streamer 0.7.34
       Improved: Faster loading for large datasets

1.07 - Fixed: Non-zero trigger at first time index no longer crashes
       Compatible with DSI-Streamer 0.7.31 custom events

1.06 - Changed: Event names now "1", "2" instead of "trigger 1", "trigger 2"
       Updated: Documentation reflects 70 Hz lowpass recommendation

1.05 - Clarified: Filter type (FIR), default changed to 70 Hz
       Fixed: Lowpass filter now applies correctly

1.04 - Fixed: Reference channel now properly loads

1.03 - Fixed: DSI-7 loading

1.02 - Added: Backwards compatibility

1.01 - Fixed: Sampling rate registration


========================================================
INSTALLATION
========================================================

1. Locate your EEGLAB plugins directory:
   /eeglab(VERSION)/plugins/
   (where VERSION is your EEGLAB version, e.g., 13_3_3)

2. Extract the WearableSensing folder from the .zip file into that directory

3. Restart MATLAB and run EEGLAB

4. Verify installation: Check for "From WearableSensing CSV files" in:
   File → Import Data → Using EEGLAB functions and plugins


========================================================
COMPREHENSIVE FEATURE LIST
========================================================

DATA IMPORT
-----------
✓ All DSI headset types (DSI-7, DSI-24, DSI-Flex, VR300)
✓ Automatic headset detection
✓ Universal compatibility with all DSI-Streamer versions
✓ Input validation prevents filtered/montage file errors
✓ Custom channel selection
✓ Time range selection (blockrange)
✓ Batch import (select multiple files for processing)

FILTERING
---------
✓ Highpass FIR filter (default: 0.1 Hz)
✓ Lowpass FIR filter (default: 70 Hz)
✓ Combined or independent filter application

DATA QUALITY
------------
✓ Automatic packet loss detection
✓ Gap statistics (console and dialog)
✓ Boundary event insertion at discontinuities
✓ Filter artifact prevention

CHANNEL MANAGEMENT
------------------
✓ Automatic channel location lookup (standard_1005.elc)
✓ Automatic auxiliary channel removal (DSI-24: X1, X2, X3)
✓ Normalized channel naming across all headset types
✓ Automatic reference channel detection

REFERENCING
-----------
✓ Linked Ears (A1/A2 or LE) - Default
✓ Hardware Reference (as recorded)
✓ Automatic reference detection from headers

EVENT HANDLING
--------------
✓ Trigger channel import
✓ Boundary events for data gaps
✓ Event timing preservation


========================================================
SUPPORT
========================================================

Questions, bugs, or feature requests?
Contact: support@wearablesensing.com

Visit our website for documentation and tutorials:
http://www.wearablesensing.com/support