Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.stsci.edu/ftp/documents/foc-handbook/focsim-beg-manual.ps
Äàòà èçìåíåíèÿ: Fri Jul 23 18:11:07 1993
Äàòà èíäåêñèðîâàíèÿ: Sat Dec 22 19:09:51 2007
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: zodiacal light
The FOCSIM Beginner's Manual
Warren J. Hack
FOC Instrument Support Team
Science Instruments Branch
Space Telescope Science Institute
Version 2.0
May 14, 1993

Acknowledgments
This manual has been written only because of the tremendous effort of Y.
Frankel and F. Paresce in producing FOCSIM. The author is grateful for the
support of F. Paresce in helping me to learn FOCSIM well enough to maintain it,
and to help others learn how to use it.

Table of Contents
What is FOCSIM? ............................................................... 4
How FOCSIM works............................................................ 5
Running FOCSIM................................................................ 6
3.1 What Source Will be Observed? .......................................... 7
3.2 The Camera and Filters to be Used..................................... 7
3.3 Setting up the Background Sources ................................... 8
3.4 What Kind of Calculation?................................................... 9
3.5 Ready to Run....................................................................... 9
Advanced Features of FOCSIM ......................................... 11
4.1 Multiple Targets ................................................................. 11
4.2 User­Supplied PSFs and Spectra ...................................... 12
Output Tables....................................................................14
5.1 Creating Images ................................................................ 14
5.2 Filter and Spectra Plots..................................................... 14
Final Comments ................................................................16
Appendix A .......................................................................17
Appendix B .......................................................................21
Appendix C .......................................................................27

(This page left intentionally blank)

FOCSIM Beginner's Manual 4
1.0 What is FOCSIM?
A properly exposed astronomical image can be worth a thousand words, or at least a good
paper. However, a saturated image or a very under­exposed image can often set research back,
particularly research that can only be done with a specific instrument or telescope. The unique
capabilities of the Faint Object Camera (FOC) on the Hubble Space Telescope holds many
promises for discovery and for learning more about objects than ground based images can
reveal. Thus, preparing an observing run on the FOC requires a great deal of care to obtain
images with the most information without either saturating the image or under­exposing.
The FOC's unique ability of providing the high resolution images in both the UV and visible
offers the opportunity for doing very unique science. This must be undertaken very carefully due
to its photon­counting design and it somewhat limited dynamic range in its largest formats,
especially after the installation of COSTAR. These two factors have required observers carefully
read the handbook in preparing a proposal and/or regularly consult with experts at the Space
Telescope Science Institute (STScI) in order prepare an observing program with properly
exposed images. Although every step was taken in preparing the FOC Handbook to provide as
clear an explanation of the workings of the FOC and of the estimation of exposure times, it can
sometimes be problematic to hand­calculate the exposure for more than a couple of possible
images. This is where FOCSIM can step in to help.
FOCSIM, the FOC exposure SIMulator, uses the most current description of the FOC and its fil­
ters along with an input spectra (either from an on­line catalog or user­supplied file) to simulate
an image from the FOC and provide the count rate within the image. FOCSIM provides not only
a calculation of the exposure time needed to reach a desired S/N, but also statistics related to
the count­rate that is expected from the object and how it is spread across a spherically­aber­
rated source or across a COSTAR­corrected source. This program has been installed on both
the Scivax VAX/VMS cluster and several Sun/Unix clusters at STScI, making it accessible to
those interested in using the FOC. The purpose of this manual is to be a cookbook for using
FOCSIM to simulate a basic exposure while also providing a checklist that can be used for set­
ting it up for more complex runs. The addition of information regarding the post­COSTAR FOC
will enable users to plan proposals for the COSTAR­corrected FOC that will yield tremendous
results while avoiding the pitfalls of non­linearity or saturation.

5 How FOCSIM works
2.0 How FOCSIM works
The primary reason for developing FOCSIM was to provide the means to determine exposure
times and signal­to­noise ratios for given observations. In order to accomplish this, FOCSIM
starts with a given spectrum for the source and calculates the count rate based on the equations
given in the FOC Handbook. Similarly, the count rates for the background sources the user
specifies are calculated based on the equations in the FOC Handbook. For extended sources,
all pixels are assumed to have the same count rate. For a point source, however, the count rate
distribution over the detector area is specified by the Point Spread Function (PSF). There are
two libraries of PSFs available to FOCSIM, one of theoretical mono­chromatic PSFs and one of
observed PSFs. For the COSTAR­corrected FOC, a set of theoretical PSFs have been created
based on the best descriptions available of COSTAR and the FOC. At the same time, FOCSIM
allows the user to provide their own PSF image to be used for the simulation. The PSFs are
background subtracted and normalized such that the total number of counts in PSF is 1. With
the PSF selected, FOCSIM can then spread the total number of counts that is calculated for the
source over the PSF to provide an estimation of the counts per pixel across the image.
The calculation of the number of counts expected for a given source relies on details of the FOC
camera, its quantum efficiency (DQE), the filters throughput, and the OTA's throughput. FOC­
SIM utilizes files for the camera DQE based on in­flight calibration observations, a table with the
measured reflectivities for the COSTAR FOC mirrors (for use in COSTAR­corrected FOC simu­
lations), a library of measured filter throughputs kept in the Calibration Database System
(CDBS), and files for the OTA's throughput taken from CDBS as well. This ensures the users of
FOCSIM that the latest calibration data available has been incorporated into the simulation to
provide as accurate a description of the FOC as possible.
The user must specify which relay they want to simulate, which filter or filter combination they
want to use in their observation, what source spectra will be observed, and what background
sources should be considered in the simulation. Once these are set, the user can have FOCSIM
calculate either the signal­to­noise for an intended exposure time, or the exposure time needed
to reach a desired signal­to­noise in the image.The resultant output contains a variety of diag­
nostic information regarding the exposure, including the peak and effective wavelength's and
throughput for each selected filter, OTA+DQE and for the total optical path, filters leaks, and
total passband of the filters, and computed energy fractions across the PSF. These diagnostic
results come in addition to the calculated count rates in the source area, for the background
sources, and for the combination of both source and background. The ST Magnitude for the
source is also reported in the output file. An example output file is attached as Appendix A to
give some idea of how comprehensive FOCSIM is in calculating the conditions of a given simu­
lated observation.

FOCSIM Beginner's Manual 6
3.0 Running FOCSIM
The most frustrating thing about any program is learning how to tell it to do what you want it to
do. Most IRAF routines, like FOCSIM, can be run either from the command line or as a menu
(with `epar') depending on how many parameters need to be input or changed. In general, the
more versatile the procedure, the more parameters are available to be adjusted. With FOCSIM,
a great deal of versatility was allowed necessitating a large number of parameters which could
be turned on or off, selected, or changed entirely. To accommodate this while providing descrip­
tions of the parameters, there are 9 menus in the FOCSIM package which set up the necessary
parameters for running the main program, FOCMAIN. FOCSIM is loaded directly from the CL
upon starting up IRAF. It will show up as the package focsim. Upon loading focsim, the user is
presented with the procedures that make up FOCSIM:
.check --- Prints the parameter settings to the screen.
.fbackg --- Set the parameters for the background sources.
.filters --- Set the camera and filters desired for the observation.
.fimage --- Set the parameters for image creation.
.focmain --- Run the simulation based on the set parameters.
.galaxy --- Set the parameters for galaxy simulation.
.genpar --- Set the parameters for desired exposure info and output.
.setfoc --- Set the parameters for the resource files to be used by FOCSIM.
.setplot --- Set the parameters for outputting plots.
.source --- Set the parameters for the input source spectra.
The procedure setplot should already be set up for the system that FOCSIM is running on. The
only time that setplot would need to be run is if the user had a particular filter transmission file,
dqe file, or background spectra file that they wanted to use. At this point, the user is left to
`point' the FOC at an object for simulation. The basic checklist of questions that must be
answered for FOCSIM are as follows:
We will start by answering these questions and then showing how these answers are applied to
set up the simulation. For our case, let's start by `observing' a U=23 A0V star with the COSTAR­
corrected F/96 relay using the F342W filter. We will have FOCSIM determine how much of the
PSF should be used to reach the signal­to­noise of 10 in the least amount of time and use that
time as the exposure time. The only background sources we will consider will be the diffuse
background of the FOC seen in all external images. We will use the default PSF library (theoret­
ical PSFs), and will not create an output image. The output report will be stored in the filetrial.­
dat and no plot tables will be created. Having decided on the specifics of this test case, let's
start telling FOCSIM what we want to do.
NOTE: In showing how to enter in the parameters, the relevant section from each procedure's
menu will be shown in this type­style, with the user input in bold­face or bold­face
print. The name of the procedures will be shown in italics.
1. What is the spectra of the source object? Is the source object a point source or
an extended object? What is the observed flux of the source in units of photons,
ergs or magnitudes?
2. Which camera relay will be used and with which filters?
3. What background sources will be considered, and at what flux levels?
4. Should the exposure time or S/N be calculated given a value of the other?
5. What name should the output report have?
6. Which type of PSFs should be used, theoretical, observed, or user­supplied?
7. Should an image be created, and if so, of what size with the object put where?
8. Should output tables of the filter transmissions, and DQE functions be created?

7 Running FOCSIM
3.1 What Source Will be Observed?
The first step is to tell FOCSIM what source object we want to use by starting upsource. The
menu that comes up first asks how many sources you want to look at. In our case, we put in a 1
for the parameter `sourobj'. Next, we need to tell it where to get the spectra, or more precisely,
what kind of spectra we are going to use. The contents of the CLB, UCB, and BPGS catalogs of
spectra that are available to FOCSIM are listed in Appendix B. Looking there, we find that an
A0V spectra is listed in the BPGS catalog, so we enter UCB into the menu as follows:
Since FOCSIM can work with up to three spectra at once, the parameter `origin' expects three
catalog names and gives a warning message if less than that are input. This warning message
CAN BE IGNORED. After entering UCB, `origin' should be showing three catalog names, with
`UCB' first and probably `USER' as the second and third elements. Since we decided to work
with a point­source (a star), we just make sure that the three elements for the parameter `type'
are all showing as `P'. Now we are ready to give FOCSIM the specifics on the star, so use
­Z to get to the next menu.
This sub­menu asks for the name of the of the spectral file you want to use on the first line. We
will input a0v in the following place:
Next, we tell it the star's flux that we want to observe is given in units of U magnitudes in the
parameter `sunit' and that the star has a magnitude of 23 in the parameter `srflux':
At this point, we have told FOCSIM all we need to about the single source object we want to
observe, so use ­Z to exit this menu. If we would have had a spectra and knew its
observed flux only at one wavelength, we could have entered that flux in `srflux' specifying the
units in `sunit' and specifying the wavelength in the parameter `srwave'. FOCSIM would then
scale the entire spectrum and compute the count rate automatically.
3.2 The Camera and Filters to be Used
Now, we can go set up the camera and filter we want to use by runningfilters. The main menu
starts by asking which camera should be used: F/96 or F/48, pre­ or post­COSTAR. We are sim­
ulating the COSTAR­corrected F/96 camera in this test case, so we enter the following:
(origin ) >Enter flux file origin(s):
>USER =>User file; CLB => FOC calibration spectra;
>SYN =>Synthetic spectra; UCB => UCB or BPGS synthetic stars.
= UCB USER USER USER
sour = a0v >Enter BPGS or UCB spectra file name
sunit = U >Enter flux unit
>photon =>[photon sec­1 cm­2 A­1]
>erg =>[Erg sec­1 cm­2 A­1]
>U =>U magnitude
>B =>B magnitude
>V =>V magnitude
srflux = 23 >Enter flux normalization:
>magnitude if selected unit is a magnitude;
(camera = F/151 )>Enter camera selection:
>F/48 => Camera F/48;
>F/96 => Camera F/96;
>F/75 => Post­COSTAR F/48
>F/151 => Post­COSTAR F/96

FOCSIM Beginner's Manual 8
The rest of the menu shows what the last used settings were, and the first time FOCSIM is run,
there will be nothing showing up for `filt_96' or `filt_48'. Exit this menu, and the sub­menu will
start up for the appropriate camera relay. It will display the first filter wheel for the camera relay
that was selected in the main menu, in our case this will be the first F/96 filter wheel. Scrolling
from one filter wheel to the next is done by moving the cursor up or down, by hitting the down­
arrow (or whatever is mapped to move the cursor down the page), the next filter wheel will show
up. This should be set to F342W as follows:
With the camera and filter(s) selected, this menu can be exited.
NOTE: If there are problems with scrolling from one filter wheel to the next, the terminal type
that under IRAF may need to be reset to a scrolling terminal type such as `xtermjhs' on a Sun
workstation.
3.3 Setting up the Background Sources
Next, we need to set up the background sources for the simulation by runningfbackg. This pro­
cedure generally only needs to be set up once unless the effects of the background affect the
detection of your source and different background sources need to be studied, such as with a
faint star embedded in a nebula. For most of the observations, especially for single point
sources, only the diffuse background parameters need to be set. This is done by setting the
parameter `difback' to yes as follows:
Upon exiting this menu, then, a sub­menu will come up requesting the specific parameters for
the diffuse background sources; the dark current, airglow lines, and the zodiacal light. In­flight
calibration observations have determined that on average the dark current for the F/96 relay is
about 5e­4 Counts sec ­1 pixel ­1 and about 2e­3 Counts sec ­1 pixel ­1 for the F/48 relay. The zodi­
acal light contribution was found to average about 120 S10 units, where S10 units are described
in the FOC Handbook (P. Greenfield et al., SPIE Proc., 1494:16,1991). These values can be
used for the parameter `drcrnt'
and for the parameter `zodlhtfx':
flt96_2 = F342W >Filter wheel 2 F/96 F/288
>CLEAR clear (no filter)
>F370LP 370 nm cutoff
>F342W 342 nm 80% xmit
>F430W 430 nm 76% xmit
>F480LP 480 nm cutoff
>F140W 140 nm 22% xmit
>F175W 175 nm 28% xmit
>F220W 220 nm 40% xmit
>F275W 275 nm 40% xmit
>F320W 250­365 nm 80% xmit
>F486N 486 nm 70% xmit H beta
>F501N 501 nm 60% xmit
(difback= Y ) >Update diffuse background parameters [Y/N]
drcrnt = 5e­4 >Enter dark current for unzoomed pixel
> [Counts s­1 pixel­1]
zodlhtfx= 120. >Zodiacal light [S10] at 5300 A.
>If object more than 90 deg from Sun
>use flux in range 60­180 [S10]

9 Running FOCSIM
3.4 What Kind of Calculation?
The only required set up that needs to be done at this point is done withgenpar. The main menu
for genpar displays the parameters used in determining what you want FOCSIM to provide as
numerical results and what PSF catalog should be used. We can also specify a signal­to­noise
ratio and ask what exposure time is needed, or ask what S/N results with a given exposure time.
In this test case, we had decided to have it determine the minimum exposure time needed to
reach a signal­to­noise of 10 in some area of the PSF. First, the parameter `simcrit' should be
set for calculating the exposure time (E.T):
Then, we have to set `s_to_n':
Now, to get a one screen report printed directly to the screen when everything is finished, make
sure `scrrep' is set to Y:
The parameter `report' is the name that the output file will have in the IMDIR directory, which we
will change for this test to:
The next parameter, `reptyp', selects whether an exhaustive report is printed (set to L) or just a
short report is produced. The default setting should be fine for this test, but setting this differ­
ently for other runs will show what the differences are in the long and short reports. The exam­
ple report in Appendix A is a long report with plot table references. If the parameter `printpsf' is
set to yes, the end of the output report will have the listing of the source areas FOCSIM used,
energy fraction contained in each area, and the exposure time needed to reach the desired S/N
ratio in that area only. This can be used to see that when more of the PSF is considered as part
of the source, more background gets included, driving the exposure time needed to reach the
desired S/N up. Lastly, we have to check what PSF library will be used by setting `psfi' toyes:
Upon exiting the main menu, the PSF installation menu will appear to allow for the selection of
the PSF library that will be used in the simulation.The type of PSF that is used can be selected
from either the FOC catalog (observed PSFs), TIM catalog (theoretical PSFs), or USR PSF
(user supplied PSF). The reason for getting into this menu has to do with the fact that each pro­
cedure sends its parameters to a master table upon exiting. If we had not gone to check the
PSF library the first time, FOCSIM would not have known which PSF library to use, and we
would have received an error when running the simulation. Thus, leaving the selections as they
are will be fine for this test and we can now exit that menu.
To run a post­COSTAR simulation, the TIM catalog must be chosen as only theoretical PSFs will
be available until after the actual installation of COSTAR. Admittedly, any post­COSTAR simula­
tion using these PSFs will give the best possible results assuming perfect correction of the
spherical aberration by COSTAR. In reality, the corrections in the visible should be pretty close
to he theoretical PSFs, while any residual aberrations will be worse the farther you go in the UV.
Therefore care must be taken in interpreting results from FOCSIM for the post­COSTAR situa­
tion.
3.5 Ready to Run...
For this test case, we will not be concerned with creating an output image, which would normally
be set up using fimage, therefore we can run focmain at this point. The screen report will be
printed giving a quick summary of the ST MAG calculated for the object along with the TOTAL
COUNT RATE for the source. An example of a screen report is given as Appendix C. Changing
simcrit = T >Quantity to be calculated: T=> E.T.; S=> S/N
s_to_n = 10 >Enter signal to noise ratio (S/N)
scrrep = Y >Output report on counts to screen [Y/N]?
report = trial.dat >Enter report name
(psfi = Y ) >Update PSF installation [Y/N]?

FOCSIM Beginner's Manual 10
to the directory IMDIR, the output file(s) will be found detailing the numerical results of the sim­
ulation. With any luck, FOCSIM should have reported the following results as reported in the
screen report:
Computed energy_fraction 0.6947
Exposure time: 183.9 [Seconds]
ST MAG 22.75
Source area for min exposure time 81.00 [Pixels]
Source rate in Source area 0.6283 [Counts s­1]
Total backg Rate 0.4883E­01
TOTAL SOURCE RATE 0.9044

11 Advanced Features of FOCSIM
4.0 Advanced Features of FOCSIM
By being able to reproduce these results using this test case, we have familiarized ourselves
with the most commonly used aspects of FOCSIM. More complex uses of FOCSIM merely
involve modifying some of the parameters used in this test case to match the type of situation
which is to be simulated. However, all runs of FOCSIM must follow the same basic procedure:
This may a fairly lengthy list of items to select, however, the number of outputs and calculations
that FOCSIM can produce covers a majority of what the FOC can actually do in orbit. By follow­
ing this checklist, many types of simulations can be run that are more complex than our simple
test case. Some of the advanced features of FOCSIM that allow for complex simulations do not
necessarily rely on new procedures, but rather rely on changing the inputs demonstrated in our
test case. The next sections discuss what changes are needed to produce simulations of more
complex situations than our test case.
4.1 Multiple Targets
Up to now, we have only dealt with a single point source object in the field of view, while FOC­
SIM can simulate up to three objects in one field, with another three objects as background
sources. Accommodating multiple sources is done in the procedure source, by first specifying
how many objects are desired with the parameter `sourobj'. Then, as we did in the test case, the
parameters `origin' and `type' are specified for each object. For example, if we wanted to work
with two sources, we would enter the following for `sourobj':
and, for `origin' and `type':
This will select the two source objects as point sources whose spectra come from either the
UCB or BPGS spectra catalogs. A separate sub­menu will then appear for each source object
allowing for specification of the file name of the spectra, its flux, and more importantly for this
case, each sources position in the field of view. Thus, binary star systems can be simulated
where the faint secondary is the prime target and is found near enough to the primary as to be
in the wings of the primary star's PSF. Alternatively, we could have set up the primary star of a
double star system as a background object and the secondary star as the source object. Then,
FOCSIM would give the statistics for the detecting the secondary if it is very close to the pri­
mary, or if there is a large difference in magnitude.
1. Set the source parameters for each source object desired insource.
2. Set which camera and filters will be used infilters.
3. Set the background parameters (if these need to be changed at all) infbackg.
4. Determine what is to be calculated, S/N or exposure time ingenpar.
5. Give the name of the output file and set it to be Long or Short.
6. Select which PSF library will be used.
7. If an image is desired, runfimage to set the name, size and location of the source(s).
8. If plots are desired, run setplot to select which plots will be produced.
(sourobj = 2 ) >Enter number of source flux files (0­3)
(origin) >Enter flux file origin(s):
>USER =>User file; CLB => FOC calibration spectra;
>SYN =>Synthetic spectra; UCB => UCB or BPGS synthetic stars.
= UCB UCB USER USER USER
type) >Enter object type for selected flux file(s):
>P =>Point object;
>E =>Extended object.
= P P

FOCSIM Beginner's Manual 12
4.2 User­Supplied PSFs and Spectra
Another aspect of FOCSIM that allows for flexibility is the capability of using user­supplied
PSFs and spectra. This lets the user provide unique data that might be available for their target
with which to produce a simulation. As we have seen, the PSF installation undergenpar is
where the user selects a USER library and where the filename of the PSF is provided in the fol­
lowing manner:
This example tells FOCSIM to use a user supplied PSF which is located in the IMDIR$USER
directory and had the filename YOUR_PSF.HHH. FOCSIM will then use this PSF for the simula­
tion regardless of what filter or camera was selected in filters. This PSF must, however, be pre­
pared in the following manner:
1. The PSF must be background subtracted.
2. The PSF must be normalized to a total number of counts in the source of 1.
The user can always use the prepared PSFs in the FOC library as guides to preparing their own
if any ambiguities arise.
For user supplied spectra, the situation is a little simpler. The test case showed how to specify
in the procedure source from what catalog the desired spectra will come. For a user supplied
spectra, the parameter `type' should be set to USER for each spectra that will be used. When
we exit this main menu, a sub­menu will appear which will ask for the same information about
the spectra as we filled in for the test case, the filename and the flux rate. The file itself can be
an ASCII table where the first column is the wavelength and the second column is the flux. The
spectra in the CLB and UCB catalogs can serve as examples. The spectra in these catalogs
cover a much larger wavelength range than necessary as only the spectral region covered by
the filter's transmission curves are used in the calculation of count rates. For general use, a
spectrum should cover the wavelength range from 1100­6600å as this is the entire range of sen­
sitivity for the FOC itself. However, for narrow or medium band filters, a spectrum that only cov­
ers the range of the desired filters is necessary.
The units of the user­supplied spectrum, however, requires some care. FOCSIM can normalize
a spectrum to a useful set of units in a couple of ways. The simplest case arises when the input
spectra is the spectrum of the source object, then the units would have to be either ergs cm ­2
sec ­1 å ­1 or photons cm ­2 sec ­1 å ­1 . The user would then run source, input USER for the parame­
ter `origin', go to the sub­menu, select the proper units in `sunit', and set `srflux' to1. FOCSIM
will then read in the spectrum without doing any conversion.
If the flux is only known as a Johnson magnitude or as a particular value at a given wavelength
in ergs or photons, then FOCSIM will read in the user­supplied spectrum and automatically
scale the spectrum to match the given parameters. For example, if there was a spectrum of Wolf
psffile = USR >Enter PSF origin
>TIM ­ Theoretical Image Modeling catalogs
>FOC ­ FOC Observation catalogs
>USR ­ USER defined catalog or PSF
psfusr = imdir$user/your_psf.hhh >Enter user defined PSF or catalog

13 Advanced Features of FOCSIM
359 but the units of the input spectrum were not known, the following settings would work:
This will then take the source spectrum wolf359_ours.dat and normalize it such that it has a V
magnitude of 16.7. If the V magnitude was not known, but the flux in ergs cm ­2 sec ­1 å ­1 at
3600å was known, then `sunit' could be set to erg, `srflux' would be set to the flux value, and
`srwave' would be set to 3600. FOCSIM would then read in the spectrum, comput the conversion
factor to bring the spectral flux at 3600å to what was input as `srflux' and scale the entire spec­
trum by that conversion factor. Finally, if a spectrum was available and it had known units that
were not one of those listed under `sunit', then you could convert it to one of the given units by
inputting the desired units for `sunit' and supplying the conversion factor yourself in `srflux'.
Although there a number of parameters available, they provide the flexibility to utilize nearly any
available spectrum for simulation of FOC images.
sour = wolf359_ours.dat >Enter source flux file name
sftype = 1 >Enter spectra type: Continuous => 1 Line =>2
sunit = V >Enter flux unit
>photon =>[photon sec­1 cm­2 A­1]
>erg =>[Erg sec­1 cm­2 A­1]
>U =>U magnitude
>B =>B magnitude
>V =>V magnitude
srflux = 16.7 >Enter flux normalization;
>magnitude if selected unit is a magnitude;
>flux value at the reference wavelength;
>spectrum distribution multiplication const.
srwave = 0. >Enter reference wavelength. If 0, then
>then spectrum will be multiplied by constant

FOCSIM Beginner's Manual 14
5.0 Output Tables
FOCSIM can produce a variety of output products to provide the user with a complete descrip­
tion of the simulation. The most obvious output is the screen report which quickly reports the
most critical results of the simulation, as seen in Appendix C. The longer report which FOCSIM
writes out to the user's output directory not only gives the count rates, but also a detailed look
at the parameters that went into the simulation, as seen in the example shown in Appendix A. In
addition to these written reports, FOCSIM can create an simulated image and produce SDAS
tables with information regarding the filters and the source spectra.
5.1 Creating Images
An image can be created by running fimage and setting the parameter `useimg' to yes and by
giving it a file name for the parameter `outfile'. For most cases, the default settings for the rest
of the parameters will suffice, producing a 512x512 image with Poissonian noise. The loca­
tion(s) of the source(s) are specified when the parameters for the source(s) spectra are set
under source. For example, to create an image with one source centered in a 512x512 image,
we would run source and go to the sub­menu to set the magnitude. This menu covers two pages
with the last entries asking about plotting the source, as shown here:
The entries shown here tell FOCSIM to plot the point source, position the object by pixels in the
FOC frame, and put the object at position (256,256). If there were more than one source in the
simulated image, then you would set the parameter `starview' to T for one source and to F for
the others. This would then create an image with a target source and nearby field sources.
5.2 Filter and Spectra Plots
The routine setplot provides the opportunity for seeing what spectral features are being imaged
based on the filters selected by creating SDAS tables of the filter transmission curves and the
spectrum. When the parameters in setplot are set to yes, the SDAS tables will be created in the
output directory and the column names will be listed in the long report. For the filters, the wave­
lengths and the transmission are given in a table for each filter selected, if the parameter
`plotinst' is set to yes. The complete throughput taking into account the detector sensitivity and
the total filter transmissions can be found in the table `tq.tab', with the table `q.tab' showing the
detector sensitivity alone.
When in the output directory, the total filter transmission table can be plotted under IRAF using
the sgraph routine found in STSDAS.stplot from the command line with the following command:
sgraph `tq lambda tq'
The example used in this handbook used the F342W filter with the COSTAR­corrected F/96
camera and the plot of the total filter transmission for this configuration created usingsgraph is
shown in Figure 1. This provides the user a clear idea of what wavelengths will be imaged using
the chosen filter combination.
However, if a particular emission feature in the object's spectrum needs to be isolated, the
spectral energy distribution needs to be taken into account, especially when imaging red objects
with filters that have substantial redleak. In order to see what portions of the object's spectrum
simage = yes >Plot point source[Y/N]
starview= T >Enter object view F/T (field or target)
distance= 0. >If field, Enter target distance (arcsec)
pixpos = yes >Select object position by pixels [Yes/No]
sxpos = 256 >Enter Pnt source X xenter in FOC plane (pix)
sypos = 256 >Enter Pnt source Y center in FOC plane (pix)

15 Output Tables
will be imaged with a given filter combination, a table named `sour1.tab' will be created if the
parameter `plotflux' is set to yes. The long report will list the table name and also show that it
contains three columns. The first column `lambda' in the table is the wavelength, the second col­
umn `influx' is the flux as it was input, while the third column `conflux' is the spectrum multiplied
by the total filter transmission found in the table `tq.tab'. This information can then be plotted out
using sgraph to show what wavelengths will be detected in the image. This information, there­
fore, compliments the statistics on blue­leaks and red­leaks given in the long report.
2750 3000 3250 3500 3750 4000
0
.02
.04
.06
Wavelength
Counts
[Counts
photon­1]
Figure 1: Plot of total filter transmission curve for the F342W filter with the COSTAR­corrected F/96
camera created from `tq.tab' using sgraph under STSDAS.

FOCSIM Beginner's Manual 16
6.0 Final Comments
The large number of parameters required to run a simulation with FOCSIM allow it to reproduce
the best supported configurations of the FOC. A great deal of care was put in creating menus
that were readily understandable and that provided guidance during the use of FOCSIM. Hope­
fully, between running through a test case here and the explanations given in each menu, FOC­
SIM will become a easily utilized tool which provides insight into how to obtain the most useful
data possible from the FOC through properly exposed images.

17 Appendix A
Appendix A
The output from a run with FOCSIM contains a wide range of information regarding the settings
of the filters and camera, the PSFs used, and given values of either the exposure time or S/N
that was desired. After this diagnostic information about the set­up, the basic computational
results are given. The primary results of the signal­to­noise ratio and exposure time are then
given, followed by the computed ST magnitude, and statistics on the count rates for the source
and background.
The following example of an output report is a Long report with PSF information for the test case
discussed in the text. In addition, plot tables were created in making this report to give an exam­
ple of how tables are referenced for later plotting using other IRAF tasks. With the exception to
the references to the plots, this report should be identical to the one created when the test case
is run.

FOCSIM Beginner's Manual 18
FOC EXPOSURE SIMULATOR REPORT
Tue 14:48:34 04­May­93
1. FOC CONFIGURATION
Focal ratio :F/151
Pixel size [Microns] : 24.0
Pixel size [Arcsec] :0.1394E­01
Pixel area [Arcsec2] :0.1942E­03
Mirror active area [Cm2]:0.3900E+05
Mirror * pixel [Cm2 sr] :0.1780E­09
Image format
Number of lines : 512
Number of samples : 512
Word length : 16
Zoom mode :No zoom
2. FILTERS
Wheel 1 Wheel 2 Wheel 3 Wheel 4
Filter Id CLEAR F342W CLEAR CLEAR
Passband [A] 730.0
Peak lambda [A] 3360.0
Eff. Lambda [A] 3404.1
Passband to Peak Ratio: 0.5
Filter plot table name=> F342W
Column 1 ­ lambda; Column 2 ­ transmittance
3. FILTERS WITH Q CONVOLUTION
Passband : 704.0
Peak lambda : 3400.0
Eff. lambda : 3406.2
Peak throughput : 0.6981E­01
Eff. throughput : 0.6979E­01
DQE file name :focsim$auxiliary/foc_151_dqe_001
Inverse sensitivity : 0.3177E­17
Detec.(Q) plot table name=> q
Column 1 ­ lambda; Column 2 ­ q [Counts Photon­1]
TQ plot table name=> tq
Column 1 ­ lambda; Column 2 ­ tq [Counts Photon­1]
4. SOURCE OBJECTS
Source # 1
File name :focsim$ucb/a0v.ucb
Flux type :Continuum spectra
Object type :Point object
Reference unit :[U magnitude]
Reference value :0.2300E+02
Reference wavelength [A]:0.3600E+04
Max count rate: max PSF :0.0000E+00 [counts S­1 pix­1]
Plot table name=> sour1 ;
Column 1 ­ lambda [A]
Column 2 ­ influx [photons cm­2 s­1 A­1]
Column 3 ­ conflux [Counts s­1 A­1]
Total point objects plot table name=> sourp;
Column 1 ­ lambda [A]
Column 2 ­ influx [photons cm­2 s­1 A­1]

19 Appendix A
Column 3 ­ conflux [Counts s­1 A­1]
5. BACKGROUND OBJECTS
Backg # 1
File name :focsim$auxiliary/zodiac_spectra.dat
Flux type :Zodiacal light
Object type :Extended object
Reference unit :[S 10]
Reference value :0.1200E+03
Reference wavelength [A]:0.5300E+04
Plot table name=> back1 ;
Column 1 ­ lambda [A]
Column 2 ­ influx [photons cm­2 s­1 sr­1 A­1]
Column 3 ­ conflux [Counts s­1 A­1]
Column 1 ­ lambda [A] plot tabl name=> backe;
Column 2 ­ Influx [photons cm­2 s­1 sr­1 A­1]
Column 3 ­ Conflux [Counts s­1 A­1]
Dark current :0.5000E­03 [Counts sec­1 pixel­1]
PSF file name : focsim$psf/f151tim/f342
PSF wavelength :0.3420E+04 [ A ]
Reqired Energy_fraction :0.0000E+00
Computed energy_fraction:0.6947E+00
Maximum PSF at the Pixel Center
6. PRIMARY RESULTS
Given value
Signal to noise ratio :0.1000E+02
Computed value
Exposure time :0.1839E+03 [Seconds]
6. SUPPLEMENTARY RESULTS
STMAG :0.2275E+02
Source area for min exposure time :0.8100E+02 [Pixels]
Source linear size :0.1254E+00 [Arcsec]
Source rates in the source area (Rs):
1. Continuum spectra : 0.6283E+00 [Counts s­1]
Total Source Rate :0.6283E+00 [Counts s­1]
Background rates in the source area (Rb):
1. Zodiacal light : 0.8333E­02 [Counts s­1]
2. Dark current : 0.4050E­01 [Counts s­1]
Total Backg Rate :0.4883E­01 [Counts s­1]
Total Sour.& Backg Rate :0.6771E+00 [Counts s­1]
Rates in the Point Source Center Pixel:
Point Source Rate :0.7153E­01 [Counts pixel­1 s­1]
Extended Source Rate :0.0000E+00 [Counts pixel­1 s­1]
Total Source Rate :0.7153E­01 [Counts pixel­1 s­1]
Total Backg Rate :0.6029E­03 [Counts pixel­1 s­1]
Total Pixel Rate :0.7213E­01 [Counts pixel­1 s­1]

FOCSIM Beginner's Manual 20
FILTER's & DETECTOR (DQE) LEAKS [count s­1]
Leak to Peak Ratio : 0.1
Peak lambda : 3400.0 A
Blue Leak Region : 2700.0 ­ 2936.0 A
Red Leak Region : 3862.0 ­ 3970.0 A
Blue Leak Red Leak Total Rate % Blue Leak % Red Leak
Source #1 0.1630E­02 0.8181E­02 0.6283E+00 0.3 1.3
Total 0.1630E­02 0.8181E­02 0.6283E+00 0.3 1.3
Backg # 1 0.1846E­04 0.4081E­04 0.8333E­02 0.2 0.5
Total 0.1846E­04 0.4081E­04 0.7152E­02 0.3 0.6
Index Box_size Shell energy Energy fraction Comput. Time or S/N
1 1.00000 7.94023E­02 7.94023E­02 1415.86
2 3.00000 0.314950 0.394352 288.905
3 5.00000 0.128838 0.523190 224.793
4 7.00000 0.109746 0.632936 192.717
5 9.00000 6.17136E­02 0.694650 183.911
6 11.0000 1.80667E­02 0.712717 190.245
7 13.0000 1.19155E­02 0.724632 200.023
8 15.0000 1.43611E­02 0.738993 210.347
9 17.0000 1.46708E­02 0.753664 221.702
10 19.0000 1.38487E­02 0.767513 234.389
11 21.0000 1.30511E­02 0.780564 248.339
12 23.0000 8.15680E­03 0.788721 265.530
13 25.0000 7.15378E­03 0.795874 284.367
14 27.0000 8.23896E­03 0.804113 303.686
15 29.0000 7.82141E­03 0.811935 324.218
16 31.0000 7.35794E­03 0.819293 345.984
17 33.0000 7.16202E­03 0.826455 368.796
18 35.0000 5.86813E­03 0.832323 393.488
19 37.0000 4.74206E­03 0.837065 420.083
20 39.0000 4.16984E­03 0.841235 448.241
21 41.0000 4.22753E­03 0.845462 477.417
22 43.0000 4.24239E­03 0.849705 507.610
23 45.0000 3.72007E­03 0.853425 539.378
24 47.0000 3.09064E­03 0.856515 572.928
25 49.0000 2.83142E­03 0.859347 607.906
26 51.0000 2.50339E­03 0.861850 644.441
27 53.0000 2.19634E­03 0.864047 682.561
28 55.0000 2.15987E­03 0.866207 721.913
29 57.0000 1.96760E­03 0.868174 762.739
30 59.0000 1.60438E­03 0.869779 805.366
31 61.0000 1.55427E­03 0.871333 849.317
32 63.0000 1.57145E­03 0.872904 894.466
33 65.0000 1.47018E­03 0.874374 941.029
34 67.0000 1.53672E­03 0.875911 988.672
35 69.0000 1.65815E­03 0.877569 1037.24
36 71.0000 1.53370E­03 0.879103 1087.25
37 73.0000 1.34936E­03 0.880452 1138.87
38 75.0000 1.38521E­03 0.881838 1191.60
39 77.0000 1.40302E­03 0.883241 1245.46
40 79.0000 1.27010E­03 0.884511 1300.84

21 Appendix B
Appendix B
This appendix details the contents of the spectra catalogs available with FOCSIM. Three tables
make up this listing:
The tables consist of the filenames for the spectra with references to star or model of which it is
representative. The filenames given in the tables are to be used AS­IS as input for the parame­
ter `sour' in the source sub­menu that corresponds to the appropriate catalog.
Table 1: BPGS stellar spectra --- Observed spectra for many stellar standards.
Table 2: UCB spectra --- Theoretical stellar spectra for over 75 MK classes.
Table 3: CLB spectra --- Spectra of objects used for calibration purposes.

FOCSIM Beginner's Manual 22
Table 1: BPGS Stellar Catalog
Filename Target ID
bpgs_1 9­SGR
bpgs_2 9­SGE
bpgs_3 HR8023
bpgs_4 BD­01D935
bpgs_5 60­CYG
bpgs_6 102­HER
bpgs_7 ETA­HYA
bpgs_8 IOTA­HER
bpgs_9 HR7899
bpgs_10 38­OPH
bpgs_11 HR7174
bpgs_12 9­VUL
bpgs_13 HD189689
bpgs_14 THETA­VIR
bpgs_15 NU­CAP
bpgs_16 HR6169
bpgs_17 HD190849A
bpgs_18 69­HER
bpgs_19 HD190849B
bpgs_20 58­AQL
bpgs_21 78­HER
bpgs_22 HR6570
bpgs_23 HD187754
bpgs_24 THETA1­SER
bpgs_25 PRAESEPE­276
bpgs_26 PRAESEPE­114
bpgs_27 PRAESEPE­154
bpgs_28 HD190192
bpgs_29 PRAESEPE­226
bpgs_30 PRAESEPE­37
bpgs_31 HD191177
bpgs_32 PRAESEPE­332
bpgs_33 BD+29D3891
bpgs_34 PRAESEPE­222
bpgs_35 HD35296
bpgs_36 BD+26D3780
bpgs_37 HD148816
bpgs_38 HD155675
bpgs_39 PRAESEPE­418
bpgs_40 HYAD­1
bpgs_41 HD122693
bpgs_42 HD154417
bpgs_43 HYAD­2
bpgs_44 HD227547
bpgs_45 HD154760
bpgs_46 HD190605
bpgs_47 HYAD­15
bpgs_48 HD139777A
bpgs_49 HD136274
bpgs_50 HYAD­26
bpgs_51 HD150205
bpgs_52 HYAD­21
bpgs_53 BD+02D3001
Table 1: BPGS Stellar Catalog
Filename Target ID

23 Appendix B
bpgs_54 HD190571
bpgs_55 HYAD­183
bpgs_56 HD190470
bpgs_57 HD154712
bpgs_58 HYAD­185
bpgs_59 BD+38D2457
bpgs_60 HYAD­173
bpgs_61 GL40
bpgs_62 HYAD­189
bpgs_63 HD151288
bpgs_64 HD157881
bpgs_65 HD132683
bpgs_66 GL15A
bpgs_67 GL49
bpgs_68 GL109
bpgs_69 GL15B
bpgs_70 GL83.1
bpgs_71 GL65
bpgs_72 HR7567
bpgs_73 HR7591
bpgs_74 20­AQL
bpgs_75 HR7467
bpgs_76 IOTA­LYR
bpgs_77 HR7346
bpgs_78 59­HER
bpgs_79 HR6642
bpgs_80 11­SGE
Table 1: BPGS Stellar Catalog
Filename Target ID
bpgs_81 60­HER
bpgs_82 HD192285
bpgs_83 ALPHA­OPH
bpgs_84 HD165475B
bpgs_85 HD165475
bpgs_86 XI­SER
bpgs_87 HD5132
bpgs_88 HD508
bpgs_89 HD210875
bpgs_90 RHO­CAP
bpgs_91 HD7331
bpgs_92 BD+63D0013
bpgs_93 HD13391
bpgs_94 HD154962
bpgs_95 HD192344
bpgs_96 HR6516
bpgs_97 HR7670
bpgs_98 HD128428
bpgs_99 31­AQL
bpgs_100 BD­02D4018
bpgs_101 M67­F143?
bpgs_102 HD11004
bpgs_103 HD173399A
bpgs_104 HD56176
bpgs_105 HD227693
bpgs_106 HD199580
bpgs_107 HD152306
Table 1: BPGS Stellar Catalog
Filename Target ID

FOCSIM Beginner's Manual 24
bpgs_108 PRAESEPE­212
bpgs_109 THETA1­TAU
bpgs_110 HD170527
bpgs_111 HD136366
bpgs_112 HD191615
bpgs_113 HD124679
bpgs_114 HD131111
bpgs_115 HD113439
bpgs_116 HD4744
bpgs_117 HD7010
bpgs_118 46­LMI
bpgs_119 91­ AQR
bpgs_120 M67­F141
bpgs_121 HR8924A
bpgs_122 HD140301
bpgs_123 HD95272
bpgs_124 HD72184
bpgs_125 HD119425
bpgs_126 HD106760
bpgs_127 PSI­UMA
bpgs_128 PHI­SER
bpgs_129 HD136514
bpgs_130 MU­AQL
bpgs_131 HR5227
bpgs_132 HD154759
bpgs_133 20­CYG
bpgs_134 ALPH­SER
Table 1: BPGS Stellar Catalog
Filename Target ID
bpgs_135 MU­LEO
bpgs_136 BD+01D3131
bpgs_137 M67­F170
bpgs_138 18­LIB­A
bpgs_139 BD+28D2165
bpgs_140 NGC188­1_69
bpgs_141 BD+30D2344
bpgs_142 HD83618
bpgs_143 HD158885
bpgs_144 HD166780
bpgs_145 HD148513
bpgs_146 M67­T626
bpgs_147 HD127227
bpgs_148 M67­IV­202
bpgs_149 HD50778
bpgs_150 HD62721
bpgs_151 HD116870
bpgs_152 HD60522
bpgs_153 BD­01D3113
bpgs_154 BD+02D2884
bpgs_155 BD­02D3873
bpgs_156 HD104216
bpgs_157 HD142804
bpgs_158 HD30959
bpgs_159 HD151658
bpgs_160 BD­02D4025
bpgs_161 BD­01D3097
Table 1: BPGS Stellar Catalog
Filename Target ID

25 Appendix B
bpgs_162 TX­DRA
bpgs_163 Z­CYG
bpgs_164 BD+01D3133
bpgs_165 BD­02D3886
bpgs_166 W­HER
bpgs_167 TY­DRA
bpgs_168 SW­VIR
bpgs_169 RZ­HER
bpgs_170 R­LEO
bpgs_171 AW­CYG
bpgs_172 WZ­CAS
bpgs_173 69­CYG
bpgs_174 HR7699
bpgs_175 HR8020
Table 1: BPGS Stellar Catalog
Filename Target ID

FOCSIM Beginner's Manual 26
Table 2: Stellar and Other Calibration Spectra in UCB Catalog
a0iii b1iii f0i g8i m3iii
a0v b1v f0iii g8iii m4iii
a1v b2iii f2i g9iii m5iii
a2i b2v f2v k0iii m6iii
a2iii b3v f5v k0v m6v
a2v b5i f6v k2iii o5v
a3iii b5iii f7v k3v o7i
a3v b5v f8i k5iii o7v
a5iii b7iii f8v k5v o8iii
a5v b7v g0i k6iii o8v
a7iii b8i g0iii k9v o9iii
a7v b8iii g0v m0iii o9p5i
b0i b8v g1v m0v o9v
b0p5iii b9p5iii g2v m1iii m1m2i
b0v b9v g2i m1v
b0p5i g5v m2v
earth elliptical sea solar
sand orioneb spiral
Table 3: Calibration Object Spectra in CLB Catalog
bpic earth lb227 sand
bpm16274 hz4 m1m2i sea
hz2 orioneb solar hz21

27 Appendix C
Appendix C
This appendix provides an example of the screen report generated by FOCSIM. This report
gives a concise overview of what FOCSIM calculated. All the information provided in this short
report is pulled directly from the regular report, with one exception: TOTAL SOURCE RATE. The
value given as the TOTAL SOURCE RATE is calculated as follows:
The source area is the computed area of the PSF which gives the minimum exposure time to
reach the given S/N or the maximum S/N for the given exposure time, while the energy_fraction
is the percent of energy that falls within the source area compared to how much fills the entire
source PSF. Thus, this value should give a close approximation to the total count rate of the
source.
This example screen report was produced from the test case discussed in the text. The screen
report, like any output to STDOUT, can be re­directed to a file using the following notation:
This command will put the FOCSIM generated screen report into a file named `your_file_na­
me.txt', with nothing showing up on the screen. The file can then be read/edited easily as it is
simply an text file.
Source rate in Source Area / Computed Energy_fraction
focmain > your_file_name.txt

FOCSIM Beginner's Manual 28
Focal ratio : F/151
Filter Id CLEAR F342W CLEAR CLEAR
PSF file name : focsim$psf/f151tim/f342
PSF wavelength : 3420. [ A ]
Reqired Energy_fraction : 0.
Computed energy_fraction: 0.6947
Signal to noise ratio : 10.00
Exposure time : 183.9 [Seconds]
STMAG : 22.75
Source area for min exposure time : 81.00 [Pixels]
Source linear size :0.1254 [Arcsec]
Source Rate in Source area : 0.6283 [Counts s­1]
Total Backg Rate : 0.4883E­01 [Counts s­1]
Total Sour.& Backg Rate : 0.6771 [Counts s­1]
TOTAL POINT SOURCE RATE : 0.9044 [Counts s­1]
Rates in the Point Source Center Pixel:
Point Source Rate : 0.7153E­01 [Counts pixel­1 s­1]
Extended Source Rate : 0. [Counts pixel­1 s­1]
Total Source Rate : 0.7153E­01 [Counts pixel­1 s­1]
Total Backg Rate : 0.6029E­03 [Counts pixel­1 s­1]
Total Pixel Rate : 0.7213E­01 [Counts pixel­1 s­1]