Sidewalk Astronomy and Social Distancing

Projection of the image of the moon as seen through my 6" Newtonian onto the sidewalk.

Projection of the image of the moon as seen through my 6″ Newtonian onto the sidewalk.

If you’re like me, you’ve had the “outreach itch” for a while now, especially when the Comet C/2020 F3 (NEOWISE) streaked across the Northern skies. But setting up a telescope and inviting strangers to look through your eyepiece is not an option these days. Continue reading

Posted in Uncategorized | Leave a comment

Model Fitting with Python

As part of our annual summer intern program (now called the Carnegie Astrophysics Summer Student Internship program, or CASSI), we run a python workshop. The purpose of this is to help bring our interns, who have a diverse range of experience with programming and python, to a common footing. Continue reading

Posted in Uncategorized | Leave a comment

NASA/ADS changes its API

Now that the NASA Abstract Data Service (ADS) has changed its API without offering a legacy service, a number of things I deal with broke. While I understand wanting to make progress, one should always strive to break as few things as possible, and since all the URLs have changed in the new system, I don’t see why keeping the old ones would have been that much of a problem. Oh well, onwards and upwards.

If you used the NASA/ADS WordPress plugin to display your private libraries (as I do for my publications list), that’s one of the things that broke. But it’s not too hard to fix. All you need to do is edit the following file in your wordpress folder: plugins/wp-nasaads-query-importer/wp-nasaads-query-importer.php. Continue reading

Posted in Uncategorized | Leave a comment

Compiling MOOG on OSX

Just a quick post for those who want to compile Chris Sneden‘s spectral line analysis package MOOG. Chris provides many helpful Makefiles with the code, including a few for Mac computers. The problem is it assumes we’re using the g77 FORTRAN compiler. Most new Macs will only deal with 64-bit binaries, so we have to use gfortran instead. Just changing the FC variable in the Makefile results in the dreated “symbol not found” errors:

"_sm_ylabel_", referenced from:
 _binplot_ in Binplot.o
 _specplot_ in Specplot.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [MOOG] Error 1

Continue reading

Posted in Uncategorized | Leave a comment

The Great Eclipse of 2017

Sixteen hours of driving is a lot. That’s how long it took us to drive the 888 miles from Pasadena, CA to Mackay, ID. But that’s what you do to see an event like the 2017 eclipse. Sure, we could have flown to Sun Valley or Boise, then drive, but we were bringing telescopes and other equipment, so we rented a Ford Expedition EL (the EL stands for “Extra Long”), packed up the family, and began the long drive across some of the most beautiful parts of the US. This is a journal of the travel and event. Continue reading

Posted in Uncategorized | Leave a comment

What, If Anything, Does Dust Tell Us about Supernovae

Here’ s a talk I gave at a recent Type Ia supernova progenitors workshop held at Carnegie. I talk about the rather perplexing properties of interstellar dust as inferred by using type Ia’s a “standard crayons”.  Or is it really all that perplexing? These findings can also be found in more detail here.


Posted in Uncategorized | Leave a comment

Got an old iSight?

Reading some online reviews of CMOS and CCD detectors for amateur telescopes, I often came across words to the effect of “basically a glorified web-cam”. It got me to thinking: my old iSight camera (the cylindrical ones we used to buy before they were built in to all Apple products) might fit into an eyepiece holder.


iSight adapter.

Alas, it was just a little too wide to fit in. But thanks to they guys at our machine shop, I soon had an adapter. Made from some scrap aluminum using a lathe.

The next step was to remove the lens from the iSight. The reason is that the camera will take the place of the eyepiece, and so the image from the telescope will be made directly on the CCD and you don’t want a lens in the way. Luckily, there are YouTube instructions for doing this, so I wasn’t flying blind. Continue reading

Posted in Uncategorized | Leave a comment

A Tale of Three Samplers

A triangle plot that shows the covariance between model parameters.

This summer, I hired an undergraduate student to look into calibrating our CSP supernovae. I wanted to do some more sophisticated models and so we looked into a few MCMC modules for python: pystan, pymc, and emcee.

Each has its plusses and minuses. In fact, I found myself wanting to merge all three together into one system. So, in case anyone out there is wondering which of these to delve into, I’m posting a summary of the three. Also, I’ve been having fun with ipython notebooks for teaching this to my students and have made three versions of the same tutorial: fitting a linear model to data. You can look at each one here:

Continue reading

Posted in Uncategorized | Leave a comment

From g77 to gfortran

Lots of friends and colleagues have been happily using g77 as their fortran compiler for years. Now, however, you can’t find an up-to-date g77 compiler very easily and we’re all supposed to start using gfortran. Here’s some tips for getting your old .f files to compile:

  • Use the following command-line arguments when invoking the gfortran compiler to get better compatibility:
    gfortran -ffixed-line-length-none -fdefault-real-8 -std=legacy -fd-lines-as-comments
  • Two commonly used argument names for the OPEN() procedure have changed. Instead of specifying NAME=FNAME, use FILE=FNAME and instead of using TYPE=, use STATUS=.
  • When linking with external libraries, you may find “symbol not found” errors, even though you know those symbols are defined in the library. This likely has to do with how many underscores (_) are in the symbol name. gfortran has some switches than can help:  -fsecond-underscore, -fno-second-underscore, depending on what the error reports and what the symbols are called in the library (use the ‘nm’ or ‘ldd’ command on the library to show it’s contents).
Posted in Uncategorized | Leave a comment

AASTeX, BibTeX, and Journal style

I’ve now got a winning strategy for citations:  BibDesk, AASTeX, and a python script to clean it all up.

Keeping track of citations is a pain, but there are lots of great tools out there for keeping them all straight and eventually importing them into your papers.  For a while I was a big fan of Papers for Macs. But when I put it into practice, exporting to a BibTeX database and importing into an AASTeX manuscript, I was disappointed. Mostly because Papers fetches data from ADS, but doesn’t use the AASTeX macros for the different journal names. And I couldn’t customize it. Annoying.

That’s when I tried another combination: BibDesk (part of the MacTeX package). It’s a lot like Papers, though with less bells and whistles. But you can’t beat the price (free) and it has this really nice feature:  highlight any citation string (like 2011AJ….141…19B), right-click, and choose “Add to BibDesk”. Voila! Citation is imported from ADS complete with AASTeX journal macros.

There’s just one little problem:  the resulting \bibitem entries have all the author names. The ApJ and AJ Journal styles like to have one, two, three, four, or two with “et al.”. So I wrote a python script to parse a .bbl file and output it with the author entries all fixed up. You might ask:  why not update the BibTeX database instead. Well, I thought about that, but decided I wanted to keep the database in tact, in case I ever want to find someone deep down in the author list (like, say, me). So here’s my magic recipe:

  1. Use BibDesk to maintain your .bib database:
    1. Add entries using the magic right-click-on-ADS-string
    2. Add entries by copying BibTeX entries to the clipboard.
    3. Merge previous BibTeX databases
  2. Use bibtex command as usual to build your .bbl file from your .tex manuscript.
  3. Run my python script:
    fix_authors ms.bbl
    (it will make a backup of the original file:  ms.bbl.backup)
  4. Re-run latex again. Maybe do that a couple of times. Just to be sure.
Posted in Uncategorized | Leave a comment