-
Notifications
You must be signed in to change notification settings - Fork 2
Running BMEP
So, running this program should be fairly simple.
.com bmep
bmep
and for MOSDEF:
.com bmep
bmep_mosdef
This should bring up a list of masks (all of the folders in your MOSFIRE_DRP_2D
path). Select the number of the mask you wish to reduce (or -1 to exit). Then, select the object or objects you want to reduce. This will open all 2d fits files for this object (so, all the filters).
Profile mode
This should bring up two images in one window. The bottom image is the science frame and the top one is the signal to noise image cut so that below 2 is black and above that is white. This top image really helps pick out emission lines and signal that are significant. Also this image is the absolute value, so the negatives should also show up if the line is sufficiently bright.
If your BMEP_MOSFIRE_DRP_MASKS
path is setup correctly, there will be a one pixel wide line drawn across one row. This marks the expected position of the object in your slit. For mosdef users, the expected position is saved in the 2d headers, so if you see an image, you should also see a horizontal white line on the expected position. If the serendip file (newmasks_slitobjs.dat
) is in the 1d directory (BMEP_MOSDEF_1D
) there will be dashed lines on the other objects that fall on the slit. The longer dashed lines are for brighter objects, and smaller dashed lines are for dimmer objects.
So, now that you have an image displayed, take your mouse and click and drag the mouse across where you see signal. This adds the columns where you clicked and where you released together. Once you release the mouse, this will bring up a plot that shows these columns binned. You can continue to add columns to this plot by clicking and dragging elsewhere on the image of the spectrum. Once you have a satisfactory profile, hit e
. (to be clear, the y-axis of the 2D image is the x-axis of the plot)
If the object has some continuum, you can press c
to switch to "continuum mode" this throws out half of the columns with the highest noise. "noise" as being defined as the sum of the variance of each column. There is a visualization of the rejected columns on the plot when you use this mode. The noise is plotted and the columns above the red line are not used to measure the profile. The x-axis of this plot is just column number where 0 corresponds to the left most column clicked.
If you mess up the profile or add in columns that you didn't want to, you can reset the profile by pressing r
. The plot doesn't reset, but it is reset, I promise. However, if you are still in continuum mode, this setting will persist.
Extraction mode
Once you hit e
, the program enters a loop that won't exit until you press q
while the IDL window is selected. This is supposed to be similar to the IRAF method of extracting spectra. Hit m
while your mouse is hovering over the spectrum's profile to fit a Gaussian to that data (initial guess for the center is where your mouse is). The results of the fit should print to the screen. If the fit was successful, three lines should be drawn, one at the center, and two at the two extremes that will be extracted. To extract this spectrum hit e
and to save it hit S
. Note: all of these commands must be entered by typing into the IDL prompt, but they use mouse input, so both windows must be visible on your screen.
There are many more commands you can issue. Hit ?
or h
to see a listing of the other commands and a short description of what each does. Some common commands should be exactly like the IRAF
Redshift estimation
After extracting, you might want to guess the redshift of an object. There are vertical red lines drawn on where you clicked. If there was a faint emission line, this might help you spot it in the 1d spectrum. For mosdef users, there are green lines drawn on the most popular emission lines based on the zspec, zgrism, or zphot. These were also drawn on the 2d image.
Now that you can see the emission lines you want to fit, you can do this with the X
key. Zoom in with the x
key then hit X
on the left, then right side of the line. If the fit is successful, information about the fit will come up, and for mosdef the priority, z_phot, z_grism, and z_spec. The plot will change to only the region fitted. The green is the data that was fit, the red is the fit, the white is the initial guess, and the vertical white line is the center of the fit (the point used for redshift calculation). A menu with four columns should come up: choice number, line name, line wavelength, redshift if this line fit is that line. If you're uncertain of the line, it could be useful to compare to zphot, zgrism, or zspec to the values in the fourth column.
The other option (for mosdef) is the Z
key (for mosdef users only). This is supposed to be the "smart" option to do line fitting. It is described here.
I know that the program can extract 2 or 3 (or more) spectra at the same time, but DO NOT do this if you are trying to fit the redshift. Extract one at a time. An example of how to do this: Lets say you have nice profiles for the primary object and object number 2. First, fit the primary with m
and extract with e
. Zoom in (x
) and fit your emission lines (X
) to your heart's content. Then save the spectrum with S
. NEXT, delete the primary spectrum with d
(this doesn't remove the saved spectrum from your 1d folder). Now, fit object number two with m
and extract with e
. Hit the 2
key to change the object's number. Zoom in (x
) and fit your emission lines (X
) to your heart's content. Then save the spectrum with S
. If you forget to change the object number, you will save incorrect lines in your line catalog, and you will overwrite your 1d spectrum.