PulsarAnalysis#
- class ptiming_ana.phaseogram.PulsarAnalysis(filename=None, nbins=50, tint=3600, binned=True, model='dgaussian')#
Bases:
object
MAIN CLASS FOR THE PULSAR ANALYSIS. A class to store the pulsar phases and mjd_times to be used in the Pulsar analysis. This class allows to develop all the timing pular analysis using different supporting classes and subclasses.
- Parameters:
- dataframedataframe containing info
DL2 LST file after the quality selection. Set daraframe to False if it is not available and want to set the attributes manually.
- pdataList of float
List of phases (in case no dataframe is available).
- ptimes: List of float
List of mjd times (in case no dataframe is available).
- tobservation: float
Total effective time of observation
- peak_limits_1: tuple
Edges of the first peak. Set to None if no P1 is present.
- peak_limits_2: tuple
Edges of the second peak. Set to None if no P2 is present.
- off_limits: tuple
Edges of the OFF region
- binned: boolean
True for a binned fitting, False for an unbinned fitting.
- Attributes:
- phaseslist of float
List of pulsar phases.
- timeslist of float
List of mjd times
- tobsfloat
Effective time of observation in hours
- regions: PhaseRegions object
Information of the OFF/signal regions
- histogram: Lightcurve object
Information of the phaseogram
- stats: PeriodicityTest object
Information of Statistical Tests for searching Periodicity
- fitting: PeakFitting object
Information abot the fitting used for the peaks
Methods Summary
draw_phaseogram
([phase_limits, stats, ...])execute_stats
(tobs)run
()save_df
(output_file[, file_format])save_object
(output_file)save_results
([output_file])setBackgroundLimits
(OFF_limits)setBinning
(nbins[, xmin, xmax])setDL3InputFile
([dirname, target_radec, ...])setEnergybinning
(energy_edges, do_diff, ...)setFermiInputFile
(filename)setFittingParams
(model[, binned, peak, do_fit])setLSTInputFile
([filename, dirname, src_dep])setListsInput
(plist[, tlist, elist, tel, ...])setParamCuts
([gammaness_cut, alpha_cut, ...])setPeaklimits
([P1_limits, P2_limits, P3_limits])setTimeInterval
(tint)set_config
(configuration_file)shift_phases
(xmin)show_EnergyAna
([integral])show_EnergyFitresults
([integral])show_EnergyPresults
([integral])show_FWHMVsEnergy
([integral])show_P1P2VsEnergy
([integral])show_SigVsEnergy
([integral])show_all_fits
([integral])show_all_lc
([ylimits])show_lcVsEnergy
([integral])show_meanVsEnergy
([integral])Methods Documentation
- check_energyana()#
- draw_phaseogram(phase_limits=[0, 2], stats='short', background=True, signal=['P1', 'P2', 'P3'], colorhist='xkcd:sky blue', colorb='black', colorP=['orange', 'green', 'purple'], colorfit='red', fit=False, hline=True)#
- execute_stats(tobs)#
- init_regions()#
- initialize()#
- run()#
- save_df(output_file, file_format='h5')#
- save_object(output_file)#
- save_results(output_file=None)#
- setBackgroundLimits(OFF_limits)#
- setBinning(nbins, xmin=None, xmax=None)#
- setDL3InputFile(dirname=None, target_radec=None, max_rad=0.2, zd_cuts=[0, 60], energy_dependent_theta=True)#
- setEnergybinning(energy_edges, do_diff, do_integral)#
- setFermiInputFile(filename)#
- setFittingParams(model, binned=False, peak='both', do_fit=True)#
- setLSTInputFile(filename=None, dirname=None, src_dep=False)#
- setListsInput(plist, tlist=None, elist=None, tel='MAGIC', energy_units='GeV')#
- setParamCuts(gammaness_cut=None, alpha_cut=None, theta2_cut=None, zd_cut=None, int_cut=None, energy_cut=None, energy_binning_cut=None)#
- setPeaklimits(P1_limits=None, P2_limits=None, P3_limits=None)#
- setTimeInterval(tint)#
- set_config(configuration_file)#
- shift_phases(xmin)#
- show_EnergyAna(integral=None)#
- show_EnergyFitresults(integral=None)#
- show_EnergyPresults(integral=None)#
- show_FWHMVsEnergy(integral=None)#
- show_P1P2VsEnergy(integral=None)#
- show_Presults()#
- show_SigVsEnergy(integral=None)#
- show_all_fits(integral=None)#
- show_all_lc(ylimits=None)#
- show_fit_results()#
- show_lcVsEnergy(integral=None)#
- show_meanVsEnergy(integral=None)#
- show_timeEvolution()#
- update_info()#