A cheat sheet to help run VPFIT 9.5 is coming soon.
The text in the boxes is meant to reflect what the program is spitting out in the terminal. The red text after the ">" symbol is for what you should enter into the program.
On Moebius:
$ cd Desktop/VPFIT/
$ /usr/local/src/vpfit/vpfit
MUST DEFINE VPFSETUP IN THE TERMINAL YOU ARE USING!
export VPFSETUP=/home/jonathan/Desktop/VPFIT/vp_setup.dat
export VPFSETUP=/home/jonathan/Desktop/VPFIT/vp_alphasetup.dat
Data: Can add
- — think about the resolution you need.
RESVEL
to the top of the ascii data file — where the velocity resolution
example:
Nice Input:
*
../ForKim/vp.4.ascii 1 5321.00 5335.65 vsig=6.5
*
FeII 14.603593 2.3091160803 9.97463 -5.4E-06qa
FeII 13.955762 2.3094469762 12.35733 -5.4E-06QA
FeII 13.023730 2.3095958348 4.78090 -5.4E-06QA
FeII 13.937499 2.3089939901 4.99292 -5.4E-06QA
Output:
after setting export,
./vpfit
f
inputfile.name
tells you output file.
! chunk 1 sigma_v= 0.03164626
%% ../ForKim/vp.4.ascii 1 5321.0000 5335.6500 vsig=6.5 ! 0.000 634 2008/07/07
! Stats: 8 1.7600077 634 621 0.000 0
FeII 2.3091053641 0.0000113279 8.80292 0.52963 14.751963 0.068850 3.9993E-05qa 1.2006E-05 0 !
FeII 2.3094499059 0.0000030316 15.81869 0.23626 14.046754 0.005731 3.9993E-05QA 0.0000E+00 0 !
FeII 2.3095928372 0.0000043106 2.67064 0.82367 12.495122 0.094696 3.9993E-05QA 0.0000E+00 0 !
FeII 2.3090270666 0.0000038484 5.85051 0.50510 14.526499 0.122991 3.9993E-05QA 0.0000E+00 0 !
VPFIT 9.3
Last major change: 25 March 2007
Copyright (C) 1995, 2004 R.F.Carswell, J.K. Webb, M.J. Irwin, A.J. Cooke.
.. please acknowledge the use of this program
(and the authorship) in resulting publications.
maximum file size : 208000
maximum chunk size : 15000
maximum no. parameters : 1000
maximum no. chunks : 60
exceeding above will corrupt results probably without warning
------------------------
Using local vp_setup.dat
------------------------
Trying atom.dat in current directory
Atomic data filename
> atom.dat
this is the file that Kim sent me over e-mail, and it's in the working directory.
Using data from : kimatom.dat
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)...
> I (capital "i")
Column density (n), log N (l) or emission (e), scalefactor
> (just press return)
filename :spectrum number: 1 Filename for data?
> dude67.ascii
ASCII file input
3974 data values
Plot? [y]
> (just press return)
plot parameter? (type he for options list)
> (just press return)
PGPLOT device? []
> /xw (just press return)
First of all, watch the terminal output as this is working. It tells you what it's doing or what it's waiting for.
Now a new window will pop up that looks something like:
The terminal will have written:
Expand plot if needed: Cursor ("e" or left button at edges, "q" or right button when OK)
Once you see the window, the first thing that you and the program will want to do is to set the window scale properly. Click ("Click" means left click, I'll specify Right Click when needed) to the left of the region you want to see.
In the terminal you will see that it says:
Cursor ("e" edges, "q" OK) Channel -23 right edge.. (it's waiting for you to click the right edge)
Now click to the right of the region you want to see. You can keep zooming in like this for a while, but you need to do it in order: first click left of the region, then right, then left, then right.
You'll eventually get something that looks like this:
To get other commands for the window; type "?" this while in the graphics window, the terminal window will list some options.
So now you have zoomed in enough to see the spectra nice and neat.
To Fit the Line
Right Click in the window.
The terminal now writes:
Mark region in which data is to be fitted: left limit (space, or left button, when ready)
You are now going to mark the region that you want to fit. Left click to the left of the line that you are fitting.
right limit
Left click to the right of the line that you are fitting.
Region limits: 5330.915A (channel 342)
- 5332.429A (channel 381)
Channels 342 381
Vacuum wavelength for start of chunk is 5330.93376 FWHM (km/s & A), or file. ?:help
width (km/s), dlam (A) ? [ 0.0, 0.000 ], or filename?
Type into the terminal window the dispersion (which it needs in km/s). You'll notice that the cursor has gone for a few commands. To convert, Wavelength (in angstroms)/dispersion(angs/pix) = R. c/R = disp in km/s in our case HIRES is about:
6.5
Line 1 :ion, lambda0, N, b, z? <CR> to end .. in the graphics window.
Go back to the graphics window, and type:
FeII 1611
(it will show up in the terminal window, even though you're typing in the graphics window)
Wavelength used: 1611.20034 set cursor x- wavelength, y- base of feature
Put the pointer at the bottom and center part of the absorption line and click. The cursor will only move to half of the optical depth point - nothing else will happen in the graphics window from that click, but the terminal will say:
.. and now half width at half (optical) depth
So now that the cursor has moved to "half" of the optical depth, the program wants you to move the mouse directly left
(or right) to give the program an estimate of the "width" at "half max". Move the mouse to the left (at the same height as it jumped), and click only once where the line intersects.
Estimated vac wavelength & z are
5331.5083 2.30902878 14.8932752 8.81220165 2.30902878
Line 2 :ion, lambda0, N,b,z? <CR> to end .. in the graphics window
So now it's asking for the same thing that you just typed in with the first guess to try to fit a second line. You would fit a second line in the exact way you did the first line. Typing in the graphics window all the normal stuff. You can keep adding lines like this. When you're satisfied with the number of lines being used to fit, just hit return.
A shortcut is to type * instead of "FeII 1611" as the next component (it repeats the component previously entered).
Include other data? y, n (def), (or sf for more from the same file)
> n
Continue (c), fit (f), or stop (s)? [f]
> f
no. of ions for fitting is 2 ion N z b bturb temp
iteration : 0 ( 1 )
chi-squared : 22.057 ( 705.8324, 32 )
FeII 14.8305 2.309019 7.55 0.00 0.00E+00 0 ! 1
FeII 14.9899 2.309042 11.12 0.00 0.00E+00 0 ! 2
iteration : 1 ( 1 )
chi-squared : 2.611 ( 83.5567, 32 )
FeII 14.4992 2.309024 7.97 0.00 0.00E+00 0 ! 1
FeII 14.7299 2.309073 13.37 0.00 0.00E+00 0 ! 2
iteration : 2 ( 1 )
chi-squared : 1.938 ( 62.0160, 32 )
FeII 14.5220 2.309022 6.80 0.00 0.00E+00 0 ! 1
FeII 14.7509 2.309088 11.09 0.00 0.00E+00 0 ! 2
iteration : 3 ( 1 )
chi-squared : 1.619 ( 51.7949, 32 )
FeII 14.5204 2.309004 6.33 0.00 0.00E+00 0 ! 1
FeII 14.7541 2.309097 10.67 0.00 0.00E+00 0 ! 2
iteration : 4 ( 1 )
chi-squared : 1.430 ( 45.7443, 32 )
FeII 14.5189 2.309003 5.29 0.00 0.00E+00 0 ! 1
FeII 14.7571 2.309100 9.72 0.00 0.00E+00 0 ! 2
iteration : 5 ( 1 )
chi-squared : 1.390 ( 44.4950, 32 )
FeII 14.5153 2.308998 5.22 0.00 0.00E+00 0 ! 1
FeII 14.7525 2.309102 9.36 0.00 0.00E+00 0 ! 2
iteration : 6 ( 1 )
chi-squared : 1.386 ( 44.3460, 32 )
FeII 14.5179 2.308998 5.09 0.00 0.00E+00 0 ! 1
FeII 14.7521 2.309102 9.24 0.00 0.00E+00 0 ! 2
iteration : 7 ( 1 )
chi-squared : 1.386 ( 44.3362, 32 )
FeII 14.5185 2.308998 5.07 0.00 0.00E+00 0 ! 1
FeII 14.7513 2.309102 9.18 0.00 0.00E+00 0 ! 2
parameter errors:
FeII 0.3205 0.000011 1.48 ! 1
FeII 0.1937 0.000036 3.19 ! 2
statistics for whole fit:
Runs test K-S test Chi-squared Chans ndf APr Xp(.68) Xp(.95) Xp(.9 9)
0.16188 0.58727 44.34 38 32 0.072 35.34 45.91 52.7 1
Statistics for each region :
Start End Chi-squared Chans df?
5330.60 5332.73 44.34 38 32 0.072 < Prob < 0.222 g= 0.07 2 1
5330.60 maxdev 0.6834 0.739 0.956 1.358 1.62 7
Plot? y,n, or c=change device [y]
> y
Line, system number: (<CR> or * for internal guesses)
> *
plot parameter? (type he for options list)
> (just press return)
And hopefully you see something like:
Plot? y,n, or c=change device [y]
> n
Fit more lines? [n]
> n
and you're done.
So now what? Well, you have 3 output files:
fort.13 - Initial guesses.
fort.18 - fit history by iteration.
fort.26 - Summary of the fit parameters.
Output a Postscript File
This is actually not too bad. When you come to this second to last line here at the end, the:
Plot? y,n, or c=change device [y]
> c
Closing plot device
number of graphs in x, y direction [1,1]
> 1,1
Graphics device/type (? to see list, default /XWINDOW):
/PS
Line, system number: (<CR> or * for internal guesses)
> *
plot parameter? (type he for options list)
> (just press return)
Now what happens is vpfit just saved a postscript file in the working directory named pgplot.ps
You have to manually move this file to a descriptive name. You'll want to do this, too, because vpfit will overwrite to this file every time you make a ps file.