Examples of -restoretimes command

Syntax:

-restoretimes prior_restricttimes_command

Example 1.

$ ./vartools -i EXAMPLES/3 \
             -rms \
             -restricttimes JDrange 53740 53750 \
             -rms \
             -restoretimes 1 \
             -rms -oneline

Name                  = EXAMPLES/3
Mean_Mag_0            =  10.16674
RMS_0                 =   0.00490
Expected_RMS_0        =   0.00104
Npoints_0             =  3417
RestrictTimes_MinJD_1 = 53740
RestrictTimes_MaxJD_1 = 53750
Mean_Mag_2            =  10.16718
RMS_2                 =   0.00504
Expected_RMS_2        =   0.00102
Npoints_2             =   738
Mean_Mag_4            =  10.16674
RMS_4                 =   0.00490
Expected_RMS_4        =   0.00104
Npoints_4             =  3417

Filter the light curve EXAMPLES/3 to the time range 53740 < t < 53750 using -restricttimes, compute statistics on the restricted light curve using -rms, then restore all originally excluded observations using -restoretimes and compute statistics once more. The argument 1 to -restoretimes refers to the first -restricttimes command on the command line. The three -rms calls (before restriction, after restriction, and after restoration) confirm that the full light curve with all 3417 points is recovered after calling -restoretimes.

Example 2.

$ ./vartools -i EXAMPLES/3 \
             -restricttimes JDrange 53740 53750 \
             -expr 'mag=mag+0.05' \
             -restoretimes 1 \
             -o EXAMPLES/OUTDIR1/3.restoretimes.txt -oneline

Name                  = EXAMPLES/3
RestrictTimes_MinJD_0 = 53740
RestrictTimes_MaxJD_0 = 53750

Restrict the light curve EXAMPLES/3 to the time range 53740 < t < 53750, apply a magnitude offset of 0.05 to that restricted segment using -expr, then restore the full set of observations with -restoretimes. The net effect is that only the points within the restricted time range have their magnitudes shifted; the restored points outside that range are returned in their original, unmodified state. The resulting light curve is written to EXAMPLES/OUTDIR1/3.restoretimes.txt. This pattern of -restricttimes / operate / -restoretimes is useful for applying any modification to an isolated portion of a light curve.