Lv3_Z2_stat.py
def niextract(eventfile,E1,E2):
    """
    Doing energy cuts only for the rate cut event file!

    eventfile - event file name
    E1 - lower energy bound (should be in a 4-digit PI string)
    E2 - upper energy bound (should be in a 4-digit PI string)
    """
    new_event = eventfile[:-4] + '_' + E1 + '-' + E2 + '.evt'
    subprocess.check_call(['niextract-events',eventfile+'[PI='+str(int(E1))+':'+str(int(E2))+']',new_event])

    return

    Doing energy cuts only for the rate cut event file!

    eventfile - event file name
    E1 - lower energy bound (should be in a 4-digit PI string)
    E2 - upper energy bound (should be in a 4-digit PI string)
    
Doing energy cuts only for the rate cut event file.
Doing energy cuts only for the rate cut event file .
def niextract(eventfile,E1,E2):
    new_event = eventfile[:-4] + '_' + E1 + '-' + E2 + '.evt'
    subprocess.check_call(['niextract-events',eventfile+'[PI='+str(int(E1))+':'+str(int(E2))+']',new_event])
    return
def niextract ( eventfile , E1 , E2 ) : new_event = eventfile [ : - 4 ] + '_' + E1 + '-' + E2 + '.evt' subprocess . check_call ( [ 'niextract-events' , eventfile + '[PI=' + str ( int ( E1 ) ) + ':' + str ( int ( E2 ) ) + ']' , new_event ] ) return
Doing energy cuts only for the rate cut event file!
Doing energy cuts only for the rate cut event file!
"""
    Doing energy cuts only for the rate cut event file!

    eventfile - event file name
    E1 - lower energy bound (should be in a 4-digit PI string)
    E2 - upper energy bound (should be in a 4-digit PI string)
    """
eventfile
E1
E2