def PIPELINE(path):
    """The **OASIS Pipeline**. Runs all **OASIS** functions in succession.
    
    :param str path: Path of data file tree (contains the **configs**, **data**, **psf**, **residuals**, **sources**, **templates** directories). Use a comma-separated list for mapping to multiple datasets.
    :returns: All-in-one difference imaging pipeline. Raw science images are placed in the **data** directory, and residual images and source catalogs are outputted into the **residuals** and **sources** directories, respectively.
    
    """
    import align_astroalign
    from ref_image import ref_image
    import combine_swarp
    import extract
    import check_saturation
    import subtract
    import mask
    import sys
    import psf
    import MR
    import os
    import time
    import initialize
    paths = path.replace(' ', '').split(',')
    del path
    for path in paths:
        startTime = time.time()
        if os.path.exists(path) == True:
            initialize.create(path)
            location = path + '/data'
            ref_image(location)
            align_astroalign.align2(location)
            mask.MASK(path)
            print('-> Combining images using swarp method...')
            psf.PSF(path)
            combine_swarp.swarp(location)
            psf.PSF(path)
            print('\n-> Subtracting images...')
            subtract.SUBTRACT(path)
            print('-> Running SExtractor on residuals...')
            extract.EXTRACT(path, method='indiv')
            MR.MR(path)
            extract.EXTRACT(path, method='MR')
            endTime = time.time()
            print('-> Finished!\n-> Total runtime: %.2f seconds\n' % (
                endTime - startTime))
        else:
            print(
                """
-> Error: Unknown path entered
-> Please enter the path to an existing exposure time directory
-> Exiting...
"""
                )
            sys.exit()
