Posts archived in Software

On the topic of iOS apps, MATLAB has released v3.0 of their mobile app. The most apparent changes are UI usability improvements.
(MATLAB link, App Store link)

Zeiss released an iOS app for viewing spectra.

No Android version yet, but Johannes Amon said:

of course I can’t tell you any specifics but at the moment we are evaluating a native port to
android ICS 4.0. at the end it always comes down to budget so it would help immensely if
you’d order some confocals right now ^^

just joking, gonna keep you posted on this project

It uses George McNamara’s Pubspectra database. (link)

Links: Zeiss, AppStore

This site has a nice big list of software for visual psychophysics. It’s very extensive and includes free as well as commercial solutions: visual stimuli, analysis, teaching, hardware, and more.

Virtual desktops are used to manage screen real estate. A user might have a bunch of web browsers open on the desktop, and then hit a key to switch to a nice clean desktop (the web browsing windows are kept in memory). This second desktop can then be filled with image analysis program windows. A keystroke later, and the user is back to the first desktop with the web browser windows, just as they left them.

It’s good for organizing work, which is good for productivity.

If you’ve used OS X sometime in the past 5 years, you might have become accustomed to using Spaces (or the current Mission Control). And those of you who don’t use OS X but have used any varient of Unix sometime in the past… well, just about ever, then you also may have become accustomed to using virtual desktops. Actually, the Amiga 1000 was the first to implement this feature, in 1985.

Somehow, Windows has managed to make it 2012 without a built-in function to support virtual desktops. Unfortuantely, many of the third party alternatives are not all that great, and some are even hardware dependent (e.g., Nvidia’s nView). But there are a couple of free programs that are worth recommending.

mdesktop is what I use. It’s a small, unobtrusive program with customizable keyboard shortcuts.

Desktops is available from Microsoft. Advantage over mdesktop? It offers a little preview of the active desktops when you click on the icon, in case you’re not sure which desktop you want to switch to. However, it also has several disadvantages compared to mdesktop. It’s slower to switch desktops, it changes graphics mode on alternative desktops (Aero is off), and it offers no way to quit the application (you have to kill the process manually and it’s hidden from the active application list).

I’m optimistic that Windows 8 will finally have a good virtual desktop manager. But I don’t have a good reason to think that. I just think Metro looks nice.

On the topic of MATLAB learning materials (covered previously here and lots more MATLAB stuff here), MIT has some online courses freely available. Here’s an “aggressively gentle” intro to MATLAB, and some more MATLAB resources. (Hat tip to MH)

Also here’s a link from an older post on xcorr (Patrick Mineault’s excellent blog). This course webpage has a bunch of examples in MATLAB code. They’re great for simultaneously learning MATLAB and visual neuroscience.

ScanImage is an excellent software package for controlling 2p scopes. It’s free and open source. It’s been actively developed and released to the public since its inception. RIght now they personnel involved are trying to renew their funding. To help keep this resource actively developed and free, please fill out their survey. It’s very, very short. Don’t take the resource for granted. It takes a lot of salaried time to keep the development going and adding in new features.

By the way, ScanImage 3.8 (new features) and 4.0 (for ThorLabs scopes) are out now (3.5 and 3.6 are no longer supported; 3.7.1 is the current stable release) (link). If you haven’t already tried a new version of ScanImage out, you should. It doesn’t take too long and the feedback is very helpful. Don’t assume that everyone else is already sending in the same feedback.

A colleague once told me: “in MATLAB, drawing a raster plot is a trivial, one line command”. True, but then you spend another 10 lines of code trying to make it not look like complete crap. Which is both time consuming and futile. In the end, you know you’re going to be spending half a day with Adobe Illustrator to fix it. But it does all start with one line of code.

Here’s some code to draw simple, one line raster plots:

function raster(in)
if size(in,1) > size(in,2)
    in=in';
end
axis([0 max(in)+1 -1 2])
plot([in;in],[ones(size(in));zeros(size(in))],'k-')
set(gca,'TickDir','out') % draw the tick marks on the outside
set(gca,'YTick', []) % don't draw y-axis ticks
set(gca,'PlotBoxAspectRatio',[1 0.05 1]) % short and wide
set(gca,'Color',get(gcf,'Color')) % match figure background
set(gca,'YColor',get(gcf,'Color')) % hide the y axis
box off

As an aside…

Looking for a wry take on MATLAB’s shortcomings from an anonymous neuroscientist? Try Abandon MATLAB. This blog’s posts include these gems:
Matlab doesn’t know how to draw one ball out of an urn containing one ball
The Mathworks don’t even know how to look up functions in their own global namespace
And this image (source):

Like the Mayan astronomers over 600 years before him, Tycho Brahe was a data factory. A data factory in the same vein as the Human Genome Project. Or as the Allen Institute for Brain Science is today.

In most formulations of the scientific method, the hypothesis is generated somewhere in the middle. What comes first is careful observation. What comes last are the hypothesis-testing experiments and controls. Often these individual steps are handled by different scientists and groups. For example, the Human Genome Project’s primary goal was one of observation, not hypothesis testing. Perhaps the same is true for the Mayans who observed the movement of Venus across the sky.

Tycho Brahe did what the Mayans did, 600 years later and in even more detail. He had the best primary data for the positions of celestial objects in the sky at the time. It was this high quality data that enabled Kepler to work out elliptical orbits for the planets.

A new website, Neurotycho.org, is set out on a similar mission. There, you can download data from primate experiments and reanalyze it. The setup seems as if they’ll accept data from other people at some point, but so far, it’s a one lab show. That one lab is Naotaka Fujii’s RIKEN lab.

There are similar efforts elsewhere in neuroscience. What’s unique about Neurotycho is that they seem to be reaching out to a very general audience. They also have a wiki with more details.

Apple’s Safari web browser v5.1 has an annoying behavior where tabs reload/refresh like crazy. This can cause lost work and data.

Disable the problematic behavior this way:
1. Close Safari

2. Open a terminal and enter this command

defaults write com.apple.safari IncludeInternalDebugMenu 1


3. Restart Safari. You should see a new menu to the right of “Help” called “Debug”.

4. Select “Use Multi-process Windows” so that it no longer has a checkmark beside it.

That should fix it. (via)

Fritzing is PCB design software (EDA) in the spirit of Arduino and Processing. It’s open source, cross-platform, streamlined, and simple to use. It doesn’t do simulations, but you can lay out your circuit in a GUI that looks like a prototyping board, then move to circuit layout, and finally PCB design. Check out the video above to get an idea of the workflow of Fritzing.

PCB manufacturing is something that I haven’t covered in Labrigger before. Partially because I didn’t think there were good free software tools to use. I’ve used proprietary stuff in the past (Tanner EDA, due to my background in MEMS), and the free (as in beer, not speech) version of EAGLE is popular. But most of the GNU-licensed PCB design software was not quite ready for primetime in my opinion. Fritzing is the first thing I’ve seen that is really well done and has the potential for wide adoption.

Anyways, now that Fritzing is here, it’s worth mentioning how affordable it is to have a custom board house make your custom PCB. It’s so cheap, I really don’t recommend making PCBs at home or in the lab, although there are plenty of ways to do so. This isn’t anything new, cheap custom PCBs have been available for decades, but not a lot of people who make their own gadgets in biomedical research know how easy it is.

Fritzing has their own fabrication, named Fritzing Fab. They’re based in Germany. But Fritzing will output files that you can send to other board houses. A Google search for “custom PCB” will return a hot mess of hits. I recommend you look for one in your geographical area. If you’re in the US, this list is a good start. I’ve used Advanced Circuits before, but any of these firms are probably solid.

Should I make a PCB?

If you’ve got more than 20 interconnects to do, then it’s probably worth making a PCB. However, if you’re really unsure of your design and might need to make several changes, then maybe the threshold should be closer to 30 interconnects. Because although PCBs can be minimally modified (cutting traces, making jumpers), they’re harder to change.

Turn around time is another consideration. Custom PCB houses are built for short turn around, but they’re still 1-5 days, typically. So if you need it right now, you’re better off wiring it yourself. Especially if there is a low number of interconnects.

BTW, Fritzing is selling some nice Arduino kits as well (link).

More materials…
A video where Fritzing is used for a slightly larger circuit design
Labrigger posts on Arduino