A set of tutorials to learn Python is available here.
Common IDL Commands
readcol – reads in data from columns in text file
plot – make plots, and customize with keywords
plothist – make histograms, can customize with keywords
where – use to search arrays, very powerful
mrdfits – read fits binary tables and images
doc_library – use to get command line help on a given command
max – return maximum value in array
min – return minimum value in array
total – sum elements in array
n_elements – return the number of elements in array
print – print desired array or value in command line
spherematch– fast matching of two coordinate lists
IDL command line shortcuts
ctrl+a – moves cursor to beginning of line
ctrl+e – moves cursor to end of line
ctrl+k – deletes everything to the right of cursor
ctrl+d – deletes character under cursor
Must-have IDL libraries for spectroscopic work in this group
Sloan III software – Go here to download various packages, using subversion. In particular, you MUST have the following:
– idlutils: General software for astronomical applications.
– idlspec2d. Install after idlutils. This package contains code to reduce Keck/DEIMOS spectra. If you want to know how the reduction process works, or what the different programs do, see this cookbook.
XIDL – Set of libraries maintained by Jason Prochaska at UC-Santa Cruz. Includes code for reduction of many Keck instruments, including LRIS, HiRES, ESI), as well as Magellan/MIKE spectra.
Links to other useful IDL websites
IDL Libraries Browser : Can search for lots of programs before having to write your own from scratch. Treat with caution – some libraries have not been updated recently, some programs may not be tested extensively. Some links are also broken.
Coyote’s Guide to IDL: Great troubleshooting and how-to guide to programming and plotting in IDL. David Fanning also maintains a library of IDL programs.
Setting-up your Mac for astronomy
These are some software to install:
– Install xcode, fink
– Install Firefox, Aquaemacs, Latex Eq. editor, Dropbox
– Also useful is VLC, Grandperspective
– Transfer Firefox bookmarks by exporting bookmark file in ‘organize bookmarks’ window.
– Set alias in bash_profile
– For bash shells: re-direct /etc/bashrc to read ~/.bash_profile and ~/.idl_setup. Edit .idl_setup to source and set software directories.
Installing an internal hard-drive on a desktop Mac (A. Grocholski)
Most internal drives are compatible with macs so long as they have a SATA connection. Non-apple brands are about 1/2 the price of the ones listed on the apple website. I installed a Seagate Barracuda 1 TB hard drive in a Mac Pro from 2007. The installation was quite easy (the only tool you’ll need is a small phillips head screwdriver) and steps are as follows (your mileage my vary depends on how apple changed their mac pro design, if at all):
1) make sure your computer is backed up just in case and then power down your computer and unplug everything.
2) lift up on the quick release tab on the back of the tower.
3) remove the side panel by pulling the top away from the tower until the tab on the bottom of the panel comes out of the slot on the tower.
4) look around inside and you should see the original hard drive mounted to a metal “carrier” with a #1 printed on the front. Assuming you only have one hard drive there should be 3 empty carriers next to this one.
5) remove an empty carrier (I used #2, which was my first empty one, but I assume you can use any of them) and take the four mounting screws off of the carrier.
6) attach the hard drive to the carrier using the four screws. The holes in the hard drive and carrier are such that there is only one way to mount the drive in the carrier and have it fit in the computer (i.e., it is almost impossible to mount it incorrectly).
7) gently slide the carrier back into its slot in the computer so that the front of the carrier sits flush with the other carriers. At this point the drive will be connected to the computer for both power and data. No other cables are necessary
8) plug everything back in and restart the computer.
9) after logging in, you should get an error message telling you there is a problem with the drive. Click “initialize” which will take you to the disk utility. Even if you don’t get the error, you’ll want to do this anyway to make sure the drive is formatted properly.
10) click on the newly installed drive in the list (the line that lists the capacity followed by the manufacturer) and click on the “partition” button on the right side of the window.
11) choose the number of partitions you would like (under volume scheme) and format type, most likely “Mac OS Extended (Journaled)” and then click “apply.”
12) enjoy the new storage space on your computer!
ADS – Astrophysics Data Service (link)
This is the main website to find astronomical papers. To search for papers with a specific first author use a ‘^’ in the author search box as in: ^Geha.
For day-to-day listings of new pre-prints, search through the link above. You can also:
– Search by (loosely) defined research areas, e.g. astro-ph.CO. The different sub-areas are listed here.
Using the Besancon Model
What is the Besançon Model?
It is a galaxy simulator, available online. It produces models of the Milky Way based on various parameters input by the user. The website contains some links on the lefthand side with further description, references, and other useful notes. You can use the model to estimate expected stellar populations in different regions of the sky, compare it to existing observational data, or numerous other applications.
Where can I find it?
How do I use the online form to generate a model?
The first page of the form you encounter will have three inputs for you to enter your choice of options. The first concerns which photometric system you would like the model to use. The two choices are the Johnson-Cousins system, which uses the U, B, V, R, I,… bands, and the CFHTLS-Megacam photometric system, which uses the u, g, r, i, z bands.
The next entry is the “Form of the model simulation”. The two options here are a Catalog Simulation or Tables and Differential Counts. You will most likely use the first of these two, which will generate a large data file with the position and photometric, as well as other information about the simulated stars.
The final option on the first page is the choice to include kinematics or not. Selecting ‘without kinematics’ means your simulation will leave out information about stars velocities in the catalog. Once you’ve made your selections, press the “Display model form” button at the bottom of the page.
The main page has a number of form spaces and options to select from (most of which have default settings pre-entered, many of which you won’t need to alter). The heading confirms the options you chose on the first page. The major categories are invariant regardless of photometric system chosen, etc. As you progress through the form and want more information on a specific input, many of them have small question-marks next to them. Clicking on these will open a small window with a description of the parameter.
Under the first heading, Field of view, you can enter your spacial preferences about the distance and direction of line of sight. There are two options to choose from when entering the location of the simulation, Small field or Large field. The Small field will be centered on the direction specified, in galactic coordinates (if you don’t know these, but have RA and Dec, there are online coordinate converters, as well as a very useful function in IDL). A Large field will take either equatorial or galactic coordinates to define the two-dimensional area in space in which you want the simulation.
The next section, Extinction Law, unless you have specific information you need to alter, is often left with default settings.
The Selection On section contains the fields in which you can enter photometric preferences. Unless you want more specific information, it is usually preferred to leave the options for Absolute magnitude, Spectral Types, Luminosity class, and Age and/or Populations on their defaults, which are all inclusive. To narrow the range, simply enter different ranges or click to highlight the desired groups.
Next you will want to select your apparent magnitude passband. Common choices are V for the Johnson-Cousins and r in the CFHTLS system. Then select your range for your chosen passband, for example from 10 to 22. The default setting here is often a bright sample, and automatically in the first band option. Be sure to enter your range for the band you selected, and most often useful to set all other bands to the full range (-99 to 99, the default for most). You then also have the option to set a range of color intervals.
The following section is for photometric errors. The typical setting for the error function is ‘parabolic’, and entries default to 0.0 (an occasion has not yet arisen where I have had to alter any of this section). If you selected “without kinematics” on the first page, this is the last parameter entry section you will see.
If you selected “with kinematics”, you will find two more sections: Proper motions and Radial velocities. Here you can enter a coordinate system choice, as well as error (this uses the same function as selected for photometric errors), and velocity range. Unless you have specific requirements, defaults are usually sufficient here.
If you wish to start the form over with the default entries, there is a reset button at the bottom of the page.
Now that you’ve entered your parameters, fill in your e-mail address at the bottom of the page. When you’re done, press the Submit button. You will then see a confirmation page, where you are given your simulation’s assigned file name, and can view all of the parameters you input.
When the simulation is done, you will receive an e-mail at the address you provided containing the results. There are a couple of link options should your browser have difficulty opening the file directly with the first option. You will want to save this file, as it is only available online for one week.
Finally, you now have your model. When you open the file, you will see the Besançon header. There is then a list of the parameters, followed by a table containing the data. Depending on the size of your field and other parameters, this catalog could contain only a few stars, or thousands. It is therefore often impractical to glean information by reading the file directly, though there are column headings both at the top and bottom for convenience, as well as a few other useful numbers like density and total number of stars listed at the end of the file.
How do I use the model catalog?
Depending on what programming language you are using, and your interface, it can be useful to save and access the catalog file in different ways. One example: in IDL, there is a function, readcol , which will read the data from the catalog into your program. For this function, it may be useful to save a version of the file with the columns of data only, deleting other text before and after the table (but be sure to save a copy elsewhere for reference!)