code: def get_azpl(cdec, cinc, gdec, ginc):
      
      TOL = 1e-4
      rad = old_div(np.pi, 180.)
      Xp = dir2cart([gdec, ginc, 1.])
      X = dir2cart([cdec, cinc, 1.])
      # find plunge first
      az, pl, zdif, ang = 0., -90., 1., 360.
      while zdif > TOL and pl < 180.:
          znew = X[0] * np.sin(pl * rad) + X[2] * np.cos(pl * rad)
          zdif = abs(Xp[2] - znew)
          pl += .01
  
      while ang > 0.1 and az < 360.:
          d, i = dogeo(cdec, cinc, az, pl)
          ang = angle([gdec, ginc], [d, i])
          az += .01
      return az - .01, pl - .01
docs: gets azimuth and pl from specimen dec inc (cdec,cinc) and gdec,ginc (geographic)  coordinates