improvements for notifications and prepare for release
This commit is contained in:
1 parent
d1c9346e57
commit
a2456daca7
7 files changed
+221
-22
No files matched your search
@@ -0,0 +1,117 @@
|
||||
"""
|
||||
Filename: inspiration.py
|
||||
Description: Contains inspiration quotes to be shown at random
|
||||
Note: Compliant with pylance strict type checking
|
||||
|
||||
Author: Tyler de Zeeuw
|
||||
License: GPL-3.0
|
||||
"""
|
||||
|
||||
# Built-in imports
|
||||
import random
|
||||
|
||||
FNIRS_QUOTES = [
|
||||
"Understanding the brain through light and data.",
|
||||
"Every signal offers another perspective on brain function.",
|
||||
"Exploring the relationship between brain activity and behavior.",
|
||||
"Using light to investigate the complexity of the human brain.",
|
||||
"Turning neural measurements into meaningful insights.",
|
||||
"A deeper understanding of the brain begins with better questions.",
|
||||
"Studying the brain means looking beyond what we can see.",
|
||||
"Connecting brain activity to the way we think, feel, and act.",
|
||||
"Even small changes in brain signals can reveal meaningful patterns.",
|
||||
"Advancing neuroscience through new ways of measuring brain activity.",
|
||||
"The brain is complex, and every measurement adds another piece.",
|
||||
"Using fNIRS to explore the connection between the brain and the world around us.",
|
||||
"Good science begins with curiosity and grows through careful observation.",
|
||||
"There is still so much to learn about how the brain works.",
|
||||
"Measuring brain activity is only the beginning; understanding it is the goal.",
|
||||
"Exploring what brain activity can tell us about the human experience.",
|
||||
"Every experiment brings a new opportunity to understand the brain.",
|
||||
"The more we measure, the more questions we learn to ask.",
|
||||
"Neuroscience advances through careful measurements and thoughtful interpretation.",
|
||||
"Understanding brain function requires looking at both signals and context.",
|
||||
"Each dataset offers a different view of the brain in action.",
|
||||
"Exploring the neural processes behind everyday human experiences.",
|
||||
"Better measurements can lead to better questions about the brain.",
|
||||
"The challenge is not just collecting data, but understanding what it means.",
|
||||
"Brain activity reflects a complex interaction of processes and experiences.",
|
||||
"Scientific progress begins with observing what we do not yet understand.",
|
||||
"Each discovery builds on the questions that came before it.",
|
||||
"There is more to brain activity than a single signal can reveal.",
|
||||
"New tools create new opportunities to investigate old questions.",
|
||||
"The goal is to connect what we measure with what we want to understand.",
|
||||
"Neural signals provide clues to the processes underlying human behavior.",
|
||||
"A better understanding of brain function starts with better evidence.",
|
||||
"The value of a measurement lies in what it helps us understand.",
|
||||
"Every experiment adds another perspective to a complex picture.",
|
||||
"Scientific discovery often begins with noticing something unexpected.",
|
||||
"Understanding the brain is an ongoing process of questioning and refinement.",
|
||||
"The best insights emerge when data meets thoughtful interpretation.",
|
||||
"Research moves forward when curiosity is matched with rigorous methods.",
|
||||
"There is always another question worth exploring.",
|
||||
"Investigating the brain means embracing complexity rather than avoiding it.",
|
||||
"Progress comes from asking precise questions about complicated systems.",
|
||||
"The brain does not work in isolation from the person or environment.",
|
||||
"Understanding behavior requires more than observing behavior alone.",
|
||||
"The smallest details can sometimes change how we interpret the bigger picture.",
|
||||
"Every method offers a different window into brain function.",
|
||||
"Different perspectives help build a more complete understanding of the brain.",
|
||||
"Good research turns uncertainty into questions that can be investigated.",
|
||||
"The process of discovery is as important as the result.",
|
||||
"Meaningful findings begin with reliable data and careful reasoning.",
|
||||
"The brain is not simple, and our methods should reflect that complexity.",
|
||||
"Scientific understanding grows when evidence challenges our assumptions.",
|
||||
"Research is a process of learning what the data can—and cannot—tell us.",
|
||||
"The most useful findings are those that move understanding forward.",
|
||||
"Each new method expands the questions we can ask about the brain.",
|
||||
"The path to understanding is built from observations, questions, and evidence.",
|
||||
"Neuroscience is about understanding the processes behind the patterns.",
|
||||
"The aim is not simply to measure brain activity, but to interpret it meaningfully.",
|
||||
"Better tools help us investigate the questions that matter.",
|
||||
"Progress in neuroscience depends on both technical precision and human curiosity.",
|
||||
"The brain is complex, but every careful observation helps clarify a part of it.",
|
||||
"Understanding brain function means connecting measurements to meaningful outcomes.",
|
||||
"Research turns curiosity into evidence and evidence into understanding.",
|
||||
"There is a story behind every pattern, but evidence determines what we can conclude.",
|
||||
"New insights emerge when we approach familiar questions from different angles.",
|
||||
"The strongest conclusions begin with careful measurements.",
|
||||
"Understanding the brain takes more than data; it takes context.",
|
||||
"The questions we ask shape what we learn from the brain.",
|
||||
"Good research is not about finding answers quickly, but finding them carefully.",
|
||||
"Every result contributes to a larger conversation about how the brain works.",
|
||||
"The human brain remains an evolving question for science.",
|
||||
"Measuring brain activity gives us another way to investigate human cognition.",
|
||||
"The connection between brain function and behavior is rarely straightforward.",
|
||||
"Scientific progress comes from combining new methods with careful interpretation.",
|
||||
"The more we learn about the brain, the better our questions become.",
|
||||
"Research is the practice of making uncertainty more understandable.",
|
||||
"Understanding the brain means being willing to revise what we think we know.",
|
||||
"Each experiment helps define what we know and what remains uncertain.",
|
||||
"The most interesting findings often begin with questions that have no easy answers.",
|
||||
"The purpose of research is to move beyond assumptions toward evidence.",
|
||||
"A measurement becomes useful when it helps answer a meaningful question.",
|
||||
"Neuroscience brings together technology, observation, and the study of human experience.",
|
||||
"fNIRS offers another way to investigate changes in brain hemodynamics.",
|
||||
"Optical measurements provide a noninvasive approach to studying brain function.",
|
||||
"Studying brain function outside the lab can reveal aspects of everyday cognition.",
|
||||
"The flexibility of fNIRS opens new possibilities for human neuroscience research.",
|
||||
"Brain measurements become more meaningful when considered alongside behavior.",
|
||||
"fNIRS provides a useful perspective on the relationship between physiology and cognition.",
|
||||
"Understanding the strengths and limitations of a method is part of good science.",
|
||||
"The future of neuroscience depends on asking better questions, not just collecting more data.",
|
||||
"Technology expands what we can measure, while critical thinking guides what we conclude.",
|
||||
"The goal of neuroscience is not just to observe the brain, but to understand its function.",
|
||||
"Every research method brings its own perspective, possibilities, and limitations.",
|
||||
"The most meaningful discoveries connect technical advances to real-world questions.",
|
||||
"Better ways to study the brain can lead to a better understanding of human experience.",
|
||||
"Science progresses when we remain curious about what the evidence cannot yet explain.",
|
||||
"Understanding the brain is a long-term effort built on many small discoveries.",
|
||||
"Behind every useful finding is a question worth investigating.",
|
||||
"The value of research lies in what we learn, not just what we measure.",
|
||||
"Good science makes room for complexity, uncertainty, and new perspectives.",
|
||||
"The next insight may come from looking at a familiar problem in a different way.",
|
||||
]
|
||||
|
||||
def get_quote() -> None:
|
||||
return f"'{random.choice(FNIRS_QUOTES)}'"
|
||||
@@ -8,12 +8,18 @@ License: GPL-3.0
|
||||
"""
|
||||
|
||||
# Built-in imports
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import platform
|
||||
|
||||
try:
|
||||
import winreg
|
||||
except ImportError:
|
||||
winreg = None
|
||||
|
||||
CURRENT_VERSION = "1.7.2"
|
||||
CURRENT_VERSION = "1.8.0"
|
||||
APP_NAME = "flares"
|
||||
APP_NAME_EXPANDED = "fNIRS Lightweight Analysis, Research, & Evaluation Suite"
|
||||
API_URL = f"https://git.research.dezeeuw.ca/api/v1/repos/tyler/{APP_NAME}/releases"
|
||||
@@ -72,6 +78,63 @@ DATA_SCHEMA = [
|
||||
]
|
||||
|
||||
|
||||
METRIC_REGISTRY = {
|
||||
"Peak_Amp": "Peak_Amp",
|
||||
"TTP": "Time_to_Peak",
|
||||
"AUC": "AUC",
|
||||
"Rising_Slope": "Rising_Slope",
|
||||
"Recovery_Slope": "Recovery_Slope",
|
||||
"FWHM": "FWHM",
|
||||
"Onset_Latency": "Onset_Latency",
|
||||
"P2P_Amp": "Peak_to_Peak_Amp",
|
||||
"Signal_Std": "Signal_Std",
|
||||
"RMS": "RMS",
|
||||
}
|
||||
|
||||
|
||||
def get_cpu_model_name():
|
||||
"""Detect detailed processor info, collapsing Windows registry whitespace padding."""
|
||||
try:
|
||||
system = platform.system()
|
||||
|
||||
if system == "Windows" and winreg is not None:
|
||||
with winreg.OpenKey(
|
||||
winreg.HKEY_LOCAL_MACHINE,
|
||||
r"HARDWARE\DESCRIPTION\System\CentralProcessor\0",
|
||||
) as key:
|
||||
raw_cpu_name, _ = winreg.QueryValueEx(key, "ProcessorNameString")
|
||||
cpu_name = " ".join(raw_cpu_name.split())
|
||||
|
||||
command = (
|
||||
"Get-CimInstance Win32_Processor | "
|
||||
"Select-Object NumberOfCores, NumberOfLogicalProcessors, MaxClockSpeed | "
|
||||
"ConvertTo-Json -Compress"
|
||||
)
|
||||
cpu = json.loads(subprocess.check_output(
|
||||
["powershell", "-NoProfile", "-Command", command],
|
||||
text=True,
|
||||
creationflags=getattr(subprocess, "CREATE_NO_WINDOW", 0),
|
||||
))
|
||||
base_ghz = cpu["MaxClockSpeed"] / 1000
|
||||
return (f"{cpu_name} @ {base_ghz:.1f}GHz "
|
||||
f"{cpu['NumberOfCores']}c/{cpu['NumberOfLogicalProcessors']}t")
|
||||
|
||||
if system == "Darwin":
|
||||
return subprocess.check_output(
|
||||
["sysctl", "-n", "machdep.cpu.brand_string"], text=True
|
||||
).strip()
|
||||
|
||||
if system == "Linux":
|
||||
with open("/proc/cpuinfo") as f:
|
||||
for line in f:
|
||||
if "model name" in line:
|
||||
return line.split(":")[1].strip()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return platform.processor() or "Multi-Core CPU"
|
||||
|
||||
|
||||
def resource_path(relative_path: str) -> str:
|
||||
"""Get absolute path to resource regardless of running directly or packaged using PyInstaller"""
|
||||
base_path = getattr(sys, "_MEIPASS", os.path.abspath("."))
|
||||
|
||||
Reference in new issue
Block a user