IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4872


Ignore:
Timestamp:
Aug 24, 2005, 1:50:27 PM (21 years ago)
Author:
Paul Price
Message:

Clarifying psRegion conventions

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r4869 r4872  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.165 2005-08-24 21:57:49 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.166 2005-08-24 23:50:27 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    771771\item Clarified behaviour of \code{psLogSetDestination} and \code{psTraceSetDestination}.
    772772\item Split \code{psMetadataRemove} into \code{psMetadataRemoveKey} and \code{psMetadataRemoveIndex}.
    773 \end{itemize}
    774 
     773\item Added explanatory note about \code{psRegionFromString} and the FITS standard.
     774\end{itemize}
     775
  • trunk/doc/pslib/psLibSDRS.tex

    r4869 r4872  
    1 %%% $Id: psLibSDRS.tex,v 1.327 2005-08-24 21:57:49 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.328 2005-08-24 23:50:27 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    35503550\code{psRegion} shall do so by value, not by pointer.
    35513551
     3552All functions which use a \code{psRegion} must interpret the
     3553definition of $(x0,y0)$ and $(x1,y1)$ in the same way.  The coordinate
     3554$(x0,y0)$ defines the starting pixel in the region.  The coordinate
     3555$(x1,y1)$ defines the outer bound of the region, and are NOT included
     3556in the region.  The size of the region is $(x1-x0,y1-y1)$.  If either
     3557$x1$ or $y1$ is less than or equal to 0, the value is added to the
     3558image dimensions (e.g., $Nx + x1$).  Thus a region \code{[0:0,0:0]}
     3559refers to the full image array, while \code{[0:-10,0:-20]} refers to
     3560the entire image, minus the last 10 columns and the last 20 rows.
     3561
    35523562We define two functions to set and return the value of a
    35533563\code{psRegion}.  The first defines the region by the corner
     
    35653575\end{prototype}
    35663576
    3567 All functions which use a psRegion must interpret the definition of
    3568 $(x0,y0)$ and $(x1,y1)$ in the same way. The coordinate $(x0,y0)$
    3569 defines the starting pixel in the region.  The coordinate $(x1,y1)$
    3570 defines the outer bound of the region.  The size of the region is
    3571 $(x1-x0,y1-y1)$.  If either $x1$ or $y1$ is less than or equal to 0,
    3572 the value is added to the image dimensions ($Nx + x1$).  Thus a region
    3573 \code{[0:0,0:0]} refers to the full image array, while
    3574 \code{[0:-10,0:-20]} trims the last 10 columns and the last 20 rows.
     3577{\bf Note that regions specified by strings are in the FITS standard.}
     3578It is the responsibility of \code{psRegionFromString} and
     3579\code{psRegionToString} to convert between the PS standard (0 means
     3580first pixel; upper value is not included, but lower is) and the FITS
     3581standard (1 means first pixel; lower and upper values are included),
     3582which simply involves subtracting one from \code{x0} and \code{y0}
     3583when going from a string representation to a \code{psRegion}.
    35753584
    35763585\begin{prototype}
Note: See TracChangeset for help on using the changeset viewer.