Tuesday, September 28, 2010

Sherpa modeling and fitting package on Ubuntu

Sherpa is a set of fitting and modelling routines used by the people from the Chandra X-Ray Observatory. It is a very robust software with its own interface, although recently they developed a python implementation which is very easy to use. I guess x-ray astronomers must know what they are doing, don't you?

You can find the python package here.
When I tried to install it on Ubuntu 10.04 or 10.10 I faced a really nasty compilation problem with the file Simplex.cc. To fix it you must edit the following file before compiling:

sherpa-4.2.2/sherpa/optmethods/Simplex.cc

Just add this line to the beginning

#include <stdio.h> 

If you have all dependencies installed the compilation should run just fine. In the following weeks I will post some examples with Sherpa.

Wednesday, September 22, 2010

Python: how to start learning?

Many (most?) people that want to start learning Python are confused about where to start. So many options! Motivated by this, I list in this post the references that I used to learn Python (and object-oriented programming as well), which can serve as a starting point for other people. I had scientists in mind when I wrote this post.

Beginner material

Learned the basic syntax and capabilities of the language with the official Python tutorial. You can download all of this as PDF files. I suggest this for people with previous programming experience. For absolute beginners, have a look at the Think Python book below.

Introductory lecture about Python, its syntax and science applications. It shows what Python is capable of for data analysis and plotting. Inspiring. The audio is also available for download as a MP3 file.

Tutorial on using Python for data analysis! How to on how to replace IDL/Matlab with Python, essentially. Includes: plotting, FITS files, signal processing.

I learned object-oriented programming using this material. Very clear and "application-oriented" approach. You don't need to be a biologist to understand this.

Longer introduction for people with no previous extensive programming experience.

Quick reference


Migrating from IDL/Matlab to Python.

If you are going to do serious stuff with Python, I suggest using the enhanced interactive Python terminal IPython.

Longer introductory books

Learning Python, Mark Lutz

A primer on scientific programming with Python, Hans Petter Langtangen

Longer reference books

Python essential reference, David Beazley

Wednesday, September 15, 2010

Switching from Windows/PC to Mac

OK, you got your shiny new Mac machine and switched from Windows to Mac OS X. What now? It happens that a friend of mine is going through that process and I assembled a list of links which might be useful for Mac newbies, which you can find below.

Switching from windows to mac, several tips and advice.

Several video tutorials made by Apple. Quick and simple.

My collection of mac-related links. Be sure to check out the following links:
- AlternativeTo.net: find alternative free software to commercial ones
- Mac OS X for scientists: Mac tutorial for scientists
- Best Mac software

Advice on your first Mac.

 
Locations of visitors to this page