def removeBaseAndExtension(filename):
    bname = basename(filename)
    root,ext = splitext(bname)
    return(root)
removes path as well as extension from filename
dataset/ETHPy150Open Mouse-Imaging-Centre/pydpiper/pydpiper/file_handling.py/removeBaseAndExtension