PDA

View Full Version : Scientific software advice


ime_NY
2006-06-10, 15:41
Hi,

I'm seeking the advice of anyone here who is involved in the scientific field. I got into a conversation with my advisor, and he swears by MATLAB for designing his experiments; he's a neuroscientist who programs his behavioral tests on MATLAB. He also says it can be used to do statistics, thereby saving me $ so that I don't have to buy a stats suite. Here are my issues:

1.) what are the alternatives to MATLAB? I've read some stuff about Mathematica.

2.) what stats packages have you used? which one do you prefer? have you used MATLAB or any other programming software to do stats?

3.) This would be my first attempt to do any type of programming; my mentor is willing to help me adjust to it, but is it a hard program for beginners to pickup? do you recommend I start on a different level, such as using C++?

4.) Professional version or student? I ask b/c whatever program I become proficient in, I'd like to stick with throughout grad school.

5.) recommendation for additional tools for this program or any other program?

Thank you so much in advance.

spikeh
2006-06-10, 15:52
Re: Programming

You're bright. You're going to pick programming up one way or the other, I wouldn't say you should start with one particular language. Whichever is more pertinent to you, go with that.

Not very helpful but really, across C, C++, C#, Java all the rest, there isn't that much difference in the basics. If you were thick I'd tell you to start out with Java but you're not :)

Brad
2006-06-10, 16:04
1.) what are the alternatives to MATLAB? I've read some stuff about Mathematica.
FreeMat (http://freemat.sourceforge.net/) and Octave (http://hpc.sourceforge.net/#octave) are both free, open source alternatives to MATLAB. I've used Octave on my Mac for a few university classes and it works pretty well in conjunction with gnuplot and AquaTerm for plotting pretty graphics. It's a small challenge to set it all up properly, though.

ime_NY
2006-06-10, 16:21
Thanks spikeh and Brad.

I've always steered clear of programming, but 2 things happened:

1.) I realized that in order to be innovative in Neuroscience research and complete a graduate curriculum that doesn't involve slicing up hundreds of animals, I'd need to design a behavioral task based on some language that I've always feared....

2.) Ever since making the Switch, I've become intrigued by computers, and I'm curious as to what limits I can push these macs. So why not start to push the envelope on something that will actually get me somewhere?

Thanks again!

euain
2006-06-10, 16:26
When I was still a scientist, we used IDL (http://www.ittvis.com/idl/) for a lot of analysis, graphics etc.

Seemed to work well enough.. and might suit your needs..

Anonymous Coward
2006-06-10, 16:33
Another math package is Maple. As far as I know, the student versions of Matlab, Mathematica, and Maple are identical to the professional versions. Matlab has additional packages for special purposes, like signal processing, but at a relatively significant price, even at student pricing.

It is not a hard program to pick up. I wouldn't necessarily go for a programming language, depending on what kind of things you are going to be doing. (You didn't mention that. As they say, "the right tool for the job", so with more details, you'd get different advice.)

If you want to get started, there is a free program with "matlab-like" commands. It it Sysquake LE and can be obtained at www.calerga.com.

Matlab has been developed over the years and parts of it are "messy". That is, the interface is not consistent and changes from version to version. Programs developed in one version may not work in another version without small but annoying modifications. Since Matlab has been around so long, many people have written scripts which are available as ".m" files which provide functions for many uses, including providing capabilities duplicating those provided by the ones for sale by Mathworks.

Matlab has a graphical mode called Simulink.

If you are concerned more with input and output from laboratory instruments, another software package is LabVIEW. In its present version, most people use it solely in a graphical interface. It also has math/statistical functions readily available, but not on the level of Matlab. If I remember, though, these application add-ons are available for download and not for sale. LabVIEW is an expensive program, but is available in a student version ($60-80) with an instruction book (often available on eBay). Make sure you get a book with the student version and not the evaluation or trial version. LabVIEW is very easy to learn for basic tasks.

A combination of Matlab and LabVIEW is a popular combination. Matlab can be used to control LabVIEW to obtain external data which is then processed by Matlab. I can't give much detail on that, though, because I've only done it with early versions of the programs.

Matlab is programmed with "C"-like or "C++"-like commands, so learning either of those first wouldn't hurt, but is not necessary.

ime_NY
2006-06-10, 22:24
Thanks Anonymous Coward and euain.

Well basically, I'd ultimately like to be proficient in something that's versatile. Since neuroscience is extremely cross-disciplinary, I really can't answer what my needs are for years down the road. In the last 5 years, the field has had me working with rats, operant -condition + drug delivery paradigms, excel macro building, PCR and gel electrophoresis, and administering visual attention tasks. Perhaps grad school will lead me to build a model neural network for the progression of Alzheimers.... or maybe one day I'll be mapping out specific neuron acitivity of drug addicts. Who knows? But one thing's sure: computer programming of techs, grad student, and outside hobbyist has helped me in my past work, and the ability to program may be one of the keys to my future success.

As of right now, I'm spending the next 7 weeks in Duke Neurobio working with MATLAB for visual attention projects. The project involves presenting pictures @ different durations and recording the dispensing of liquid, and perhaps it may include recording eye movement. I'll also be responsible for analyzing the stats.
But once I get back to my home instition, it'll be back to genotyping and a different type of visual attention project.


sorry if my answers seem too vague.

Anonymous Coward
2006-06-10, 23:47
It sounds like you'll be using Matlab or a Matlab-like program because itis a standard in the field in which you'll be working. Mathematica and Maple might be more "elegant", but not as practical since you'll have more examples.

But it also sounds like LabVIEW would be good to learn to take advantage of automatic data collection. You can use it to control liquid delivery if you have an automated system. Lawrence Berkeley Laboratory uses that program (or did just a few years ago) to control experiments using a cyclotron and Apple uses it for some testing. It is commonly used to control power supplies and signal generators and receive input from oscilloscopes (just to mention some representative inputs and outputs).

ime_NY
2006-06-14, 11:50
Thanks to everyone for the wonderful advice!

I ordered by student version of MATLAB...... and there's no doubt that I will starting some type of thread in the Programmer's Nook.

Thanks again

Kickaha
2006-06-14, 12:13
Well, I'll put my two cents in, even though it's not a judgment of your purchasing decision (if it's the std in your field, and you have a built-in support network, that's reasonable), but...

Can anyone explain to me how in the &*(%#$@ MATLAB *EVER* got to be popular?? Seriously. I've used it. It's like programming in FORTRAN, but, y'know, not as *fun*. Or as clean. Or as simple. (And yes, those are sarcasm.)

The thing is a mess. It's like it was written by a bunch of propeller-head engineers who didn't really know the math, but golly, they sure wanted a kompooter program to do it for them. The input language stinks, they keep changing it on everyone, and it's just a giant hack.

Mathematica, OTOH, is an incredibly nice, well thought out, well architected, and powerful system. It's the MacOS X to MATLAB's WinXP. Or Win98.

I just don't get it. I really don't.

scottmacd
2006-06-17, 16:20
I am suprised that no one mentioned the R programming language for stats:

http://www.r-project.org/

This program has the additional benefit of being free.

Additionally I would like to point out that MATLAB and Mathematica are designed for very different tasks and that you should probably steer clear of Mathematica as it is a black hole of misery created by one of the most arrogant men in science. (ever try to read A New Kind of Science? 1200 pages of "look how smart i am")

Programming in MATLAB is quite enjoyable, almost everything you could possibly want to do is precanned, you just use it. And the documentation is superb.

ironlung
2006-06-18, 02:39
scottmacd. I actually happen to like mathematica quite a lot, and prefer it over matlab. I think mathematica is cleaner (my opinion of course). That being said, wolfram is an arrogant pr*ck who thinks way too much of himself. Mathematica was born at UIUC (where i currently study), and we get an excellent discount on it, making it practically free.

I agree that matlab and mathematica are designed for two different tasks. In my opinon, mathematica is better at handing 'mathematics' (i.e. equations) while matlab is better for manipulating data.

I had to integrate over 1500 integrals at the same time once. Matlab couldnt do it. Would hang every time. Mathematica was able to do it beautifully. However mathematica in windows would crash trying to attempt it. Mathematica on a powermac was able to do it with ease, which is one of the main reasons why i switched.

Banana
2006-06-18, 03:02
...wolfram is an arrogant pr*ck who thinks way too much of himself...

Clearly a product of childhood trauma of having a wolf rammed up his ass.

ironlung
2006-06-18, 04:34
Clearly a product of childhood trauma of having a wolf rammed up his ass.

I think ur sleep deprived banana







And so am I.

sebatlh
2006-06-18, 08:58
Matlab is kind of like Word. It can do just about anything, but it still sucks ;)

If you decide to use matlab, just be prepared for a lot of "WTF!?!?" and you be ok :cancer:

I don't know anything about alternatives though :(

Brad
2006-06-18, 09:01
If you decide to use matlab, just be prepared for a lot of "WTF!?!?" and you be ok
Why do you say that? It's always worked reliably for me when I've used it. The analogy to Word is pretty bad because Word misbehaves with some unpredictable results at times, but MATLAB always calculates results the same, provided you don't screw up the input.

blakbyrd
2006-06-18, 09:07
Clearly a product of childhood trauma of having a wolf rammed up his ass.
:lol:

(Sorry)

sebatlh
2006-06-18, 15:55
Because I spent 3 hours yesterday to get a colorbar to display correctly...
Turned out that contourf don't play nice with custom caxis and colorbars :(

The behaviour was consistent at least... :p

ime_NY
2006-06-18, 23:47
So I picked up MATLAB. But for some reason, I cannot run it b/c I need to "install X 11"....?


I take it that I must install it from the OS X install disc(s)? How do I go about doing this? And what exactly does X 11 do? Does it enable MATLAB to work with the UNIX architecture?

Brad
2006-06-18, 23:53
Yes, it's on the Mac OS X installer. It's an optional install. See this thread (http://forums.applenova.com/showthread.php?t=17300) for details.

X11 is a windowing system shared by various Unix and Linux distributions. I behaves a bit differently than the "native" Aqua interface on Mac OS X. See here (http://www.apple.com/macosx/features/x11/) and here (http://en.wikipedia.org/wiki/X11) for details.

ime_NY
2006-06-19, 00:02
thanks, Brad.

I'll let everyone know how this project comes along....

hflomberg
2006-06-19, 10:51
On that note - Does anyone knopw a good freeware replacement for Minitab -- or spss for that matter?

gusmore
2006-06-20, 23:11
Matlab's easy enough to learn on your own, and it does have a benefit (at least in neuroscience, and especially for research on visually guided behavior) of being very widespread, and hence making it easier to poach program & code from colleagues. I learned it a few years ago to detect, analyze, and create summary figures for saccadic eye movement data. Unfortunately (at least right now & for the past couple years), it kind of sucks on Macs-for example I had a Dual G5 2.0 with 2.5GB RAM and the shuffling analysis I was doing still ran slower on that beast than the old Pentium 3 with only 1GB RAM that I was using at the lab (in short, it's slower on Macintosh). Who knows...I will say that Matlab also lacks strong statistics tools (the stats package is very basic) and that if you want to do anything sophisticated either program it yourself into Matlab, or learn R (I was too lazy to ever learn the latter, so I always did the former). You might also check out IgorPro; it's a wicked fast program, is widely used in neuroscience, and comparatively inexpensive.

ime_NY
2006-06-20, 23:22
Gusmore, I'll definitely check out IgorPro. What experience have you had in neuroscience?

Also, general question to the users of MATLAB:

how long did it take for you to be comfortable with MATLAB?

This is the first time I've ever attempted programming, and I'd like to get comfortable with it ASAP. One student has picked it up rather easily, but he admits to having a background in C+. One of the MD/PhD students said it took her 6 months, and she had experience in another language (not sure which one exactly). The postdoc whom I'm working with has been using it for a year or two.

gusmore
2006-06-21, 11:58
I had no prior programming experience, and Matlab is the first, and essentially only, programming language I know. It took me a month or two to become comfortable with it (though I should state during this time I was doing summer research and was able to devote a lot of time to learning it). As the previous people mentioned, the built-in help documentation is very thorough. Aside from that, the only other book I used was http://www.eece.maine.edu/mm/; (the book's most likely at your school's library). It's pretty good and clarified a few things not covered by the documentation. It also helps to have someone else's program that they've written and learn to follow the code until you understand exactly what the script is doing, if that makes any sense.