I've got my sprites packed into a texture, and I've got their coordinates. How do I turn that into an NGUI atlas?

I need to create an NGUI atlas at run time, and I think I’m close:

// Create the texture and pack the sprites into it.
var testTexture = new Texture2D(1, 1);
var coordinates = testTexture.PackTextures(textures.ToArray(), 0);

// Get the atlas game object (just a GameObject that I added to the scene with a UIAtlas attached to it) and set its texture to the packed texture.
var atlas = GameObject.Find("MyAtlas").GetComponent<UIAtlas>();
atlas.spriteMaterial.mainTexture = testTexture;

// Add a sprite object with the coordinates from PackTextures and att it to the atlas's spriteList.
for(int i = 0; i < coordinates.Count; i++)
{
    var coordinate = coordinates*;*

var sprite = new UIAtlas.Sprite();
sprite.name = names*;*
sprite.inner = coordinate;
sprite.outer = coordinate;
atlas.spriteList.Add(sprite);
atlas.MarkAsDirty();
}
This almost works. The atlas object does have a sprite list with the correct names, but the sprites are either blank or they have odd rectangles instead of their actual images. The dimensions are also either 0 or 1, and I’m thinking it’s because the coordinates that I get back from PackTextures are between 0.0 and 1.0. Is there some step that I need to take to multiply the atlas’s size?
What do I need to do to properly create my atlas?

Set the atlas to be in Texture Coordinates instead of in Pixels.