Monday, January 25, 2016

Well that is going to speed things up

Ever since I discovered how to make a progress bar in my python scripts, most of them seem to have them now.

It shows how far along it is but also the estimated time till completion. Brilliant. It also made me slightly more worried about how long something takes.

For example, a (older) script I wrote to fit SED models to suspected brown dwarfs. It works well but it's a little heavy on for loops. I wanted to apply it to LOTS of sources. So I ask Matt if he knows any tricks to speed things up. Matt shows me a trick using arrays.

Script goes from weeks-till-completion to mere seconds. wow. Usually I am not too fussed if a script runs for a little while (2 min? fine, I'll check twitter or something) but cutting down from weeks of runtime. nice.

Go Matt.

Now I'm going to stare at a progress bar run across the screen.

No comments:

Post a Comment