/* FILE: /mxtools/src/psfshift/psf_open.c * PURPOSE: Open a PSFSHIFT PsfS * 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" int inc_PsfS_Open_i2 ( inc_ParS *ParS, inc_PsfS *PsfS ){ char mxfunc[] = "inc_PsfS_Open_i2"; int mxstatus=0; int status; IRAFPointer ifp; strcpy( PsfS->ifn, ParS->image); mxstatus++; status = mxiraf_image_s_open_f3 (&PsfS->mxIrafImage, PsfS->ifn, IRAF_READ_WRITE); if (status) goto mx_error; PsfS->matrixd = PsfS->mxIrafImage->data->matrixd; PsfS->vectord = PsfS->mxIrafImage->data->vectord; PsfS->llx0i = PsfS->mxIrafImage->data->llx0i; PsfS->lly0i = PsfS->mxIrafImage->data->lly0i; PsfS->xdimi = PsfS->mxIrafImage->data->nxi; PsfS->ydimi = PsfS->mxIrafImage->data->nyi; PsfS->nxi = PsfS->xdimi; PsfS->nyi = PsfS->ydimi; ifp = PsfS->mxIrafImage->ptr; mxstatus++; PsfS->PSF_CPXJ = c_imgeti( ifp, "PSF_CPXJ" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPXJ is %d\n", PsfS->PSF_CPXJ); mxstatus++; PsfS->PSF_CPYJ = c_imgeti( ifp, "PSF_CPYJ" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPYJ is %d\n", PsfS->PSF_CPYJ); mxstatus++; PsfS->PSF_CPXF = c_imgetd( ifp, "PSF_CPXF" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPXF is %g\n", PsfS->PSF_CPXF); mxstatus++; PsfS->PSF_CPYF = c_imgetd( ifp, "PSF_CPYF" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPYF is %g\n", PsfS->PSF_CPYF); mxstatus++; PsfS->PSF_CPXP = c_imgetd( ifp, "PSF_CPXP" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPXP is %g\n", PsfS->PSF_CPXP); mxstatus++; PsfS->PSF_CPYP = c_imgetd( ifp, "PSF_CPYP" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPYP is %g\n", PsfS->PSF_CPYP); mxstatus++; PsfS->PSF_CPXI = c_imgetd( ifp, "PSF_CPXI" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPXI is %g\n", PsfS->PSF_CPXI); mxstatus++; PsfS->PSF_CPYI = c_imgetd( ifp, "PSF_CPYI" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CPYI is %g\n", PsfS->PSF_CPYI); mxstatus++; PsfS->PSF_CWXI = c_imgetd( ifp, "PSF_CWXI" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CWXI is %g\n", PsfS->PSF_CWXI); mxstatus++; PsfS->PSF_CWYI = c_imgetd( ifp, "PSF_CWYI" ); if ( mxiraf_cvos_error_check_f0() ) goto mx_error; printf ("PSF_CWYI is %g\n", PsfS->PSF_CWYI); ok: status = 0; goto bye; mx_error: mxp_errmsg_append_f3 (mxfunc, mxstatus, ""); goto bye; mx_error2: mxp_errmsg_append_f3 (mxfunc, mxstatus, MX.tmpmsg); goto bye; bye: return(status); } /* end-of-file */