# pix2xy

Find pixel cartesian face coordinates

## Contents

- Syntax
- Input Arguments
- Return Arguments
- Example

## Syntax

    xy = pix2xy(nSide,nPix)

## Input Arguments

    nSide     HEALPix resolution parameter
    nPix      nested indexing pixel numbers to find coordinates of

## Return Arguments

    xy        size(nPix) cell array of pixel coordinates on face

## Example

    nPix = reshape(1:24,[4,3,2]);
    xy = pix2xy(2,nPix)

    xy(:,:,1) =

        [2x1 double]    [2x1 double]    [2x1 double]
        [2x1 double]    [2x1 double]    [2x1 double]
        [2x1 double]    [2x1 double]    [2x1 double]
        [2x1 double]    [2x1 double]    [2x1 double]

    xy(:,:,2) =

        [2x1 double]    [2x1 double]    [2x1 double]
        [2x1 double]    [2x1 double]    [2x1 double]
        [2x1 double]    [2x1 double]    [2x1 double]
        [2x1 double]    [2x1 double]    [2x1 double]

Copyright 2010-2011 Lee Samuel Finn. Terms of Use.