def calcZBpRp(G):
gatefloor=power(<NUM_LIT>,<NUM_LIT>*(<NUM_LIT>-<NUM_LIT>))<EOL>if isscalar(G):<EOL><INDENT>result=amax((gatefloor,power(<NUM_LIT>,<NUM_LIT>*(G-<NUM_LIT>))))<EOL><DEDENT>else :<EOL><INDENT>result=power(<NUM_LIT>,<NUM_LIT>*(G-<NUM_LIT>))<EOL>indices=(result<gatefloor)<EOL>result[indices]=gatefloor<EOL><DEDENT>return result<EOL>
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.