Syntax:

-changevariable <"t" | "mag" | "err" | "id"> var

Example 1.
$ ./vartools -l EXAMPLES/lc_list \
    -LS 0.1 100.0 0.1 1 0 \
    -expr 'phase=t' \
    -changevariable t phase \
    -Phase ls \
    -changevariable t t \
    -o EXAMPLES/OUTDIR1 nameformat "%s.phase.txt" \
        columnformat "t:%17.9f,mag:%9.5f,err:%9.5f,phase:%9.5f" \
    -header

#Name LS_Period_1_0 Log10_LS_Prob_1_0 LS_SNR_1_0
EXAMPLES/1     0.97821072 -452.25157   41.33409
EXAMPLES/2     1.23440877 -704.49194   58.45119
EXAMPLES/3     1.14786351  -30.00548   15.74701
EXAMPLES/4    14.81290524  -59.52748   13.11947
EXAMPLES/5     7.40645262  -53.86771   10.01489
EXAMPLES/6     0.96306814  -42.42348   10.53479
EXAMPLES/7     0.32704113  -11.84669    4.77871
EXAMPLES/8     3.07991099  -88.30735   15.34709
EXAMPLES/9     7.23420953  -37.93155   14.15476
EXAMPLES/10     0.96906857  -40.55309   11.32727

Use -LS to find periodic signals in the light curves from EXAMPLES/lc_list. Phase the light curves with this period, and output the light curves including time, magnitude, magnitude uncertainty, and phase, to the directory EXAMPLES/OUTDIR1, appending phase.txt to the end of each filename. Note here we first use the -expr command to set the new vector variable "phase" equal to "t" (this is done on a per-point basis). We then change the time variable to "phase", so that the subsequent -Phase command stores the phase in the variable "phase" rather than in the variable "t". Note the -Phase command expects the time variable to store the times on input, this is why we need the preceding -expr command. We then change the time variable back to "t" so that the output light curves will be sorted by time rather than Phase. To have vartools write more than just the default t, mag, and err columns to the output light curves we give the columnformat keyword.