def convert_and_combine_2_to_3(dtype, map_dict, input_dir=".", output_dir=".", data_model=None):
    """
    Read in er_*.txt file and pmag_*.txt file in working directory.
    Combine the data, then translate headers from 2.5 --> 3.0.
    Last, write out the data in 3.0.

    Parameters
    ----------
    dtype : string for input type (specimens, samples, sites, etc.)
    map_dict : dictionary with format {header2_format: header3_format, ...} (from mapping.map_magic module)
    input_dir : input directory, default "."
    output_dir : output directory, default "."
    data_model : data_model3.DataModel object, default None

    Returns
    ---------
    output_file_name with 3.0 format data (or None if translation failed)
    """
    # read in er_ data & make DataFrame
    er_file = os.path.join(input_dir, 'er_{}.txt'.format(dtype))
    er_data, er_dtype = magic_read(er_file)
    if len(er_data):
        er_df = pd.DataFrame(er_data)
        if dtype == 'ages':
            pass
            # remove records with blank ages
            #er_data = get_dictitem(er_data, 'age', '', "F")
            #er_df = pd.DataFrame(er_data)
        else:
            er_df.index = er_df['er_{}_name'.format(dtype[:-1])]
    else:
        er_df = pd.DataFrame()
    #
    if dtype == 'ages':
        full_df = er_df
    else:
        # read in pmag_ data & make DataFrame
        pmag_file = os.path.join(input_dir, 'pmag_{}.txt'.format(dtype))
        pmag_data, pmag_dtype = magic_read(pmag_file)
        if len(pmag_data):
            pmag_df = pd.DataFrame(pmag_data)
            pmag_df.index = pmag_df['er_{}_name'.format(dtype[:-1])]
        else:
            pmag_df = pd.DataFrame()
        # combine the two Dataframes
        full_df = pd.concat([er_df, pmag_df], sort=True)
        # sort the DataFrame so that all records from one item are together
        full_df.sort_index(inplace=True)

    # fix the column names to be 3.0
    full_df.rename(columns=map_dict, inplace=True)
    # create a MagicDataFrame object, providing the dataframe and the data type
    new_df = cb.MagicDataFrame(dtype=dtype, df=full_df, dmodel=data_model)
    # write out the data to file
    if len(new_df.df):
        new_df.write_magic_file(dir_path=output_dir)
        return dtype + ".txt"
    else:
        print("-I- No {} data found.".format(dtype))
        return None