User reference

class pyjktebop.JKTEBOP(target_name, recompile=True, compiler='gfortran', custom_compile_command=None)

Bases: object

clean_old_results()

Remove pre-existing output files. JKTEBOP doesn’t run if these exist.

compile_jktebop()

Compile jktebop.f

run_jktebop()

Run jktebop executable

class pyjktebop.TASK3(target_name, rv=False, v_shift=0)

Bases: object

data_from_output_file()

Extract data from the .out file as np.arrays and extend beyond +/-0.5 phase

get_rv_results()

Retrieve model and data from RV output files

model_from_fit_file()

Extract fit from the .fit file as np.arrays and extend beyond +/-0.5 phase

plot_eclipses(save=True, ecl_width=0.016, n_bin=1000, y_buffer=0.005, marker_size=20)

Plot data and model centered on the primary and secondary eclipses

Parameters:
  • save (bool, optional) – Whether to save the plot to file as <target>-eclipses.png

  • ecl_width (float, optional) – Width of the eclipses to restrict the x axes, in phase units

  • n_bin (int, optional) – Number of bins to use when binning the residual

  • y_buffer (float, optional) – Number to add to the min/max of the observed data to determine the y axis limits

  • marker_size (int, optional) – Size of the ax.scatter markers

plot_lightcurve(save=True, y_buffer=0.003)

Plot data and model of the entire phase-folded light curve

Parameters:
  • save (bool, optional) – Whether to save the plot to file as <target>-lightcurve.png

  • y_buffer (float, optional) – Number to add to the min/max of the observed data to determine the y axis limits

plot_rv_curve(save=True, marker_size=60)

Plot data and model of the entire phase-folded radial velocity curve

Parameters:
  • save (bool, optional) – Whether to save the plot to file as <target>-rvs.png

  • marker_size (int, optional) – Size of the ax.scatter markers

plot_rv_lc(save=True, y_buffer=0.003, rv_marker_size=60)

Plot data and model of the entire phase-folded light curve and radial velocity curve

Parameters:
  • save (bool, optional) – Whether to save the plot to file as <target>-lc-rvs-combo.png

  • y_buffer (float, optional) – Number to add to the min/max of the observed light curve data to determine the y axis limits

  • rv_marker_size (int, optional) – Size of the ax.scatter markers for the RV panel

secondary_phase_from_param_file()

Extract phase of secondary eclipse from .par file

class pyjktebop.TASK8(target_name, rv=False, ld_a=None, ld_b=None)

Bases: object

extract_best_fit_params() dict

Retrieve best parameters from TASK8 .par file

Return type:

Best fit parameters as a dictionary, in the correct format to make a TASK2 or TASK3 file

load_samples()

Retrieve TASK8 Monte Carlo results from .fit file

make_task3_input()

Generate a TASK3 file fixing at best parameters, so the user can rerun and plot

model_from_best_fit(recompile=False, compiler='gfortran', custom_compile_command=None)

Prepare TASK3 input file with all parameters fixed, run JKTEBOP to make best fit model output files. Returns a TASK3 object which can be used to generate the desired plots.

Parameters:
  • recompile (bool) – Whether to recompile JKTEBOP before running TASK3.

  • compiler (str, optional) – Name of compiler to use (e.g. ‘gfortran’)

  • custom_compile_command (str, optional) – Own command to use to compile JKTEBOP if e.g. gfortran is not working.

Return type:

TASK3 object

plot_corner(n_params=13, save=False)

Make corner plot to display MC samples from TASK8

Parameters:
  • n_params (int) – Number of free parameters used in MC fit. The .fit file presents derived as well as fitted parameters!

  • save (bool, optional) – Whether to save the plot to file as <target>-corner.png

pyjktebop.extend_array(array, phase=False)

Extend/copy arrays so secondary eclipses at phase 0.5 plot correctly

pyjktebop.jktebop_parser()
pyjktebop.make_bins(ph_array, mag_array, n_bin=1000, min_in_bin=8)

Convert phase and magnitude array into binned phase and magnitude arrays

pyjktebop.wrap_phase(phase_array)

Convert phase array from (0,1) to (-0.5,0.5)