pygaia/errors/utils.py
def calcZBpRp(G):
  """
  Calculate the value for the parameter z in the formula for the BP and RP magnitude errors as a
  function of G and (V-I).

  Parameters
  ----------
  
  G - Value of G-band magnitude.

  Returns
  -------
  
  Value of z for BP/RP.
  """
  gatefloor=power(10.0,0.4*(11.0-15.0))
  if isscalar(G):
   result=amax((gatefloor,power(10.0,0.4*(G-15.0))))
  else :
    result=power(10.0,0.4*(G-15.0))
    indices=(result<gatefloor)
    result[indices]=gatefloor
  return result
def calcZBpRp(G):
  """
  Calculate the value for the parameter z in the formula for the BP and RP magnitude errors as a
  function of G and (V-I).

  Parameters
  ----------
  
  G - Value of G-band magnitude.

  Returns
  -------
  
  Value of z for BP/RP.
  """
  gatefloor=power(10.0,0.4*(11.0-15.0))
  if isscalar(G):
   result=amax((gatefloor,power(10.0,0.4*(G-15.0))))
  else :
    result=power(10.0,0.4*(G-15.0))
    indices=(result<gatefloor)
    result[indices]=gatefloor
  return result
def calcZBpRp ( G ) : gatefloor = power ( 10.0 , 0.4 * ( 11.0 - 15.0 ) ) if isscalar ( G ) : result = amax ( ( gatefloor , power ( 10.0 , 0.4 * ( G - 15.0 ) ) ) ) else : result = power ( 10.0 , 0.4 * ( G - 15.0 ) ) indices = ( result < gatefloor ) result [ indices ] = gatefloor return result
Calculate the value for the parameter z in the formula for the BP and RP magnitude errors as a
  function of G and (V-I).

  Parameters
  ----------
  
  G - Value of G-band magnitude.

  Returns
  -------
  
  Value of z for BP/RP.
Calculate the value for the parameter z in the formula for the BP and RP magnitude errors as a function of G and ( V - I ) .