Archive for the 'Tips' Category
So, this new site I found the other day – Astro Better is what this site should be. That is, they have multiple people contributing, they post about IDL, IRAF, and various tips. It’s actually updated more than every 3 months.
The future of this site remains unclear – I’m in full transition mode away from actual science research to science policy, and while the site seems harmless enough in terms of content, I certainly have less time for it, and I just don’t spend much time doing astronomical research anymore, so that’s why the content has dried up. And, horrors, I’ll most likely be stuck with using a Windows machine in at my next position. A nightmare!
Anyway, check out Astro better, contribute, subscribe to its feed, etc.
.
iLounge has a good review of all the various iPhone programs that allow you to upload and view supported file types. These are typically PDF, images, Office and iWork documents. One could upload a PDF of a journal article or preprint to read on the plane or train (assuming you don’t prefer paper.)
Of course, none of these will be Papers for viewing journal PDFs, but still could be useful. It seems that File Magnet and Datacase both get A- scores for Macs. FileMagnet doesn’t work on Windows, and Datacase gets a B+ on Windows. However, since Mac users are the ones reading this site, the Windows score or compatibility shouldn’t matter too much.
Tags: apple, files, iPhone, PDF — .
A friend recently needed a Fortran compiler, and I pointed her to the useful high performance computing. However, things didn’t work and that’s because the program also needed to Apple’s developer tools – which include a compiler, etc. – to install properly.
Xcode is usually included somewhere when you buy a new Mac. Either a disc image hiding somewhere on the hard drive or on the DVD that came with your machine. If all those things fail, or you don’t want to look around, it’s also available at the ADC site for free. You simply must register for free ADC “Online Membership.” The advantage of downloading is that you will get the latest version. Be advised to make sure you’re getting a version of Xcode that works on your version of OS X.
The latest Xcode runs on the latest OS X, so today that means that Xcode 3.1 works on Leopard only. You should be able to find an older version for Tiger.
At the web site, look for Developer Tools and then Xcode 3.1.
The only real trick after downloading them and installing them is to customize the install, and I only do this to save disk space. But unless you’re going to develop a real Mac OS X app, you don’t need all the documentation and examples. It’ll save you about half a gigabyte. You want to uncheck “Core Reference Library” and be sure that the “UNIX Development Support” is checked.

Tags: apple, compiler, Leopard, unix, xcode — .
So, I’m returning to DC from the AAS today (a bit earlier than some). I found something interesting – the Boingo-run wifi hotspots at the St. Louis airport offer 15 free minutes to iPhone users, if you watch an ad. What I discovered is 2 things:
- They determine you’re on an iPhone via user-agent strings
- You can reset the 15 minutes by deleting boingo cookies
So, it’s fairly easy to get WiFi indefinitely on a Mac or your iPhone. On the iPhone just clear cookies (though that’s a pain because you can’t easily select which cookies to delete, so you may lose automatic logins to other sites too)
On a Mac you use the Safari “Develop” menu to pretend you’re Mobile Safari, watch the ad, then you’re in business. Once the 15 minutes are up, open up Safari’s Security preferences, show cookies, and select only boingo ones (easy to do with the live search text field), and then load a page at you’re back at the initial trial offer.
Who knows how long this will work or if they won’t shut the whole thing down when they read this post but it’s a neat trick and if AAS members read or subscribe to RSS from this site, you can try it out at the airport.
Tags: airports, boingo, free, iPhone, mac, wifi, wireless — .
So, I spent a lot of time googling on this. I had a pdf of my thesis I wanted to get printed into book form – and the site I was using to publish needed all the used fonts embedded in the PDF file. It claimed that one was not, in fact, embedded. I use TexShop and pdftex and I have to use pdftex at this point because all my figures were PDFS.
So, I searched for “pdftex embed fonts” or “texshop latex embed fonts” and countless variations. I found a lot of interesting links.
But none worked – the options in udmap.cfg or whatever were already set to embed fonts, but the one Times-Roman just wouldn’t embed. I was looking for some other option to flip and not finding anything when one of these links inspired me to try this:
Open the PDF in OS X Preview. Save as PDF. Boom. Done. The font became embedded. I don’t know if this would work for any PDF but it worked for me. I was then able to upload it with success. (I’m using lulu.com, incidentally. UMI-ordered thesis reprints are a scam. Overpriced and poor quality.)
Update Eh, so that didn’t really work. Lulu didn’t reject the PDF outright but was yet unable to print it as they said in an email later. So, I’m back to the drawing board somewhat. It seems to create embedded fonts but “embedded subsets” which may be a problem. I tried saving to postscript and letting Lulu do the PDF conversion, but the new PDF still has subsets rather than entire fonts. I’ll see if it works.
Tags: fonts, latex, PDF, pdftex — .
A common problem with the IRAF installers is that / is sometimes not writeable by the admin group, and thus the “iraf user” can’t write files to the root of the hard drive. To see what goes wrong with the installer, please check the installer log. You can see a screenshot here.
If it’s something about permissions, making / writeable by the admin will probably fix it (assuming IRAF is an admin user, as I suggest)
sudo chmod g+w /
Tags: installers, IRAF, permissions — .
So, you’ve seen the highly annoying Intellitxt ads, possibly on the UK Macworld site or elsewhere. Some sites let you turn them off but there’s no way to turn them off everywhere. I think I figured out how to stop them, at least on a Mac.
You’ll need to edit your /etc/hosts file and add this line:
127.0.0.1 images.intellitxt.com
And then you’ll need to flush the lookupd cache with a
sudo lookupd -flushcache
This prevents the javascript from loading from the intellitxt ads and thus, stops them from happening. Now, I know there are some ethical questions with blocking ads on web sites, since advertising (even on my own site) helps to pay the bills, etc. But, these ads are invasive and highly annoying (which is why I don’t have any here), so I think turning them off is something worth doing.
Update Some other options for blocking these ads can be found here.
.
The way I make this work is to change the editor defined in the login.cl file from vi to emacs. The cl uses keybindings based on the editor and for whatever reason, changing the editor to emacs does the trick. You have to remove the comment # from the set editor line and then change it to emacs so it then looks like
set editor = emacs
Now, I personally never have IRAF invoke the editor defined in my login.cl file so this change has no effect for me other than making the delete key work. I’m not really sure when the editor is the login.cl file is used. But presumably this change would force you to use emacs when you want vi.
.
The wonderful High performance computing for Mac site has pre-compiled binaries for Grace and the motif library on which it depends. This is perhaps easier than the compile-fest that is required to get it working via Fink on an Intel-based Mac. Of course, for reasons that remain unclear to me, people appear to prefer IDL, SM, and “something else entirely” to grace.
Tags: fink, grace, plotting, unix — .
So, I admit I only recently installed SM(supermongo), and only have used it slightly. Between IDL, grace(installable via Fink or there are binaries for MacOS X at the HPC site), and Plot, I just don’t see why any Mac user would make plots in SM. It requires gnuplot-esque scripts/programs, and just seems in general a pain and esoteric.
Perhaps it is powerful, perhaps for automated plot creation from certain kinds of data, it’s great, but I don’t understand its popularity. Has anyone used all the above tools and yet prefers SM? If so, please post a comment. I’m curious if I’m missing something.
For casual plotting, say from analysis that I do in IDL, I just do quick plots in IDL itself, and I’ve written a fair number of simple IDL routines that call plot or ploterr or other people’s plotting programs. This works for day to day plotting, and is easy to integrate into my other IDL programs. For almost all plots for publication, I have always used the aforementioned grace, which I installed with Fink.
If if I wasn’t already familiar with grace, I’d probably try this unfortunately under-named program, Plot. It seems pretty good, but since it’s very similar to Grace except with all the options in different places, so I’ve just stayed with the familiar Grace. But, I vastly prefer a graphical interface like this for tweaking than altering parameters via some script. I have also used gnuplot. It was a nightmare. I recreated in grace in one hour what it took days to get gnuplot to do, and do poorly. I abandoned gnuplot as a first year grad student.
Anyway, I know sm must have its fans, so if that’s you, let me know why you like it below. But, please note if you’ve used any other plotting program.
Update I’m baffled by the “something else entirely” winning unless it’s non-astronomers voting for Excel. Whatever you are voting for, could you post a comment and tell me? Also, I recently got a new Macbook, and installing Grace via Fink was a royal pain requiring a selfupdate via rsync and then a very long compile-fest because they don’t have a binary available. It’s hard to recommend with all that pain, but I maintain it’s much better than SM.
Update II Ploticus sounds vaguely familiar (see in the comments), but not so much python/matplotlib. These sound like IDL/SMish sort of plotting though. Personally, I still prefer a GUI – hence my like for xmgr Grace.
Update III I certainly get the desire to have a plot automagically made while one is doing data reduction, analysis, etc. This is one reason I like IDL. However, I prefer to be able to finely tune the appearance in a GUI for a plot designed for publication. I suppose it’s a learning curve thing. Granted, once you write one sm script to plot a spectra … you’re set for all other spectra. However, I’m not convinced for my own work that the time/effort spent learning how to write such a script is worth it, since I’m obviously rather comfortable with Grace. (It’s worth noting for a certain repetitive plots I have used IDL.)
.