--- alias: user-guide-coordinate-systems-substrate-map tags: - mapping description: "Explain how to determine the range of substrate coordinates for each combination of Origin Location and Axis direction" --- # Coordinate Systems ## Overview This page defines the supported coordinate systems by combining: - **Origin location** - **Axis direction** - **Range formulas** for `X_min`, `X_max`, `Y_min`, and `Y_max` !!! note If `Columns` or `Rows` are odd, the result of `Columns / 2` and `Rows / 2` is truncated. ## Legend - **Squares** represent grid cells. - **Red circle** represents the origin. - **X** and **Y** arrows show the positive axis directions. ## Coordinate System Matrix ### UpRight X increases to the right; Y increases upward. | Origin | X_min | X_max | Y_min | Y_max | |---|---|---|---|---| | LowerLeft | `0` | `Columns - 1` | `0` | `Rows - 1` | | UpperLeft | `0` | `Columns - 1` | `- Rows + 1` | `0` | | LowerRight | `- Columns + 1` | `0` | `0` | `Rows - 1` | | UpperRight | `- Columns + 1` | `0` | `- Rows + 1` | `0` | | Center | `Columns / 2 - Columns + 1` | `Columns / 2` | `Rows / 2 - Rows + 1` | `Rows / 2` | === "LowerLeft" XYcellorigin Origin at the lower-left corner. X increases to the right; Y increases upward. === "UpperLeft" XYcellorigin Origin at the upper-left corner. X increases to the right; Y increases upward. === "LowerRight" XYcellorigin Origin at the lower-right corner. X increases to the right; Y increases upward. === "UpperRight" XYcellorigin Origin at the upper-right corner. X increases to the right; Y increases upward. === "Center" XYcellorigin Origin at the center of the grid. X increases to the right; Y increases upward. ### DownRight X increases to the right; Y increases downward. | Origin | X_min | X_max | Y_min | Y_max | |---|---|---|---|---| | LowerLeft | `0` | `Columns - 1` | `- Rows + 1` | `0` | | UpperLeft | `0` | `Columns - 1` | `0` | `Rows - 1` | | LowerRight | `- Columns + 1` | `0` | `- Rows + 1` | `0` | | UpperRight | `- Columns + 1` | `0` | `0` | `Rows - 1` | | Center | `Columns / 2 - Columns + 1` | `Columns / 2` | `- Rows / 2` | `- Rows / 2 + Rows - 1` | === "LowerLeft" XYcellorigin Origin at the lower-left corner. X increases to the right; Y increases downward. === "UpperLeft" XYcellorigin Origin at the upper-left corner. X increases to the right; Y increases downward. === "LowerRight" XYcellorigin Origin at the lower-right corner. X increases to the right; Y increases downward. === "UpperRight" XYcellorigin Origin at the upper-right corner. X increases to the right; Y increases downward. === "Center" XYcellorigin Origin at the center of the grid. X increases to the right; Y increases downward. ### UpLeft X increases to the left; Y increases upward. | Origin | X_min | X_max | Y_min | Y_max | |---|---|---|---|---| | LowerLeft | `- Columns + 1` | `0` | `0` | `Rows - 1` | | UpperLeft | `- Columns + 1` | `0` | `- Rows + 1` | `0` | | LowerRight | `0` | `Columns - 1` | `0` | `Rows - 1` | | UpperRight | `0` | `Columns - 1` | `- Rows + 1` | `0` | | Center | `- Columns / 2` | `- Columns / 2 + Columns - 1` | `Rows / 2 - Rows + 1` | `Rows / 2` | === "LowerLeft" XYcellorigin Origin at the lower-left corner. X increases to the left; Y increases upward. === "UpperLeft" XYcellorigin Origin at the upper-left corner. X increases to the left; Y increases upward. === "LowerRight" XYcellorigin Origin at the lower-right corner. X increases to the left; Y increases upward. === "UpperRight" XYcellorigin Origin at the upper-right corner. X increases to the left; Y increases upward. === "Center" XYcellorigin Origin at the center of the grid. X increases to the left; Y increases upward. ### DownLeft X increases to the left; Y increases downward. | Origin | X_min | X_max | Y_min | Y_max | |---|---|---|---|---| | LowerLeft | `- Columns + 1` | `0` | `- Rows + 1` | `0` | | UpperLeft | `- Columns + 1` | `0` | `0` | `Rows - 1` | | LowerRight | `0` | `Columns - 1` | `- Rows + 1` | `0` | | UpperRight | `0` | `Columns - 1` | `0` | `Rows - 1` | | Center | `- Columns / 2` | `- Columns / 2 + Columns - 1` | `- Rows / 2` | `- Rows / 2 + Rows - 1` | === "LowerLeft" XYcellorigin Origin at the lower-left corner. X increases to the left; Y increases downward. === "UpperLeft" XYcellorigin Origin at the upper-left corner. X increases to the left; Y increases downward. === "LowerRight" XYcellorigin Origin at the lower-right corner. X increases to the left; Y increases downward. === "UpperRight" XYcellorigin Origin at the upper-right corner. X increases to the left; Y increases downward. === "Center" XYcellorigin Origin at the center of the grid. X increases to the left; Y increases downward.