Added function to store nonuniformly sampled data.