NEUROFUSIONInc / fusion

Record changes in health, behavior and brain activity locally on your browser or mobile phone. Discord: https://discord.gg/sqsuzXWE3K
https://usefusion.ai/research
Other
35 stars 8 forks source link

Power spectral analysis on resting state (eyes closed)dataset recorded over weeks #56

Closed oreHGA closed 1 year ago

oreHGA commented 1 year ago

Dataset

oreHGA commented 1 year ago

This is the basis for the next study we'd be running & sharing current data + analysis will hopefully ginger people to join in!

oreHGA commented 1 year ago

Erik has been working on a script that returns for a single recording :

Script

    return {
        "timestamp": df_pbb.index[0],
        "duration": df_pbb.index[-1] - df_pbb.index[0],
        "avg_power_per_channel_by_band": {
            channel: {band: df_pbb[channel + "_" + band].mean() for band in bands}
            for channel in channels
        },
        "avg_power_by_band": dict(average_band_power),
        "avg_power_by_channel": dict(average_channel_power),
        "avg_calm_score": avg_calm_score,
        "avg_focus_score": avg_focus_score,
        "time_spent_calm": time_spent_calm,
        "time_spent_focused": time_spent_focused,
        # `relative_power` keys are 2-tuples (band1, band2), values are ratios
        # maybe doesn't need to be computed here,
        # can be computed later from `avg_power_by_band`
        # "relative_power": {},
    }

Oh I think we could also include signal quality averages per channel

oreHGA commented 1 year ago

There's a snippet of code that allows us to choose channels based on signal Quality

Screenshot 2023-05-24 at 6 30 26 PM