Just some things to think about if you find yourself working in a Windows environment for scientific purposes. This thread will grow over time. I'll try to bump it as it gets updated.
Reconsider
Windows is an environment fraught with perils for the unsuspecting scientist who is trying to figure out how that cool new part works, or who wants to measure something in anything like real time. There are lots of situations where people are now virtually forced into using Windows (LabView, I'm looking at you) because people like to use in-house, custom-built drivers that us scientists have to buy from the people who develop the instrument. It's sometimes possible to avoid these situations; a number of PCI vendors are now providing *nix drivers for their units. Some still aren't. After dealing with two project's worth of development of Windows drivers for data input devices, it now seems clear that in many cases the "ease" of use with Windows isn't worth the pain of troubleshooting away the unintended interactions of the operating system with what you're trying to do.
Keep in mind that Windows doesn't play nicely, in real time
Attempting "real time" data input with Windows is a lesson in futility. The operating system jumps in and takes control of the processor at seemingly random, and unavoidable, times. If your data stream is constantly hitting your input buffer and you care about millisecond accuracy in your timing, tread carefully. Especially make sure that your buffer is large enough that it can handle the OS taking over the processor for a few hundred milliseconds without having your data overflow the buffer and be lost.
Never trust the Windows system clock for absolute time
It returns an absurdly high-precision time stamp. This doesn't appear to have anything to do with reality. Even if you're using a Network Time Server, you still are dealing with a few milliseconds of lag between your computer and the time server. Use a local GPS unit with a 1 pulse per second (PPS) signal so that you can synch the local (Windows) time with GPS time.
This is especially true if you're using some sort of "real time" runtime software (e.g. LabView or LabWindows and a "one second clock"). It doesn't take too long for that clock to start getting off by a few parts per thousand (e.g. milliseconds). If you never care about sub-second timing, this probably doesn't concern you. If all you care about is, say, data logging the security cameras at your store, the Windows clock is fine. If you want to synch your data with other phenomena in the outside world, then you need to use something external to the system to synch things up.
Turn off everything that you can
Windows boots with a large amount of unnecessary software at launch. Most people know about this, but sometimes we forget that we've changed machines are we're no longer working with a clean build and you need to open the task manager and clear out anything that looks extraneous without killing the OS. Sometimes this is difficuly; sometimes this is not. If you have a good one (and congratulations if you do!), consult your sysadmin to try to turn everything off that you can. It sounds like a silly thing to have to track, but having the Windows updater boot while you're in the middle of an overnight data acquisition isn't fun.
Tuesday, August 31, 2010
Thursday, August 26, 2010
Giving up on SciPy
1, cont'd...
Okay, so after three days of trying to get SciPy installed on a system in which I don't have root access, I'm giving up. Can't get the appropriate ATLAS builds, etc, etc, etc. I have managed to get Numpy, matplotlib, and other working. So my python experience may continue even with the SciPy setback.
Lots of interesting stuff going on out there. For people who haven't seen it yet, GRIP is pretty darn cool. It's hard to believe that just a year ago we were flying ADELE down in Florida, and now this mission is heading directly into hurricanes. There are some great pics on the website of them loading the instruments into the Global Hawk, which I hadn't realized was HUGE. Almost as big as the NSF GV that we flew on last summer. Good hunting, GRIP!
Okay, so after three days of trying to get SciPy installed on a system in which I don't have root access, I'm giving up. Can't get the appropriate ATLAS builds, etc, etc, etc. I have managed to get Numpy, matplotlib, and other working. So my python experience may continue even with the SciPy setback.
Lots of interesting stuff going on out there. For people who haven't seen it yet, GRIP is pretty darn cool. It's hard to believe that just a year ago we were flying ADELE down in Florida, and now this mission is heading directly into hurricanes. There are some great pics on the website of them loading the instruments into the Global Hawk, which I hadn't realized was HUGE. Almost as big as the NSF GV that we flew on last summer. Good hunting, GRIP!
Wednesday, August 25, 2010
Hello World
Things I'm working on now:
1. Learn Python
Every few years I take a hack at trying to really switch away from using IDL. One of these days I'm going to be in a group that doesn't support my proprietary programing environment fix. Closely associated with this are getting PyFITS installed and starting to extend things like ROOT into my daily life. We'll see how this goes.
2. Keep up with the blogging.
I'm writing quite a bit in my personal life lately. I want to try to keep up with this on the blog. We'll see how long this one lasts. I tracked down my old blogs, and they all seem to die after about a week's worth of effort. I think my problem is that I tend to assign "blog writing time" (or writing time in general) to periods of time that aren't always free (Friday afternoons were a terrible idea).
1. Learn Python
Every few years I take a hack at trying to really switch away from using IDL. One of these days I'm going to be in a group that doesn't support my proprietary programing environment fix. Closely associated with this are getting PyFITS installed and starting to extend things like ROOT into my daily life. We'll see how this goes.
2. Keep up with the blogging.
I'm writing quite a bit in my personal life lately. I want to try to keep up with this on the blog. We'll see how long this one lasts. I tracked down my old blogs, and they all seem to die after about a week's worth of effort. I think my problem is that I tend to assign "blog writing time" (or writing time in general) to periods of time that aren't always free (Friday afternoons were a terrible idea).
Subscribe to:
Comments (Atom)