def get_filename_pair(filename):
    """
    Given one *.spar/*.sdat filename, returns tuple with both filenames
    It doesn't matter if the filename is a fully qualified path or not.
    - one assumption, the extension are either all caps or all lower

    """
    spar_filename = sdat_filename = filename[:-3]
    if filename[-1:].isupper():
        sdat_filename += 'DAT'
        spar_filename += 'PAR'
    else:
        sdat_filename += 'dat'
        spar_filename += 'par'

    return (spar_filename, sdat_filename)