September 27, 2017

I saw a neat video by Bite Size Psych about the worth of university degrees.

I do agree that “what you do when you’re not studying is what you learn the most from.” There are also lots of problems related to getting a degree just to signal that you have a degree. This is especially problematic now as the current generation entering the workforce is more educated than past generations and faced with fewer opportunities in the current economic landscape. I think this is one reason millennials are given a bad rap; it might be hard for older generations with more opportunities and less education to relate to the struggle of millennials to get a decent job after university.

My one objection to the video’s suggestion to do the bare minimum is that more and more students require graduate degrees to compete for decent jobs. Many students in kinesiology continue on to study physical therapy, occupational therapy, medicine or go to graduate school. All of those opportunities, and even some jobs, are so competitive that they will seriously consider your GPA. Think of it as a modern extension to signalling theory. If you have 100 applicants for a job and all of them have degrees, what else could you use to rank them? GPA is an easy option, even if it isn’t a good predictor of job success. That is the modern era we live in, where university is the new high school.

September 18, 2017

I seem to forget how to convert a voltage signal in the time domain to the frequency domain every time I want to do it. There are also far too many website that try to tell you how to do this in Matlab. I end up spending too much time searching for the best one as I reteach myself the fast Fourier transform (fft) function.

Well, no more. I’ve now upload a Matlab function that takes a signal in the time domain and converts it to the frequency domain; specifically, the single-sided amplitude spectrum. You can download it here, but you will need to change the file extension from .docx to .m to run it in Matlab.

Below is an example on electromyographic (EMG) data. These data are from my colleague (Thanks Dr. John Harry!) and it is a 3-s surface electrode recording of the biceps femoris during a countermovement vertical jump. The sampling frequency was 2000 Hz.

The EMG shows the bicep femoris contracts during the countermovement down (a to d) and the explosive movement up (d-f). This occurs between .75 and 1.75 s in the time domain plot. The EMG is relatively quiet until landing (h) between 2 and 2.75 s in the plot.

Let’s take a look at the frequencies in the EMG data.

Most of the power for surface EMG is typically between 10 and 400 Hz. That seems to be the case for our data, as shown in the amplitude spectrum above. The power of the frequencies rapidly increases around 10 Hz and the slowly decrease from 100 to 400 Hz.

Let’s see what the amplitude spectrum looks like after filtering the data with a low-pass filter at 200 Hz (dual-pass, second order, Butterworth), just for fun.

After the 200 Hz, low-pass filter, the power of frequencies above 200 Hz are drastically reduced. There is still some power in the frequencies between 200 and 350 Hz. That is caused by the filter’s frequency response. I’ll leave that conversation about the pass band, the transition band, and the stop band of different filters for another day. [You can find some details about the frequency response of a filter in two of my previous posts (Moving average filters, Solving the underdamped response of a 10 Hz low pass Butterworth filter) and on Wikipedia.]

If you want your income to be in the top 20%, then you should go to an Ivy or elite school. That is easier said then done because the deck is stacked against people with low socioeconomic status; for example, you might not be able to study for the SATs because you are too busy working to afford food. That brings up the question of the affordability of a university education. That is a whole other can of worms! I will give a shout-out to Texas Tech’s $8 million water park that was mentioned as an example of the excessive spending of universities in the one-sided debate by John Stossel.

I’ve been to Texas Tech’s water park, which is across the street from my office. It, no doubt, attracts students to Tech, but what is the cost to students’ tuition and taking money away from the core roles of the university, namely teaching and research? I understand that experiences outside the classroom are an important part of your four years at university, but when did the university become responsible for providing those experiences?

I believe universities should focus on academics and pull back on this recent foray into emulating all-inclusive resorts. The more rock climbing walls, water parks, and stylish residences we build, the more we increase tuition and student debt. I don’t need to remind you that the total US student debt is $1.4 trillion, almost twice the total US credit card debt (neither of which are good). Other problems are the increasing number of administators at universities and their skyrocketing salaries. Texas Tech’s president, for example, made $599 thousand in the 2017 financial year. That is equivalent to the tuition from 100 in-state students. Presidential pay is so high that teams of four people applied for the position at the University of British Columbia saying they would split the salary, continue to teach, and be more productive than a single person. Administrative salaries still pale in comparison to the football coaching staff. I’m amazed that Texas Tech’s coach made over $3 million in 2016 (tuition from 550 students) and the athlete-students were paid nothing.

It would be great to see more major universities that focus on offering tremendous value for your tuition. Imagine a university with modest residences, minimal administrators, and without rock walls or water parks. Where tuition is invested back into the academic pursuits of students and faculty. How would that university attract students? Can you image how boring the campus tour would be without flashy excess? Perhaps that type of university will become popular when the children of parents who are still saddled by student debt decide not to follow in their footsteps.

I’m always happy to discuss this issue and search for solutions. Perhaps we can debate while floating down the lazy river at Texas Tech’s water park.

May 29, 2017

I’m currently analysing bimanual reaching data in Lissajous plots. In these plots, the position of the left arm is plotted on the y-axis and the position of the right arm is plotted on the x-axis. The figure below is an example.

The important aspect in Lissajous plots is the shape of the trajectory. Therefore, to average several trials together, I need to create a spatial average of each trajectory. The reason for this is more obvious when we zoom into the start of the trajectory, shown below.

You can see that the points in the Lissajous plot begin close together and then get farther apart. This is because the arm begins stationary and then accelerates towards the target. This information is actually a problem when averaging together multiple trials. Imagine if one trial slowed down in the middle. There would be more data points in the middle and this would pull the average towards these points. What we need to do is preserve just the shape of the Lissajous plot. This is done with a spatial average.

A spatial average creates 100 points (for example) and places them equally along the trajectory. The next plot shows the original trajectory, which had 1000 points, and the spatial average with 100 equally spaced points.

You can now take several of these trajectories and average them while preserving (or properly averaging) the spatial information, hence a spatial average.

I wrote some Matlab code to calculate 2D spatial averages. The first argument, input_array, is the trajectory data with each row being a frame, the first column the x position, and the second column the y position. The second argument is the number of points in the spatial average. You can download the function here, but you will need to rename the file from .doc to .m

The code will only work if there are lots more frames in the original data than the spatial average (I used 1000 and 100 above). You can always increase the number of frames in your original data by using the interp1 command.

For example, say that your original data_array has 127 frames. The following code will increase it to 1000 frames.

This is the first entry in the trajectory analysis toolbox. I hope to add more examples and code as I use them in my research.

Update (September 12, 2015):

I reused this code for anther experiment and I found that the last point in the spatial average was sometimes missing. I’m not sure why this is happening, but I added a hack to fix it. At the start of the code, the first data point in the spatial average is set to the first point in the input array (as before) and the last data point in the spatial average is set to the last point in the input_array.

Update (May 30, 2017):

I wrote another version of this function to calculate a 1D spatial average. You can download the function here, but again, you will need to rename the file from .doc to .m. A 1D spatial average is helpful, for example, when you displacement by time data. You want to preserve the shape of the trajectory but time shouldn’t contribute to the “distance” traveled when calculating the spatial average.

When writing this function, I found and fixed a bug in the 2D spatial average function. The bug occurred when there was a large distance between points, which is odd for smooth, trajectory data. Both the 2D and 1D functions can now handle step functions and, hopefully, anything else you throw at them.

February 7, 2017

I’ve been digging into the research on the focus of attention. Professor Wulf has done a great job of synthesising all the research every few years and publishing a review. One of the latest reviews is Attentional focus and motor learning: a review of 15 years. I particularly enjoyed the tables that listed all the studies and the tasks used. They allowed me to quickly find all the research that has used a stability platform for further investigation.

January 15, 2017

I read an interesting article in PCMag (of all places) called How broken is college, and can we fix it? It is a short but well-balanced read about the challenges and successes of modern post-secondary education. One interesting argument is that post-secondary education isn’t broken for the wealthy but it is broken for the less wealthy students who are increasingly recruited by universities. It was also interesting to find out that decreased public financing of post-secondary education is not a current trend – it has been occurring for 40 years!

If you would like to know more about increasing tuition rates and student loan debt, then I recommend the 2014 documentary Ivory Tower. The trailer for it is a bit sensational, but the documentary is a well-balanced investigation of the business models of American colleges and the impact on students.

December 2, 2016

I’ve been setting up my lab at Texas Tech University. My main requirement is a motion capture system, and I compared and tested several systems. I was looking for something far less expensive than the Optotrak Certus by Northern Digital with similar capabilities. I decided on the Improv by PhaseSpace, and I’ve been impressed by the system. There is more testing to do and so I will have more to share in the next few months. Below is a picture of the six-camera Improv system in my lab.

You can see eight LED markers on the surface of the table. These attach to a small wireless micro driver. You can track up to 24 markers at 270 Hz (48 markers at 135 Hz). A key feature is that the markers are active markers and so there is no marker swapping, as there can be with passive markers in the Vicon and Optitrack systems. This allows measurement of markers even when they are right beside each other, which I will need to track the fingers during reach-to-grasp movements.

Setting up the hardware was easy. I like how small and light the cameras are (about 10 x 10 x 6 cm and 400 g) and that they can be attached to a standard tripod. The software is also easy to use. It took a few calls to PhaseSpace to figure out a few things, mostly because PhaseSpace doesn’t have a detailed manual yet (I might post my own later).

I’m currently writing a C++ program that will allow Matlab to make calls to the PhaseSpace application programming interface (API), similar to what I’ve done before with the Optotrak. I’ll post my notes on that when I have it figured out.