Reference for sixte functions
ARFconstruct
Synopsis
Constructs an ARF in keV and cm^2-units from mirror area, filters, filter supports, detector material and additional factor information.
Usage
variable arf=ARFconstruct(e_lo, e_hi, mirrorareafile, filterfiles, supportfiles, open_fraction, detectorlayerfiles, factor);
Description
An ARF is built from a mirror area, filter-, support grid-, detector layer transmission information. The transmission files-parameters have to be file names of transmission tables in the format:
TEXT TEXT energy[0] [ev] transmission[0] energy[1] [ev] transmission[1] ... ...
These arrays are interpolated to the input energy grid (e_lo, e_hi). The open_fraction is an array with the same lenght as the number of filter support files and gives the fraction of the support grid that is open for X-rays. The mirror area file has to be in the format:
TEXT energy[0] [kev] area[0] [cm^2] energy[1] [kev] area[1] [cm^2] ... ...
The factor is an additional factor multiplied to the ARF.
The return value is a structure
arf=struct{ energ_lo=e_lo, energ_hi=e_hi, specresp };
To construct an ARF without mirrors included, it can be done by setting mirrorareafile=NULL
ARFfromMirrorArea
Synopsis
Sets the ARF values to the interpolated values of the given mirror area array.
Usage
ARFfromMirrorArea(arf, mirrorarea);
See also: ARFreadMirrorArea
ARFreadMirrorArea
Synopsis
Reads the mirror area ASCII-file and returns it as a structure.
Usage
variable mirrorarea=ARFreadMirrorArea(mirrorname);
Description
The mirror area file has to be in the format:
TEXT energy[0] [kev] area[0] [cm^2] energy[1] [kev] area[1] [cm^2]
See also: ARFfromMirrorArea
attitude_lissajous_pattern
Synopsis
creates an Attitude File for a Lissajous pattern
Usage
attitude_lissajous_pattern(prefix,expos,ra,dec)
create_basic_simputfile
Synopsis
creates a basic SIMPUT file
Usage
Struct_Type str = create_basic_simputfile(filename, RA, Dec, srcFlux, nH, powerLawIndex);
Description
This function creates a structure, which contains all necessary info for a simple "simputfile" command to create a basic SIMPUT file for a given point source. The flux is assumed to be given in the 2-10 keV band by default. The file can be directly created by adding the qualifier "eval". Otherwise a structure is returned. This structure can be further modifed, and then evaluated with the function "eval_simputfile".
Qualifiers
- crab: flux is given in units of Crab
- eval: directly evalute the returned structure (similar to call eval_simputfile(str);
- emin: lower limit of the energy band of the given flux in keV
- emax: lower limit of the energy band of the given flux in keV
- quite: don't show any output
Examples
variable str = create_basic_simputfile("velaX-1.fits",135.528583,40.554722,100e-3,1.8,5.0;crab);
See also: eval_simputfile,get_simputfile_struct,set_simputfile_model_grid,set_simputfile_flux
eval_simputfile
Synopsis
evaluates the SIMPUT structure
Usage
Integer_Type sucess = eval_simputfile(Struct_Type str);
Description
This function evalutes the SIMPUT structure, created for example with "get_simputfile_struct". Generally, all fields of the structure == NULL are skipped.
Qualifiers
- quiet: don't show any output
See also: create_basic_simputfile,get_simputfile_struct,set_simputfile_model_grid,set_simputfile_flux
fits_write_sixte_vignetting
Synopsis
write a vignetting file, which can be used in a Sixte instrument configuration XML file.
Usage
fits_write_sixte_vignetting((string) filename, energies, offaxangles [, phi = 0]);
Description
energies given in keV, offaxis angles given in arcmin
get_param_from_filename
Synopsis
returns a double parameter value from a string / filename
Usage
Double_Type val = get_param_from_filename(filename,key,regexp);
Description
For a given filename = data/f4l_flux0001000muCrabpattern.fits, the value can be extracted by specifying the key="flux"; and a regexp of regexp="flux([0-9.]+)muCrab"R; Note that there is a strict naming convention:
- only one "." to mark the file type
- parameters are separated by "_"
- the "key" parameter always has to be part of the parameter string
If onle one argument is given, the above example for the flux is automatically used as key and regexp.
See also: simput_athenacrab
get_simputfile_struct
Synopsis
get a very basic SIMPUT structure for further editing
Usage
get_simputfile_struct(filename, RA, Dec flux);
Description
Note: All parameters and there usage are according to the simputfile routine of the SIMPUT package. E.g., flux is given in erg/cm^2/s.
Qualifiers
- crab: flux is given in units of Crab
- emin[2.0]: lower limit of the energy band of the given flux in keV
- emax[10.0]: lower limit of the energy band of the given flux in keV
See also: create_basic_simputfile,eval_simputfile,set_simputfile_model_grid,set_simputfile_flux
get_sixte_eventfile_statistic
Synopsis
returns a double parameter value from a string / filename
Usage
Struct_Type str = get_sixte_eventfile_statistic(string filename, double flux);
See also: get_param_from_filename
lissajous_pattern
Synopsis
calculates a Lissajous pattern for 3:4 ratio with PI/4 offset
Usage
variable li = lissajous_pattern();
Qualifiers
- amplitude[1.0]: amplitude by default from -1 to 1
- tstart[0.0]: tstart
- tstop[1.0]: tstop
- x0[0.0]: x0
- y0[0.0]: y0
Description
An ARF is built from a mirror area, filter-, support grid-, detector layer transmission information. The transmission files-parameters have to be file names of transmission tables in the format:
make_movie_from_evtList
Synopsis
makes a simple movie from a given event list
Usage
Double_Type total_img = make_movie_from_evtList(string eventFile, double dt, string movieFile);
Description
Make a movie from the eventlist "eventFile". The time (in seconds) of each frame is adjusted by "dt". The output file is written to "movieFile" (best use a mp4 file).
Qualifiers
- cmap["hot"]: color map
- thres[0.0]: threshold of counts/frame, when a frame should be discarded
- fps: frames per secondswitch on the scale
- size[10,10]: size of the image in cm
- tstart: start time of the movie (sec)
- tstop: end time of the movie (sec)
- labels: draw some labels (white frame and time in ksec)
See also: xfig_plot_new,fitswcs_get_img_wcs
read_sixte_lc
Synopsis
reads a LC created by the SIXTE makelc tool
Usage
read_sixte_lc(filename);
set_simputfile_model_grid
Synopsis
set the model grid in the SIMPUT structure
Usage
set_simputfile_model_grid(Struct_Type str);
%``` or
set_simputfile_model_grid(Struct_Type str, Elow, Eup, Estep);
##### Description
All energies are given in keV. By default, the spectrum is
evaluated from 0.05-24.0 keV in steps of 0.01 keV.
__See also__: create_basic_simputfile,get_simputfile_struct,eval_simputfile,set_simputfile_flux
#### simput_athenacrab
##### Synopsis
returns command to create a standard Athena Crab Simput File
##### Usage
```c
String_Type cmd = simput_athenacrab(Double_Type flux);
Description
Flux has to be given in Crab. The naming convention is that the flux (in micro Crab = 1e-6 Crab) is encoded in the filename.
See also: simput_athenacrab_flux_from_filename
sixte_create_img_wfi
Synopsis
returns cmd to create an Image from an EventFile for the XIFU Baseline config
Usage
string cmd = sixte_create_img_wfi(double ra, double dec, string event_file, string image_file);
Qualifiers
- mode["large"]: change mode of the WFI
sixte_create_img_xifu
Synopsis
returns cmd to create an Image from an EventFile for the XIFU Baseline config
Usage
String cmd = sixte_create_img_xifu(double ra, double dec, string event_file, string image_file);
write_simput_dummy_bkg
Synopsis
plots a sky image, including an optional scale and/or grid
Usage
write_simput_dummy_bkg(fsimput,fsrc,fpar);
Description
fsimput: Name of the ouput simput-File fsrc: Name of a SRC-FITS-Image (with FK5 WCS Header) fpar: ISIS-par File (with proper normalization) of the BKG
Qualifiers
- src_name["BKG"]: name of the source in the SIMPUT file
- overwrite: if given, already exsiting simput files are overwritten
- arcmin_area=[1.0]: area in arcmin specifying the flux for the given spectrum
See also: xfig_plot_new,fitswcs_get_img_wcs
xfig_plot_sky_img
Synopsis
plots a sky image, including an optional scale and/or grid
Usage
Xfig_Plot_object pl = xfig_plot_sky_img(String_type fits_img);
Description
This function uses xfig to plot a sky image, with a given color scale ("hot" by default). With a separate qualifier, a scale can be switched on. The
Qualifiers
- cmap["hot"]: color map
- scale: switch on the scale
- arcmin[=5]: length of the scale in arcmin
- lin: linear image scale instead of logarithmic
- func: giva a reference to an arbitrary function to be applied to the image
- size[10,10]: size of the image in cm
- ref_img[fits_img]: if not given as direct argument, a reference FITS image has to be provided for the scale (filename!)
- grid: draw a grid and corresponding labels
- step_ra[=1]: step size of the RA-grid (given in min)
- step_ra[=5]: step size of the Dec-grid (given in arcmin)
- grid_color[#BBBBBB]: color of the grid
- scale_color[white]: color of the scale
See also: xfig_plot_new,fitswcs_get_img_wcs