def find_scan_info(filename,  position = '__P', scan = '__S', date = '____'):
    """
    Find laser position and scan number by looking at the file name
    """
    try:
        file = filename.split(position, 2)

        file = file[1].split(scan, 2)
        laser_position = file[0]

        file = file[1].split(date, 2)
        scan_number = file[0]
    except IndexError:
        laser_position = -1
        scan_number = -1

    return laser_position, scan_number