def z_step(step):
    """Takes in a step number and returns the redshift of the simulation.
    This assumes 500 steps from z=200 to z=0, with spacing in scale factor.
    """
    a_in = 1./(1.+200)
    a_fin = 1./(1.)
    delta = (a_fin-a_in)/500.
    a = a_in + delta*(step+1.)
    z = 1./a -1
    return z