##marx_plots.pro: This procedure creates a postscript file containing plots of MARX output. The plots it creates: ypos vs. zpos, output spectrum/spectra (for HETG), pha vs. dd (2 plots for HETG), input spectrum, and a list of sim. information (eg. total cts, time, etc.). USAGE: marx_plots, dir, PARFILE = parfile, PSFILE = psfile dir = Directory containing the MARX output PARFILE (Keyword) = The name of the parameter file, if it is *not* marx.par. (Default value=marx.par.) PSFILE (Keyword) = The name of the postscript file to which the plots are to be written. The default value is marx_plots.ps. Procedures used by marx_plots.pro: - get_input_spec.pro - grating_spec.pro - read_marx_data.pro - read_parfile.pro [ FUNCTION ] - tg_extract.pro get_input_spec.pro: This procdure is used by marx_plots.pro ##grating_spec.pro: This procedure will extract a grating spectrum from MARX output. USAGE: grating_spec, marxdir, spectrum, GRATING = grating, SCALE = scale, ORDER = order marxdir = the directory containing the marx output spectrum = The vector returned by grating_spec. It is either 2xN dimensional or 4xN dimensional, depending on which grating was used. If grat=LETG, spectrum = 2xN, where the dimensions are ENERGY (or WAVELENGTH) and CTS/SEC. If grat=HETG, spectrum = 4xN dimensional. spectrum(0,*) = ENERGY (WAVE.), spectrum(1,*) = CTS/SEC for the MEG, spectrum(2,*),spectrum(3,*) = ENERGY (WAVE) and CTS/SEC for the HEG. GRATING = grating Set this keyword if there is no marx.par file in the output dir. Otherwise, the program will read the parameter file to obtain the grating. SCALE = scale Set SCALE = wave to get a wavelength scale. Otherwise, the scale will be ENERGY ORDER = order Set ORDER = 2, 3, 4, . . . etc. to extract a spectrum of a particular order. The default value is to use the first order. **NOTE that this program "CHEATS" by extracting only events for the given order, using the order.dat data.** ##read_parfile.pro: This is a FUNCTION which will return a selected parameter from a parameter file. USAGE: parvalue = read_parfile('parname', PARFILE=parfile, MARXDIR=marxdir) where 'parname' is the name of the parameter *spelled exactly as it is in the parameter file*. PARFILE = parfile - set this if the parameter file is not marx.par MARXDIR = marxdir - the directory containing the par file EXAMPLE: rowland = read_parfile('RowlandDiameter', PARFILE = 'simulation.par') ## read_marx_file.pro: This is a FUNCTION which will read a marx output file and return the data in a vector. EXAMPLE: ypos = read_marx_file('marx_dir/ypos.dat') ## read_marx_data.pro: This is a PROCEDURE which will read in the ypos, zpos, time, order and pha data from the marx output dir. USAGE: read_marx_data, marxdir, ypos, zpos, time, order, pha marxdir : The name of the directory containing the marx output ypos, zpos, time, order, pha: The vectors containing the marx output. These are returned by the procedure.