Skip to content

Instantly share code, notes, and snippets.

@alexrudy
Created June 18, 2014 04:32
Show Gist options
  • Save alexrudy/dd092ecafa7db29a746e to your computer and use it in GitHub Desktop.
Save alexrudy/dd092ecafa7db29a746e to your computer and use it in GitHub Desktop.
Meeting Notes from 2014/6/17

First Group Meeting

Evan and I met to discuss the start of his SIP work. We are currently persuing three projects:

  1. Learning Python
  2. Exploring images of the Crab Nebula
  3. Reading the Schweitzer et. al. Paper

We also talked briefly about stellar evolution, and how Pulsars form.

Learning Python

We talked about Evan's python setup. He is using the Anaconda distribution, and the Spyder Integrated Development Environment. We talked about the software stack, which I'll re-iterate here:

  • Python is a programming language, and also a program, installed (on Windows) as Python.exe. This is called the "Python Interpreter" and is the program which understands written python code and uses it to take actions.
  • Python uses a "module" system, where libraries of code written by others can be used within Python. This is done using the "import" mechanism, where import numpy "import"'s the "numpy" module for use in that python program. Behind the scenes, "numpy" is a collection of python files which are assembled in a "module".
    • The simplest way to install the most basic module is to put the python file for that module in the same directory (folder) as your python code. Modules like "numpy" are more complex, and often require an installer.
    • The second easiest way to install python modules, and the way that you should prefer, is using a python distribution. In the case of Evan's choice, "Anaconda" is his python distribution. Anaconda provides a way to install "packages", some of which contain "modules". The Anaconda documentation provides information about installing packages, and information about which packages are installed.
    • The third easiest way is to use the default python module manager, called pip. You can find more about pip and its usage in its online documentation.
    • An unadvisable way of installing a python module is to use an installer that they provide. I don't advise this because it is a way to lose control over where things are installed. Often the installers won't play nicely with other installed python modules.
    • The most difficult way to install a module is installing it directly from its source files. To do this, you would download the source files to a directory on your computer. Then (on a command line) you would run python setup.py install from the source directory you downloaded. I call this the most difficult way, as you have to do it from the command line, and you are responsible to make sure all of the other requirements for that package are installed.
  • The Anaconda distribution is a way to install python and to manage that installation, as well as installing many modules and packages. There are a few other python distributions (e.g. Enthought) which also install python. Most distributions come with some modules installed from the start, and with a mechanism for installing optional modules.
  • Spyder is an "Integrated Development Environment" (IDE). It provides mechanisms for writing python code (in files), running python code, and helpful tools for debugging and editing code. Using an IDE is optional, and there are several of them around (IDLE is another python IDE, Eclipse is an IDE for writing code in Java). An IDE includes a way of writing text files. I use a simple text editor instead of an IDE, as I prefer the flexibility of a text editor. This is really a personal decision, and you can use either an IDE or a text editor or both.

All of this is your programming "stack", and any layer of this could be replaced (say, if you really wanted to learn/use Java or Ruby, or if you liked IDLE better than Spyder). You should get to know all of the pieces of your stack, as they are all useful.

We also talked about the specific version of python to use. A good description of the advantages and disadvantages of python is described here, but my suggestion is that you use python version 2.7. But thats only my suggestion. I use both python 2.7 and python 3.3 on a regular basis and am happy to help with both.

We briefly discussed how the MIT python course was going, but given the discussion above about the "python stack", I don't think Evan had gotten very far. We'll continue to discuss python next time.

Exploring Images

Evan and I talked about the images of the Crab Nebula that I sent. We talked about the Pulsar, and the background/foreground stars in the image. We also talked about the features of pulsar and nebula, including:

  • "Wisps" or "Toroidal Winds" which appear as ellipses.
  • The "Knot", which appears as a blob next to the Pulsar, and is sometimes called the "Inner Knot".
  • The "Anvil", which a specially shaped wisp to the lower left of the Pulsar.

Reading the Schweitzer Paper

Figure 1 provided a good diagram of the Crab Pulsar and evironment that looks similar to the images that Evan examined in ds9. We discussed that Section 1 is dense, and has lots of strange physical units. We decided that on Thursday, we'll discuss the celestial sphere, and the units we use to measure position on the sky. For that, it would be good to take note of the places where the first few paragraphs of section two refer to angles, as in degress (º) arcminutes ('), or arcseconds (").

Action Items

For Thursday, we'll talk about:

  • The Celestial Sphere, and how we measure positions on the sky.
  • Features in the Crab Nebula.
  • Progress using "Numpy", "Matplotlib" and "Astropy".
  • Progress on the MIT Python Course.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment