QSO simulations

How to run a QSO simulation through target selection


First, try running TARGET on the example in the examples
directory.

(1) setup target
(2) cd to a directory where you want to work
(3) Execute the command:

unix> target

You will get a "ta>" prompt

(4) Now you are in a tcl shell.  The example input files for target
	are in the $TARGET_DIR/examples directory.  The output will
	go in your working directory.  Here's how you generate the
	selected objects:

ta> targetSelectFromChunk \
>> [envscan \$TARGET_DIR]/examples/tsChunk-25-647905.par \
>> -quasars [envscan \$TARGET_DIR]/examples/tsQuasarsParams.par \
>> -objDir [envscan \$TARGET_DIR]/examples

This should have generated the file tsSelectedObjects-000581-1-0-0004.par in
your current directory.  This is an ASCII file that you should be able to
look at. (NOTE: The current examples do not run on sdssdp2 - OSF1 - due to
NaN problems.  The simulations should work on OSF1, however.)

(5) We can now generate the figure of merit by:

ta> taQsoSimTargetEvalFromChunk \
>> [envscan \$TARGET_DIR]/examples/tsChunk-25-647905.par \
>> tsSelectedObjects-000581-1-0-0004.par [envscan \$TARGET_DIR]/examples

Since the keys in the examples in the current cut product are zero,
the figure of merit is unable to determine the completeness and efficiency
by redshift and type - and can only tell you how many objects you
selected out of the total number of objects.

(6) You can also convert one one Xiaohui's simulations to the input
format for the target selection pipeline and run the above.  Suppose you
have a file called NGP9d.ugriz-1010 that is such a simulation in your
current working directory.  Note that the converstion routine has only
been tested on chunks containing one field, but it was designed to work
on multiple-field chunks.  A sample session follows:

ta> taQsoSimConvert NGP9d.ugriz-1010
Creating chunk 1
Creating segment 1
Creating fieldinfo for field 0
Appending 13402 objects in field 0 to file tsObj-000001-3-0-0000.fit
Writing segment 1 to file tsFieldInfo-000001-3-0-0000.fit
Writing chunk 1 to file tsChunk-21-000182.par
ta> targetSelectFromChunk tsChunk-21-000182.par -quasars tsQuasarsParams.par
field 0 has 334 objects (out of 13402) with Target flag(s) set
0
ta> taQsoSimTargetEvalFromChunk tsChunk-21-000182.par \
>> tsSelectedObjects-000001-3-0-0000.par .

Targets selected (by type):     1       13/991
                                2       35/9801
                                3       5/2324
                                4       0/0
                                5       0/0
                                6       0/0
                                7       0/0
                                8       58/58
                                9       14/16
                                10      209/212
                                        -----------------
                                        334/13402

QSO completeness (z):           -10 - 1 85/85
                                1 - 1.5 48/48
                                1.5 - 2 32/32
                                2 - 2.5 24/24
                                2.5 - 3 15/16
                                3 - 3.5 5/6
                                3.5 - 4 0/1
                                4 - 6   0/0
                                6 - 10  0/0
                                        -----------------
                                        209/212

QSO completeness (m):           -10 - 15        0/0
                                15 - 16 1/1
                                16 - 17 1/1
                                17 - 18 20/20
                                18 - 19 91/92
                                19 - 30 96/98
                                        -----------------
                                        209/212

ta> 

How to run select known objects

If the simulated quasar data contains radio information this can be used to create a fake FIRST catalog and from this a FITS file. The FITS binary catalog can be used within TARGET to set the flags in a tsObj*fit file for objects which are matched with the catalog. At the moment there is no simulation for the USNO Proper Motion or ROSAT All-Sky survey catalogs.

The conversion of the simulated data into a FITS file is done within the RADIO product. The matching of the radio sources with optical objects is done within TARGET.

Assume that the original quasar simulation is: /data/sim/sim.dat

  1. setup radio (v1_2 is needed)
  2. unix> cd /data/sim
  3. unix> radio
  4. radio> sim2First sim.dat -verbose
  5. radio> first2Fits catalog-sim0.txt -verbose
sim2First will produce an ascii file in the ( 17Apr97 ) format used by the FIRST group. The default name for this is catalog-sim0.txt. first2Fits will convert a FIRST catalog, real or fake, into a FITS binary file. The default name is koCat-rad-000999.fit
The verbose flags are optional, and are useful just to follow the program along. sim2First can however take tens of minutes on slower computers if the simulated quasar file is large.

The actual setting of flags is done within TARGET. The FIRST FITS catalog can be moved to the directory that has the simulated chunk file. Assume that this is in /data/sim/tsChunk-sim.par and that there is a corresponding field info file in the same directory. The tunable parameters used for the known object matching are given in a parameter file, with the format given by $TARGET_DIR/examples/koMatch.par

  1. setup target
  2. unix> cd /data/sim
  3. unix> cp $TARGET_DIR/examples/koMatch.par /data/sim
  4. edit /data/sim/koMatch.par to point to the correct FIRST FITS file and to change any of the matching parmaters (although the default values are fine for the current simulations)
  5. unix> target
  6. target> koMatch tsChunk-sim.par koMatch.par -verbose
The result will be a new file named tsChunk-sim.par in the current directory with the target flags set that replaces the original. The verbose flag is optional, but is useful for showing how many FIRST sources have been targeted.

For additional options and details about sim2First and first2Fits go to the RADIO Home Page.

There are also additional options for koMatch as well as details about the currently implemented matching algorithms.