src/ztransform.c
float Vtoz(float V, 
						float omega0,
						float omegal0)
{
	unsigned long i,ip1;
	float sV,z;

	if(!zrf_initialized || omega0!=zrf_omega0 || omegal0!=zrf_omegal0) 
		init_zrf(omega0, omegal0);

	k_locate(zrf_V, ZRF_NUM, V, &i);
	if(i==ZRF_NUM || i==ZRF_NUM-1) i=ZRF_NUM-2;
	if(i==-1) i=0;
	ip1=i+1;
	sV=V-zrf_V[i];
	z=zrf_z[i]+sV*(zrf_z[ip1]-zrf_z[i])/(zrf_V[ip1]-zrf_V[i]);
	return(z);
}
/* Converts to redshift z from comoving enclosed volume in h^{-3} Mpc^3 */
Converts to redshift z from comoving enclosed volume in h^{-3} Mpc^3
Converts to redshift z from comoving enclosed volume in h^ { - 3 } Mpc^3
float Vtoz(float V, 
						float omega0,
						float omegal0)
{
	unsigned long i,ip1;
	float sV,z;
	if(!zrf_initialized || omega0!=zrf_omega0 || omegal0!=zrf_omegal0) 
		init_zrf(omega0, omegal0);
	k_locate(zrf_V, ZRF_NUM, V, &i);
	if(i==ZRF_NUM || i==ZRF_NUM-1) i=ZRF_NUM-2;
	if(i==-1) i=0;
	ip1=i+1;
	sV=V-zrf_V[i];
	z=zrf_z[i]+sV*(zrf_z[ip1]-zrf_z[i])/(zrf_V[ip1]-zrf_V[i]);
	return(z);
}
float Vtoz ( float V , float omega0 , float omegal0 ) { unsigned long i , ip1 ; float sV , z ; if ( ! zrf_initialized || omega0 != zrf_omega0 || omegal0 != zrf_omegal0 ) init_zrf ( omega0 , omegal0 ) ; k_locate ( zrf_V , ZRF_NUM , V , & i ) ; if ( i == ZRF_NUM || i == ZRF_NUM - 1 ) i = ZRF_NUM - 2 ; if ( i == -1 ) i = 0 ; ip1 = i + 1 ; sV = V - zrf_V [ i ] ; z = zrf_z [ i ] + sV * ( zrf_z [ ip1 ] - zrf_z [ i ] ) / ( zrf_V [ ip1 ] - zrf_V [ i ] ) ; return ( z ) ; }
Converts to redshift z from comoving enclosed volume in h^{-3} Mpc^3
Converts to redshift z from comoving enclosed volume in h^ { - 3 } Mpc^3