PeakFitting#

class ptiming_ana.phaseogram.PeakFitting(binned, model, peak='both')#

Bases: object

Fit of the pulse profile to one of the models in ptiming_ana.phaseogram.models.

Parameters:
binnedbool

If True, a least-squares fit to the phaseogram is done. If False, an unbinned extended maximum likelihood fit to the list of phases is done.

modelstr

Name of the model. See get_model_list.

peak{“both”, “P1”, “P2”}

Peak(s) to fit. Models with a single peak need “P1” or “P2”, the rest of the models need “both”.

Attributes:
parnameslist of str

Name of the parameters of the model.

params, errorslist of float

Best-fit values and uncertainties, in the same order as parnames. The amplitudes are given in counts per phase bin times phase and the background in counts per phase bin, for both the binned and the unbinned fit.

df_resultpandas.DataFrame

Table with the result of the fit.

Methods Summary

check_fit_result()

check_model()

create_result_df()

est_initial_values(pulsar_phases)

fit_Binned(pulsar_phases)

Least-squares fit to the phaseogram (background fixed to the OFF level).

fit_ULmodel(pulsar_phases)

Unbinned extended maximum likelihood fit to the list of phases.

run(pulsar_phases)

show_result()

Methods Documentation

check_fit_result()#
check_model()#
create_result_df()#
est_initial_values(pulsar_phases)#
fit_Binned(pulsar_phases)#

Least-squares fit to the phaseogram (background fixed to the OFF level).

fit_ULmodel(pulsar_phases)#

Unbinned extended maximum likelihood fit to the list of phases.

run(pulsar_phases)#
show_result()#