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

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

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