def read_voltages(self, voltage_file):
        """import voltages from a volt.dat file

        Parameters
        ----------
        voltage_file : string
            Path to volt.dat file
        """

        measurements_raw = np.loadtxt(
            voltage_file,
            skiprows=1,
        )
        measurements = np.atleast_2d(measurements_raw)

        # extract measurement configurations
        A = (measurements[:, 0] / 1e4).astype(int)
        B = (measurements[:, 0] % 1e4).astype(int)
        M = (measurements[:, 1] / 1e4).astype(int)
        N = (measurements[:, 1] % 1e4).astype(int)
        ABMN = np.vstack((A, B, M, N)).T

        if self.configs.configs is None:
            self.configs.configs = ABMN
        else:
            # configurations don't match
            if not np.all(ABMN == self.configs.configs):
                for nr, (old_config, new_config) in enumerate(zip(
                        self.configs.configs, ABMN)):

                    if np.all(old_config == new_config):
                        continue
                    # check polarity
                    current_electrodes_are_equal = np.all(
                        old_config[0:2] == new_config[0:2]
                    )
                    voltage_electrodes_are_switched = np.all(
                        old_config[2:4] == new_config[4:1:-1]
                    )

                    if(current_electrodes_are_equal and
                       voltage_electrodes_are_switched):

                        if len(self.configs.measurements.keys()) > 0:
                            raise Exception(
                                'need to switch electrode polarity, but ' +
                                'there are already measurements stored for ' +
                                'the old configuration!')
                        else:
                            # switch M/N in configurations
                            self.configs.configs[nr, :] = new_config
                    else:
                        raise Exception(
                            'There was an error matching configurations of ' +
                            'voltages with configurations already imported'
                        )

        # add measurements to the config instance
        mid_mag = self.configs.add_measurements(
            measurements[:, 2]
        )
        mid_pha = self.configs.add_measurements(
            measurements[:, 3]
        )

        self.assignments['measurements'] = [mid_mag, mid_pha]
import voltages from a volt.dat file

        Parameters
        ----------
        voltage_file : string
            Path to volt.dat file