Brian Jackson

Associate Professor of Physics at Boise State University

  • About
  • Research
    • CV
    • Joining the Boise State Planetary Science Research Group
    • Research Experiences for Undergrads
    • Ultra-short-period planet database
    • The Short Period Planets Group — S(u)PerP(i)G
    • Google Scholar Page
    • Code
  • Teaching
  • Press
  • Extracurricular Activities
    • Field Trips
      • Bruneau Sand Dunes – 2022 Jun 29
  • Public Outreach
    • Boise State’s Astronomical Observatory
    • Central Idaho Dark Sky Reserve STEM Network

Writing a Scientific Software Package: Motivation and Background

Posted by admin on April 1, 2018
Posted in: Data Science. Tagged: coding, python, Writing a Scientific Software Package.

Ancient software developers meticulously punched holes in paper cards to write programs.

In the eons before my graduate career, scientists rarely, if ever, publicly distributed their codes, with authors zealously guarding their coding projects.

But just as I was finishing my PhD, it was becoming common for scientists to make the code they developed as part of a published project readily available on the internet. However, the methods to post code online (at least those I knew about) were pretty clunky.

Nowadays, the infrastructure for posting and sharing code online is robust, mature, and relatively easy to use. Consequently, scientists are creating beautiful code repositories, along with accessible documentation.

Open-sourcing code is becoming ever more important: as codes become more complex and capable, readily available codes with good documentation are critical to support reproducibility, a cornerstone of the scientific process. Moreover, federal funding agencies are starting to require investigators to make their code and data products public.

Unfortunately, since I was one of the last generation of grad students before these repositories were common, I never really learned how to distribute and document code properly.

So as part of an ongoing effort to improve my science output (and as an aide to my future students), I’m going to begin a series of semi-regular blog posts describing my process of learning how to write, document, and post scientific code.

A few caveats upfront:

  • I intend to mostly (probably exclusively) write the code in python, which has become (at least in astronomy) the language of choice, so not all of what I write will be generally relevant.
  • I was ushered into the Cult of Mac many years ago, so not all of what I write will be relevant for other OS’s. Here again, though, I’ve found anecdotally that most astronomers use Mac.
  • This blog series is in no way intended to be comprehensive or rigorous. I’m just planning to describe what I learn as I go along, and what time I can devote will almost definitely not suffice to explain all the details, nuances, or technical aspects that intersect the project.

As to the actual science code I intend to write, several years ago my colleagues and I wrote a paper about ellipsoidal variations induced by massive exoplanets orbiting very close to their host stars. The accompanying code, EVIL-MC was written in IDL, an older language still widely used in astronomy but proprietary and requiring the purchase of an expensive site license.

My plan is to convert that IDL code into a Python package over the next several weeks.

EVIL-MC – Ellipsoidal Variations Induced by a Low-Mass Companion


Tidal distortion (exaggerated) of a star (orange-yellow disk) orbited by planet (white/black disk). The plot below shows the brightness variation of the star due to the tidal distortion.

Posts navigation

← LPSC Meeting – 2018 Mar 18-23
Writing a Scientific Software Package: Configuring vim →
  • Twitter: decaelus

    Brian Jackson
    • Come join us at @BoiseState for an exoplanets and outreach postdoc - https://t.co/LgQkDfkVJd. Apps due by end of Ap… https://t.co/37IiiVvl6D 08:41:55 2023 Mar 8
    • Records show powerful, wealthy funders outside Idaho back school choice campaign https://t.co/tzrZgyYk4U via @idahocapitalsun 11:03:33 2023 Feb 3
    • Learn how to save the dark (https://t.co/CqYzD5o2Xh at @BroncoPhysics First Friday Astronomy event this Fri (Feb 3… https://t.co/8B3Set3tW0 11:49:28 2023 Jan 30
    @decaelus
  • Recent Posts

    • LPSC 2023
    • Taking the Universe’s Measure
    • Research Group Meeting – 2023 Mar 2
    • Resources for the Jupiter-Venus Conjunction
    • PHYS305 – 2023 Mar 1
  • Archives

    • March 2023
    • February 2023
    • January 2023
    • December 2022
    • November 2022
    • October 2022
    • September 2022
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021
    • September 2021
    • August 2021
    • July 2021
    • June 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
Proudly powered by WordPress Theme: Parament by Automattic.