If you have a TTAG observation of a source in a close binary system, you might be interested in removing the orbital motion that smears out the photospheric lines. For a circular orbit, you can use remove_target_orbital_motion.
Usage: remove_target_orbital_motion [-hb] [-v level] input_idf_file output_idf_file mjd0 period vrmax [ra_h ra_m ra_s dec_d dec_m dec_s] Arguments: mjd0 : (Geocentric or Heliocentric) Modified Julian Day of closest approch on orbit. period : Period in seconds. vrmax : Maximum radial velocity in km/s ra_h ra_m ra_s dec_d dec_m dec_s : Optional RA and DEC of target. If present mjd0 is interpreted as Heliocentric. Options: -h: this help message -v: verbosity level (=1; 0 is silent) -b: update timeline doppler information (required for BPM)
Note that you should have:
where T is the orbital period, dT the uncertainty on the period, obstime the time of the observation and mjd0 a modified julian day for which the target is at its closest approch on an orbit. If this is not the case or if you don't know mjd0, you should try with different values of mjd0 going from obstime to obstime+T.
If mjd0 and obstime are not close in time, you should take into account the heliocentric light-time delay (Note that the light-time delay due to the systemic velocity is generally already accounted for in the period as measured from Earth on a long time-base). Thus you should probably use the heliocentric version of remove_target_orbital_motion, which means that you need to input the RA and DEC of the target. If your value of mjd0 is geocentric, you will need to convert it to heliocentric. You can use mjd2hjd to do so.
Usage: mjd2hjd [-h] [-v level] mjd ra_h ra_m ra_s dec_d dec_m dec_s Arguments: mjd : Modified Julian Day. ra_h ra_m ra_s dec_d dec_m dec_s : RA and DEC of target. Options: -h: this help message -v: verbosity level (=1; 0 is silent)
The b switch in remove_target_orbital_motion tells the program to update the timeline doppler information in the output IDF file. This is required if you want to correct for potholes. In that case you should run cf_bad_pixels on the output of remove_target_orbital_motion. This also means that if you want to correct for bad pixels, you should not have combined your exposures into a single IDF file before removing the orbital motion.
The IDF file with updated doppler information uses a bigger container for doppler information than a normal IDF file because close binary systems can have very large orbital velocity. idf_combine can read these files, but you may get an overflow when it tries to write the output file. To prevent this, use the b switch with idf_combine to combine such files.
The following script remove the target orbital motion, combines the exposures into a single IDF file and generates an associated BPM file.
#!/bin/sh # # Takes 10 arguments : # 1 : observation rootname (example: M1010101) # 2 : Heliocentric Modified Julian Day of closest approch on orbit. # 3 : period in seconds # 4 : Maximum radial velocity in km/s # 5 6 7 : RA of target - h , min, sec # 8 9 10: DEC of target - deg, min, sec # # Removes the orbital motion # Combines all the IDF files # Creates the associated BPM file # This for each segment: 1a, 1b, 2a and 2b # rootname=$1 hmjd=$2 period=$3 vmax=$4 rah=$5 ram=$6 ras=$7 decd=$8 decm=$9 shift 1 decs=$9 rm *ttagfbpm.fit rm *_corr_ttagfidf.fit for seg in "1a" "1b" "2a" "2b" do str=${rootname}[0-8]??${seg}ttagfidf.fit exposures=`ls $str` for expo in $exposures do expocorr=`echo $expo | sed -e 's/ttag/_corr_ttag/g` remove_target_orbital_motion -b $expo $expocorr \ $hmjd $period $vmax \ $rah $ram $ras \ $decd $decm $decs cf_bad_pixels $expocorr done str2=${rootname}[0-8]??${seg}_corr_ttagfidf.fit idf_combine -c -b ${rootname}all${seg}_corr_ttagfidf.fit $str2 bpm_combine ${rootname}all${seg}_corr_ttagfbpm.fit \ ${rootname}all${seg}_corr_ttagfidf.fit done exit 0