Frequently Asked Questions : DVO

How do I use the dvo shell, variables, math functions, plotting capabilities etc?

dvo uses the Opihi Shell Language (q.v. for the amazing number of things you can do in it).

How do I update the list of photcodes ?

Your .ptolemyrc file specifies the location of a PHOTCODE_FILE as well as a CATDIR, usually with something like:

 CONFDIR                    /home/panstarrs/ipp/psconfig/ipp-2.6.lin64/share/ippconfig 
 PHOTCODE_FILE		$CONFDIR/dvo.photcodes
 # location of DVO database tables
 CATDIR			/data/ipp003.0/catdir

If you want to update the photometry codes, you will have to edit that dvo.photcodes file or specify the location of a new one. But if you have already created a DVO catdir, then the photcodes are locked in place. Any dvo programs like addstar or dvo itself will pick up the photcodes from the Photcodes.dat file in your CATDIR, not from the PHOTCODE_FILE. So after updating your PHOTCODE_FILE, you must delete the Photcodes.dat file from your CATDIR. Then when you run something like addstar, a new Photcodes.dat file will be automatically created.

addstar is reporting a "bad astrometric solution in header." How do I get around that?

You probably have an astrometric error term that exceeds the allowable range. The parameter ADDSTAR_MAX_CERROR can be specified in your camera's dvo.config file. Try increasing this parameter. To change it at the command line you can use :

 addstar -D ADDSTAR_MAX_CERROR 5.0  ...

After processing a set of overlapping images, there are too many stars in the catalog. What's wrong?

You may need to re-sort the dvo catalog. In the normal camera stage processing, each new photometry file is added to the database without any sorting of detected objects (because this is a time-consuming process). Use the following to sort your overlapping catalogs and coordinate multiple occurrences of the same object:

 addstar -resort -D CATDIR mycatdir 

To specify the radius (in arcseconds) for determining a match, use

 addstar -resort -D CATDIR mycatdir -D RADIUS 1.5  

or edit the appropriate dvo.config file for your camera.

I've got a perfectly good .smf file, but I can't see any stars. What's wrong?

You might have an error in your .ptolemyrc file. Compare your .ptolemyrc file to the dvo.site file from the ipp installation you are using.

How do I set up my .ptolemyrc file?

Here is an example .ptolemyrc that functions with GPC1 data as of ipp-2.6 :

CONFDIR                 /home/panstarrs/ipp/psconfig/ipp-2.6-bills.lin64/share/ippconfig
CAMERA                  default

# location of DVO database tables
CATDIR			default

# location of possible data sources
2MASS_DIR_AS		NONE
2MASS_DIR_DR2		NONE
GSCDIR			NONE
USNO_A_DIR		NONE
USNO_B_DIR		NONE
TYCHO_DIR		NONE

PHOTCODE_FILE		$CONFDIR/dvo.photcodes
GSCFILE			$CONFDIR/GSCregions.tbl
CATMODE			SPLIT
CATFORMAT		PS1_DEV_1
SKY_DEPTH               3
# SKY_TABLE		this may be used to override GSCFILE
ZERO_PT			25.0

# access control for client/server addstar mode 
# PASSWORD
# HOSTNAME
# VALID_IP

# camera dependent parameter files:
FILTER_LIST             $CONFDIR/$CAMERA/dvo.filters
CAMERA_CONFIG           $CONFDIR/$CAMERA/dvo.layout
DETREND_RECIPES         $CONFDIR/$CAMERA/dvo.recipe

# load the camera-specific configuration files
input                   $CONFDIR/$CAMERA/dvo.config

How can I access info from the mysql database tables within DVO?

Use dbconnect to connect to the database and dbselect to collect the data.

dvo: dbconnect
USAGE: dbconnect (hostname) (username) (database)

dvo: dbselect
USAGE: dbselect (fields) from (table) [where]

Here is an example using the gpc1 database that extracts some vectors from the MD09 chip processing output.

dvo:  dbconnect  hostmachine  uid gpc1
dvo: dbselect chipProcessedImfile.class_id,chipProcessedImfile.fwhm_major,chipProcessedImfile.fwhm_minor,chipProcessedImfile.n_stars,chipProcessedImfile.n_astrom,chipProcessedImfile.sigma_ra,chipProcessedImfile.sigma_dec FROM chipProcessedImfile,chipRun,rawExp  WHERE chipProcessedImfile.chip_id=chipRun.chip_id AND chipRun.exp_id=rawExp.exp_id AND rawExp.ra >= '5.8' AND rawExp.ra <= '5.9' AND rawExp.decl >= '-0.1' AND rawExp.decl <= '0.1' AND rawExp.exp_time>60 AND chipProcessedImfile.fault=0 AND chipRun.state='full'

How do I create/manipulate a vector/array of values?

Create vectors from scratch with the create function Example:

 create x 0 100 0.1 

creates a vector called x with 100 values spaced in increments of 0.1, starting at 0.

Perform arithmetic, etc. with the set function. Use

 help set

to see detailed help and examples.

How do I make a histogram of a vector or an image?

The internal dvo documentation (available via help or ?) is a bit confusing for this.

histogram computes the histogram of a vector (a list of numbers). The usage line for this function should be:

 USAGE: histogram invec outvec start end [delta]

imhist computes the histogram of an image The usage line should read:

 USAGE: imhist <buffer> <x> <y> [-region sx sy nx ny] [-range min max] [-delta binsize]

Ignore the response you get from help histogram

How do I make plots of vectors and how do I set the plotting style?

Use the plot and style functions. Check out the dvo help pages with:

 help plot
 
 help style

See also lim and box

How do I save a plot or image to a printable file?

All of these should save the current active Kapa window as a file:

 png outfile.png
 jpeg outfile.jpeg
 ps outfile.ps

Presently (as of 080814) only the ps command uses the output filename correctly (png saves to kapa.png regardless of the provided filename) and the jpeg command doesn't seem to do anything at the moment.

Why does addstar say "Error in config: can't find RADIUS"?

This error occurs when addstar can't find a dvo.config file referenced via 'input' in your ~/.ptolemyrc like so:

 input                   $CONFDIR/$CAMERA/dvo.config

CONFDIR is the config directory (typically defined earlier in ~/.ptolemyrc).

CAMERA is the camera name, either also from ~/.ptolemyrc or given on the addstar command line with -D CAMERA camname.

All of these are case-sensitive (except perhaps on a Mac), so you need to give $CONFDIR and $CAMERA in exactly the capitalization as the corresponding directories on your disk, and the directory and file need to exist, of course. Bug #1100 asks for a clearer error message.