SimSpec Documentation


To use SimSpec pipeline, it is required to have prior experience of using IRAF spectroscopy reduction tasks, especially “apall”.

The basic steps to run the pipeline are:

  • To choose a instrument configuration for which you want to reduce the data
  • Create a setup file listing all .fits files for Targets, ARC, standard, bias etc. (there are helper tools in pipeline to assist in building this file)
  • Run the pipeline, and follow the guided steps in the interface
  • Only step(s) that include manual work, is to do the careful aperture extraction of targets(s) and standard

Installation and first time setup

Steps in this section you only need to do once

Installing SimSpec

You will need Python2.x with Pyraf package installed. SimSpec can be installed from the PyPI/PIP repository by following command.

Note: If you have multiple versions of Python installed, then when you execute the following PIP command, make sure the PIP is executed for that version of Python which has Pyraf installed in it.
You might also need to install as a superuser sudo, if your python version require so.

$ pip install simspec

After installation simspec command will start the program. When you run simspec for first time, you will asked some basic information, like your name, this will go into the header of fits files you reduce. SimSpec supports multiple user mode. It will also ask for SNID executable name, if you not know / need SNID, simply leave this bank.

Troubleshooting tip:

To test the installation, run SimSpec like this

$ simspec

If you get a message SimSpecError: Unable to find configuration file: setup.conf then your installation is “most likely” fine. But if you get an error that Pyraf not found. Then SimSpec is installed in a Python version which does not have Pyraf installed. To get the path/version of the Python in which SimSpec is installed type this command

$ simspec –sysinfo

You can execute this in your shell to get help on all the command line parameters (optional)

$ simspec -h

Installing Instrument specific modules for SimSpec

An SimSpec module adds instrument-specific data-reduction capability to the SimSpec pipeline. Users can create their own SimSpec module or can directly use pre-built modules for various instruments/telescopes. List of available SimSpec instrument modules can be found in SimSpec Module repository

You can install as many modules as needed. For example two MDM modules for two ARC configurations.

To install a module use the following command. See the repository page for more installation options.

$ simspec -installmodule IMACS

Or multiple modules togather,

$ simspec -installmodule OSMOS_Ar  OSMOS_HgNe

Note: Installing SimSpec Modules require same level of file system permission as it was used for installing SimSpec. If you invoked sudo while PIP installing SimSpec, you might need to do the same when installing modules.

Data reduction with SimSpec

These steps you need to do each time you reduce data for each night.

Generate setup file (setup.conf) for the dataset

In your terminal cd to you working directory where you have your raw data files are present

Generate a temple configuration file

$ simspec –genconf

You will be prompted, then chose your desired instrument module (which you have already installed) which you will be using.

Now you will have a setup.conf file. Edit this text file it with your favorite editor (I prefer gedit here)

Fill in with names of (i) ARC files, (ii) standard files and your (iii) target object files. Also, be sure to enter the Standard object name. You can include as many object/target file named groups as you want

The content of the setup.conf file should look like this

; with IMACS Module v1.0
Instrument = IMACS




; Use "simspec -liststds" to get list of standard names available by default
Name = feige34


[Another-Object-Name-Here] ; Add as many named target groups as you want (optional)
Files names...

[Yet-Another-Object-Name-Here] ; (again optional)
Files names...

Note: For MDM, bias and flats are not required, but for other Instruments Bias and Flat file names are also needed.

As a helper tool you can execute this command to list all the .fits files along with relevant (instrument specific) header info

$ simspec –obslog

Another helper function to list and choose the exact name of the standard star you are going to use

$ simspec –liststds

Running SimSpec UI and doing the reduction

Once you have prepared the setup.conf file, you are ready run the SimSpec User Interface. Just fire up the program, it will read the setup.conf by default.

$ simspec

or you can specify the setup configuration file in command line argument as (optional)

$ simspec FILE.CONF

SimSpec UI

You will be provided a self-explanatory color-coded interface with guided steps to execute one by one and get the reduction done. At any time you can go back to any previous step and you will be guided to do subsequent required steps.

  • The only important steps to manually work out are aperture extractions of Standard and Target/Object (steps 3 and 4).
  • While doing flux calibration (step 7) just ensure the fitting is good and adjust as needed.
  • Ignore Step 6. You may not need it is most case (as long as the auto-wavelength-calibration works.)

Additional help and parameters (optional)

$ simspec -h

This will list all the command line arguments

SimSpec is highly user-configurable and you can have access to a lot to parameters, at this monent I don’t have any detiled manual describing all.

  • While you are running the SimSpec UI, you can press `p’ to list the available parameters.
  • These parameters can be changed in runtime (as you press p, you will get to modify each parameter)
  • You can set these parameter in your ‘setup.conf’ file (which you prepared earlier) as well. Just put the parameter under the [setup] section of the .conf file, e.g. CosmicCor = false . These are case-insensitive.

Advanced user manual

In this section you will find detailed instruction for advanced features of SimSpec.

SimSpec has plenty to advanced features and parameters to tweak, for which I don't have a full documentation yet.

More to be added soon.... Till then, if you are using SimSpec and have any queries, please feel free to contact me.