Lv3_quicklook.py
def filtering(eventfile,outfile,maskdet,eventflags):
    """
    Function that will filter out bad detectors and impose eventflag restrictions.
    Will expect to add to this function over time...

    eventfile - path to the event file. Will extract ObsID from this for the NICER files.
    outfile - output file from the filtering
    maskdet - list of DET_IDs to mask
    eventflags - NICER event flags to filter out (e.g., in the format '(EVENT_FLAGS==bx1x000)')
    """
    evfilt_expr = eventflags
    for i in range(len(maskdet)):
        evfilt_expr += '.and.(DET_ID!='+str(maskdet[i]) + ')'

    subprocess.run(['ftcopy',eventfile+'['+evfilt_expr+']',outfile,'clobber=yes','history=yes'])

    Function that will filter out bad detectors and impose eventflag restrictions.
    Will expect to add to this function over time...

    eventfile - path to the event file. Will extract ObsID from this for the NICER files.
    outfile - output file from the filtering
    maskdet - list of DET_IDs to mask
    eventflags - NICER event flags to filter out (e.g., in the format '(EVENT_FLAGS==bx1x000)')
    
Function that will filter out bad detectors and impose eventflag restrictions.
Will expect to add to this function over time

path to the event file. Will extract ObsID from this for the NICER files.
outfile - output file from the filtering
maskdet - list of DET_IDs to mask
eventflags - NICER event flags to filter out ')
Function that will filter out bad detectors and impose eventflag restrictions . Will expect to add to this function over time path to the event file . Will extract ObsID from this for the NICER files . outfile - output file from the filtering maskdet - list of DET_IDs to mask eventflags - NICER event flags to filter out ' )
def filtering(eventfile,outfile,maskdet,eventflags):
    evfilt_expr = eventflags
    for i in range(len(maskdet)):
        evfilt_expr += '.and.(DET_ID!='+str(maskdet[i]) + ')'
    subprocess.run(['ftcopy',eventfile+'['+evfilt_expr+']',outfile,'clobber=yes','history=yes'])
def filtering ( eventfile , outfile , maskdet , eventflags ) : evfilt_expr = eventflags for i in range ( len ( maskdet ) ) : evfilt_expr += '.and.(DET_ID!=' + str ( maskdet [ i ] ) + ')' subprocess . run ( [ 'ftcopy' , eventfile + '[' + evfilt_expr + ']' , outfile , 'clobber=yes' , 'history=yes' ] )
Function that will filter out bad detectors and impose eventflag restrictions.
Function that will filter out bad detectors and impose eventflag restrictions .
"""
    Function that will filter out bad detectors and impose eventflag restrictions.
    Will expect to add to this function over time...

    eventfile - path to the event file. Will extract ObsID from this for the NICER files.
    outfile - output file from the filtering
    maskdet - list of DET_IDs to mask
    eventflags - NICER event flags to filter out (e.g., in the format '(EVENT_FLAGS==bx1x000)')
    """
eventfile
outfile
maskdet
eventflags