docs: def initialize_CART_rot(self, s):
          """
          Sets current specimen to s and calculates the data necessary to plot
          the specimen plots (zijderveld, specimen eqarea, M/M0)
  
          Parameters
          ----------
          s: specimen to set as the GUI's current specimen
          """
          self.s = s  # only place in code where self.s is to be set directly
          if self.orthogonal_box.GetValue() == "X=East":
              self.ORTHO_PLOT_TYPE = 'E-W'
          elif self.orthogonal_box.GetValue() == "X=North":
              self.ORTHO_PLOT_TYPE = 'N-S'
          elif self.orthogonal_box.GetValue() == "X=best fit line dec":
              self.ORTHO_PLOT_TYPE = 'PCA_dec'
          else:
              self.ORTHO_PLOT_TYPE = 'ZIJ'
          if self.COORDINATE_SYSTEM == 'geographic':
              # self.CART_rot=self.Data[self.s]['zij_rotated_geo']
              self.zij = array(self.Data[self.s]['zdata_geo'])
              self.zijblock = self.Data[self.s]['zijdblock_geo']
          elif self.COORDINATE_SYSTEM == 'tilt-corrected':
              # self.CART_rot=self.Data[self.s]['zij_rotated_tilt']
              self.zij = array(self.Data[self.s]['zdata_tilt'])
              self.zijblock = self.Data[self.s]['zijdblock_tilt']
          else:
              # self.CART_rot=self.Data[self.s]['zij_rotated']
              self.zij = array(self.Data[self.s]['zdata'])
              self.zijblock = self.Data[self.s]['zijdblock']
  
          if self.COORDINATE_SYSTEM == 'geographic':
              if self.ORTHO_PLOT_TYPE == 'N-S':
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata_geo'], 0.)
              elif self.ORTHO_PLOT_TYPE == 'E-W':
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata_geo'], 90.)
              elif self.ORTHO_PLOT_TYPE == 'PCA_dec':
                  if 'specimen_dec' in list(self.current_fit.pars.keys()) and type(self.current_fit.pars['specimen_dec']) != str:
                      self.CART_rot = Rotate_zijderveld(
                          self.Data[self.s]['zdata_geo'], self.current_fit.pars['specimen_dec'])
                  else:
                      self.CART_rot = Rotate_zijderveld(self.Data[self.s]['zdata_geo'], pmag.cart2dir(
                          self.Data[self.s]['zdata_geo'][0])[0])
              else:
                  self.CART_rot = Rotate_zijderveld(self.Data[self.s]['zdata_geo'], pmag.cart2dir(
                      self.Data[self.s]['zdata_geo'][0])[0])
  
          elif self.COORDINATE_SYSTEM == 'tilt-corrected':
              if self.ORTHO_PLOT_TYPE == 'N-S':
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata_tilt'], 0.)
              elif self.ORTHO_PLOT_TYPE == 'E-W':
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata_tilt'], 90)
              elif self.ORTHO_PLOT_TYPE == 'PCA_dec':
                  if 'specimen_dec' in list(self.current_fit.pars.keys()) and type(self.current_fit.pars['specimen_dec']) != str:
                      self.CART_rot = Rotate_zijderveld(
                          self.Data[self.s]['zdata_tilt'], self.current_fit.pars['specimen_dec'])
                  else:
                      self.CART_rot = Rotate_zijderveld(self.Data[self.s]['zdata_tilt'], pmag.cart2dir(
                          self.Data[self.s]['zdata_tilt'][0])[0])
              else:
                  self.CART_rot = Rotate_zijderveld(self.Data[self.s]['zdata_tilt'], pmag.cart2dir(
                      self.Data[self.s]['zdata_tilt'][0])[0])
          else:
              if self.ORTHO_PLOT_TYPE == 'N-S':
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata'], 0.)
              elif self.ORTHO_PLOT_TYPE == 'E-W':
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata'], 90)
              elif self.ORTHO_PLOT_TYPE == 'PCA_dec':
                  if 'specimen_dec' in list(self.current_fit.pars.keys()) and type(self.current_fit.pars['specimen_dec']) != str:
                      self.CART_rot = Rotate_zijderveld(
                          self.Data[self.s]['zdata'], self.current_fit.pars['specimen_dec'])
                  else:  # Zijderveld
                      self.CART_rot = Rotate_zijderveld(
                          self.Data[self.s]['zdata'], pmag.cart2dir(self.Data[self.s]['zdata'][0])[0])
  
              else:  # Zijderveld
                  self.CART_rot = Rotate_zijderveld(
                      self.Data[self.s]['zdata'], pmag.cart2dir(self.Data[self.s]['zdata'][0])[0])
  
          self.zij_norm = array([row/sqrt(sum(row**2)) for row in self.zij])
  
          # remove bad data from plotting:
          self.CART_rot_good = []
          self.CART_rot_bad = []
          for i in range(len(self.CART_rot)):
              if self.Data[self.s]['measurement_flag'][i] == 'g':
                  self.CART_rot_good.append(list(self.CART_rot[i]))
              else:
                  self.CART_rot_bad.append(list(self.CART_rot[i]))
  
          self.CART_rot = array(self.CART_rot)
          self.CART_rot_good = array(self.CART_rot_good)
          self.CART_rot_bad = array(self.CART_rot_bad)