Syntax:
-Killharm <"aov" | "ls" | "both" | "injectharm" | "fix" Nper per1 ... perN | "spec" Nper> Nharm Nsubharm omodel [model_outdir] ["fitonly"] ["outampphase" | "outampradphase" | "outRphi" | "outRradphi"] Example 1.$ ./vartools -i EXAMPLES/2 -oneline \ -LS 0.1 10. 0.1 1 0 \ -rms -chi2 \ -Killharm ls 0 0 0 \ -rms -chi2 Name = EXAMPLES/2 LS_Period_1_0 = 1.23440877 Log10_LS_Prob_1_0 = -704.49194 LS_SNR_1_0 = 58.45119 Mean_Mag_1 = 10.11802 RMS_1 = 0.03663 Expected_RMS_1 = 0.00102 Npoints_1 = 3313 Chi2_2 = 1709.50065 Weighted_Mean_Mag_2 = 10.11178 Killharm_Mean_Mag_3 = 10.12217 Killharm_Period_1_3 = 1.23440877 Killharm_Per1_Fundamental_Sincoeff_3 = 0.05008 Killharm_Per1_Fundamental_Coscoeff_3 = -0.00222 Killharm_Per1_Amplitude_3 = 0.10026 Mean_Mag_4 = 10.11176 RMS_4 = 0.00231 Expected_RMS_4 = 0.00102 Npoints_4 = 3313 Chi2_5 = 6.51484 Weighted_Mean_Mag_5 = 10.11178
Search for a periodic signal in the light curve EXAMPLES/2 using the Lomb-Scargle algorithm, and then fit and remove a sinusoid using -Killharm. We include calls to -rms and -chi2 before and after calling -Killharm to show how these statistics change after subtracting the best-fit sinusoid. For the -Killharm command we take the period from the last ls command, we only fit the fundamental (no harmonics or sub-harmonics), and we do not output the best-fit model.
Example 2.$ ./vartools -i EXAMPLES/M3.V006.lc -oneline \ -Killharm fix 1 0.514333 10 0 1 \ EXAMPLES/OUTDIR1/ fitonly outRphi Name = EXAMPLES/M3.V006.lc Killharm_Mean_Mag_0 = 15.77123 Killharm_Period_1_0 = 0.51433300 Killharm_Per1_Fundamental_Amp_0 = 0.38041 Killharm_Per1_Fundamental_Phi_0 = -0.07662 Killharm_Per1_Harm_R_2_1_0 = 0.47077 Killharm_Per1_Harm_Phi_2_1_0 = 0.60826 Killharm_Per1_Harm_R_3_1_0 = 0.35917 Killharm_Per1_Harm_Phi_3_1_0 = 0.26249 Killharm_Per1_Harm_R_4_1_0 = 0.23631 Killharm_Per1_Harm_Phi_4_1_0 = -0.06843 Killharm_Per1_Harm_R_5_1_0 = 0.16353 Killharm_Per1_Harm_Phi_5_1_0 = 0.60682 Killharm_Per1_Harm_R_6_1_0 = 0.10621 Killharm_Per1_Harm_Phi_6_1_0 = 0.28738 Killharm_Per1_Harm_R_7_1_0 = 0.06203 Killharm_Per1_Harm_Phi_7_1_0 = 0.95751 Killharm_Per1_Harm_R_8_1_0 = 0.03602 Killharm_Per1_Harm_Phi_8_1_0 = 0.58867 Killharm_Per1_Harm_R_9_1_0 = 0.02900 Killharm_Per1_Harm_Phi_9_1_0 = 0.22322 Killharm_Per1_Harm_R_10_1_0 = 0.01750 Killharm_Per1_Harm_Phi_10_1_0 = 0.94258 Killharm_Per1_Harm_R_11_1_0 = 0.00768 Killharm_Per1_Harm_Phi_11_1_0 = 0.66560 Killharm_Per1_Amplitude_0 = 1.11128
Fit a harmonic series to the RR Lyrae light curve EXAMPLES/M3.V006.lc. We fix the period to 0.514333 days, and we fit 10 harmonics plus the fundamental. We do not fit sub-harmonics. The best-fit model is output to EXAMPLES/OUTDIR1 (the filename will be EXAMPLES/OUTDIR1/M3.V006.lc.killharm.model). We do not subtract the model (the fitonly keyword) and we give relative amplitudes and phases (the amplitudes and phases in this format can be used in the -Injectharm command to inject a harmonic series with the fixed signal shape, but random overall amplitude and phase. See "vartools -example -Injectharm").
Fig 1. Harmonic Series Fit to the RR Lyrae Light Curve from Example 2.