software development

Astronomy projects with Google Summer of Code

Google Summer of Code GSoC
Google Summer of Code projects are now open for application! We’re looking for some undergrads to work in python on black hole X-ray analysis code (they don’t need to know any astrophysics in advance): check out our Timelab ideas page. There are also some astronomy projects with the OpenAstronomy umbrella organization.

If you’re mentoring undergrads (or are an undergrad yourself) who particularly like coding, this could be great astro-programming experience for them! Google Summer of Code is a paid internship for people who are enrolled as undergraduate students as of May 4th 2017.

Please encourage your undergrads to apply!! Applications are open until April 3rd. Check out the main GSoC website for more info.

Hack Together Day at EWASS 2017

We are pleased to announce a hack day to accompany the special session on astronomy research software at EWASS 2017!!

Hack Together Day is a day to work intensively on projects, individually or in small groups, of interest to the astronomical community. A wide variety of projects will be undertaken, spanning everything from software development to community outreach to scientific research to trying out new analysis tools. We’ll also ask the contributors for SS16 (Developments and Practices in Astronomy Research Software) block 3 to be at the hack day, to help participants install, configure, and use the featured software packages. This information will be shared here once the talk schedule is confirmed.

Hack day or programming experience is not required; newcomers are extremely welcome! Project ideas and participants will be solicited before and during the meeting. Participants can lead or join a project, and should plan on focusing on only one thing.

Hack Together Day will take place on Thursday June 29th from 9:00 to 17:30, with the usual breaks for the plenary session, coffee and lunch.

Please register your attendance using this form so we can ensure enough resources for everyone. You do not need to be contributing an oral or poster presentation to the software session in order to participate in the hack day! For more information, see the EWASS 2017 Hack Together Day page on the AstroBetter wiki.

Get in touch if you have any comments/questions/concerns. We look forward to seeing you in Prague this June!

EWASS 2017: Developments & Practices in Astronomy Research Software!!

ewass_prague_2017_logo
EXCITING NEWS!! There will be a special session at the European Week of Astronomy and Space Science (EWASS) 2017 on developments and practices in astronomy research software and a hack day!! I’m co-organizing the hack day and a block on different astronomy software packages, where we will have a variety of speakers (invited and contributed) share open-source software packages of interest to a broad portion of the astronomical and space science community.

EWASS is the general meeting for the European Astronomical Society that will be held in Prague, Czech Republic on 26-30 June 2017, hosted this year in partnership with the Czech Astronomical Society. There will be many symposia and special sessions on a variety of research topics, and registration for the meeting will open in December.

UPDATE (25 Jan):

Abstract submission is open for all EWASS 2017 sessions, and here’s a blog post on the hack day with links for registration and more info. The talks will be on June 28 and Hack Together Day #hackEWASS will be on June 29.

PyAstro17 applications are open!

The Python in Astronomy logo is based on the Python Logo, an SDO AIA 17.1nm EUV image courtesy of NASA/SDO and the AIA, EVE, and HMI science teams and this image of the Horsehead nebula which is used courtesy of ESA.
Applications to participate in the Python in Astronomy 2017 workshop are open until December 9th! The workshop will be held on May 8-12, 2017 at the Lorentz Center in Leiden, the Netherlands. Some travel funding will be available if needed, and participant selection will be done with the goal of growing the Python in Astronomy community. All career levels and Python skill levels are welcome to apply.

I’ve been to the previous two Python in Astronomy workshops. At the first meeting, I was a beginner in terms of contributing to open-source python astronomy projects (like, had never done a GitHub pull request, and didn’t know anything about packaging software), but I learned a ton and loved getting involved with a wonderful community! At the second meeting I was able to take a more active participation role, and I co-lead a tutorial on git and GitHub. And I’m now on the Scientific Organizing Committee for this one!

You can learn more on the workshop website! The application form is here. Get in touch with me or other SOC members if you have questions!

Python in Astronomy 2016

By www.python.org - www.python.org, GPL, https://commons.wikimedia.org/w/index.php?curid=34991651
I’m currently in Seattle at the Python in Astronomy 2016 workshop and wanted to post some notes and reference links for those of you who want to follow along with what we’re up to:

The program for the week

#PyAstro16 hashtag on twitter

Livestream and archived livestreams are recorded and posted by Dan Foreman-Mackey

A Google doc with a list of links to notes from all the presentations and unconference sessions

Zenodo page that will have presentations, notes, as ‘Unproceedings’ (with a DOI for official citing)

Please let me know if there are any other links you’re interested in or that I forgot to include!

#pyastro15

This week I’m participating in the Python in Astronomy workshop at the Lorentz Center in Leiden. It is the greatest workshop/conference/unconference I’ve been to, and it’s only day 3 out of 5. I’ve been developing my git and github skills, and submitted my first pull request (i.e., open-source code contribution) yesterday to SunPy! For this afternoon some of us are planning to sit down and try to hammer out the basics of an astroquery HEASARC module for downloading data from NASA’s HEASARC database!

You can follow along with the hashtag #pyastro15

A note on the twitter hashtag feed: I know that abbreviations can be frustrating for those not at the conference or new to the topics. This being said, twitter inherently does not lend itself to verbosity. If you’re trying to follow along and are getting lost in tweets densely packed with abbreviations and acronyms, please reply and request clarification!

Also, you’ll probably find that some people are tweeting with the hashtag more for non-attendees, and some are aiming their tweets at fellow attendees (I admit I tend to be in the latter camp). You may find it less frustrating to follow a few specific people and not everything from the hashtag.

10 Coding Principles, by Greg Landweber

My undergraduate mentor in the math department, Prof. Greg Landweber, taught me his 10 coding principles in a computational methods tutorial. They’ve gotten me through my BA project, MSc thesis, and I’m still using them in my PhD. They are as follows:

  1. BE FEARLESS.
  2. Compile early and often.
  3. Consult the documentation (RTFM).
  4. Use descriptive variable names.
  5. Comment liberally, including every function, its parameters, and return value.
  6. User interface should be at the top-level only. Computational functions don’t talk to the user.
  7. Use print statements to debug.
  8. No global variables.
  9. Organize your code into functions. Avoid repetition.
  10. Think about algorithms. Avoid checking every possibility by brute force.

Number 1 is my favourite. Number 10 is still something I’m working on. I forced myself to use these principles when I was learning to code, and I think they make me a better programmer than I’d be without having learned and used them. One idea I would add, which is a principle of both good coding practice and laziness:

    11. If you’re manually doing a task often, automate it. You will be rewarded handsomely for your effort up-front.

What are your coding principles?

EDIT: This post generated some great discussions! Here are some suggestions and addenda from my friends and colleagues:

    3a. Write documentation in the first place, and update it as the code grows and changes.
    11a. If you have to do it twice, automate it!
    12. Think before you code. (As it was pointed out, “think before you X” is a good rule of thumb for life.)
    13. Use assertions to debug.
    14. Use version control (e.g. Git).
    14a. Never commit broken code.
    15. Avoid archaic languages (fortran, IDL) whenever possible.
    16. If any code unit has more than ~50 lines (pick a relevant threshold), it needs to be split into separate units.
    17. Write test cases for your code.
    18. Just because you’ve found a bug doesn’t mean you’ve found all the bugs and your code works now.
    19. Don’t just be prepared for failure, expect it! There will be a problem with the code you’re writing right now, but you’ll be able to fix it eventually!