Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, November 14, 2011

ColorHug

OK, so you're into photography. Like most of us, you download your pictures from your camera, or you scan your negatives, then process them on your computer. Nice. Fun. Convenient.

But frustrating. Why? Because of color. As in, the color you saw in the scene is not what you see on your computer screen, which is not what you see on your other computer screen or what people will see online or what you end up with from your printer.

Coffee Break
This is one solution to color problems, of course. I love black and white; and with no color there is no problem with color casts.

Maiko at Shochikuza theatre in Osaka.

There's lots of reasons. Your camera doesn't really capture the "true" color (if you shoot negative film you know just how malleable "true" really is). A printer can't really reproduce all colors your camera can capture or your screen can show; it fudges things outrageously just to give you a vague impression of similarity.

But one frustrating reason is that your screen isn't neutral. Pretty much all screens have a color cast — they're bluish or reddish, or a green tint, or have some odd color shift between lighter and darker colors. And monitors change as they get older. The backlight changes color with age, and the screen pixel colors themselves can change with years of exposure.

So you carefully edit your pictures to look great on your computer. But if your screen is, say, a bit blue, then you will have added extra red to your pictures to compensate for that. They'll look reddish on other peoples screens, and come out red-tinted on your printer. Of course, their screens and your printer have color casts of their own, making things even worse.

You can't do much about other peoples screens. But at least you can do something about your own. Most image-related software today can handle "color profiles". That is, a file that describes how your monitor (or camera, or printer) handles color, and lets the software compensate for it. If you have a good color profile for your particular screen then your software can take it into account. Everything will look "right", that is neutral, as you work with it. It won't fix other peoples screens of course, but at least they get a nice, neutral, well-balanced image without color casts to begin with. It should look better, at least, if not great.

Yodobashi - Color
Why can't we just eyeball the color cast ourselves? Because we are really, really bad at evaluating color accurately. Any hint of the right color and we "fill in" the rest ourselves. The picture above is black and white. I added a few areas of solid color tint to it — red, green and blue areas for the signs in the background, muted orange for skin areas, a few splashes on clothes and bags. All colors are solid tints, and just vaguely similar to the real colors. Most of the image is still in black and white, with no trace of color.

Still, at first glance it looks like a natural color image to most people, and some refuse to believe it's largely black and white until you explicitly cover up the colorized parts. Our brains see the hints of color and fills in the rest by itself.

How do you create a color profile? You use a "colorimeter" — a device that measures the color on a screen, or paper — together with software that takes the measurement and generates a color profile from it. There's a few such devices for sale out there like the Pantone Huey or X-Rite ColorMunki. They work well enough. But the software is not open source, so you're dependent on them to support you in the years ahead. If the company goes bust or they decide to discontinue support for newer OS version your expensive device ends up as a paperweight. They also typically work only on recent Macs or Windows machines.

Enter ColorHug. It's a colorimeter, built as open hardware (schematics and the firmware is available for you), and with open source software for Linux. It's a fair bit faster than other systems, and less expensive too. The developer is gearing up for a first production run, and has just announced an advance order program that gets you a unit at a discount in exchange for helping out with reporting bugs and issues.

This is very useful for Mac and Windows users too by the way. The software is for Linux, but the color profile files are the same for every operating system. You get a bootable CD with a Linux system, so you can boot the CD, calibrate your monitor, then use the profile in your own operating system with no problem. And of course, the client software is open source, so somebody is bound to port it to both Windows and Mac if there is enough interest.

I've sent in my preorder already. Interest seems huge, though, so I can only hope I'll actually get one.

Wednesday, August 31, 2011

Linux Runs Computational Neuroscience

Test Tubes


What OS is actually used in computational neuroscience? A recent paper in Frontiers in Neuroinformatics (let's hear it for Open Access!) has looked at this.

There's plenty of data there, but the main finding is that the most used system is Linux. Most researchers in the field use more than one OS, but Linux is the most common system, used by more than two-thirds of respondents, with Windows in second place with half and OSX third with a quarter1. Some people use Linux as their primary OS while others use it in a virtual machine or logged in to a remote machine somewhere else. Of course, many, even most people use more than one system.

One reason for the popularity of Linux is that many computational research tools are developed primarily for Linux and Unix; another one is that clusters and supercomputers mostly run Linux today. If you need to run your model or computation on a larger cluster you will need to use Linux in one form or another. But it's not simply a matter of necessity; the paper finds that satisfaction is also highest for Linux. Windows is most likely to be used specifically to access Word, Outlook or other specific software that only runs on Windows.

Now, the paper is based on an online survey and a self-selected sample of respondents; this is problematic at best. But it does fit with my own anecdotal experience. At OCNC I saw some people that primarily used Linux, but many more dual-booted Linux and another OS, or combined more than one OS using virtual machines. I often see similar setups at conferences and meetings as well.

Virtual machines have long been used on big servers and mainframes, but are fairly recent in the desktop world. A virtual machine — a VM — is a piece of software that emulates a real computer. You can install an operating system and applications in it and the OS will think it has direct access to the real hardware. In reality the virtual machine runs as an application in a host operating system, and tightly controls the access to the real system.

A VM is extremely convenient. You can start and stop the system it hosts at any time; you can save the entire system state into a (large) file on disk and go back to that saved image whenever you want, or copy that image to other computers to run there. It lets you create a specific software environment guaranteed to be the same every time you use it. Modern PCs lets a VM give out controlled access to the real hardware so there is not much speed reduction.

You can use a hosted Ubuntu Linux system for your software development and data analysis, use a remote cluster for your actual simulations, and the desktop OS you're already familiar with for email and web surfing. Or run Linux or OSX as your primary system, then a copy of Windows in a VM to access legacy Windows-only applications. Or run a second copy of your system in a VM, to make sure the environment is identical every time you run a simulation.
 
The major drawback of the virtual machine approach is really that each hosted OS really needs as much memory and disk space as if it was the only system on the computer. But modern laptops tend to have plenty of both, and for large simulations you're likely to use a remote cluster anyhow.

--
#1 This seemed a bit low to me at first. But this survey counts desktops and clusters as well, not just laptops, and OSX isn't nearly as prevalent in those areas as in portable computing. Also, Apple laptops have a very distinctive, uniform design; you end up with a positive bias where you remember seeing them but forget about all the anonymous, generic laptops that were really the majority at the meeting or the conference.



Monday, July 25, 2011

Firefox 5

I upgraded my web browser to Firefox 5 the other day, from version 3.6. The whole process was very uneventful, in a good way. For older versions of Ubuntu there's a PPA (a special repository) for recent Firefox releases (the current version of Ubuntu has Firefox 5 already), and upgrading was as easy as adding the PPA, do an upgrade then restart the browser. I'm sure it's just as easy for OSX and Windows.

Kanda

Browser.


The browser seems to work flawlessly. My plugins, including the all-important Zotero plugin, were all compatible with the new version, and all websites work as expected. The most obvious change is visual; the interface and the theme is cleaner and tighter, with small tweaks and improvements all over the place. The browser is also noticeably snappier, and loading time in particular seems to have been improved. I don't think it uses less memory than before, but it seems better at giving back unused memory again. It's difficult to judge properly from casual use, though.

The Awesome Bar is one of the best Firefox features, yet one of the most overlooked. Firefox 5 seems to have tweaked and polished it, making it even better than before. It took me a long time to try it out, but once I did, I got hooked. I rely on the Awesome bar all the time1, and use it more than my bookmarks toolbar.

Say I want to go to my Flickr account. Instead of having to use the mouse to find the link in all my bookmarks (like many people I have hundreds and hundreds of them), I simply go to the location bar (ctrl-l is a useful shortcut) and start typing "f", "l", "i". Immediately I get a drop-down list with web pages that could match, both in the title and the contents of the web page. The list is based on places I visit, and the top results are those I visit often and that I've visited recently. And true enough, just writing "f" is enough for me to get my picture stream as the first choice, my Flickr home page as the second and updates to my Flickr groups as the third. Perfect!

The "app tab" is a very useful addition to Firefox 5. If you have a site you keep visiting all the time — Gmail, Google+, Twitter, Facebook or some site like that — You can right-click and "pin" the tab. It'll sit as a small iconified tab on the left edge of your tab bar. It's always available, and any link to another website will open in a new tab rather than replacing the pinned tab. The icon is supposed to change color whenever the web page changes2, but this doesn't work reliably for me; Google Reader updates, but Gmail only updates sometimes and Google+ does not update at all. I hope they improve the change detection in the next release, along with an option to disable the notification. Another minor issue is that the tabs only appear in the first window tab bar. If you open another window the app tabs are nowhere to be found. It'd be nice if they were persistent across all windows.

The one real disappointment is "tab groups". It sounds like a neat idea: group tabs that belong together — tabs related to a given project, for instance — and deal with them as one group. Unfortunately the user interface seems completely broken. It's still incomprehensible to me even after reading the documentation and the online help. The groups are hard to find; tabs don't stay in groups; tab groups disappear; new tabs get silently added for unknown reasons; and there seems to be no way to not be in a tab group once you start using them. It's frustrating and counterintuitive. For Firefox 5 I'd suggest you simply stay away from tab groups completely.

Other than these new bits ­— one positive, one negative — it really works just like the older version, except faster and neater. This is a good thing. A browser is an indispensable part of the desktop by now, and you really don't want any surprises. Browsers should Just Work, and Firefox 5 manages to do exactly that.

--
#1 Linux has a similar desktop application called Gnome Do. It's just as useful, and I use that one all the time too. Do and Awesome Bar are not just useful — using them reduces my mouse and trackpad use too, something my wrists are very happy for.


#2 This may or may not be a good thing, depending on your tolerance to interruptions.

Monday, July 11, 2011

Thunderbird

Geeky post ahead: I'm a long-time Linux user1, and Evolution has been my mail client of choice for many years. It works well enough, but it's always had its share of bugs and shortcomings - with the calendar especially - and I've kept hearing good things about Thunderbird, the Mozilla foundation email client. I've been wanting to try it out but the effort of switching held me back. But now Ubuntu, the Linux system I use, has announced that they will switch the default mail application from Evolution to Thunderbird with the next version and that has prompted me to finally make the switch.

In short Thunderbird mostly works the same as Evolution, but with fewer bugs and annoyances. The big difference - the one feature that had me thinking of switching - is that Lightning, the Thunderbird calendar, can seamlessly synchronize both ways with Google Calendar. Other benefits are quite minor; for instance, with Thunderbird you can always jump directly to the next unread message even when it's in a different mail folder, whereas Evolution requires you to select the folder manually. You can undo message deletion with the general "undo" command, while in Evolution you need to view your deleted messages, find and select your email, then undelete it. Small things, true, but they add up for a much smoother overall impression.

There are a few areas where Evolution is clearly superior. The automatic account set-up worked better with Evolution; I had to manually re-edit my mail accounts after setting up Thunderbird in order to get them to work, and it never gave me any useful feedback as to what wasn't working (or that one account wasn't working at all). Also, the manual mail check button doesn't seem to work consistently with Thunderbird, and there is no visual feedback when it fails. Overall, though, Thunderbird is an improvement, if an incremental one.

A final note of caution: actually moving my accounts, address book and my archived email from Evolution to Thunderbird was a bit messy and error-prone. You need to set up your accounts manually, add a temporary account to import your old email, and you need to export your address book then use an external converter to get it into a format Thunderbird can read. It's certainly doable and there's step-by-step guides out there but it's still nothing I would do lightly. I expect that Ubuntu will will have an import function to automate the move from Evolution for the next version. If you're not in a hurry to switch I would suggest you wait for that.

--
#1 I've been using it as my OS of choice since my days as a computer science student and I'm happy with it. But that's not the sole reason; nowadays Linux is the de-facto default operating system for much of neuroinformatics, computational neuroscience and high-performance computing. Simulators, languages and related software tend to run primarily on Linux, and most computing clusters and supercomputers today use Linux adapted for their particular hardware.

Wednesday, November 5, 2008

Ubuntu

There's been a somewhat stressful few weeks lately; this week we're shooting the final video presentation for the project, and ATR has its yearly Open House. But while the run-up has been busy this week is remarkably slow as all the shooting, presentations and visitors pretty much preclude any real work. So I've taken the opportunity to upgrade my laptop to the newest version of Ubuntu.

For those that do not know, Ubuntu is an operating system (like Windows or Mac OSX) based on Linux. I've used Linux for many years but then, I'm pretty much hopelessly geeky. Of course, lots of people - you included - are using Linux without knowing it: you'll find it in your cable modems, cable-TV set-top boxes, routers and other electronic devices; many of the Internet sites you visit are served to you by Linux. When you use any Google application like Gmail or Google Maps you are using Linux. But while Linux has worked great for me on my desktop I'd be the first to admit that Linux on your PC is very much not for everyone. Up until now, that is.

Whenever I install a new version I always spend a good deal of time tweaking the new system to fix small issues and get everything working properly. It can take a couple of days of off-and-on tinkering to get everything shipshape. This time it took all of ten minutes, mostly just reentering passwords for my email accounts and such. My only real tweak is getting my keyboard to work. I have the very oddball requirement of using a Swedish keyboard layout on a a Japanese laptop keyboard that is missing a couple of keys vital to Swedish (specifically, the Swedish key for "<>|" to the left of 'z' is missing). I basically need to tell Linux to use a different, unused key for that. Of course you could argue that Linux sucks for forcing me to do such a remapping, but under Windows I have never found any way to do it at all. Under Linux this is a bother; under Windows it is impossible.

Other than the (self-inflicted) keyboard thing everything - and I mean everything - worked right out of the box. Wireless connections, suspend and resume, and things like connecting second screens have been common problem spots for laptops, but now it all just worked with no tweaking needed whatsoever. The included software (and there is a lot included) is all just a bit more polished and smooth than before. The F-Spot photo management software is updated and a lot more polished; the Gimp image editor is steadily improving too and is good enough that I prefer it over Photoshop even though we have both at home.

There are a few things not installed by default that I think people should get. Installing things, by the way, is generally much easier under Linux than Windows. Just about any kind of software (we're talking tens of thousands of packages here) is available through the "package manager". Just open the "Add/Remove applications" and you'll get a nice categorized list of what's available. One thing I recommend is the Inkscape drawing program. Smooth and polished; I use it for all illustrations and drawings. The included spreadsheet is pretty good, but I prefer Gnumeric as it is faster and more stable. Install Macromedia Flash; it's not included by default because its license doesn't allow it. Also look for VLC, a good film player, and "Ubuntu Restricted Extras" so you can play mp3 and various other music and movie formats.

But if you have some specific application on Windows you just can't do without? Well, we do have our computers for running our applications after all, not for using operating systems. If your program is important to you and there is no good alternative in Ubuntu then you should of course use Windows. If it's only one or two programs, however, and especially if they are "productivity apps" - tax software or stuff like that - then there is the possibility of running it under Ubuntu using "Wine". It is a piece of software that lets you run a lot of Windows software under Ubuntu. It is not perfect by any means but it does work decently. It may well be a solution for that one important software package you still need.

Anyway, just wanted to state that I'm happy with Ubuntu and you might be too. You can download and burn a CD with Ubuntu, then boot from that CD to try it out. It will be a bit slower than having it installed but it will not touch your computer in any way so it's a completely safe way to see what it's about.