Urania

A blog named for the muse of Astronomy containing musings by an astronomer

Experimenting with a little Homebrew 0

Posted on March 01, 2011 by Juan

Well, today it finally happened.  I got sick and tired of MacPorts behavior of replacing every binary already included in the Mac OS with its own version.  I don’t need two versions of perl or python installed on my Macs and I am getting tired that every time I try to install a port, it insists on installing a complete perl/python installation or its own set of libraries the MacOS already has built in,  in order to install a small utility.  I know that MacPorts has some justification for this, but it seems messy to me.

As such, I started looking for alternatives and came back to homebrew, which I had discovered a few months ago.  It is a package management system in which everything relies on already installed Mac binaries/libraries as much as possible.  By default, homebrew packages are installed into their own isolated directory (/usr/local/Library/Cellar/) and then symlinked into /usr/local/bin, /usr/local/sbin, or /usr/local/lib directories as needed. But it is flexible enough that you can install it where ever you want and it will still run.  Another nice feature, it doesn’t require you install it as root, it can run completely as the user permission level!

The negatives of homebrew:

  1. There are no where near as many packages (they call them “Formula”) are available for Homebrew as for MacPorts or Fink.
  2. For an astronomer, another big problem, there is no TeX under Homebrew.

It turned out the first negative was a bit of annoyance, but I was willing to live with it because the installation was so much cleaner and most of the important packages I needed MacPorts for were already there.  The second negative turned into a postive because I discovered here is a very easy to install MacTeX package available now that installs a complete TeXlive installation, including AASTeX, by default!  It even has some nice GUI controls included for keeping it up to date.

What follows is a description of what I did to transition from MacPorts to HomeBrew+MacTeX.

  1. Backing up MacPorts: No need to not have a way to change my mind if this blows up in my face.  I backed up my entire MacPorts installation by using the command

    tar czvf /opt_backup.tgz /opt

    and then when that was done, I had a 1.6 Gig tarball at the root level of my drive called opt_backup.tgz.

  2. Disable MacPorts: At this point, I deleted the /opt directory and commented out the commands in my ~/.tcshrc that added those directories to the PATH environmental variable.   If you use the default bash shell, you will need to edit ~/.bashrc to disable MacPorts.
  3. Install Homebrew: Following the directions on the Homebrew site. I originally wanted to place homebrew in its own custom install directory (/usr/local/homebrew).But after reviewing the Homebrew installation documentation, I came to realize that using the default /usr/local location for the install makes the most sense.

    I did this in the recommended manner, using the install script, which does some nice permission checking to make sure things will run nicely before installing. Since my default shell isn’t bash, I had to switch to it, then just run the install script from the command line:

    bash
    ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"

    The first time I ran it, it failed because my permissions for /usr/local had been tweaked. So I had to run the command

    sudo chown -R root:staff /usr/local

    to get the permissions so the script could run.

  4. Activate Homebrew: Since I am not using a custom directory for the installation, there is not configuration needed in terms of setting up the environment. /usr/local/bin/ is in the default PATH, so as soon as I start up a new terminal window, homebrew is available! Otherwise, I would have to edit my default ~/.tcshrc or ~/.bashrc to add the homebrew binaries directories (bin and sbin) to the PATH environmental variable.
  5. Install my favorite packages using homebrew: Installing packages in homebrew is just a matter of making sure the Formula for the package exists (all the publicaly available Formula are here) and then typing

    brew install (formula name)

    So for example, installing CFITSIO was just a matter of typing:

    brew install cfitsio

    Actually, this was for the most part simple for my attempts to install git.  It kept crashing with an error that said:

    The current directory must be set to the ITT directory.

    Well, ITT is the vendor of IDL (a package commonly used by astronomers for data reduction) and I discovered that I had accidentally set the IDL binary directory to be in the PATH ahead of the default system directories.  This meant the IDL version of a binary called install was replacing the system default version of this.  Just the kind of problem I was trying to get away from in MacPorts.  I  changed to my ~/.tcshrc to make sure the IDL binaries directory was later in the PATH than the system directories fixed things.  The only package this affected the install of was git, all the other packages installed without a hitch thus far.  The other brew formulae I installed were installed with the following commands:

    brew install subversion  imagemagick ghostscript macvim lynx coreutils findutils plotutils

    I can get a list of all the packages I have installed using the command:

    brew list

  6. Installing MacTeX: This was extremely easy, I downloaded the MacTeX 2010 package (The version I got was dated 10 Sept 2010 and was 1.6 Gig) and then uncompressed it and double clicked it. It installs using the Mac Installer. I did make sure to customize the install to remove some of the stuff I didn’t feel I needed, but I kept the GUI tools. Turns out there is a nice TeX Live Utility installed in /Applications/TeX that lets you customize which TeX packages are installed and can automatically update things. Review of this tool also showed a very astronomer friendly decision to include AASTeX by default! The TeX installation is in the /usr/local/texlive/ directory and it installs a symlink at /usr/texbin/ to all the LaTeX binaries. I added the following lines to my ~/.tcshrc file to get the tex binaries in my PATH:

    # Set up MacTeX 2010 by including path to that installation of LaTeX
    setenv PATH ${PATH}:/usr/texbin

So there you have it, how I went from using MacPorts and the literally hundreds of packages to support the few I wanted to trimming things down to a few packages in homebrew and one double-clickable TeX installer.

[Edited on Mar. 2, 2011 11:04 am to update the instructions to the default homebrew instructions, which are cleaned and easier to implement.]

Stealth Upgrade Fees: How to treat your customers like feces… AND how to fix it! 0

Posted on December 07, 2010 by Juan

[Added 4:45 pm on December 7, 2010: In the giving credit where credit is due category, Jonathan Monroe of Actual Technologies responded to my complaint (in the comments to this blog post) and has done a very nice thing, crediting me my upgrade fee.  I fully understand this is no small action for what I suspect is a smallish developer with reasonably small margins.  While I didn’t like how I felt extorted, Mr. Monroe does seem to be interested in fixing the problem.  So as you read this, be aware there was in fact a happy ending…]

One of the pieces of software I use a lot is database software, specifically MySQL.  Much of my research involves manipulating large amounts of data and using a free product like MySQL just made a lot of sense to me.

To get that data to easily move into Microsoft Excel, I have used Actual Technologies ODBC Driver for Open Source.  This awesome product worked beautifully for allowing me to move data from MySQL to Excel.  Until today…

Recently my university upgraded my Microsoft Office to version 2011.  I am not sure if the problem lies in Office 2011 or in Actual’s drivers, but Excel couldn’t see the driver.  I could open the ODBC Manager software and see the Actual drivers were installed and I had a valid license:

Open Source Database DSN Configuration
I could even see the serial number and confirm it was OK:

License Key

However Excel insisted it wasn’t installed.  Faced with this problem, I went ahead and downloaded the software again, figuring I might just need to reinstall it to get Excel to see it.  So I downloaded the new version of the driver and installed it.  Notice the installer claimed it was upgrading my drivers:
Install Actual ODBC Driver Pack
I then launched Excel and it did see my MySQL database success!!!!  Oh wait, why am I only getting 3 lines of data back for my query….  Opening the ODBC manager my worst fears are confirmed, my old license key is no longer valid!

Actual Open Source Databases DSN Configuration

I am able to confirm my old license number is in there…  the driver just claims it is “not valid for the current version of the driver”.  I try to erase the number thinking that maybe the driver just got confused and I got this error:

ODBC Manager

This acknowledgement that I had a previously valid license key that they are now rejecting strongly suggests they didn’t do this by accident. Actual technologies simply declared my old license number invalid.  Now I am rather upset.

An installer program should NEVER simply upgrade a user if the new software is going to declare their old serial number invalid.  That is just rude and frankly smacks of extortion.

After waiting a few hours for a response, I got one. I had a license key for the old version, NOT the new version. They did send me instructions for downgrading. In that sense, they are doing a good job, and in fact, the upgrade price is reasonable and I will probably pay for the upgrade, but I replied with the following message to Jonathan Monroe of Actual Technologies:

Mr. Monroe,

First of all, thank you for your response. I appreciate it. I especially appreciate that you provided instructions for downgrading the driver. I will in fact probably purchase the upgrade, the price is reasonable.

That said, I do need to chastise Actual Technology a bit. I am currently working on a blog post about this, but in a nutshell, it is rude in the extreme to upgrade a user without warning them that such an upgrade requires a new license key. This action left me without a functional installation of ODBC drivers for hours, right when I needed them. Please consider placing a warning message in large print telling users how this will happen or changing your software to recognize formerly valid licenses as ‘temporary licenses’ so a user can contact you to get things resolved.

Sincerely,

Juan

As I noted above, Mr. Monroe in fact has done a gracious thing and refunded me my upgrade fee as well as made the suggestion they will be looking into remedying this problem.  Fixing the problem always makes the customer happy… thanks Mr. Monroe and Actual Technologies.

How a scientist sees the world… 0

Posted on June 12, 2010 by Juan

When I first started teaching at Saint Cloud State over a decade ago, I worked with a fellow named Ted Bunn. He is a theorist, which of course means as a observational astronomer that I have to joke about how all he had to do to get a Ph.D. was “invent a particle.” The truth is however that theorists sometimes amaze me. It has taken me a decade a teaching to feel like I really understand undergraduate physics. These guys get there quicker.

Anyway, Ted now keeps a blog which often has what I find to be insightful little posts one what it is like to be a scientist. Today (June 12, 2010) Ted posted a short post about an Abstruse Goose comic about how scientists view the world:

Abstruse Goose 275

Ted then quotes Richard Feynman on something that I think is very true about scientists:

I have a friend who’s an artist, and he sometimes takes a view which I don’t agree with. He’ll hold up a flower and say, ‘Look how beautiful it is,’ and I’ll agree. But then he’ll say, ‘I, as an artist, can see how beautiful a flower is. But you, as a scientist, take it all apart and it becomes dull.’ I think he’s kind of nutty …. There are all kinds of interesting questions that come from a knowledge of science, which only adds to the excitement and mystery and awe of a flower. It only adds. I don’t understand how it subtracts. (From What Do You Care What Other People Think?)

I’ll admit, I don’t quite see the world as equations as implied by the figure, but I am constantly fascinated by trying to understand “how things work.”  Earlier this week, I was mowing the grass and I started wondering “what are the minimal conditions necessary for a planet to form on which grass could grow?”  I started thinking about the need for the planet to be composed of the right materials, that is rock.  For a planet to be rocky, there needs to be  heavier elements like silicon and iron in the early solar nebula.  The universe started with no silicon or iron, these elements are forged at the centers of high mass starts and then expelled into the interstellar medium when these high-mass stars explode in supernova.  This means grass can only grow in a universe that has been around long enough for a few generations of high-mass stars to have lived there lives so that the fraction of heavier elements is high enough for rocky worlds to form…  This thought process  happened in a span of maybe 15 seconds… and I didn’t even get started on considering all the other factors which actually affect the ability for a rocky world to harbor life.  Scientists really do get to awe at the universe around them in a way other people don’t.

Mac Apps for the Professional Astronomer 2

Posted on June 01, 2010 by Juan

I was asked by one of my colleagues who was late to switching to a Mac (from linux) what the necessary software is for an astronomer to have on their Macintosh. Some lists of this sort have been assembled online, however most are no longer available. Some resources I was aware of that were still online as of this writing (Summer 2010) were

  • Jane Rigby’s (Carnegie Observatories) OS X for Astronomers: This site is a fairly complete listing of Mac software the Professional Astronomer would be listed in. However, she uses “Fink” whereas I prefer “MacPorts”. To each their own.
  • MacOS X for Astrophysicists: This site is a bit dated (last update 2007) but there is a lot good information about how to configure X11, LaTeX, etc. on the Mac.
  • MacResearch: Focused more generally on using a Mac for research (notably programming), this site is a good read even if not astronomy focused.

My approach here will be to list everything I use on a regularly basis in my research. I will warn you up front that I am an optical astronomer who as dabbled in some radio astronomy, but I don’t know anything about High-Energy packages. So that is one bias. Secondly, being a college professor at a smaller state institution, I tend to focus on free (as in beer) or inexpensive software although I will list a few programs that I think are definitely worth the money for professional astronomer.

Programming/Unix Environment

There is some stuff any astronomer using a Mac should install, because it is free and/or critical to using your computer as a competent astronomer (depending on your specialty)…

  • XCode: You will need the gcc compilers in many cases and they come with the OS, so you might as well install them. If you want to get the most current Xcode, you can download it from the Apple Developer Connection website (you will need a free account).
  • g77/gfortran compilers: If you need a g77 (for MacOS before 10.6) or gfortran compiler, the best place to get pre-built binaries is at the High Performance Computing of MacOS X website.
  • X11: X11 is an optional install under Tiger and is installed by default under Leopard. However, when in Leopard, Apple switched from Xfree86 to X.org, and this transition introduced some advantages (no DISPLAY environment setup necessary…. yeah!) and some bugs (Boo!). As such, I had been using XQuartz in Leopard, which remain a few steps ahead of Leopard’s X11 and easily installed over it. However, I have found Snow Leopard’s X11 installation stable and robust enough to not replace it with XQuartz any more.
  • MacPorts: The bane of many unix-style OSes these days is the package manager one uses to install the unix-style programs with all their dependencies. I have settled on MacPorts. I used it’s “competitor” Fink for a while, but I have found MacPorts to generally be a much more up-to-date package manager. I use it to install TeTeX and a multitude of CLI programs (PGPLOT, gs,gv,gsl,xephem).
    • Porticus: is a decent (free) GUI front end for MacPorts if you fear the command line.

For the Optical Astronomer

This is the data reduction software I use almost every time I work on my research…

  • Scisoft OSX (My Mirror): IMHO the simplest way to install IRAF and many other packages I use regularly (PGPLOT, WCSTools, Sextractor, CFITSIO, etc.) in one double-click of a mouse (and some editing of my .tcshrc file).
  • SAOImage DS9: I sometimes update the version of DS9 included in SciSoft OSX with the most current versions from the CfA.
  • HEASARC’s fv: They call it the “Interactive FITS File Editor” and frankly it sometimes is the easiest way to quickly see the contents of a complex FITS files.
  • JSkyCalc: This venerable observing planning software that used to be solely for the command line (when it was skycalc) has now been updated to a graphical user interface written in java, so it runs on almost any platform, including Mac OSX. For the Mac, just save the jskycalc.jar file someplace and double click on it to launch it.
  • IDL: Definitely not cheaper (but cheaper than it used to be). Some astronomers I know swear by it (I have been known to swear at it). Personally, I do need the power of IDL sometimes, especially when someone else provides me her/his IDL code. If you use it, you will probably want to grab the IDL Astronomy Users Library which provides a large number of pre-built IDL routines for the astronomer. If you are feeling cheap, you might be able to get away with GDL (from High Performance Computing)

For the Radio Astronomer

This is the data reduction software I played around with when reducing radio data. I can’t claim I am current on the state of the art, so let me know if you feel I am missing something here.

  • AIPS: When I was doing more radio astronomy, I was working with AIPS a lot. I helped in the process of getting it working under MacOS (as a guinea pig). It ran quite nicely under MacOS the last time I used it (about 2004).
  • CASA: CASA (formerly AIPS++) is a sort of successor to AIPS. Personally, I was never that impressed with it, but I know several people who like using it (such as folks involved with ALMA). It is available for Mac OS 10.5 and 10.6 (Intel Macs only).

Writing Tools for Astronomers

Writing either documentation or papers for peer-review publications can be a challenge. For informal work, I have quite happy using Apple’s Pages for written work or Apple’s Keynote when assembling a poster or set of slides. However, for peer-reviewed journals or NSF applications, I typically use latex, having installed tetex with MacPorts.

  • Texmaker: is a nice interface for writing LaTeX on the Mac. Certainly not perfect or as good as some commercial products I have seen, but it is free and it works well. I especially like it when used with the Skim PDF reader which allows in-window updating of the PDF.
  • Papers: This is an awesome package for organizing your personal library of publications. It provides (somewhat glitchy) ADS Abstracts and arXiv interfaces that allow you to match PDF files to their metadata. Once you have done this, you can search for you local library by the words in the title, abstract, author’s name, year of publication, etc. And you can keep your PDFs organized. It has been a wonderful way for me to keep track of everything I have been reading when I have to prepare a paper.
  • iWork: is a very useful package from Apple that acts as a lower cost replacement to Microsoft Office (if all I cared about were cost, I would use OpenOffice.org). However, I use it because it includes:
    • Keynote: Keynote is a much more polished presentation manager than PowerPoint.
    • Pages: I prefer pages for my word processing and MacResearch had a compelling article on why you might use Pages for grant applications.
  • MathType 6: I would recommend also getting MathType 6, which let’s you insert equations into Pages or Keynote with ease (and it accepts LaTeX as a way of building equations). Make sure to update to the current version, it avoids a lot of crashing bugs.
  • LaTeXit: If you don’t want to pay for a commercial program, LaTeXit is a great option for typeseting formulas with LaTeX. It allows you typeset and then drag the results into Keynote or Pages documents where they are inserted as PDF images.
  • Evernote: I don’t use Evernote solely for writing papers, it is just a place to toss little notes I used to keep on post-it notes. But if I want to save some webpage or some text for later use, it is a perfect tool for that. It can sync between Mac and iPhone/iPod touch and it is free for up to 40 MB of notes a month.

Astronomically Useful Widgets

Widgets have been in MacOS since version 10.4 (Tiger), and while I don’t find them terribly useful, there are some free Widgets can be useful to have on observing runs:

  • Clear Sky Clock Widget: I may be biased since I helped re-work this widget and am responsible for the current version, but is useful as a way of displaying the current Clear Sky Chart (formerly called “Clear Sky Clock”) on your desktop. Clear Sky Chart is only useful for astronomers in North America.
  • AstroTimes Widget: I am not sure if this widget is still available, but it was a quick way to see the Local Sidereal Time when observing.

Astronomically Useful Spotlight Plugins

Spotlight is a feature that has been built-in to MacOS X since version 10.4 (Tiger). It indexes the contents of files to allow for almost instantaneous searches of the contents of a hard drive. The built-in plugins search many file types, but the following additional plugins are useful for file formats astronomers commonly run into.

  • FITSImporter: This plugin allows Spotlight to index FITS file headers.

Astronomically Useful QuickLook Plugins

QuickLook is a feature that has been built-in to MacOS X since version 10.5 (Leopard). When in the Finder, selecting a file and tapping on the spacebar displays a preview of the file. As with Spotlight plugins, many common file formats are supported with the built-in plugins, but for file formats astronomers commonly run into some plugins can be useful.

  • QLFits: This QuickLook plugin allows easy previewing of FITS file headers and images/spectra from the Finder.
  • QLColorCode: This QuickLook plugin displays source code files with syntax highlighting making QuickLook a much more powerful way of previewing code.
  • EPSQuickLookPlugIn: Allows viewing of encapsulated PostScript files via QuickLook. Since most figures I embed in my papers start as EPS files, this is very useful to me.

The Less Obvious Stuff

Some software doesn’t fit well into a particular broad class of work astronomers do, but can come in useful all the same for specific tasks.

  • User Interface Enhancements:
    • ShellHere.app: Drag this to your Finder winder and from now on, if you want to open the Terminal at a location corresponding to a given Finder winder, all you you need to do is click on the ShellHere icon. Works great, sort of the counterpart to “open .” in the terminal opening up a Finder window.
    • QuickSilver: Why waste your time digging through the Finder? I use QuickSilver to launch programs, access frequently used documents, and basically streamline my use of my Mac. Its the swiss army chainsaw of launchers.
    • GeekTool: This is an awesome little tool that allows you to display almost anything on your desktop. I use it to display my weblogs and system logs to my desktop, along with the local weather conditions and Doppler radar image. Anything you can display in the shell can display on the desktop.
  • A backup solution beyond Time Machine! Time Machine (part of Mac OS since version 10.5) is wonderful for incremental backups, but if your boot drive fries, you can’t boot from your Time Machine backup. This is why I also clone my boot drive regularly.
    • Carbon Copy Cloner: This is a free way to clone your boot drive on the Mac.
    • DejaVu: If you want an more automated solution, I prefer DejaVu, which runs scheduled rsync sessions in the background. That way, my backup drive is constantly updated and when my boot drive fails, I can just switch over to the backup without losing a beat.
  • Versions: Actually, I can’t say I ‘recommend’ Versions per se. I would strongly recommend subversion or some other version tracking system for anyone who writes code regularly. It makes tracking edits to source code (and latex documents) a breeze. I happen to use Versions as a very nice GUI that allows quick examination of differences between different versions of the source code you have tracked. That said, it is not cheap and I think SynX is a perfectly adequate free GUI front-end for code version tracking with similar functionality, if not as polished.
  • Parallels/VMWare Fusion/VirtualBox: If you occasionally have to run software that only runs on that other platform (you know, Linux), virtualization software is quite useful. I have found both Parallels 5 and VMWare Fusion 3 to be quite good (I found Parallels to be faster, but I heard VMWare was catching up). VirtualBox is free (as in beer) and may be an option to try before shelling out money for commercial virtualization software.
  • Chicken of the VNC: At several observatories, I am required to use VNC to interface with the computers. Chicken of the VNC works as a client. There are commercial VNC clients that are a bit faster, but if you have decent bandwidth, this works fine.
  • Wx: As an frequently optical astronomer, I sometimes obsess about the weather. Of all the weather programs out there, I have found this one to be the most stable and flexible. Its relatively inexpensive ($16.95 US), but as a warning, it is limited to the United States.
  • OmniFocus: This program is probably the single most useful program I have for managing my time. It implements David Allen’s Getting Things Done approach to time management. Its not cheap, nor is it completely intuitive… but it is absolutely necessary for me. A iPhone version also exists, which allows syncing of your OmniFocus sessions between your Mac and iPhone/iPod Touch.
  • DropBox: If you look at DropBox for the first time, it just looks like a way to sync files between computers. That is, until you realize you can allow specific users to share specific directories. I use it to share files to big to email with collaborators all the time. The only warning, it currently doesn’t map out extended attributes of files (like the executable settings) between computers, so it is not good for shell scripts. This failing is supposed to be fixed in the current version 0.8 beta.
  • fseventer is useful for diagnosing programs that create files. It tracks all file system events as long as it is on. So if you want to know where an installer is tossing files around your system, this will help you see what is happening. Its rare that I need it, but when I do, it is a Godsend.

[I made some minor edits adding some links I had forgotten about. – June 1, 2010 11:45 am CDT]

STS-131 Re-Entry over Minnesota !?! 0

Posted on April 19, 2010 by admin

[Addendum: NASA TV reports showers within 30 miles of Kennedy Space Center means landing on Orbit 237 has been cancelled. 🙁 – Updated at 5:57 am CDT, April 20. The landing on Orbit 238 looks more likely. Unfortunately for us, that takes the Shuttle far to the west of us during its landing.]

What’s going on with this page? The Space Shuttle Discovery was not able to land on the morning of Monday, April 19 due to bad weather atthe Kennedy Space Center. This however means we in Minnesota now have a good chance to see and maybe even hear the Space Shuttle Discovery re-enter the atmosphere in the early morning of Tuesday, April 20 in the half-hour before sunrise!

How will we know if the re-entry of the Space Shuttle will be over Minnesota? You can check the STS-131 Landing Blog. By 5:31 am CDT the Space ShuttleDiscovery will have to start its deorbit burn, so we should know by then if the landing will be over Minnesota. [Addendum: NASA TV reports showers within 30 miles of Kennedy Space Center means landing on Orbit 237 has been cancelled. 🙁 – Updated at 5:57 am CDT, April 20. The landing on Orbit 238 looks more likely.]

What is the Path the Space Shuttle will follow During Re-Entry? The first landing opportunity for the Space Shuttle Discovery comes during Orbit 237 and would follow the path shown below (From NASA’s STS-131 Ground Tracks page)

What do you mean “hear” the space shuttle? If the Space Shuttle passes over Minnesota, it will have slowed down a bit already, but it will still be traveling about 13,600 miles per hour or a bit over Mach 18!  As such, even if we don’t see the Space Shuttle, we may in fact hear the twin sonic booms about half a second apart of the re-entry a few minutes after it flies overhead since the shuttle will be only about 45 miles overhead!  There are two sonic booms, one generated by compression of air near the nose of the Shuttle, and another by compression near the tail.  Its not just me, AccuWeather is claiming we might well hear the sonic boom! Furthermore, Space.com has this article on the (now aborted) entry that was going to be over the Dakotas on Monday morning, and it says the first effects of Earth’s atmosphere on the Space Shuttle are at an altitude of about 75 miles. Since it would be only about 44 miles over Minnesota, I suspect we might well hear it. I figure if the Space Shuttle is at 44 miles and sound takes about 5 seconds per mile, we should hear any sonic boom about 2 to 3 minutes to get to the ground (WARNING: I am not taking into account variations in the speed of sound due to varying air density/temperature. I could be off by up to a minute).

What do the twin sonic booms sound like? Here is a YouTube recording of the Shuttle’s twin sonic boom. From what I have read, the twin sonic booms can be heard about 40 miles to either side of the flight path in the right situations.

When will the Space Shuttle Pass over Minnesota if it does Re-Enter over Minnesota? If the Space Shuttle Discovery re-enters the Earth’s atmosphere during Orbit 237, the NASA Human Space Flight Realtime data page tells us the following:

 

Details for the Fargo-Moorhead Area:

The Space Shuttle will come over the horizon in the northwest at 6:12:58 am CDT in the northwest. However, it will not clear the Earth’s shadow until about 30 seconds later at 06:13:29 am CDT. It will appear to speed up as it rises in the sky over the next 2 minutes until it is almost overhead. The closest approach will be at 6:15:16 am CDT when the Shuttle is only 43 miles away when it 71 degrees above the horizon (almost overhead) a little bit to the northwest moving toward the southeast! The Shuttle will remain over the horizon until 6:17:50 am CDT. Fortunately for Fargo-Moorhead, sunrise is at 6:30 am CDT, so we have the best shot in Minnesota for seeing the Shuttle in dark skies. It may still be difficult to spot given the dawn sky. if you don’t see it, be sure to stick around long enough listen for the sonic boom a few minutes later (about 6:17 to 6:19 am it should reach the ground)! Details on the passage are listed below (azimuth is angle east of north, elevation is angle above the horizon).

Local Time Azimuth Elevation Range Height of Sun above Horizon (as seen by Shuttle) Angle between Sun and Shuttle
Deg E of N Deg Miles Deg Deg
Tue-Apr-20@06:12:58 297.2 0.3 566 -1.2 158.6
Tue-Apr-20@06:12:58 297.5 1.3 503 -0.5 158
Tue-Apr-20@06:13:29 297.8 2.5 440 0.1 157.5
Tue-Apr-20@06:13:44 298.1 3.8 378 0.7 156.9
Tue-Apr-20@06:13:59 298.4 5.5 317 1.3 156.3
Tue-Apr-20@06:14:15 298.7 7.7 256 1.9 155.8
Tue-Apr-20@06:14:30 299 11 197 2.5 155.2
Tue-Apr-20@06:14:45 299.3 16.6 138 3.1 154.6
Tue-Apr-20@06:15:01 299.6 29.2 84 3.7 154
Tue-Apr-20@06:15:16 299.7 71 43 4.3 153.4
Tue-Apr-20@06:15:31 120.5 42.9 60 4.8 152.8
Tue-Apr-20@06:15:47 120.7 21.3 109 5.3 152.2
Tue-Apr-20@06:16:02 121.1 13.3 163 5.9 151.5
Tue-Apr-20@06:16:17 121.4 9.1 217 6.4 150.9
Tue-Apr-20@06:16:33 121.8 6.5 271 6.9 150.3
Tue-Apr-20@06:16:48 122.2 4.7 325 7.3 149.7
Tue-Apr-20@06:17:04 122.6 3.2 378 7.8 149.1
Tue-Apr-20@06:17:19 123 2.1 430 8.2 148.5
Tue-Apr-20@06:17:34 123.4 1.1 481 8.7 147.9
Tue-Apr-20@06:17:50 123.8 0.3 532 9 147.3

 

Details for the Twin Cities Area:

The Space Shuttle will come over the horizon in the northwest at 6:14 am CDT in the northwest and it will appear to speed up as it rises over the next 2 minutes until it is almost overhead. The closest approach will be at 6:16:17 AM when the Shuttle is only 44 miles away when it 65 degrees above the northeastern horizon (about 2/3 of the way to the zenith from the horizon) moving toward the southeast! The Shuttle will remain over the horizon until almost 6:19 am CDT. Unfortunately sunrise is at 6:19 am CDT, so you will be fighting the intense dawn sky light to see the Shuttle. However, listen for the sonic boom a few minutes later! Details on the passage are listed below (azimuth is angle east of north, elevation is angle above the horizon).

Local Time Azimuth Elevation Range Height of Sun above Horizon (as seen by Shuttle) Angle between Sun and Shuttle
Deg E of N Deg Miles Deg Deg
Tue-Apr-20@06:13:59 304.1 0.8 528 1.3 155
Tue-Apr-20@06:13:59 304.7 1.9 467 1.9 154.5
Tue-Apr-20@06:14:30 305.4 3 407 2.5 153.9
Tue-Apr-20@06:14:45 306.2 4.4 348 3.1 153.4
Tue-Apr-20@06:15:01 307.2 6.2 289 3.7 152.8
Tue-Apr-20@06:15:16 308.5 8.7 231 4.3 152.2
Tue-Apr-20@06:15:31 310.5 12.4 175 4.8 151.7
Tue-Apr-20@06:15:47 314 19 120 5.3 151.1
Tue-Apr-20@06:16:02 323.5 34.4 71 5.9 150.5
Tue-Apr-20@06:16:17 36.9 65.1 44 6.4 150
Tue-Apr-20@06:16:33 107.2 33.9 70 6.9 149.4
Tue-Apr-20@06:16:48 116.5 18.8 118 7.3 148.8
Tue-Apr-20@06:17:04 120.1 12.3 168 7.8 148.3
Tue-Apr-20@06:17:19 122.1 8.7 219 8.2 147.7
Tue-Apr-20@06:17:34 123.5 6.3 270 8.7 147.1
Tue-Apr-20@06:17:50 124.6 4.6 319 9 146.6
Tue-Apr-20@06:18:05 125.5 3.2 368 9.4 146
Tue-Apr-20@06:18:20 126.4 2.1 416 9.8 145.5
Tue-Apr-20@06:18:36 127.1 1.2 463 10.1 145
Tue-Apr-20@06:18:51 127.9 0.4 509 10.4 144.5

 

Details for the Rochester Area:

The Space Shuttle will come over the horizon in the northwest at 6:14 am CDT in the northwest and it will appear to speed up as it rises over the next 2 minutes until it is almost overhead. The closest approach will be at 6:16:33 AM when the Shuttle is only 65 miles away when it 37 degrees above the northern horizon (about 1/3 of the way to the zenith from the horizon) moving toward the southeast! The Shuttle will remain over the horizon until almost 6:19 am CDT. Unfortunately sunrise is at 6:18 am CDT, so you may lose the Space Shuttle in the dawn glare. However, listen for the sonic boom a few minutes later! Details on the passage are listed below (azimuth is angle east of north, elevation is angle above the horizon).

Local Time Azimuth Elevation Range Height of Sun above Horizon (as seen by Shuttle) Angle between Sun and Shuttle
Deg E of N Deg Miles Deg Deg
Tue-Apr-20@06:14:15 308.7 0.6 538 1.9 154.2
Tue-Apr-20@06:14:15 309.7 1.6 479 2.5 153.7
Tue-Apr-20@06:14:45 310.9 2.7 420 3.1 153.1
Tue-Apr-20@06:15:01 312.4 4 361 3.7 152.6
Tue-Apr-20@06:15:16 314.3 5.6 304 4.3 152
Tue-Apr-20@06:15:31 316.9 7.8 248 4.8 151.5
Tue-Apr-20@06:15:47 320.7 10.8 193 5.3 150.9
Tue-Apr-20@06:16:02 327.3 15.7 141 5.9 150.4
Tue-Apr-20@06:16:17 341.2 24.4 95 6.4 149.8
Tue-Apr-20@06:16:33 18.6 37.2 65 6.9 149.3
Tue-Apr-20@06:16:48 74.6 32.1 73 7.3 148.7
Tue-Apr-20@06:17:04 99.2 20.1 110 7.8 148.2
Tue-Apr-20@06:17:19 109.1 13.4 156 8.2 147.7
Tue-Apr-20@06:17:34 114.4 9.5 203 8.6 147.1
Tue-Apr-20@06:17:50 117.7 6.9 252 9 146.6
Tue-Apr-20@06:18:05 120.1 5.1 299 9.4 146.1
Tue-Apr-20@06:18:20 121.9 3.7 346 9.8 145.6
Tue-Apr-20@06:18:36 123.4 2.6 392 10.1 145.1
Tue-Apr-20@06:18:51 124.7 1.6 437 10.4 144.6
Tue-Apr-20@06:19:06 125.9 0.8 481 10.7 144.1
Tue-Apr-20@06:19:22 127 0.1 524 11 143.6

Science of the Olympic Winter Games 0

Posted on February 17, 2010 by admin

This is one of the cooler websites I have seen recently. My kids and I have been watching some of the Olympics on TV. The National Science Founds is hosting a 16-part video series put together by NBC on the Science of the Olympic games, which describes all the physics and mathematics behind Olympic sports including how equipment can make a difference in performance. Cool stuff and a nice contribution by the NSF and NBC to educators.

PGPLOT on Snow Leopard 28

Posted on October 23, 2009 by admin

One of the packages I use a lot in my research is the venerable PGPLOT package put together by Tim Pearson (currently at Caltech). You see evidence of this set of plotting routines in the figures in many astronomy papers from the 1980s onward. PGPLOT was written in FORTRAN and supports a wide variety of drivers to export its graphics, including color postscript, GIF, and Xwindows displays. In addition to using PGPLOT, I use PGPLOT.pm, a perl module for calling PGPLOT from perl scripts written by Karl Glazebrook.  I have used it to make interactive perl scripts for ‘marking’ spectral lines in HI spectra among other things.

When I moved to Snow Leopard, I discovered that I could not get PGPLOT.pm compiled against the PGPLOT package that comes with Scisoft OSX and soon realized this was because Perl on my Mac Pro is 64-bit whereas the PGPLOT package included with Scisoft OSX was 32 bit. I decided to compile PGPLOT 64-bit native to try to remedy the problem and on the way discovered a few other issues. Here’s what I did to get both PGPLOT and PGPLOT.pm working under Snow Leopard (on both 32-bit and 64-bit computers).

  1. Determine 32/64-bit nature of hardware: Since a lot of people don’t know a priori whether their processor is 32 or 64-bit, here’s a simple command line test.  Type the following into the command line:
    sysctl hw | grep 64bit

    If the response is
    hw.cpu64bit_capable: 1

    you have a 64-bit system. If the response is
    hw.cpu64bit_capable: 0

    you have a 32-bit system. If it is something else, well, you are on your own!
  2. Install GFORTRAN: The first thing I did was install Gnu Fortran (aka gfortran) as configured by Gaurav Hanna at the High Performance Computing for Mac OS X website. It turns out the version he compiled for Snow Leopard (here) is 64-bit Intel ONLY, so for my venerable first generation MacBook Pro, I grabbed the 32-bit Intel Leopard version (here), which worked fine in Snow Leopard. Installing them is a simple matter of issuing the proper tar command to unpack the tarball into /usr/local, where all the binaries are installed.
    • sudo tar -C / -xzvf gfortran-snwleo-intel.bin.gz

      (for the 64-bit Snow Leopard version)
    • sudo tar -C / -xzvf gfortran-leopard-intel.bin.gz

      (for the 32-bit Leopard version)

    Once they are installed, you simply have to make sure /usr/local/bin is in your $PATH.

  3. Install PGPLOT: I grabbed the PGPLOT source code from Tim Pearson’s website (here) and untarred the tarball into /usr/local/src/pgplot, the default location the code expects to be in (based on the instructions in the install-unix.txt file included in the source code tarball).
    sudo tar -C /usr/local/src/ -xzvf pgplot pgplot5.2.tar.gz
  4. Install sys_macosx configuration: The PGPLOT source code has various compiler configurations stored in “configuration directories” but it doesn’t come with one for Mac OS X. The MacPorts folks, when they ported PGPLOT, did create such a configuration. However, that configuration is hard coded to require AquaTerm, a nice MacOS X native display program that has not been made 64-bit compliant yet. Furthermore, their version of the configuration requires g77 to compile. The only g77 I could find was not 64-bit compliant, so I ended up hacking the sys_macosx/ configuration directory to include a new gfortran configuration that didn’t require AquaTerm. I am making a tarball of that configuration directory available in the pgplot5.2_macosx_addition.tgz which you can download and unpack into the PGPLOT source directory using:
    sudo tar -C -xzvf /usr/local/src/pgplot5.2_macosx_addition.tgz

    [The above line was edited to fix an error noticed by a commenter. – Juan (Oct. 24, 2009)]
  5. Compile the PGPLOT binaries: At this point, if you follow the instructions in the install-unix.txt file in the PGPLOT directory you will be fine, baring in mind the configuration you want to use is the “maxosx gfortran_gcc” configuration. However, I will outline the steps I used below.
    1. Create a PGPLOT library/binary directory:Create a directory to contain the PGPLOT libraries. I created /usr/local/pgplot using the command:
      sudo mkdir /usr/local/pgplot
    2. Choose the graphics drivers you want: Copy the drivers.list file from the source directory to this new pgplot directory and edit it to match your needs:
      cd /usr/local/pgplot
      sudo cp /usr/local/src/pgplot/drivers.list .
      sudo vi drivers.list

      (You can replace this last step with emacs or whatever text editor you prefer). You make a graphics driver part of the compilation by removing the leading exclamation point from the line. I choose to activate the X-Window drivers, the GIF drivers (to create GIF images), and the PostScript printer drivers (which you can use to create PostScript versions of plots for publication). Be aware PNG support requires libpng be installed.
    3. Create the makefile: We now need to create the makefile using PGPLOT’s makemake script. Within the /usr/local/pgplot directory execute:
      sudo /usr/local/src/pgplot/makemake /usr/local/src/pgplot  macosx gfortran_gcc

      which should result in the following output
      Reading configuration file: /usr/local/src/pgplot/sys_macosx/gfortran_gcc.conf
      Selecting uncommented drivers from ./drivers.list
      Found drivers GIDRIV NUDRIV PSDRIV XWDRIV
      Creating make file: makefile
      Determining object file dependencies.
    4. Create all the binaries: Now you just have to create all the binaries, which is a simple make command:
      sudo make

      Assuming everything proceeds without error, you should then see at the end of the output
      *** Finished compilation of PGPLOT ***
      
      Note that if you plan to install PGPLOT in a different
      directory than the current one, the following files will be
      needed.
      
             libpgplot.a
             libpgplot.dylib
             grfont.dat
             rgb.txt
             pgxwin_server
      
      Also note that subsequent usage of PGPLOT programs requires that
      the full path of the chosen installation directory be named in
      an environment variable named PGPLOT_DIR.

      At this point, you should (if you are going to use PGPLOT within perl or C compile the C library as well using
      sudo make cpg

      Finally, clean out all the temporary object files, you don’t need them. Do this using the makefile by typing
      sudo make clean

      If you want to test if things are working you can run one of the PGPLOT demo programs created in this directory. However, the pgdemo* executables seem hard coded to expect the pgplot libraries in the /usr/local/lib directory, to it might be a good idea to do the following step before trying the demos. [Edited in response to a comment about the demos not working. – Juan (Oct. 24, 2009)]
    5. Copy library and header files: This step is optional, but since most programs (including the pgdemo* executables) don’t look in /usr/local/pgplot for library and header files, I copy them to /usr/local/lib and /usr/local/include respectively using
      sudo cp *.a /usr/local/lib
      sudo cp *.dylib /usr/local/lib
      sudo cp *.h /usr/local/include
  6. Making sure I use these PGPLOT binaries: Since I am using Scisoft OSX, I modified my ~/.tcshrc file to change the PGPLOT related environmental variables after loading Scisoft’s environment
    setenv PGPLOT_DIR /usr/local/pgplot/

    . If you are not using Scisoft, you can place these lines anywhere in your ~/.tcshrc file. If you stick to using bash, then the corresponding lines in the ~/.bashrc file that you need to create (after setting up Scisoft, if you are using that) are:
    export PGPLOT_DIR=/usr/local/pgplot/

    At this point you have a working PGPLOT set of libraries installed. You can stop here if you just want to use PGPLOT from C or FORTRAN source code. If you want to use PGPLOT from within Perl, you need to go further.
  7. Install the ExtUtils:: F77 perl module: In order to install PGPLOT support, you need to install ExtUtils:F77 first. You can download ExtUtils::F77 here and once you untar the tarball,
    tar xzvf ExtUtils-F77-1.16.tar.gz

    it can be easily compiled using the following standard perl module compilation steps:
    cd ExtUtils-F77-1.16
    perl Makefile.PL
    make
    sudo make install
  8. Install the PGPLOT perl module: You can download PGPLOT here. Untar the tarball.
    tar xzvf PGPLOT-2.20.tar.gz

    We start as we usually do for Perl modules, creating the makefile using the Makefile.PL script:
    cd ExtUtils-F77-1.16

    Unfortunately, the Makefile.PL script will create a makefile this creates doesn’t work because it doesn’t call gfortran so we have to change the Makefile.PL script to know about gfortran. So load Makefile.PL and edit the line that reads
    use ExtUtils::F77;

    to read
    use ExtUtils::F77 qw{Darwin GFortran};

    Once you have done that, create the makefile using
    perl Makefile.PL

    Now you still have a problem because this makefile is designed to create a universal binary. However, depending on which platform you downloaded gfortran for (in step 1), you only have 64-bit intel or 32-bit intel support. So you have to delete all mentions of
    -arch ppc

    from the makefile as well as removing
    -arch i386

    if you are compiling on a 64-bit system or
    -arch x86_64

    if you are compiling on a 32-bit system. Once you have done that, you can finish installing the perl module using:
    make
    make test
    sudo make install

    I did have some issues with make test because it couldn’t find my X-windows driver due to a bad environment, but the compile reported no errors and I was able to get the make test to work once I had the proper environmental variable settings for PGPLOT_DIR (see step 5).

So that is it, I now have working PGPLOT installations with perl support on both my 32-bit MacBook Pro and my 64-bit Mac Pro.

 

[Edited on December 28, 2009 to add the first step to determine whether your system is 32/64-bit.]

SSH2 extension activation in PHP 5.3.0 4

Posted on October 13, 2009 by admin

This is an upgraded tutorial to getting SSH2 support under PHP 5.3.0 that I wrote a while back. Getting SSH2 support in PHP is useful for maintaining WordPress blogs. It would be nice if such an extension were not necessary, but this is the only way WordPress supports SSH administration through their web interface.

The big difference is that I will now be using the built-in Apache2 and PHP 5.3.0 under MacOS 10.6.1. I have gotten tired of the fact that everytime MacPorts updates it PHP installation, it tends to clobber the php.ini file for the site, requiring me to re-setup everything. Furthermore, I am also a bit tired of having MacPorts install its own version of everything I already have under MacOS X (such as Apache2, PHP, and MySQL). I understand their philosophy (and the practicality of it), but I am trying to keep my computer as clean as possible. As such, I am only using MacPorts to provide libssh2 to the SSH2 extension for PHP.

I noticed that the WordPress code had ssh2 support built-in, so all I need to is activate SSH2 support in the MacPorts installed PHP and I should be able to use SFTP in WordPress to handle the upgrades. I poked around and found this posting outlining the process for adding ssh2 support to Ubuntu. It guided me in developing this list of hints:

  1. If you haven’t already, start by installing libssh2 via MacPorts using the command:
    sudo port install libssh2
  2. Download the necessary SSH2 PHP extension using the build in PECL command
    sudo pecl download channel://pecl.php.net/ssh2-0.11.0
    The sudo is necessary because a lock file needs to be created during the download in /usr/lib/php, which is a protected directory. However, the file is downloaded to the current directory. Once the download is complete, we will need to unpack the SSH2 extension and go into its directory:
    tar xzvf ssh2-0.11.0.tgz
    cd ssh2-0.11.0
    If you try to do the normal phpize/configure/make sequence for compiling PHP extensions at this point, you will get a string of error messages ending with something like
    /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/download/ssh2-0.11.0/ssh2.c:1105: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type

    This is occuring because there is an incompatibility between this ssh2 extension code and PHP 5.3.0. It can be patched by downloading the ssh2-php53.patch file from http://remi.fedorapeople.org/ssh2-php53.patch and applying the patch from the command line in the ssh2-0.11.0 directory
    curl -o ssh2-php53.patch http://remi.fedorapeople.org/ssh2-php53.patch
    patch < ssh2-patch53.patch
    Once you have done that, you can finish the SSH2 PHP extension compilation using
    phpize
    ./configure --with-ssh2=/opt/local
    make
    sudo make install
    The final command informed me the ssh2.so library was placed in /usr/lib/php/extensions/no-debug-non-zts-20090626/

  3. Now you need to make sure PHP loads the new module, so we open the PHP configuration file /etc/php.ini and edit the extension_dir line to point the extension directory above:
    extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626/"

    and then add the following line to the end of the section on “Dynamic Extensions”:
    extension=ssh2.so
    If you edited everything properly, a simple php -v from the command line should NOT trigger any errors.

  4. Finally, I restart the apache2 server so that the reconfigured PHP is loaded using
    sudo apachectl restart
    At this point, I checked (via the phpinfo(); command to see if the web server was supporting SSH. Near the bottom of the phpinfo(); listing is a listed of “Registered PHP Streams”. As noted here, it should incude “ssh2.shell”, “ssh2.exec”, “ssh2.tunnel”, “ssh2.scp”, and “ssh2.sftp”. If it does, you have enabled SSH support for Apache2 driven PHP pages under MacPorts.

  5. If you are doing this to get WordPress 2.7 automatic installation working, you will notice now when the automatic installation dialog box pops up, in addition to ftp and ftps, you now have an ssh option.

Scisoft OSX 2009.10.1 released 2

Posted on October 01, 2009 by admin

Nor Pirzkal has released another minor update to Scisoft OSX. He states in his blog that:

A minor revision of Scisoft is available for downloading. Many people are experiencing many problems with the Apple Package Installer and I am distributing this release as a simple tar.gz file.

This version of Scisoft is distributed as a simple tar file that can be un-tarred in /. Scisoft expect to be located in /Applications/scisoft/

I can confirm the CONTENTS file distributed with the install is identical to the file for Scisoft 2009.9.1 so this release may just be a way to avoid some issues with the Apple Package Installer program.

This change to a tarball format is good, but it changes how to install the software. However, there is at least one major glitch in this distribution

  • WCSTools is missing from the installation! There are symbolic links to the package, but the /Application/scisoft/i386/Packages/wcstools-3.7.3/ directory is empty! If you are upgrading from a previous version of Scisoft OSX, there is an easy way to recover from this problem. I am outlining my suggested installation routine below.
  • As I noted for Scisoft 2009.9.1, “on Snow Leopard, Gordon Richards discovered that if you attempt ‘import pylab’ in python, you get a bus error. I can confirm the same error occurs on my Snow Leopard machine using either this SciSoft OSX release or the previous one. Furthermore, I can confirm the error DOES NOT occur in Leopard. I am not a heavy Python user, so I will leave it to Gordon, Nor, and others to investigate this issue. Gordon notes that this blog posting contains instructions for getting pylab installed under a vanilla Snow Leopard install, in case you need them.”

My suggested routine for upgrading to this version of Scisoft OSX from a previous version is the following:

  1. Backup the previous version of Scisoft by renaming the /Application/scisoft/ directory to /Application/scisoft_old/.
  2. Download the current gzipped tarball of Scisoft OSX. The current version of Scisoft OSX is available for download from the Scisoft OSX website, but I have made the package available on my Scisoft OSX mirror as well, in case it is faster for people.
  3. Using the command line in an administrative account, you can untar the tarball using the command:
    sudo tar -C / -xzvf Scisoft_OSX_macintel_2009.10.1.tar.gz
    You will be asked for your account password to allow ‘sudo’ to run the tar command as root.
  4. The files are untarred with their ownership intact from when Nor created the tarball, so be sure to change the ownership to match your root account using
    sudo chown -R root:admin /Applications/scisoft/
  5. Finally, if you want to copy over the WCStools package from the previous Scisoft OSX installation, you can use the command:
    sudo cp -r -p /Applications/scisoft_old/i386/Packages/wcstools-3.7.3/ /Applications/scisoft/i386/Packages/wcstools-3.7.3/
    That should get your back the WCStools.

I have alerted Nor to the missing wcstools directory as well as some other minor issues with this release. Hopefully, if Nor has some time, he will make

Scisoft OSX 2009.9.1 released 2

Posted on September 16, 2009 by admin

Nor Pirzkal has released a minor update to Scisoft OSX. He states in his blog that:

This version should fix a few outstanding bugs in version 2009.6.1. People running on case sensitive file system will hopefully stopped having problems. This version otherwise upgrades a few minor packages as described in the NEWS and CONTENTS files.

This version requires OSX Intel 10.5.x or higher. It also works fine with OSX 10.6.0 and OSX 10.6.1.

From reviewing the CONTENTS file distributed with the install, the major changes from the previous version as as he indicated, quite minor. They include:

  • The following Python packages were updated:
    • matplotlib 0.99 (upgraded from version 0.98.5.2)
    • pyraf 1.8 (upgraded to the current release version from version 1.7.1)
    • pygsl 0.9.4 (upgraded from version 0.9.3)
    • mxDateTime 3.1.2 was added to the distribution. Adds certain useful date manipulation functions to the python installation.
    • pysao 2.1.8 was added to the distribution. This appears to add direct XPA communication capability between python scripts and SAOImage DS9.
  • The gsl library was update from version 1.11 to 1.13.
  • [From NEWS file] Changed ds9 [command line] unix version a [symbolic] link from an alias. I noticed the SAOImage DS9 website currently says “Note: the next release of DS9, version 5.7, will be available October 15th.”
  • [From NEWS file] Fixed references to “packages” to “Packages” in Setup scripts

The glitches I have noticed in this distribution

  • As with previous versions, the installer for Scisoft OSX (due to bugs, apparently in Apple’s installer.app) changes the ownership of /Applications after the install. I would run Disk Utility and Fix the Permissions on your root volume after installing Scisoft OSX.
  • [Added Sept. 23] Gordon Richards and I have have been investigating some serious annoyances with the python installation on Snow Leopard in this version of SciSoft OSX.
    1. First of all, the installer apparently doesn’t install /Applications/scisoft/i386/Packages/Python-2.5.4/Python.framework/Versions/2.5/Resources/Python.app/ when running on Snow Leopard. This directory contains the python executable. Therefore, in the new SciSoft OSX on Snow Leopard, you can’t run python from the clean install. If you manually copy this directory from the previous SciSoft OSX installation to this one, then I find you can run python again (or in my case, pyraf). I can confirm this directory is apparently installed under Leopard.
    2. On Snow Leopard, Gordon Richards discovered that if you attempt ‘import pylab’ in python, you get a bus error. I can confirm the same error occurs on my Snow Leopard machine using either this SciSoft OSX release or the previous one. Furthermore, I can confirm the error DOES NOT occur in Leopard. I am not a heavy Python user, so I will leave it to Gordon, Nor, and others to investigate this issue. Gordon notes that this blog posting contains instructions for getting pylab installed under a vanilla Snow Leopard install, in case you need them.

The current version of Scisoft OSX is available for download from the Scisoft OSX website, but I have made the package available on my Scisoft OSX mirror as well, in case it is faster for people.

Snow Leopard for this Astronomer 2

Posted on September 16, 2009 by admin

I recently updated my laptop, an old Core Duo MacBook Pro, to Snow Leopard to test out the new OS. There have been a lot of little annoyances and a lot of little benefits to the move.

Some of the improvements I have noticed:

  • Snow Leopard is noticeably faster! I had thought it might just be fan-boy talk, but this operating system is in fact noticably faster at launching applications and the like. It is especially nice to no longer see the beachball every few minutes in the Finder. In fact, I don’t think I have seen that dreaded rainbow beachball int he Finder since upgrading!
  • Cisco VPN is built in! Like the iPod Touch, Cisco VPN networking is now built-in, so all I had to do was configure it as one of my network interfaces. Thank you Apple! If you previously had it installed, you can uninstall Cisco’s crappy little VPN client using the command:sudo /usr/local/bin/vpn_uninstall
  • QuickLook works in the Open/Save Dialog Boxes: Just as in the Finder, you can now hit the spacebar with a file selected in an Open/Save dialog box and you get a previous of the file’s contents. Sweet. QuickLook was probably the most useful feature I use everyday in Leopard, so I am glad to see it available in Open/Save dialog boxes as well.
  • I can see Hidden Files in the Open/Save Dialog Boxes: Credit this to MacOS X Hints, but in the Open-Save Dialog box, if I hit ‘Command-Shift-.’ (that’s a period), you can see the hidden files in a given directory. If you use your mac in a region where commas are normally used to as a decimal separate, you have to use the comma from the numerical keypad instead of the period. Very useful for people who edit .tcshrc or .bashrc files regularly.

Some of the annoyances I have been ironing out during the last week:

  • X11 now knows more about user environment: I use tsch as my shell environment. Apparently X11 on Snow Leopard loads the ~/.tcshrc file to set the system enviroment! I had a bug in the file that prevented X11 from launching. I was able to figure out it was local to my account by creating a test user account and launching X11 without a hitch. I was able to find the bad library path and fix it in the ~/.tcshrc and now my X11 works fine.
  • Battery Issues with Snow Leopard: I had issues with the battery under Snow Leopard. The battery life that was being reported was half what it had been before the upgrade. This seemed very odd to me, but the system profiler app insisted that after 183 charge cycles I had only 1949 mAh of power. So to ‘recalibrate’ I started up the computer after it went to sleep due to ‘low power’. It ran for another hour, reporting 0% battery the entire time. It then did a hard shutdown. I left it off and unplugged overnight, I then charged it full. It still reported only 1949 mAh total charge. I called Apple’s tech support which elevated the report to engineering. Then, after ‘safe booting’ the machine (see notes below), and booting back into my normal setup, I discovered the battery level was being reported as 4300 mAh, as it should be. Now, as of this morning, the problem is back again and System Profiler insists the battery has only 2870 mAh of maximum charge and it requires service. Not sure what the problem was, but a lot of people have been having similar problems with this particular battery and snow leopard.
    [Followup (added Oct. 23, 2009): Apple replaced the battery and the problem went away.  It is possible that the number of people reporting the problem is just indicative of a small percentage of users whose bad batteries were not obvious to them before Snow Leopard.]
  • Ethernet Issues with Snow Leopard: I had major issues with the ethernet connection dropping after a few minutes. Actually, it isn’t a full lost connection, I can still see computers on my subnet, and Skype seems to work, but a large percentage of websites fail to load and mail doesn’t work for off-campus mail servers. Quite a few other people were reporting similar problems on the Apple Discussion boards, but most of them resolved the problem by doing one of the following:
    1. Sometimes corrupt settings persist from a previous setup. Removing all the files in /Library/Preferences/SystemConfiguration/ and rebooting will purge all the system settings related to networking. You will also lose settings related to other things, such as Energy Saver settings, but it can help when you can’t isolate the issue. I tried this, it didn’t work in my case
    2. The other solution many people hit on was to create a new “Location” in the Network control panel. If you have a corrupt preference setting in your Location, creating a new one lets you start from scratch. Again, this didn’t work for me.

    After going through all this, I talked to an Apple product specialist and they hit on the idea to try bringing up the computer in ‘Safe Mode‘ by rebooting ahdn holding the shift key during the boot. Safe mode turns off the launching of all non-system deamons and agents as well as turning off the launching of all the programs you might launch at login via your Accounts preference pane “Login Items”. Lo and behold, after doing this, my ethernet connection appears to have been stable! What I did was

    1. I removed Adobe VersionCue CS3 from my launch items in the Accounts preference pane. Adobe noted it was incompatible with Snow Leopard anyway.
    2. I disabled the following launch items by moving them to my Desktop and then rebooting
      /Library/LaunchDaemons/com.adobe.versioncueCS3.plist
      /Library/LaunchAgents/at.obdev.LittleSnitchNetworkMonitor.plist
      /Library/LaunchAgents/at.obdev.LittleSnitchUIAgent.plist

    Having now brought the computer back up through a normal boot, the ethernet connection has remained stable. The fact that my battery issue seems to have been resolved almost simultaneously makes me think these apps were responsible. [Followup (added Oct. 23, 2009): I narrowed down the problem to an apparent incompatibility between Snow Leopard and the version of BIND my campus is using as a DNS server.  And it may be specific to my machine.  Not sure.  Switching to using OpenDNS as my DNS resolver made the issue go away for me.  My server, a Mac Pro, which I have upgraded to Snow Leopard, has exhibited no such weirdness.]

  • MacPorts Rebuild: I traditionally rebuild my MacPorts installation from scratch with a new OS installation. There were no major issues, but I took the opportunity to upgrade to the latest MacPorts and to try to rebuild with only the bare minimum of ports that I was using.
  • Many Mail Plugins Fail: Most mail plugins use ‘unapproved’ APIs and most of the Mail Plugins I used failed for Snow Leopard’s Mail.app. Furthermore, it looks like Apple has changed things so now every minor revision in the OS will require Mail plugin writers to explicitly approve the plugin for that version of Mail.app. This means in the future every minor revision in Snow Leopard will likely shut down Mail plugins until they get updated.
  • Force 32-bit compilation for IRAF in Snow Leopard: Doug Mink has discovered that compiling IRAF packages in Snow Leopard presented errors until he forced 32-bit compilation (I am assuming he was on a 64-bit machine). I am quoting his suggestions (sent to me via email) below:It turns out that Snow Leopard defaults to 64-bits and you need to add the -m32 flag to hlib$fc.csh and hlib$mkpkg.inc just like you have to for 64-bit Linux:

    In fc.csh (Juan’s Note: in Scisoft OSX, this is /Applications/scisoft/all/Packages/iraf/iraf/unix/hlib/fc.csh) after this:

    # Scan the argument list and concatenate all arguments.
    set args = ""
    while ("$1" != "")
    set args = "$args $1"
    shift
    end

    add this:
    if ($MACH == "macintel") then
    print ("MACINTEL: -m32 flag set")
    set args = "$args -m32"
    endif

    and in mkpkg.inc (Juan’s Note: In Scisoft OSX, this is /Applications/scisoft/all/Packages/iraf/iraf/unix/hlib/mkpkg.inc for each IRAF package you want to recompile) :
    $else $ifeq (MACH, macintel) then
    $set    XFLAGS          = "-c -w -m32"  # default XC compile flags
    $set    XVFLAGS         = "-c -w"       # VOPS XC compile flags
    $set    LFLAGS          = "-Nz -m32"    # default XC link flags

That is my Snow Leopard report for now. More from the trenches and after I upgrade SciSoft OSX.

Why I live in Minnesota 0

Posted on June 17, 2009 by admin

I often have to tell people I live in “Fargo-Moorhead” before they have a clue where I live. But then they think I live in North Dakota. This is why I live on the Minnesota side of the Red River.

  • Translate

  • Astro Pic o' the Day

  • Archives

  • Admin



↑ Top