docs: def LOS_CrossProj(VType, Ds, us, kPIns, kPOuts, kRMins,
                    Lplot='In', proj='All', multi=False):
      """ Compute the parameters to plot the poloidal projection of the LOS  """
      assert type(VType) is str and VType.lower() in ['tor','lin']
      assert Lplot.lower() in ['tot','in']
      assert type(proj) is str
      proj = proj.lower()
      assert proj in ['cross','hor','all','3d']
      assert Ds.ndim==2 and Ds.shape==us.shape
      nL = Ds.shape[1]
      k0 = kPIns if Lplot.lower()=='in' else np.zeros((nL,))
  
      if VType.lower()=='tor' and proj in ['cross','all']:
          CrossProjAng = np.arccos(np.sqrt(us[0,:]**2+us[1,:]**2)
                                   /np.sqrt(np.sum(us**2,axis=0)))
          nkp = np.ceil(25.*(1 - (CrossProjAng/(np.pi/4)-1)**2) + 2)
          ks = np.max([kRMins,kPIns],axis=0) if Lplot.lower()=='in' else kRMins
          pts0 = []
          if multi:
              for ii in range(0,nL):
                  if np.isnan(kPOuts[ii]):
                      pts0.append( np.array([[np.nan,np.nan],
                                             [np.nan,np.nan]]) )
                  else:
                      k = np.linspace(k0[ii],kPOuts[ii],nkp[ii],endpoint=True)
                      k = np.unique(np.append(k,ks[ii]))
                      pp = Ds[:,ii:ii+1] + k[np.newaxis,:]*us[:,ii:ii+1]
                      pts0.append( np.array([np.hypot(pp[0,:],pp[1,:]),pp[2,:]])  )
          else:
              for ii in range(0,nL):
                  if np.isnan(kPOuts[ii]):
                      pts0.append(np.array([[np.nan,np.nan,np.nan],
                                            [np.nan,np.nan,np.nan],
                                            [np.nan,np.nan,np.nan]]))
                  else:
                      k = np.linspace(k0[ii],kPOuts[ii],nkp[ii],endpoint=True)
                      k = np.append(np.unique(np.append(k,ks[ii])),np.nan)
                      pts0.append( Ds[:,ii:ii+1] + k[np.newaxis,:]*us[:,ii:ii+1] )
              pts0 = np.concatenate(tuple(pts0),axis=1)
              pts0 = np.array([np.hypot(pts0[0,:],pts0[1,:]),pts0[2,:]])
  
      if not (VType.lower()=='tor' and proj=='cross'):
          pts = []
          if multi:
              for ii in range(0,nL):
                  if np.isnan(kPOuts[ii]):
                      pts.append( np.array([[np.nan,np.nan],
                                            [np.nan,np.nan],
                                            [np.nan,np.nan]]) )
                  else:
                      k = np.array([k0[ii],kPOuts[ii]])
                      pts.append( Ds[:,ii:ii+1] + k[np.newaxis,:]*us[:,ii:ii+1] )
          else:
              for ii in range(0,nL):
                  if np.isnan(kPOuts[ii]):
                      pts.append(np.array([[np.nan,np.nan,np.nan],
                                           [np.nan,np.nan,np.nan],
                                           [np.nan,np.nan,np.nan]]))
                  else:
                      k = np.array([k0[ii],kPOuts[ii],np.nan])
                      pts.append( Ds[:,ii:ii+1] + k[np.newaxis,:]*us[:,ii:ii+1] )
              pts = np.concatenate(tuple(pts),axis=1)
  
      if proj=='hor':
          pts = [pp[:2,:] for pp in pts] if multi else pts[:2,:]
      elif proj=='cross':
          if VType.lower()=='tor':
              pts = pts0
          else:
              pts = [pp[1:,:] for pp in pts] if multi else pts[1:,:]
      elif proj=='all':
          if multi:
              if VType.lower()=='tor':
                  pts = [(p0,pp[:2,:]) for (p0,pp) in zip(*[pts0,pts])]
              else:
                  pts = (pts[1:,:],pts[:2,:])
          else:
              pts = (pts0,pts[:2,:]) if VType.lower()=='tor' else (pts[1:,:],pts[:2,:])
      return pts