IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1208


Ignore:
Timestamp:
Jul 12, 2004, 12:18:39 PM (22 years ago)
Author:
eugene
Message:

clarified robust stats

File:
1 edited

Legend:

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

    r1090 r1208  
    1 %%% $Id: psLibADD.tex,v 1.20 2004-06-25 03:04:46 eugene Exp $
     1%%% $Id: psLibADD.tex,v 1.21 2004-07-12 22:18:39 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    685685sum is renormalized by the ratio (12.57/16.00).
    686686
     687\paragraph{Image Rotation}
     688
     689Image rotation can be performed in two possible ways under different
     690circumstances, identified in the following discussion.
     691
     692In the simplest case, the rotation angle is an integer multiple of 90
     693degrees ($\pi/2$ rad).  In these cases, the input and output pixels
     694have a one-to-one mapping.  If the input image has dimensions of $N_x,
     695N_y$, then the output image will have dimensions of either $N_x, N_y$
     696(for even multiples of 90 degrees) or $N_y, N_x$ (for odd multiples).
     697
     698If the angle of the rotation is not a multiple of 90, then the output
     699pixels necessarily result from the interpolation of several input
     700pixels.  In this case, for an input image of dimensions $N_x, N_y$ and
     701rotation angle $\theta$, the output image has dimensions $Lx = |N_x
     702\cos \theta| + |N_y \sin \theta|$ and $Ly = |N_x \sin \theta| + |N_y
     703\cos \theta|$, each dimension rounded up to the nearest integer as
     704needed.  Every pixel in the output image is in general derived from an
     705interpolation over 4 neighboring pixels.  The coordinate of a pixel in
     706the output image ($i,j$) corresponds to a fractional pixel coordinate
     707($x,y$) in the input image according to:
     708\[ x = (i - i_o)*\cos\theta + (j - j_o)*\sin\theta \]
     709\[ y = (i_o - i)*\sin\theta + (j - j_o)*\cos\theta \]
     710where the offset coordinate ($i_o,j_o$) depends on the sign of the
     711sine of the angle $\theta$.  If the sign of that sine is positive, the
     712offset coordinate is ($N_y\sin\theta$,0), otherwise it is
     713(0,$-N_x\sin\theta$).
     714
    687715\subsubsection{Celestial Coordinate Conversions}
    688716
     
    692720  PSLib function             & SLALIB function \\ \hline
    693721%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    694   \code{psCoordinatesItoE()} & \code{sla_EQECL} \\
    695   \code{psCoordinatesEtoI()} & \code{sla_ECLEQ} \\
    696   \code{psCoordinatesItoG()} & \code{sla_EQGAL} \\
    697   \code{psCoordinatesGtoI()} & \code{sla_GALEQ} \\
     722  \code{psCoordinatesICRSToEcliptic()} & \code{sla_EQECL} \\
     723  \code{psCoordinatesEclipticToICRS()} & \code{sla_ECLEQ} \\
     724  \code{psCoordinatesICRSToGalactic()} & \code{sla_EQGAL} \\
     725  \code{psCoordinatesGalacticToICRS()} & \code{sla_GALEQ} \\
    698726\end{tabular}
    699727
     
    778806{\rm where}\hspace{1cm} z & \equiv & \sqrt{1 - (x\pi/720^\circ)^2 - (y\pi/360^\circ)^2}
    779807\end{eqnarray}
     808
     809\subsubsection{Offset}
     810
     811Coordinate offsets can either spherical offsets or linear offsets. 
     812
     813A spherical offset is performed by adding the components of the
     814offset, after unit conversion, to the given position.  The resulting
     815coordinates must be wrapped to within the allowed range ($-\pi$ to
     816$\pi$, 0 to $2\pi$).
     817
     818A linear offset is defined to be a linear offset in a tangent
     819projection centered on the starting coordinate with $y$ axis aligned
     820with the local direction or increasing Declination.  This projection
     821is undefined only for the coordinates exactly at the north and south
     822poles, in which case the orientation is defined to have the $y$ axis
     823parallel to the line of RA = 0.0.  The scale of the projection is 1.0
     824(ie, 1 'pixel' is 1 radian) and the given offsets must the scaled
     825based on the given offset units. 
     826
     827Pseudo-code to implement the above for an offset:
     828
     829\begin{verbatim}
     830psSphere *psSphereSetOffset (psSphere pos, psSphere offset) {
     831
     832  psPlane lin;
     833  psSphere new;
     834  psProjection proj;
     835
     836  proj.R = pos->r;
     837  proj.D = pos->d;
     838  proj.X = 0;
     839  proj.Y = 0;
     840  proj.type = PS_PROJ_TAN;
     841
     842  lin.x = offset.r;
     843  lin.y = offset.d;
     844
     845  new = psDeproject (&lin, &proj);
     846  return (new);
     847}
     848\end{verbatim}
    780849
    781850%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset for help on using the changeset viewer.