"Late [Autism] diagnosis...may restrict access to resources & hinder the reinterpretation of past experiences, w/ significant implications for identity construction & perceived quality of life.
...also associated with higher social anxiety, loneliness, and lower perceived social support." #AutRes
Posts by Dagmar Fraser
One element that was definitely new to me in spinning up this post: filtfilt(b,a,x) vs filtfilt(sos,g,x) – I need to take a look at that! ⚙️
#MATLAB #MATLABambassador
IMUs and wearables often stream float32 to save memory, so your data arrives as single without warning. R2019b would have forced a cast to double. R2024a quietly accepts it and runs the filter in single - for 3rd-order and up that is enough to give you weird differences compared to double.
Since 2024: "When single-precision input is given, the filter coefficients of the 'filtfilt' function will be quantized to single precision. The incorrect results with single precision data are especially evident when the filter order increases" (www.mathworks.com/matlabcentra...) 🧪
If your simulation ever produces NaNs (division by zero curvature, for example), your code will run on your machine and potentially crash on a reviewer's! 💥
In 2016b, passing a column of NaNs returned NaNs; in 2019b+ it errors.
"By R2020a x is explicitly documented as having to be finite valued. The code test was added in a previous release." (www.mathworks.com/matlabcentra...)
MATLAB is rightly lauded that decades-old code will normally just run - I have seen enough argument-number changes, the great case-sensitive change, and 4 different ways of talking to National Instruments hardware that I can miss more subtle subtle changes.
It has been part of my work for nearly 3 decades… though I am now less cavalier in advocating it when I need *event value* accuracy! What I didn't realise is that it had been evolving and been optimised under me. 🤔
You exchanged edge accuracy for edge prominence - as double the filter also knocked down the signal of interest.
Twenty years later I was recommending it in my chapter on recovering timing of events - exchanging event timing accuracy for smooshed event value (doi.org/10.1163/9789...).
hence filtfilt; a non-causal zero-phase filter (non-causal as you can’t run it backwards in real time, zero-phase for no smearing). 🔁
You’d smooth the data with a low pass filter, but that skewed the vectors proportionally to underlying frequencies, smearing the image, so you ran the filter backwards as well -
We were trying to get clean images out of very noisy Charge Coupled Devices. These CCDs are now teeny tiny sensors in the cameras of your iPhones – were in their infancy in the 90s, and massive. 📷
filtfilt (uk.mathworks.com/help/signal/...) was one of the first MATLAB commands I learned in 1998 in my first ever post grad role as a Research Assistant.
Do you want to use vibration stimuli in remote research studies? 👀 📳🤳🏼
Our latest paper in Behaviour Research Methods might be of interest to you!
Coauthors include: @kalvinroberts.bsky.social @peircej.bsky.social @multisensorylab.bsky.social
link.springer.com/article/10.3...
LLM agents are a serious problem for online experiments.
It is very easy to use them and very hard to spot them. What can researchers do?
With @brendenlake.bsky.social, we suggest detecting LLMs based on their lack of human cognitive constraints in our #CogSci2026 paper: arxiv.org/abs/2604.00016
When recording experimental data, have you ever:
1) overwritten data?
2) changed the experiment and forgot when?
3) had a student leave the lab leaving a mess of dataset?
4) noticed how everyone has their own way to transfer data?
We published a solution: LSLAutoBIDS - open science by design.
🧵
Crenna et al. 2021 did the hard work concocting a SG filter matching the default Butterworth 10Hz Low Pass filter bit. However they concluded that SG “offers no advantage” but that’s because they dropped their carefully crafted SG in after some other filter has already altered the signal!
However BlueBEAR is down for Easter maintenance so instead of running HPC jobs requiring 288GB of RAM I am here posting about 1960s chemistry papers.
#MATLAB #MATLABambassador
I am currently evaluating 14.7 million combinations of movement, noise, filter and differentiation method to put my sgolay preference on a sound footing: osf.io/ckr8h/overview
Their polynomial window now helps me explore neurodevelopmental markers, Parkinsonian movement profiles, and whether a stylus trajectory is genuinely smooth or just over filtered. 😺✨
Yet here we are, sixty years later, using their idea to stabilise the very quantities that determine whether a drawing task sits on the one third power law or meaningfully departs from it.
Savitzky and Golay were chemists trying to rescue faint absorption lines from noisy spectrograms. They were not thinking about motor control, handwriting, ellipse tracing or kinematic invariants.
And the trajectory still looks like the thing the person actually drew. 🐾
In short, SG is a smoothing differentiator. One operator replaces the whole low pass then finite difference then low pass chain. It avoids amplifying high frequency noise, and gives you clean derivatives from the same fitted polynomial.
This smooths and differentiates in one coherent step - no repeated filtering, no phase distortion (ask me about issues with filtfilt!), no position to velocity to acceleration to jerk noise cascade.
SG works differently:
1 fit a tiny polynomial to the raw data in a sliding window
2 differentiates the polynomial, not the noisy data (and differentiating noisy series explodes the noise: uk.mathworks.com/help/signal/...)
It works, but it’s basically photocopying a photocopy, with the signal getting a little wonkier each time.
A lot of biomechanics papers still follow the traditional recipe:
1 butterworth filter the positional data to remove noise
2 use finite differences to compute velocity, acceleration and jerk
3 sometimes filter again after each step 2
The algorithm is Savitzky–Golay. MATLAB calls it sgolay - which also sounds like something a matador might shout, though Savitzky gets shortchanged!