Syntax:
-o <outdir | outname> ["nameformat" formatstring] ["columnformat" formatstring] Example 1.$ ./vartools -l EXAMPLES/lc_list -header \ -LS 0.1 100.0 0.1 1 0 \ -expr phase=t \ -changevariable t phase \ -Phase ls \ -o EXAMPLES/OUTDIR1 \ nameformat "file_%s_%05d_simout.txt" \ columnformat "t:%11.5f,phase:%8.5f,mag:%7.4f,err:%7.4f" #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 $ head -3 EXAMPLES/OUTDIR1/file_1_00001_simout.txt 53725.17392 0.00000 10.0850 0.0012 53726.15280 0.00068 10.0886 0.0009 53726.15378 0.00169 10.0918 0.0009
Example illustrating the use of the "nameformat" and "columnformat" keywords for the -o command. Light curves are read-in from the list, the -LS command is used to find the periods. The -expr command then defines a new vector "phase" which is initialized to the times in the light curves. The -changevariable command causes subsequent commands to use phase in cases where the time would normally be used. This, together with the following -Phase command, causes the vector "phase" to store the light curve phase for the period found with -LS. The light curves are then output to the directory EXAMPLES/OUTDIR1. The nameformat keyword gives the rule for naming the output files. The first light curve ("EXAMPLES/1") will yield output to the file "EXAMPLES/OUTDIR1/file_1_00001_simout.txt", the second ("EXAMPLES/2") to the files "EXAMPLES/OUTDIR1/file_2_00002_simout.txt", and so on. If the nameformat had not been given, the first file would have been output to "EXAMPLES/OUTDIR1/1" and so on. The columnformat keyword specifies how the data will be formatted in the output light curve. Here we indicate that four quantities, the time, phase, magnitude, and error will be included in the output. We also give printf like formatting rules for each of these to make the output easier to read. If columnformat had not been given, then only t, mag and err would have been output, and they would have all been output using the formats %17.9f, %9.5f, and %9.5f respectively.