Lv3_Z2_stat.py
def call_photonphase(obsid,model,par_file):
    """
    Calls photonphase from PINT to calculate the phase value for each event.

    obsid - Observation ID of the object of interest (10-digit str)
    model - binary model being used (ELL1, BT, DD, or DDK for now)
    par_file - orbital parameter file for input into PINT's photonphase
    """
    filename = Lv0_dirs.NICERSOFT_DATADIR + obsid + '_pipe/cleanfilt.evt'
    orbfile = Lv0_dirs.NICERSOFT_DATADIR + obsid + '_pipe/ni' + obsid + '.orb'

    if model == '':
        outfile_name = filename[:-4] + '_phase.evt'
    if model != 'ELL1' and model != 'BT' and model != 'DD' and model != 'DDK':
        raise ValueError("The model should be one of ELL1, BT, DD, or DDK! Update if a new model has been added to PINT.")
    else:
        outfile_name = filename[:-4] + '_phase_' + model + '.evt'

    subprocess.check_call(['photonphase',filename,par_file,'--orbfile',orbfile,'--addphase','--barytime','--outfile',outfile_name])

    return

    Calls photonphase from PINT to calculate the phase value for each event.

    obsid - Observation ID of the object of interest (10-digit str)
    model - binary model being used (ELL1, BT, DD, or DDK for now)
    par_file - orbital parameter file for input into PINT's photonphase
    
Calls photonphase from PINT to calculate the phase value for each event.
obsid - Observation ID of the object of interest (10-digit str)
model - binary model being used (ELL1, BT, DD, or DDK for now)
par_file - orbital parameter file for input into PINT's photonphase
Calls photonphase from PINT to calculate the phase value for each event . obsid - Observation ID of the object of interest ( 10 - digit str ) model - binary model being used ( ELL1 BT DD or DDK for now ) par_file - orbital parameter file for input into PINT ' s photonphase
def call_photonphase(obsid,model,par_file):
    filename = Lv0_dirs.NICERSOFT_DATADIR + obsid + '_pipe/cleanfilt.evt'
    orbfile = Lv0_dirs.NICERSOFT_DATADIR + obsid + '_pipe/ni' + obsid + '.orb'
    if model == '':
        outfile_name = filename[:-4] + '_phase.evt'
    if model != 'ELL1' and model != 'BT' and model != 'DD' and model != 'DDK':
        raise ValueError("The model should be one of ELL1, BT, DD, or DDK! Update if a new model has been added to PINT.")
    else:
        outfile_name = filename[:-4] + '_phase_' + model + '.evt'
    subprocess.check_call(['photonphase',filename,par_file,'--orbfile',orbfile,'--addphase','--barytime','--outfile',outfile_name])
    return
def call_photonphase ( obsid , model , par_file ) : filename = Lv0_dirs . NICERSOFT_DATADIR + obsid + '_pipe/cleanfilt.evt' orbfile = Lv0_dirs . NICERSOFT_DATADIR + obsid + '_pipe/ni' + obsid + '.orb' if model == '' : outfile_name = filename [ : - 4 ] + '_phase.evt' if model != 'ELL1' and model != 'BT' and model != 'DD' and model != 'DDK' : raise ValueError ( "The model should be one of ELL1, BT, DD, or DDK! Update if a new model has been added to PINT." ) else : outfile_name = filename [ : - 4 ] + '_phase_' + model + '.evt' subprocess . check_call ( [ 'photonphase' , filename , par_file , '--orbfile' , orbfile , '--addphase' , '--barytime' , '--outfile' , outfile_name ] ) return
Calls photonphase from PINT to calculate the phase value for each event.
Calls photonphase from PINT to calculate the phase value for each event .
"""
    Calls photonphase from PINT to calculate the phase value for each event.

    obsid - Observation ID of the object of interest (10-digit str)
    model - binary model being used (ELL1, BT, DD, or DDK for now)
    par_file - orbital parameter file for input into PINT's photonphase
    """
obsid
model
par_file