# Real-time CLEEGN
###### tags: `real-time` `CLEEGN` `CECNL`
## pylsl config `~lsl_api/lsl_api.cfg`
### Localhost Only
```ini
[multicast]
; The scope within which one's outlets and inlets are visible to each other. This can be machine (local to the machine),
; link (local to the subnet), site (local to the site as defined by local policy), organization (e.g., campus), or global.
; Always use only the smallest scope that works for your goals. This setting effectively merges the contents of
; MachineAdresses, LinkAddresses, SiteAddresses, OrganizationAddresses, and GlobalAddresses, and sets the packet
; TTL to one of the settings: 0, 1, 24, 32, or 255. If you share streams with remote collaborators, consider using the
; KnownPeers setting under [lab] (thus listing their machines directly, which is more likely to work than internet-scale
; multi-casting). Another possibility is to use the AddressesOverride and TTLOverride settings to avoid pulling in every
; site at intermediate scopes.
ResolveScope = machine ; site
```
## Issue
- qt plugin issue:
- msg: ""
## New Progress
- [Real-Time-CLEEGN](https://github.com/cemeteryparty/Real-Time-CLEEGN)
- use bci-challenge raw as offline
- rescale after pre-processing
- add feature `ChannelShift` (uncommit)
- analyze channel scale between lab-8c, bci_ern
- re-scale using div of (std / ern_bpf_std)
- linux driver issue: stream_viewer (liblsl), shared object loader error, harm (env config fail)
- windows issue: replace push_chunk to push_sample???
- linux issue: check the pyQt log to access correct lib
## 1214
- Update: save preprocessed chunk in buffer for delay update
- Update: ar_block, buf in buf out
- Revise: chunk alignment issue



## 1206
- Update: Module the real-time program
- Revise: wrong behaviour in CAR
- Revise: 1024 Hz input freq to 1000 Hz input freq (correct), `lfilter` to `sosfilt`. `lfilter` has instability issue, use `sosfilt` can solve the issue. Require further investigation to fugure out the reason.
- Revise: wrong behaviour in downsampling (original version start at same index)
## TODO
- 8 channel data analyze
- back to 8-chan device (real data)
- issue: low eff.rate???? (hardware issue???
- 32 channel data analyze
- cross-dataset optimize
- exception handler
## Preview
- `streamoutlet.py` to intercept the stream and perform pre-processing and artifact removal.
- use lsl_viewer as visualizer
- collect 8 channel data and remove artifact by CLEEGN-8ch_ERN56
### issue
- inbalance scale in each channel cause bad performance???