Manual for the IRIS Simulator
(Martin Wiesmann, UIO)
2012-12-05

This tool simulates the IRIS instrument with simulated solar data. It takes an OBS list as input, and produces level-1 fits-files, which might also come from IRIS. It also gives a quick overview on the data in the form of snapshots and a movie. This tool was tested with the output of build ‘irisplantool_20121030’.

Requirements:
-	IDL 6.2 or later (tested on 8.1)
-	SolarSoft (http://www.lmsal.com/solarsoft/)
-	Qt-tools (http://omino.com/sw/qt_tools/) (required for creating movies, available for MAC only, a future release of this tool will use a platform-independent solution)

Usage:
IRIS_simulator [,OBSfile=OBSfile, OBSdir=OBSdir, copyxml=copyxml]

Optional inputs:
OBSfile: The filename of the OBS-file created by ‘irisplantool’ (e.g. ‘OBS-T-00001.xml’). If not provided a dialog pops up, with which the user can choose a file. This variable may include the path to the file, or the path may be given separately in OBSdir.
OBSdir: The directory in which this OBS-file resides (e.g. ‘XMLTest/’). If not provided, the directory will be taken from ‘OBSfile’.
Copyxml: either 0 (zero) or 1 (one), if 1, then all the xml-files which belong to given OBS will be copied to a directory whose name contains the date and time of creation with an ‘_dep’ appended. If not provided, the default (0) is assumed.

When a valid OBS file is chosen, the dependency tool is opened:

Dependency tool

The dependency tool displays the content of an Observing list table and all its corresponding tables (FRM, FDB, CRS). Those tables are created with Ankur’s tool ‘irisplantool.jar’. At the moment build ‘irisplantool_20121017’ or later should be used with the current dependency tool. It was also tested with ‘irisplantool_20121030’.

Output:
This tool opens 4 windows, the upper left contains the content of the OBS, lower left all FRM, separated with tabs. Upper middle window displays the FDBs in 3 different tabs, SJI, NUV and FUV. Upper right shows the CRS, also in 3 different tabs.
Also, if copyxml is set, the corresponding xml-files will be copied to a new directory.

Interaction:
One can click on the table in the OBS window, and the corresponding tab in the FRM window will be selected, as well as the corresponding tabs of the FDBs and CRSs. Accordingly, when one clicks a tab or a table in the FRM window, the corresponding tabs of the FDBs and CRSs will be opened. And finally, clicking on a tab on the FDB window, opens the corresponding tab on the CRS window.
If the OBS window is closed, all other windows are also closed. FRM/FDB/CRS windows cannot be closed.
The CRS window will be placed in a scroll area if necessary, this window can then be moved and resized. However, if it is resized, the size of the window will be updated, and the scroll area will be faulty. Workaround: make the CRS window big enough, to be able to see the whole content.
There is a button on the top of the CRS window ‘Show regions on CCD’, which will open a new window showing the regions of the selected CRS files drawn on the CCD areas.

Starting the IRIS simulation:
The IRIS simulation can be started by clicking on the menu ‘Simulator’ and then ‘Start Simulation’ in the menu bar of the OBS window (top left). Doing that will open a new window, in which all the input parameters for the IRIS simulator can be seen and edited.

Input parameters:

Input:
OBS input file:
The OBS-file, including its path, which should be used in the IRIS simulator. The default is the OBS-file passed into the dependency tool. By clicking the ‘Change’ button on the right side, this file can be changed.

FUV/NUV sim input folder:
The directory containing the FUV/NUV simulation files. The default is the current directory.

FUV/NUV sim input format:
The format of the FUV/NUV simulation files, as it is used in wildcards and ‘strmatch’, where * replaces the file number. The default is ‘iris_synthetic_fuv_*.fits’, or ‘iris_synthetic_nuv_cb24bih_*.fits’ respectively.

dtime [s]:
Time step between consecutive simulation files in seconds. The default is 10s.

dtime wrap [s]:
Time step between the last and the first simulation file, when wrapping around in seconds. The default is 30s.

Ouput:
Fitsfiles:
If activated, the resulting level 1 fitsfiles will be saved to the ouput folder.

Save graphs:
If activated, the resulting graphs will be saved into files, into the output folder, each step will create a new png-file with the step-number as part of the filename. If deactivated, the graphs will be plotted directly onto the screen, this is only recommended when in debug mode with a small number of steps (preferably ‘1’, see further below). Needs to be activated, if ‘make movie’ is activated.

Make movie:
If activated, the tool calls qt-tools to create a mov-movie, using the images created with the option ‘save graphs’.

Play movie:
If activated, the tool will call Quicktime Player to play the movie created with the option ‘make movie. Will have no effect, if ‘make movie’ is deactivated.

Copy xml-files:
If activated, all xml-files which the given OBS depends upon, will be copied to the output folder.

Csv logfile:
If activated, a log will be written into a comma-separated file into the ouput folder. This file is excel-readable.

Txt logfile:
If activated, a log will be written into a text file into the output. This file is human-readable.

Max window size [pixels]:
These two numbers (x and y) define the maximum size of the plot window.

Output folder:
The directory into which the results should be saved. The default is the current directory. The tool will create a new folder in this directory, whose name will contain the current date and time.

QuickTime location:
The location of the Quicktime application. This is required for the option ‘play movie’. (A forward slash is required if there is a space in the name)

Graph:
Overview SJI:
Frame [arcsec]:
Defines the frame around the actual observed region on the sun, which will be shown on the Overview SJI.

Type (fu1, fu2, nu1, nu2):
Defines the bandpass of the Overview SJI, allowed values are: ‘fu1’, ‘fu2’, ‘nu1’, ‘nu2’ (where fu stands for FUV and nu for NUV)

Scaling threshold:
Overview:
The scaling threshold of the Overview SJI, as used in ‘histo_opt’, meaning that values which are the cutoff brightest or darkest, respectively, will be clipped.

SJI:
The scaling threshold of the slit-jaw-images.

Spec:
The scaling threshold of the spectral images.

Debugging:
Debugging:
If debugging is turned on, the simulation will stop after it reached the number of steps defined in ‘nr. steps’.

Nr. steps:
Set the number of steps, after which the simulation should stop if debugging is active.

Add. Time:
This value is added to the simulation time, if debugging is turned on.

Menu
All these parameters can be saved and loaded. This can be done via the menu of this window.

File:
Load Parameters:
This menu opens a file dialog, in which one can choose a previously saved parameter file. Those have by default an .sav extension.

Load Default Parameters:
This menu will load the default parameters. It will first look if the user has its own default parameter file, which would be located in the hidden IDL-folder in the user’s homedirectory.

Save Parameters:
Save the current parameters into a file which has by default the .sav extension.

Save as Default Parameters:
The current parameters will be saved as the user’s default. This file will be in the hidden IDL-folder in the user’s homedirectory. See ‘APP_USER_DIR’ in the IDL help for detailed information.
Starting the Simulation

The button ‘Start Simulation’ on the bottom of the input parameters window will start the simulation. If clicked, this window will be closed, and a new, smaller one appears. The new window contains a progress bar and a button to abort the simulation. This window will be closed, when the simulation is done, or when it is aborted.

Bug reports:

Please report any bug you encounter at the DAI of the IRIS team page:
https://www.lmsal.com/iris_science/DAI/

Please make sure, that the bug you are about to report isn’t already reported there. If it is, you are welcome to add any comments you may have.
Please provide enough information so that the bug can be reproduced. In general, this information might be useful to a developer:
-	Version of the tool
-	IDL version
-	OS
-	The OBS and related xml-files used to reproduce the bug
-	The parameters used to reproduce the bug