| | 1 | Started by [wiki:User:Sebastian.Jester Sebastian Jester] |
| | 2 | |
| | 3 | = More info = |
| | 4 | |
| | 5 | See [wiki:WikiStart dvo links on IPPwiki front page], and in particular [wiki:DVO_Challenge DVO Challenge] for examples of dvo command usage, and [http://pan-starrs.ifa.hawaii.edu/project/IPP/documentation/dvo.pdf dvo.pdf] for background (even though dvo.pdf is quite outdated, it's the only place where you can read about dvo's design principles...). |
| | 6 | |
| | 7 | = dvo concepts = |
| | 8 | |
| | 9 | Skycells, Objects, measurements, averages, photcodes, CATDIRs |
| | 10 | |
| | 11 | == dvo has a spatial index == |
| | 12 | |
| | 13 | dvo stores data in subdirectories of a CATDIR that correspond to different parts of the sky. This naturally allows comparatively fast spatial indexing. |
| | 14 | |
| | 15 | Correspondingly, dvo operations are typically done on a given <code>region</code> of the sky. |
| | 16 | |
| | 17 | == Objects, measurements, averages == |
| | 18 | |
| | 19 | dvo uses two types of tables |
| | 20 | |
| | 21 | * '''Measurement tables''' contain all individual measurements from different epochs and filters in a giant table. There is originally no notion of which measurements correspond to the same astronomical object, and which to different ones. |
| | 22 | |
| | 23 | * '''Average tables''' know which measurements belong to the same objects, and record the average value, scatter, and error in the mean of the same object over different epochs, for each filter. They also record the proper motion and parrallax (if it has been determined). |
| | 24 | |
| | 25 | Both sets of tables, the links between them, and derived quantities are created or computed by a set of commands outside of dvo (<code>addstar, relphot, relastro</code>). Once you start dvo, everything you need should already be there... |
| | 26 | |
| | 27 | == photcodes == |
| | 28 | |
| | 29 | A '''photcode''' is an internal identifier of a photometric system. dvo distinguishes between different kinds of photcodes, depending on which kind of information is accessible in addition to the photometric catalog, and how the photometric data were computed. dvo allows conversion and cross-calibration between different systems. |
| | 30 | |
| | 31 | * '''ref''' (reference) photcodes are for external catalogs. Typically, only the photometric data and a (rough) epoch are available, but it is not possible to access the original images or instrumental magnitudes. |
| | 32 | * '''dep''' (dependent) photcodes are for measurements where all input data are accessible, i.e. images and instrumental magnitudes, zero points, air mass, observing time etc. Measurements are reported in '''dep''' photcodes. There can be multiple '''dep''' photcodes for a given bandpass, eg. in PS1, every chip/filter combination (300 of them) gets its own dep photcode. |
| | 33 | * '''average''' photcodes are for derived quantities such as averages of '''dep''' measurements, where there isn't an image that can be identified as the origin of the photometric quantity. These are meant to be generic filters, e.g. the (abstract) average PS1 r-band filter. |
| | 34 | |
| | 35 | Existing '''dep''' and '''ref''' photcodes can be averaged into '''average''' ones. |
| | 36 | |
| | 37 | = Installing dvo = |
| | 38 | |
| | 39 | dvo comes as part of IPP - see [wiki:WikiStart Installation-related links on IPPwiki main page]. Talk to your local IPP guru about where it's installed. We'll also be aiming to make a standalone dvo-only tarball for use on laptops. |
| | 40 | |
| | 41 | In Heidelberg, see /IPP/README on the IPP cluster (and read all of it!) |
| | 42 | |
| | 43 | = Using dvo = |
| | 44 | |
| | 45 | == Startup == |
| | 46 | |
| | 47 | dvo -D CATDIR /path/to/catdir |
| | 48 | |
| | 49 | e.g. in Heidelberg: |
| | 50 | |
| | 51 | dvo -D CATDIR /IPP/data/GPC1/flatcorr_20081029/catdir.flatcorr |
| | 52 | |
| | 53 | == Getting help == |
| | 54 | |
| | 55 | Most dvo commands have a help text that can be read with |
| | 56 | |
| | 57 | help command |
| | 58 | |
| | 59 | The dvo shell allows tab completion of commands and filenames. |
| | 60 | |
| | 61 | Most commands will also com/explain what they expect if called without arguments. |
| | 62 | |
| | 63 | == Setting the <code>region</code> == |
| | 64 | |
| | 65 | Set the region for plotting and plot a coordinate grid: |
| | 66 | region 314.7428 37.1718 3 |
| | 67 | cgrid |
| | 68 | |
| | 69 | Set the region for catalog extraction: |
| | 70 | skyregion 310 320 33 40 |
| | 71 | |
| | 72 | == Loading data == |
| | 73 | |
| | 74 | Show which images are present in the current skyregion: |
| | 75 | images |
| | 76 | |
| | 77 | Extracting average quantities into vectors (similar to those in sm, or arrays in IDL or C etc.) is done via <code>avextract</code>; from the currently defined region by giving the <code>-region</code> argument: |
| | 78 | avextract -region RA DEC g r i y |
| | 79 | [... takes a while for big regions with lots of measurements ...] |
| | 80 | |
| | 81 | NB: From looking at the source code, the syntax is supposed to be: |
| | 82 | -region # take ra,dec limits from currently defined plotting 'region' |
| | 83 | -skyregion ramin ramax decmin decmax # use ra,dec limits as given |
| | 84 | no -region or -skyregion command # use previously defined skyregion |
| | 85 | |
| | 86 | However, with the <code>-region</code> setting, the output list does not actually seem to be affected by changing the <code>region</code>. I.e. better use the <code>skyregion</code> variant! |
| | 87 | |
| | 88 | Also note that there is only ever '''one''' active skyregion, ie. <code>avextract -skyregion</code> changes the skyregion in the same way as the <code>skyregion</code> command. You can see the currently active one with the |
| | 89 | skyregion |
| | 90 | command. |
| | 91 | |
| | 92 | In addition to the quantities themselves, there is both an uncertainty and scatter; I think, usually the scatter is reported in the <code>:err</code> version of quantities; for RA and DEC, the error is in dRA, dDEC (see <code>avextract --help fields</code>: |
| | 93 | avextract -region RA dRA DEC dDEC g g:err r r:err i i:err y y:err |
| | 94 | |
| | 95 | '''Note there have been problems with the calculations of some scatter/error columns, so not all of them may be there.''' |
| | 96 | |
| | 97 | To see which vectors you've loaded, say |
| | 98 | vectors |
| | 99 | |
| | 100 | There are two more <code>extract</code> commands: |
| | 101 | * <code>mextract</code> extracts measurements; however, one can't compute colours from these (e.g.) because they are returned without any notion of which entry in the vector belongs to which object |
| | 102 | * <code>mmextract</code> extracts pairs of measurements belonging to the '''same''' object |
| | 103 | |
| | 104 | == Searching == |
| | 105 | |
| | 106 | === Restricting output of avextract etc. to interesting objects === |
| | 107 | |
| | 108 | The <code>avextract</code>, <code>mextract</code> and <code>mmextract</code> commands allow restricting the rows that are returned by adding a SQL-like <code>where</code> clause: |
| | 109 | avextract -region RA DEC g r i y where g-r < 0 |
| | 110 | |
| | 111 | === Find out which images contain a given ra, dec === |
| | 112 | |
| | 113 | gimages 314.7428 37.1718 -region |
| | 114 | |
| | 115 | == Plotting and computing == |
| | 116 | |
| | 117 | To plot two vectors against each other, say |
| | 118 | limits g r |
| | 119 | plot g r |
| | 120 | |
| | 121 | To compute new vectors, say |
| | 122 | |
| | 123 | set gr = g - r |
| | 124 | limits gr r |
| | 125 | plot gr r |
| | 126 | |
| | 127 | To plot things in sky coordinates, use <code>cplot</code>: |
| | 128 | cplot RA DEC |