def setup_normalisation(df_samplenames, df_allp):
    """ Sets up the normalisation of data for that experiment relative to a control.

    Checks to see that a single sample is labelled TRUE for "standard for normalisation?" in the settings file.

    Parameters
    ----------
    df_samplenames : pandas DataFrame
        Dataframe containing the samplenames and column identifying the sample for normalisation.
    df_allp : pandas Dataframe
        Dataframe for all individual EC50 datapoints from all experiments marked as "TRUE" in the run_gatherer
        column of the settings file. Includes individual values for samples found twice in a single experiment.
        index : unique sample numbers (sSnum)
        columns: experiment names (e.g. "Mon_23.05", "Tue_24.05", "Wed_25.05")
        values : EC50 values, or lists of EC50 values as strings

    Returns
    -------
    conduct_normalisation : boolean
        If True, all necessary requirements for normalisation OF THAT DATASET are found, and it should proceed.
    list_norm_datasets : list
        Suffix for the datasets, e.g. ["", "_normalised"] if conduct_normalisation is True
        If conduct_normalisation is False, will contain a suffix for a single, non-normalised dataset, [""]
    """
    dataset_contains_samples_in_settings_file = bool(set(df_allp.longname).
        intersection(set(df_samplenames.index)))
    if dataset_contains_samples_in_settings_file:
        samplenames_selected = df_samplenames.loc[(df_allp.longname), :]
        if True in list(samplenames_selected['standard for normalisation?']):
            n_standards_labelled_as_True = samplenames_selected[
                'standard for normalisation?'].value_counts()[True]
            if n_standards_labelled_as_True == 1:
                conduct_normalisation = True
                list_norm_datasets = ['', '_normalised']
            elif n_standards_labelled_as_True > 1:
                raise ValueError(
                    'Multiple samples are labelled as standards for normalisation. Only a single sample can be labelled as a standard.Please check the samplenames tab of your settings file.'
                    )
        else:
            conduct_normalisation = False
            list_norm_datasets = ['']
    else:
        conduct_normalisation = False
        list_norm_datasets = ['']
        print(
            """Note: Full sample names were used in the output graphs. 
      If you want to shorten sample names, normalise to a control,       or reorder samples in the output graph, please check the samples tab of the settings file."""
            )
    return conduct_normalisation, list_norm_datasets
