This supplements the information given in the general VPFIT description. These additions (especially those marked [*] ) are in a development stage, and probably don't work as well as you might like.
ARBITRARY LINE SPREAD FUNCTIONS
The resolution file (see VPFIT description) need not contain just the fit coefficents for the Gaussian width LSF, but can be a pixel by pixel description with a weight for each pixel specified. This is assumed if there is no RESFILE specified in the header for the data and the file contains more than one line of values, and is not invoked otherwise. A LSF which has as weights the ordinates of the normal curve with sigma=1 pixel at each pixel relative to a central peak could be written to a file as:
-4 0.0001
-3 0.0044
-2 0.0540
-1 0.2420
0 0.3989
1 0.2420
2 0.0540
3 0.0044
4 0.0001
<EOF>
where <EOF> is the end-of-file.This pixel by pixel smoothing is then applied to the Voigt profiles on the continuum before comparison with the data. Note that the file should contain an odd number of pixel values for the LSF. The normalization does not matter, since the smoothed value at each point is divided by the summed weights. The pixel numbers need not be entered -- a file containing one number per line
0.0001
0.0044
0.0540
0.2420
0.3989
0.2420
0.0540
0.0044
0.0001
<EOF>
is completely equivalent. If there are two values per line it reads only the second on each, and assumes the middle of the range is the one associated with the reference (central wavelength) pixel. If the LSF is asymmetric you will probably need to think about what the association of wavelengths with pixels means, since then peak and mean wavelengths are different.
Note that integer pixel values are required.
If you enter non-integer values in the first of the two columns they are
ignored.
If the instrument profile is not well sampled,
then you should choose finer pixels for the data (not helpful, but true).
INITIAL GUESSES (If they are Ly-alpha):
[*] Instead of 'I', 'F', 'D' as the first command line option, if you are single region Ly-a fitting try 'G'. This is equivalent to 'I', except that you are not asked for the initial line estimates -- it guesses for itself. The most sensible use is
G ad il re
since the guesses are fairly primitive. For example, extended line shoulders
are missed and clustered sharp components treated as single. The 'ad' option
normally corrects for these omissions after a few iterations. The whole
operation is pretty mindless, but takes quite a while in complex regions
to iterate to an acceptable solution.
If you want to use a file to specify the regions then use the 'F' option in the usual way, and just have no initial values specified. Just put in a blank line where you would normally have the first guess. With the blank line terminator, this means that after the asterisk below the data file information there should be TWO blank lines before the end of file or next dataset. You can do this for several datasets in the fort.13 file, and for each the assumption is that you want to guess Ly-a parameters for the last wavelength chunk in the data set being dealt with. This means at the moment that it is makes sense only to use one region per dataset, but it does leave open other possibilities if ever the approach is generalized. The fort.13 type input file then looks something like:
---------------------------------
*
datafile 1 5454.9 5507.7
*
*
datafile 1 5507.7 5542.7
*
*
datafile 1 4670.0 4704.9
datafile 1 5542.7 5581.8
*
---------------------------------
For the third dataset above, the Ly-a guesses are made for the last
region of that set only (5542.7 - 5581.8A) -- it is assumed that the other
region is put in to provide additional constaints to those systems.
You need to tell the program that there is more than one dataset, so when you reach
Parameter input file, # entries? [fort.13,1]
> fort.13 999
<--
will make sure up to 999 fit sets are read (if you have even more, make
the number larger!). It will ask you if you want to look at the last one
in the list only if the number given matches the number of datasets.
You can use option 9 in the program to check that you like the look of
the results it obtains if you are worried.
It is actually something of a pain setting up the fort.13 file, but there are some shortcuts. I used to use IRAF splot 'e-e' on small continuum regions in the spectrum, and then edit splot.log to become a list of start wavelengths (in, say, temp1) and a list of end wavelengths (in temp2), and then
paste -d " " temp1 temp2 > temp3
awk '{print"filename 1 "$1" "$2}' temp3 > f13.dat
and then insert the * <CR> <CR> * fillers by cutting and pasting a few times. However this was still somewhat tedious, so now I use the 'pg' option in the rdgen program and copy the parameters to a file. You can also shorten the work a bit by using an alternative input format which matches the summary output from vpfit. This is:
---------------------------------
%% datafile 1 5454.9 5507.7
%% datafile 1 5507.7 5542.7
%% datafile 1 5542.7 5581.8
---------------------------------
Since there are no first guesses the program generates its own. If some
are present then the program uses them, and then there should be no blank
lines
between the %% lines giving the filenames.
Then the program is run from a file which contains
#!/bin/csh #!/bin/csh
if ( -e log ) then
\rm log
endif
set host = `hostname`
echo $host
/data/cass72/rfc/qsos/1626/bcam.2 >&
log &
bcam.2 contains something like
alias vpcam /data/cass72/rfc/vpdev/dev/vpsol
setenv ATOMDIR /home/rfc/atom.dat
setenv VPFSETUP /data/cass72/rfc/vpdev/vp_setup.batch
setenv VPFPLOTS /data/cass72/rfc/qsos/vp_splot.dat
date
echo 'running vpfit in directory...'
echo $cwd
echo 'on machine...'
hostname
vpcam < /data/cass72/rfc/qsos/1626/vin13.dat
and vin13.dat might contain
f13.run 999
n
n
n
where f13.run is the fort.13 input list described above. For completeness, the vp_setup.batch file contains
With this overall procedure, you can get an idea of how far the program
has gone at any stage by using 'tail -50 log'.
There will be some regions where the fitting process fails. These are easily identified by looking through the fort.26 (f26.w*) files to see where the final fit probability is too small (it is the second last number on the first line of fit parameters). You'll need to see if you can provide better initial guesses for these ones by hand.
Relative wavelengths within a spectrum can be inaccurate, so if you are trying to fit several lines of an ion simultaneously you may get a bad fit not because of inadequacies in the model but inadequacies in the wavelength calibration. To overcome this you may shift one region's wavelengths with respect to some reference by using a line in fort.13 (or interactively):
>> <ignored value>HU <redshift>HV <velocity shift km/s>
(with region information at the end of the line if needed, e.g. "0.00 0.00E+00 n" if applies only to nth region).
The wavelengths of the region containing the '>>' line with the usual assumed wavelength of 1215.67A is shifted by <velocity shift> km/s relative to the calibrated wavelength. Thus, in the example fort.13 file below a shift of 2.83 km/s is applied to the second region since the position of the '>>' line redshifted is 5274A. This was the result of an attempt to make some rather noisy NiII lines agree. The initial guess had the 2.83 replaced by 0.0.
*
1759
6195.91 6199.81
1759
5272.97 5275.69
*
NiII
12.9696 2.624569 16.71
0.00 0.00E+00 0 ! 1
NiII
13.7469 2.625207 20.18
0.00 0.00E+00 0 ! 2
NiII
13.2108 2.625625
3.46 0.00 0.00E+00
0 ! 3
NiII
12.8951 2.625858 13.81
0.00 0.00E+00 0 ! 4
>>
1.0000HU 3.338348HV 2.83
0.00 0.00E+00 0 ! 5
Note that the ignored value and the redshift MUST
be fixed, since there is no way the program can determine them, and this
should be done automatically by the program. The velocity shift determined
is of wavelength regions with respect to some reference region, so normally
there must be at least one more wavelength region in the list than there
are '>>' lines.
Another reason for considering velocity shifts is when dealing with two spectra of the same object, taken either at different times or two images of a gravitational lens for example, when you might want to compare the two but are not sure if you got the continuum level consistent between them. Then you can use a fort.13 file generated for one spectrum, and fix all normal ions and allow the continuum (<>) and velocity shift to (>>) to change by using
options: <CR> for previous value
I - interactive setup and fit
F - run from an input file
D - display profiles from input file
? for help
option (key) (key)...
>C
instead of 'F' in response to the first prompt
This fixes all ions, but allows continuum, shift
and zero level to be refitted. 'CHI'
instead of 'C'
fixes only HI, so that the heavy elements will be refitted -- which might
be useful for close pairs when comparing Ly-a forests.
In addition to the list given in the vpfit documentation, you may limit the maximum column density to be some specified value, through a parameter in the 'vp_setup.dat' file. The parameter line is
cvalmax 15.75 maximum column density
This is useful when you are getting runaway high
column density values in bad blends, but is not otherwise necessary normally.
If there are lines in a region which have already been fitted, and you know that almost all the costraints come from other regions, then it is possible to add put these extra lines in the continuum before fitting. You do this by setting up a file in fort.26 format (called, say, f26.list, but any name is fine), and then in the options line have, for example,
options: <CR> for previous value
I - interactive setup and fit
F - run from an input file
D - display profiles from input file
? for help
option (key) (key)...
>F inc f26.list
Then ions in the f26.list file are put in the continuum, but they are not refitted. They are assumed to be completely and accurately known.
You can put some constraints on the lines from the list by adding them to the filename, so you might have
>F inc 'f26.list 26 12.5 15.5 2.4 3.6 0 100'
in which case the lines are in fort.26 format (the other option is 13), and only those HI with 12.5<logN<15.5, 2.4<z<3.6, and 0<b<100 are included. All other lines in the list are always included, including continuum shifts .. it is easier to edit the file than to set up steering lists. Note that the surrounding quotes are absolutely vital. If they are omitted then the selection parameters are treated as line commands (like ad, il etc), and are not passed to the system selection routine.
If instead you use
>F inc 'f26.list 26 12.5 15.5 2.4 3.6 0 100 0 i'
the result is a little different. The extra '0' is just a spacer in this example (in a general case, all HI lines with b<that value are included, independent of the other constraints), and the 'i' is an indicator which results in continuum shifts being excluded. This is probably more useful if you are adjusting the continuum, unless really want the continuum shift to depend on the one you had for that region in a previous fit.
Setting parameters 'ad Ly-a' on the intial options line means that any new line added in will be Ly-a at the position where the overall fit is worst. This results in Ly-a being added at redshifts considerably greater than you want sometimes, so you can specify a maximum redshift where the new line can be called Ly-a. This is done by putting 'zu <max redshift>' on the same line. So the line might look like:
options: <CR> for previous value
I - interactive setup and fit
F - run from an input file
D - display profiles from input file
? for help
option (key) (key)...
>F ad Ly-a zu 3.63
for an upper limit redshift of 3.63.
Anything else?
For the really adventurous there are other capabilities
in various states of readiness. To save the innocent from scientific injury,
the descriptions
are password protected. If you really want to act as a guinea-pig, please
let me know.