def calc_and_plot_sample_orient_check(self):
        """
        If sample orientation is on plots the wrong arrow, wrong compass,
        and rotated sample error directions for the current specimen
        interpretation on the high level mean plot so that you can check
        sample orientation good/bad.
        """
        fit = self.current_fit
        if fit == None:
            return
        pars = fit.get('specimen')
        if 'specimen_dec' not in list(pars.keys()) or 'specimen_inc' not in list(pars.keys()):
            fit.put(self.s, 'specimen', self.get_PCA_parameters(
                self.s, fit, fit.tmin, fit.tmax, 'specimen', fit.PCA_type))
            pars = fit.get('specimen')
            if not pars:
                self.user_warning(
                    "could not calculate fit %s for specimen %s in specimen coordinate system while checking sample orientation please check data" % (fit.name, self.s))
                return
        dec, inc = pars['specimen_dec'], pars['specimen_inc']
        sample = self.Data_hierarchy['sample_of_specimen'][self.s]
        if sample not in list(self.Data_info["er_samples"].keys()) or "sample_azimuth" not in list(self.Data_info["er_samples"][sample].keys()) or "sample_dip" not in list(self.Data_info["er_samples"][sample].keys()):
            self.user_warning(
                "Could not display sample orientation checks because sample azimuth or sample dip is missing from er_samples table for sample %s" % sample)
            self.check_orient_on = False  # stop trying because this raises a ton of warnings
            return
        try:
            azimuth = float(self.Data_info["er_samples"][sample]['sample_azimuth'])
            dip = float(self.Data_info["er_samples"][sample]['sample_dip'])
        except TypeError:
            self.user_warning(
                "Could not display sample orientation checks because azimuth or dip is missing (or invalid) for sample %s" % sample)
            self.check_orient_on = False # stop trying because this raises a ton of warnings
            return

        # first test wrong direction of drill arrows (flip drill direction in opposite direction and re-calculate d,i)
        d, i = pmag.dogeo(dec, inc, azimuth-180., -dip)
        XY = pmag.dimap(d, i)
        if i > 0:
            FC = fit.color
            SIZE = 15*self.GUI_RESOLUTION
        else:
            FC = 'white'
            SIZE = 15*self.GUI_RESOLUTION
        self.high_level_eqarea.scatter([XY[0]], [
                                       XY[1]], marker='^', edgecolor=fit.color, facecolor=FC, s=SIZE, lw=1, clip_on=False)
        if self.ie_open:
            self.ie.scatter([XY[0]], [XY[1]], marker='^', edgecolor=fit.color,
                            facecolor=FC, s=SIZE, lw=1, clip_on=False)
        # Then test wrong end of compass (take az-180.)
        d, i = pmag.dogeo(dec, inc, azimuth-180., dip)
        XY = pmag.dimap(d, i)
        if i > 0:
            FC = fit.color
            SIZE = 15*self.GUI_RESOLUTION
        else:
            FC = 'white'
            SIZE = 15*self.GUI_RESOLUTION
        self.high_level_eqarea.scatter([XY[0]], [
                                       XY[1]], marker='v', edgecolor=fit.color, facecolor=FC, s=SIZE, lw=1, clip_on=False)
        if self.ie_open:
            self.ie.scatter([XY[0]], [XY[1]], marker='v', edgecolor=fit.color,
                            facecolor=FC, s=SIZE, lw=1, clip_on=False)
        # did the sample spin in the hole?
        # now spin around specimen's z
        X_up, Y_up, X_d, Y_d = [], [], [], []
        for incr in range(0, 360, 5):
            d, i = pmag.dogeo(dec+incr, inc, azimuth, dip)
            XY = pmag.dimap(d, i)
            if i >= 0:
                X_d.append(XY[0])
                Y_d.append(XY[1])
            else:
                X_up.append(XY[0])
                Y_up.append(XY[1])
        self.high_level_eqarea.scatter(
            X_d, Y_d, marker='.', color=fit.color, alpha=.5, s=SIZE/2, lw=1, clip_on=False)
        self.high_level_eqarea.scatter(
            X_up, Y_up, marker='.', color=fit.color, s=SIZE/2, lw=1, clip_on=False)
        if self.ie_open:
            self.ie.scatter(X_d, Y_d, marker='.', color=fit.color,
                            alpha=.5, s=SIZE/2, lw=1, clip_on=False)
            self.ie.scatter(X_up, Y_up, marker='.',
                            color=fit.color, s=SIZE/2, lw=1, clip_on=False)