You are here: IRS>SmartDoc Web>LoResSpectralMapping (30 Oct 2008, WikiGuest)

SMART Cook Book

IRS Low-Res Spectral Mapping ("Step and Stare")

Usage

This recipe assumes that you have IRS low resolution data (Short low or long low modules) taken in spectral mapping mode. (Formerly called "step and stare" mode).
It assumes that you have multiple exposures taken in a series of "steps" (of slightly differing RA & Dec.) across a given source.
The result will be a series of full end-to-end low resolution spectra output into a text or ".fits" file that can be imported into a different plotting/text processing program for publication.
This recipe does not include the subtraction of nodding observations (which are not currently used in spectral mapping mode) nor is any instruction provided as to curve fitting multiple spectra (eg. to a Gaussian) to estimate an intensity distribution across the source. Either or both of these instructions may be provided later.

NOTE : SMART has a large number of buttons, reflecting its multiple functionality. This recipe only specifically refers to those buttons actually used for this particular processing.
Any buttons not referred to do not need to be used here and may be safely ignored.

To extract an observation do the following :

  1. SMART must be installed or accessible on the machine you are using. This machine must have a windowing system (eg. X-windows) running.
    (Check with your system administrator if you need either SMART and/or windowing installed.)
  2. Invoke SMART. This can be by typing "smart" or "smart-cvs" at the prompt.
    (Check with your system administrator which configuration of SMART you have installed and how you need to invoke it.)
    Some messages will scroll past the prompt. This is normal. Then the Project Manager window will appear, headed "SMART Project".
  3. All work in SMART is organized into "Projects". You can start a new project (step 4) or add to an existing one (step 5).
  4. To start a new project :

    1. Click on "Project" and then select "New" on the drop-down menu that appears.
    2. A box appears called "New Project".
    3. At "New Project Name:" type in a new project name (eg. "Project1") and click "OK".
    4. The new project window will disappear and a new project will be created in SMART.
    5. An entry "Dataset1" will appear in the "Project Manager" box.
  5. To add to an existing project :

    1. Click on "Project" and then select "Load" on the drop-down menu that appears.
    2. A selection window will appear headed "Please Select a File".
    3. You can navigate between different directories using the "Directories" and "Filter" boxes.
    4. To select a file click on it. It will highlight. All SMART projects have a ".smp" extension.
    5. Then click "OK" on the selection window.
    6. The selection window will disappear and the selected project will be loaded into SMART.
      (NOTE: Depending on the project size SMART may take 1-2 minutes to load it. Messages will scroll at the prompt during loading. This is normal.)
    7. The Project Manager will display a list of current datasets in the project. Click on the one you want to add data to and it will highlight.
    8. Alternatively you can add a new, empty dataset by clicking on the "Add Dataset" button at the bottom of the Project Manager.
      A pop-up window will appear headed "New Dataset". Type in a name (eg. "Dataset42") and click "OK".
      NOTE: Within SMART you can only work on one data set at a time.
  6. Click on the dataset you want to work with and it will highlight.
    If this is the first time since starting SMART that a dataset has been highlighted then another row of buttons will appear at the bottom of the window.
  7. Click the "Add Records/Edit Dataset" button. A new window will appear headed "Dataset:Dataset1".
  8. On "Dataset:Dataset1" click "Browse". A selection window will appear headed "Please Select a File".
    NOTE: File naming conventions and locations for SIRTF/Spitzer data are not controlled or explained by SMART. SMART can accommodate any file naming convention applied.
    Users may obtain data files directly from SSC, from the SIRTF/Spitzer Public Archive of from their own site specific data storage.
    Please see your own site or system administrator for help with this.
  9. Select the data file(s) for processing. You can navigate between different directories using the "Directories" and "Filter" boxes.
    To select a single file click on it. It will highlight. Then click "OK" on the selection window.
    Multiple entries may be selected from the list in several different ways :

    1. Continuous block - click on the first required entry to highlight it and then drag the cursor arrow downwards with the mouse button still pressed until the last required entry is reached. The entire block will highlight. Then click "OK" on the selection window.
    2. Continuous block (alternative) - click on the first required entry to highlight it and then scroll down with the "down arrow" key while the "Shift" button is pressed.
      Keep scrolling down until the last required entry is reached. The entire block will highlight. Then click "OK" on the selection window.
    3. Continuous block (alternative) - click on the first required entry to highlight it then move the mouse pointer down and click on last required entry while the "Shift" button is pressed.
      This will select whole block and may be faster than using the down arrow in some cases. Then click "OK" on the selection window.
    4. Discontinuous block - First use one of the above methods to highlight the entire range from first to last.
      Then de-select unwanted entries by moving the cursor to them and clicking the mouse with the "Ctrl" (control) key pressed.
      Multiple entries within a block selection may be de-selected by either :
      1. Multiple individual clicks with the mouse button and "Ctrl" still pressed. (Useful for removing scattered individual entries.)
      2. Dragging the cursor arrow downwards with the mouse button and "Ctrl" still pressed until the last required entry is reached. (Useful for removing blocks.)
      Then click "OK" on the selection window.
    5. Discontinuous individual entries - Select one by one by clicking with the mouse with the "Ctrl" (control) key pressed. Then click "OK" on the selection window.
  10. The selected file(s) will appear listed in the "Dataset:Dataset1" window.
  11. If necessary you can change any file name (within SMART) by clicking on it to highlight it. Then clicking the "Rename" button at the bottom of the "Dataset:Dataset1" window.
    A small window headed "Rename" appears. Enter the new file name in the "Rename" window and then click "OK". This will return you to the "Dataset:Dataset1" window with the file renamed.
  12. For some low resolution observations the PSF does not fill the full width of the slit.
    As a result of this an order projected onto the pixel array does not fill the usual full width of pixels. It is then necessary to ignore the outlying pixels.
    SMART contains a mechanism for dealing with this. Only use steps 18-24 if your source does not fill the slit.
    For spectral mapping observations you may have the situation where within one spectral map some images fill the slit and others do not. Please be aware of this. Each observation must be checked individually.
  13. Click on one file in the "Dataset:Dataset1" window display box to highlight it.
  14. Click on the "View" button at the bottom of the "Dataset:Dataset1" window. A drop down sub-menu will appear with three entries :
    1. SMTV/ISAP - Version of the SMTV file viewer integrated into SMART.
    2. IDP3/ISAP - Version of the IDP3 file viewer integrated into SMART.
    3. Quickview/ISAP - Another viewer for SMART input files.
    All these three viewers perform the same basic function, allowing the user to view input image files. Pick the one you are most familiar with.
    If you are not familiar with any of them try each and pick the one you like. For this particular purpose they are functionally equivalent.
  15. Inspect the image and decide if it fills the slit or not. Then exit the viewer and return to the "Dataset:Dataset1" window.
  16. If the image fills the slit then you need do nothing. Bypass steps 18-24.
  17. If the image does not fill the slit then use steps 18-24.
  18. Click on "Calibration" on the Project Manager window toolbar. A drop-down menu will appear, select "Setup".
  19. A new window will appear headed "SMART Calibration Files - Caution !!!". This is the Calibration window.
  20. On the Calibration window there is a list box at the left hand side with a scrollbar on its right.
    Click on the scroll bar and move down to the last entry in the list box. This is "User Parameters".
  21. Click on "User Parameters". A box will appear below the list box. This is headed "Must press "ENTER" to change value".
  22. The first entry in this lower box is headed "Extraction Parameters". The next line states "!sm_fwhmfactor(-1.to +30.) SYS: 1.0".
    Click on the text entry line immediately below this. It will highlight. Then enter "-1.0", overwriting whatever is already in the box. (The minus sign is important.)
    Setting the "-1.0" value causes SMART to take the default fwhm/width for this gaussian/column to be the one defined in the SL or LL "psffov_f" calibration files.
  23. Press the "Enter" key on the keyboard while the text entry line is still highlighted. This is necessary or the change will not occur.
  24. Click on "Exit with this" at the bottom of the Calibration window. You will return to the Project Manager.
  25. On the "Dataset:Dataset1" window select a file to be extracted. Click on it and it will highlight. You can select two or more files for extraction together by highlighting all of them.
    Multiple highlighting in the "Dataset:Dataset1" is done in exactly the same way as for the file selection box described in step 9.
  26. Click on the "Extract" button. (Bottom row of buttons on the "Dataset:Dataset1" window.)
  27. A new window appears headed "Extraction ...".
  28. Under "Select Extraction Type:" click on "Interactive Point Source". Then click "OK".
  29. A window will appear headed "SMART Manual Source Finder".
  30. At the top left hand corner is a drop-down list labeled "Select BCD". Double click on it.
    This will show the name and co-ordinates of the selected data at the top right. A view of the image will appear in the upper center and a cross sectional plot will display in the central box.
  31. Below the co-ordinate display is a selection list headed "Short-Low Orders" for an SL observation or "Long-Low Orders" for a LL one.
    Click on the relevant radio button to display the order (1,2 or 3) you want to work with first. The source is in only one of the orders.
    If you do not see an obvious profile in the central box, you probably do not have the right order button selected.
  32. The central box shows the flux data for the selected order co-added (collapsed) together and plotted as a cross section across the array.
    (The cross dispersion direction, effectively a cross section across the relevant array pixels.)
    The intensity scale is a normalized scale of nominal meaning only. The box upper rubric lists the order number and wavelength range.
  33. Below the central box, at the left are three radio buttons. Select one of them to choose how SMART attempts to fit the data in the cross dispersion direction :
    "Gaussian" - (This is the default) Attempts to fit a Gaussian distribution.
    "Column" - Attempts to fit a column which tapers with wavelength corresponding to the data's own taper with wavelength. (As wavelength decreases so does order width as short wavelengths spread less in the spatial direction.)
    "Fixed column" - Attempts to fit a fixed width column. That is, the column width does not change with wavelength. This is meaningful only for extended sources, but flux calibration of extended sources is not included in this version. Calibrations only apply for unresolved sources.
  34. Click on "Define Source". Move the mouse pointer onto the central display box and click on the points which you regard as suitable for defining the width of the fitting region.
    That is, the spatial width of the source for which you wish to extract a spectrum. Once the second point is clicked the "fit" region will be outlined in red. By default the rest of the display will be regarded as "background" and outlined in yellow.
    If you proceed to extract, the background underneath the source will be fitted by extrapolating from the outlined background regions on either side of the source.
  35. More than one fit region may be chosen. Click "Define Source" again and select another pair of points. This can be repeated for each required region.
    "Undo Last" will remove the last region selected. "Undo All" will remove all selected regions.
  36. Normally "background" is assumed by default to be all parts of the region not selected as "source". However you can define background manually. Click on "Man-Define Sky".
    The yellow marked background will disappear leaving the red marked source. Then select and click two points to define background. These will be marked in yellow.
  37. More than one background region may be chosen. Click "Man-Define Sky" again and select another pair of points. This can be repeated for each required region.
    "Undo Last" will remove the last region selected. "Undo All" will remove all selected regions.
  38. Once source and background have been defined to your satisfaction click on the "this order" and "this BCD" radio buttons in the lower center of the window.
  39. Click "Apply Selection".
  40. There are five buttons at the bottom of the "SMART Manual Source Finder" window. Exit by clicking one of them :
    "Exit/!NoSkySub" - Extracts data with no sky subtraction at all.
    "Exit/!AutoSky 0" - Extracts data with sky subtraction as a zero order polynomial (ie. a constant) based on the defined sky.
    "Exit/!AutoSky 1" - Extracts data with sky subtraction as a first order polynomial (ie. a straight line) based on the defined sky.
    "Exit/!QuerySky" - Extracts data with sky subtraction selected by the user during extraction. (See below)
    "QUIT/NO-SAVE" - Quits with no extraction and discards all input to this window.
    NOTE : For normal use of low resolution data "Exit/Autosky 1" is recommended.
  41. During extraction the following windows will appear showing SMART's attempt to fit the data :

    "Exit/!NoSkySub" - One plot of the fit labeled "DN vs X-dispersion Distance (pixels)".
    "Exit/!AutoSky 0" - One plot of the fit labeled "DN vs X-dispersion Distance (pixels)".
    "Exit/!AutoSky 1" - Two plots, one of the fit, the other of the straight line sky subtraction, both labeled "DN vs X-dispersion Distance (pixels)".
    "Exit/!QuerySky" - A window will appear headed "SMART SKY SUBTRACTION - CAUTION".(See below)
    "QUIT/NO-SAVE" - No plot or window appears.

  42. If the "Exit/!QuerySky" option is taken then a window will appear headed "SMART SKY SUBTRACTION - CAUTION". This allows the user to choose the type of sky subtraction performed. At the top of the window is the file name. Then comes "Sky Type".
    This has four options selected by radio button. These are intended for use in a later release(s) of SMART. Currently select the "None" option (the default) and click "Exit" to continue the extraction.
  43. While extraction is running messages will scroll at the prompt. This is normal. If you are extracting more than one file at once and using the "Exit/!QuerySky" option then the "SMART SKY SUBTRACTION - CAUTION" window will appear for each file.
    Options must be chosen separately for each one. They do not need to be the same as the options chosen for other data files/orders in the same extraction.
  44. A large window will appear titled "SMART-ISAP:ISO/SIRTF Spectral Analysis Package". This is the IDEA window.
    At its center is the display box where extracted data is displayed and can be worked on.
  45. Above the display box are a group of radio button lists titled "BCD:", "Order:", "Slit Pos:" and "Module". For the "Order:" list click on "All".
  46. If two or more files have been selected for extraction together then they will be listed separately on the "BCD:" radio button list.
    You can select "All" to display them all simultaneously or choose an individual BCD number to just display one data set. Make sure you know which data set is which.
  47. Click the "Plot" button on the left hand side of the IDEA window. The extracted data will appear in the display box as a set of data points.

  48. Click on the "Style" button on the left hand side of the display box. A new window will appear called "Plot Style Preferences".
    In the top line of this ("Line Style:") click on "Connected". Then click on the "Apply" button at the bottom left hand corner. The "Plot Style Preferences" window will disappear.

  49. OPTIONAL STEP - color
    Some users find it helpful to have the different orders displayed in different colors. To do this click on the "Style" button on the left hand side of the display box.
    A new window will appear called "Plot Style Preferences". In the second line of this ("Color Coding Preference:") click on "Order Number". Then click on the "Apply" button at the bottom left hand corner. The "Plot Style Preferences" window will disappear.
  50. Extracted data now appears in the IDEA window display box as connected data points.
    (Each order will also be colored differently if you have selected this above. NOTE : If your data suddenly has one order missing it may be that one of your default colors is black. See your system administrator to change this.)
  51. The full spectrum can appear very ragged due to poor calibrations at the edges of each order. Any part of the spectrum can be enlarged for examination by holding down the left mouse button and drawing a box around the area for examination. When finished click "Plot" again to return to the full spectrum.
  52. It is often helpful to trim the edges of each order as the first and last few data points of each order may be misleading.
    To do this first go to the "Orders" list on the IDEA window above the main display box. Unselect "All" and select the first order only. Then click "Plot" on the left hand side of the IDEA window.
  53. This will display just the first order. If there is significant rise or drop at either/both edges of the order it can be masked out.
  54. With the right mouse button draw a box around the portion of the edge of the spectrum you want to mask out. A window headed "Applications" will appear. Click on "Mask".
    The "Applications" window will disappear and in the main display box the selected portion of the order will be masked out. Repeat for the other edge of the order if needed.
    NOTE: The data may be automatically re-scaled to best fill the display box. IE. Its appearance may change. This is normal.
  55. If you do not like a particular box you have selected click on "Cancel" at the right hand side of the "Applications" window (which will disappear) then click "Replot" at the bottom right of the IDEA window.
    This will remove the box you have drawn and you can draw another.
  56. At any time you can recover data points that have been masked. To do this on the IDEA window click "All" on the "Orders" list, then "Plot". This ensures that all the data is displayed.
    Then with the right mouse key draw a box around the entire display box area within the displayed axes. When the "Applications" window appears click "!UnMask". This will restore the masked data to the display box.
  57. If you are absolutely sure you will NEVER need the edge data points then instead of selecting "Mask" on the "Applications" window select "Zap" instead.
    The "Zap" function works in the same way as "Mask" however any data removed with it is gone permanently from the extracted data. It cannot be recovered or re-viewed later.
  58. For each order (1,2 or 3) repeat steps 52-57 until all unwanted order edges have been removed.
  59. Once you are satisfied that all unwanted data has been trimmed again click on "All" on the "Order" list.
    Then click on "Plot". This will display the full extracted spectrum with unwanted data removed.
  60. At the top right of the IDEA window there is a row of buttons. Click the fourth one. "Store-Prime".
  61. On the IDEA window left hand side click the "Store" button.
  62. A new window will display headed "Stored Data Sets". This displays a radio button list of all current data sets being worked on.
    The first entry will be the name of the original file extracted. The second entry will be the same name preceded by a row of "M:", "Z:" etc. Each letter represents one "Mask" or "Zap" operation performed.
    EG: 1st entry - IRAS_12345+6789 2nd entry - M:M:Z:IRAS_12345+6789 (ie. original data with 2 Mask and 1 Zap performed on it.)
  63. It is usually more convenient to give the processed data some other, more meaningful and less cumbersome name.
    To do this on the "Stored Data Sets" window select the dataset to be renamed. Then click on "Apply Function to :[filename]" at the top of the "Stored Data Sets" window. A sub-menu will appear, click on "Change Name".
  64. A small pop-up window will appear. At "New Title:" enter the new name. Then click "OK". The "Stored Data Sets" window will then disappear.
  65. Click the "Store" button again to display "Stored Data Sets". The re-named dataset will appear listed with its new name. Select it.
  66. Click on "Apply Function to :[filename]" at the top of the "Stored Data Sets" window. A sub-menu will appear, click on "Write to disk in...".
  67. Another sub menu will appear with three options :

    1. FITS format - the standard ".fits" table format.
    2. ASCII format - This leads to 2 further options :
      1. Write the header + All the data An ASCII file of data in column format containing all data in the data set.
      2. Write the header + wave flux stdev and flag data An ASCII file of data in column format containing the minimum data needed for re-loading into the IDEA window at a later time.
    3. ISAP-XDR format - The IDL "XDR" format. Only use this to save data you intend to further process ONLY with other IDL programs.
  68. Select one of the save options. The choice of format will be determined by the input requirements of any piece of software you intend to use next.
    A small pop-up window will appear. At "Name for [type] file" the default name displayed is the current name for the data set within the IDEA window.
    The default directory is the one from which SMART was invoked. You can change either of these by typing in "directory/file". (Please use absolute path names for directories.) Then click "OK".
    The entry window and the "Stored Data Sets" window will then disappear.
  69. At this point you have extracted and stored the first spectra of the spectral map.
  70. To extract and store each of the other spectra from this spectral map repeat steps 12-69. Please bear in mind that you can have a situation where some observations of a given spectral map completely fill the slit while others do not. In this case you must switch the "!sm_fwhmfactor" accordingly. (IE. Repeat Steps 18-24.)
    Note that the setting of "!sm_fwhmfactor" does not revert to default once it has been changed. You must change it back manually. The usual default value is 1.0. Check each observation before extraction to decide the setting of "!sm_fwhmfactor".
    Observation fills slit - sm_fwhmfactor = 1.0. Observation does not fill slit - sm_fwhmfactor = -1.0.
  71. When the second and subsequent data sets have been extracted a small window will appear headed "Acknowledge" with the message "Updating stored data sets with newly extracted data". Click "OK" on this window.
  72. Multiple data sets can be held within the IDEA window. However only one can be worked with at any one time.
    The data set being worked with is called the "Prime" data set. The first data set to be extracted is automatically made the prime data set. Running a second or subsequent extraction does not change this.
    The first extracted data set remains the prime data set until it is specifically changed. (NOTE: In step 60 above when "Store-Prime" is clicked this takes the masked/zapped version of the first data set and creates a new separate data set composed of that data. This new data set then becomes the prime data set.)
  73. To make a second or subsequent extracted data set the prime one click on "Store". The "Stored Data Sets" window will appear with a list of all data sets. Click on the one you want to make prime. (IE. work on at that time.)
  74. Then click on the "Apply Function to: [filename]". On the sub menu which appears click "Make Prime". The selected data set will then become the prime one.
  75. This may cause the display box to go blank. The new prime data set may well have some different configuration of orders from its predecessor.
    If this happens click "All" on the "Orders" list near the top of the IDEA window, then "Plot" on the left hand side. This will display the new prime data set in the display window.
  76. This recipe does not include the subtraction of nodding observations (which are not currently used in spectral mapping mode) nor is any instruction provided as to curve fitting multiple spectra (eg. to a Gaussian) to estimate an intensity distribution across the source. Either or both of these instructions may be provided later.
  77. When finished click the "QUIT" button at the bottom left of the IDEA window.
  78. A small window will appear headed "ISAP Exit", displaying the text "Do you really want to exit?". Click "Yes".
  79. A small window will appear headed "Update Project", displaying the text "Do you want to save your spectral data to the SMART Project Manager?". Click "Yes".
  80. In the "Dataset:Dataset1" window a new entries will appear in the file list. These are the extracted and modified spectra you have just made.
    They will be named with the name(s) you gave to them in the IDEA window. They will be stored in this SMART project for further use. It will not be necessary to extract them again.
  81. If necessary you can change any dataset name within SMART by clicking on it to highlight it. Then clicking the "Rename" button at the bottom of the "Dataset:Dataset1" window.
    A small window headed "Rename" appears. Enter the new file name in the "Rename" window and then click "OK". This will return you to the "Dataset:Dataset1" window with the file renamed.
  82. On the "Dataset:Dataset1" window click "Close".
  83. On the Project Manager" window click "Exit".
  84. A small pop-up window headed "Question" will appear asking "Save Project ? [project name]. Click "Yes".
  85. You have now left SMART.
  86. IDL is still invoked at the prompt. Type "exit" at the prompt to leave IDL.

 
This site is powered by FoswikiCopyright © 2002-2009 by the Cornell IRS Team.
Send feedback. We use Foswiki.