Command-Line Interface

If you want to write the file that SPEX needs as input using the IDL command line interface instead of the GUI, you should use the following commands, suitably edited for your needs and to get the time interval of interest:

tr=['2002/02/26 21:10:00','2002/02/26 21:40:00']

os=hsi_spectrum()

os->set,obs_time_int=tr

os->set,sp_energy_binning=1

os->set,seg_index_mask=[1,0,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0]

os->set,sp_time_interval =10

os->set,time_range=[0,0]

os->set,sp_semi_calibrated=1

sp=os->getdata()

os->filewrite,/fits,/build,srmfile=srmfile, simplify=simplify, specfile=specfile, srmatrix=srmatrix

Set simplify to 2 for diagonal matrix only, 1 for simple non-diagonal elements as well, 0 for full-up off-diagonals included. Simplify may also be set as a 10 element vector, one value for each particular machination of the response generator, but that is for experts.

srmfile is the name of the srm file, leave it null if you want autoname; similarly for specfile.

See hsi_spex_export_test.pro for more expert techniques. There is no need to set sp_semi_calibrated for the SPEX export. I like to set time_range explicitly, but [0,0] may work just as well. It certainly is an easier way to step through an obs_time_interval.