#17 closed defect (fixed)
Naming conventions for rows and columns
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | trivial | Keywords: | |
| Cc: |
Description
The psImage struct uses mixed naming conventions when referring to pixel
locations: rows/columns and x/y coordinates. While a very minor problem, it can
become confusing and difficult to fix as both code and documentation grow over
time.
I'd like to propose we use row/column naming throughout both documentation and
code. (Row would be the y-coordinate and column the x-coordinate.)
Change History (3)
comment:1 by , 22 years ago
comment:2 by , 22 years ago
existing astronomy functions (ie, iraf, sextractor, etc) always refer to image
coordinates in the form (x,y) not (row,col). I believe all functions should
have the form OperateOnImage(image,x,y) in which case the x refers to a column
number and the y refers to a row number.
comment:3 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I have changed the psImage definition in the SDRS to use the union rows with
elements in the form rows_TYPE. Function parameters continue to be in the form
function(x,y)

Follow-up question: we should try to be consistent in the order they appear in
function parameters, structs, etc. Given x=col and y=row, most of the functions
that used x,y as input now have col,row.
Would one prefer the order of row before col over col before row?