/* FILE: mxtools/src/psfshift/psfshift.c * PURPOSE: Shift a MATPHOT PSF file * AUTHOR: Kenneth J. Mighell (mighell@noao.edu) * LANGUAGE: ANSI C * DATE: 2001OCT26 * COPYRIGHT: (C) 2001 Assoc. of Universities for Research in Astronomy Inc. */ #include #include "inc.h" IRAFTASK (psfshift) { int i; extern int iraf_psfshift (void); i = iraf_psfshift (); } /* * ############################################################################ */ int iraf_psfshift(void) { char mxfunc[] = "iraf_psfshift"; int mxstatus=0; int status; inc_ParS ParS; inc_PsfS PsfS; mxstatus++; status = mxp_init_f0(); if (status) goto mx_error; mxstatus++; status = inc_ParS_Get_i1 (&ParS); if (status) goto mx_error; mxstatus++; status = inc_PsfS_Open_i2 (&ParS, &PsfS); if (status) goto mx_error; /* ** ========================================================================= */ mxstatus++; status = ip_Shift2d_i3( PsfS.mxIrafImage->data, ParS.deltax, ParS.deltay); if (status) goto mx_error; PsfS.PSF_CPXP += ParS.deltax; PsfS.PSF_CPYP += ParS.deltay; /* ** ========================================================================= */ mxstatus++; status = inc_ParS_Put_i1 (&ParS); if (status) goto mx_error; inc_ParS_Print_v2 (&ParS, stdout); ok: status = 0; goto bye; mx_error: mx_error1: mxp_tmpmsg_init_f0(); mx_error2: mxp_errmsg_append_f3 (mxfunc, mxstatus, MX.tmpmsg); mxp_tmpmsg_init_f0(); mxp_errmsg_dump_f0(); goto bye; bye: inc_PsfS_Close_i1( &PsfS ); fflush (stdout); return(status); } /* end-of-file */