Lv2_merged_pulse_methods.py
def plot_pf(merging,data_id,E_trunc,PI1,PI2,pulse_pars,no_phase_bins):
    """
    Extracts the time series from the demodulated merged event file, and creates
    the pulse profile from Lv2_phase.py!

    merging - True/False - whether to use merged data
    data_id - 10-digit ObsID or 6-digit ID for the merged event file
    E_trunc - True/False - whether to do energy truncation
    PI1 - lower bound of PI (not energy in keV!) desired for the energy range
    PI2 - upper bound of PI (not energy in keV!) desired for the energy range
    pulse_pars - parameters corresponding to the pulse
    no_phase_bins - number of phase bins desired
    """
    if type(data_id) != str:
        raise TypeError("data_id should be a string!")
    if len(data_id) != 6 and len(data_id) != 10:
        raise ValueError("data_id should have 6 or 10 digits in the string!")
    if E_trunc != True and E_trunc != False:
        raise ValueError("E_trunc (energy truncation) should either be True or False!")
    if type(pulse_pars) != list and type(pulse_pars) != np.ndarray:
        raise TypeError("pulse_pars should either be a list or an array!")

    phase_bins,summed_profile = pulse_profile(merging,data_id,E_trunc,PI1,PI2,pulse_pars,no_phase_bins)

    plt.figure()
    plt.step(phase_bins[:-1],summed_profile)
    plt.xlabel('Phase', fontsize=12)
    plt.ylabel('Count/s',fontsize=12)
    plt.show()

    return

    Extracts the time series from the demodulated merged event file, and creates
    the pulse profile from Lv2_phase.py!

    merging - True/False - whether to use merged data
    data_id - 10-digit ObsID or 6-digit ID for the merged event file
    E_trunc - True/False - whether to do energy truncation
    PI1 - lower bound of PI (not energy in keV!) desired for the energy range
    PI2 - upper bound of PI (not energy in keV!) desired for the energy range
    pulse_pars - parameters corresponding to the pulse
    no_phase_bins - number of phase bins desired
    
Extracts the time series from the demodulated merged event file, and creates
the pulse profile from Lv2_phase.py!


Extracts the time series from the demodulated merged event file and creates the pulse profile from Lv2_phase . py!
def plot_pf(merging,data_id,E_trunc,PI1,PI2,pulse_pars,no_phase_bins):
    if type(data_id) != str:
        raise TypeError("data_id should be a string!")
    if len(data_id) != 6 and len(data_id) != 10:
        raise ValueError("data_id should have 6 or 10 digits in the string!")
    if E_trunc != True and E_trunc != False:
        raise ValueError("E_trunc (energy truncation) should either be True or False!")
    if type(pulse_pars) != list and type(pulse_pars) != np.ndarray:
        raise TypeError("pulse_pars should either be a list or an array!")
    phase_bins,summed_profile = pulse_profile(merging,data_id,E_trunc,PI1,PI2,pulse_pars,no_phase_bins)
    plt.figure()
    plt.step(phase_bins[:-1],summed_profile)
    plt.xlabel('Phase', fontsize=12)
    plt.ylabel('Count/s',fontsize=12)
    plt.show()
    return
def plot_pf ( merging , data_id , E_trunc , PI1 , PI2 , pulse_pars , no_phase_bins ) : if type ( data_id ) != str : raise TypeError ( "data_id should be a string!" ) if len ( data_id ) != 6 and len ( data_id ) != 10 : raise ValueError ( "data_id should have 6 or 10 digits in the string!" ) if E_trunc != True and E_trunc != False : raise ValueError ( "E_trunc (energy truncation) should either be True or False!" ) if type ( pulse_pars ) != list and type ( pulse_pars ) != np . ndarray : raise TypeError ( "pulse_pars should either be a list or an array!" ) phase_bins , summed_profile = pulse_profile ( merging , data_id , E_trunc , PI1 , PI2 , pulse_pars , no_phase_bins ) plt . figure ( ) plt . step ( phase_bins [ : - 1 ] , summed_profile ) plt . xlabel ( 'Phase' , fontsize = 12 ) plt . ylabel ( 'Count/s' , fontsize = 12 ) plt . show ( ) return
Extracts the time series from the demodulated merged event file, and creates
the pulse profile from Lv2_phase.py!
Extracts the time series from the demodulated merged event file and creates the pulse profile from Lv2_phase . py!
"""
    Extracts the time series from the demodulated merged event file, and creates
    the pulse profile from Lv2_phase.py!

    merging - True/False - whether to use merged data
    data_id - 10-digit ObsID or 6-digit ID for the merged event file
    E_trunc - True/False - whether to do energy truncation
    PI1 - lower bound of PI (not energy in keV!) desired for the energy range
    PI2 - upper bound of PI (not energy in keV!) desired for the energy range
    pulse_pars - parameters corresponding to the pulse
    no_phase_bins - number of phase bins desired
    """
merging
data_id
E_trunc
PI1
PI2
pulse_pars
no_phase_bins