def get_imod_filename(path, extension, convention):
    """
    Return the filepath for an expected output file from an IMOD process, adjusting for
        filename convention.

    Args:
        path: The base filepath of the file
        extension: The file extension with the dot prefix, i.e. ".preali"
        convetion: Either "old" or "new", denoting the IMOD filename convention

    Returns: The output filepath
    """
    non_mrc_files = [".rawtlt", ".prexg", ".prexf"]
    if extension in non_mrc_files or convention == "old":
        return path + extension
    elif convention == "new":
        file_type = extension[1:]
        return f"{path}_{file_type}.mrc"