def get_atlas_name(template_name, ids, model, free_text):
    """
    input:
        template_name: name of template atlas
        ids: an AnalysisIds object matching the one used in the main notebook
        model: an instance of Model
        free_text: arbitrary string to append to atlas name
    returns the name of the production atlas
    """
    prod_name = template_name.replace("TPL", "PRD")
    prod_atlas_name = f"{prod_name}_{model.name}_{ids.project}_{ids.analysis}"
    if free_text != "":
        prod_atlas_name += f"_{free_text}"
    return prod_atlas_name