/* FILE: par_get.c * PURPOSE: Get wfpc2color2_ParS input parameters * AUTHOR: Kenneth J. Mighell (mighell@noao.edu) * LANGUAGE: ANSI C * DATE: 2001SEP10 * COPYRIGHT: (C) 2001 Assoc. of Universities for Research in Astronomy Inc. */ #include "mx.h" #include "inc.h" int inc_ParS_Get_i1 ( inc_ParS *ParS ){ char mxfunc[] = "inc_ParS_Get_i1"; int mxstatus = 0; int status; mxstatus++; status = IrafParStringGet_v5( "image", "", ParS->image, sizeof(ParS->image), &ParS->image_is_INDEF ); if (status) goto mx_error1; status = IrafParDoubleGet_v4( "gain", 0.0, &ParS->gain, &ParS->gain_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gain_is_INDEF) { sprintf( MX.tmpmsg, "GAIN can not be INDEF!\n"); goto mx_error2; } if (ParS->gain<=0.0) { sprintf( MX.tmpmsg, "GAIN must be greater than zero!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "ron", 0.0, &ParS->ron, &ParS->ron_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->ron_is_INDEF) { sprintf( MX.tmpmsg, "RON can not be INDEF!\n"); goto mx_error2; } if (ParS->ron<0.0) { sprintf( MX.tmpmsg, "RON can not be negative!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "gse", 0.0, &ParS->gse, &ParS->gse_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gse_is_INDEF) { sprintf( MX.tmpmsg, "GSE can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "gsx", 0.0, &ParS->gsx, &ParS->gsx_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gsx_is_INDEF) { sprintf( MX.tmpmsg, "GSX can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "gsy", 0.0, &ParS->gsy, &ParS->gsy_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gsy_is_INDEF) { sprintf( MX.tmpmsg, "GSY can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "gsf", 0.0, &ParS->gsf, &ParS->gsf_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gsf_is_INDEF) { sprintf( MX.tmpmsg, "GSF can not be INDEF!\n"); goto mx_error2; } ParS->gss = ParS->gsf/2.35; status = IrafParDoubleGet_v4( "gbe", 0.0, &ParS->gbe, &ParS->gbe_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gbe_is_INDEF) { sprintf( MX.tmpmsg, "GBE can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "gbx", 0.0, &ParS->gbx, &ParS->gbx_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gbx_is_INDEF) { sprintf( MX.tmpmsg, "GBX can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "gby", 0.0, &ParS->gby, &ParS->gby_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->gby_is_INDEF) { sprintf( MX.tmpmsg, "GBY can not be INDEF!\n"); goto mx_error2; } mxstatus++; status = IrafParStringGet_v5( "parflags", "", ParS->parflags, sizeof(ParS->parflags), &ParS->parflags_is_INDEF ); if (status) goto mx_error1; if (ParS->parflags_is_INDEF) { sprintf( MX.tmpmsg, "parflags can not be INDEF!\n"); goto mx_error2; } /* HACK ALERT */ #ifdef NOGO strcpy( ParS->parflags, "fffffff" ); #endif status = IrafParDoubleGet_v4( "tbe", 0.0, &ParS->tbe, &ParS->tbe_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tbe_is_INDEF) { sprintf( MX.tmpmsg, "TBE can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "tbx", 0.0, &ParS->tbx, &ParS->tbx_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tbx_is_INDEF) { sprintf( MX.tmpmsg, "TBX can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "tby", 0.0, &ParS->tby, &ParS->tby_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tby_is_INDEF) { sprintf( MX.tmpmsg, "TBY can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "tse", 0.0, &ParS->tse, &ParS->tse_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tse_is_INDEF) { sprintf( MX.tmpmsg, "TSE can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "tsx", 0.0, &ParS->tsx, &ParS->tsx_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tsx_is_INDEF) { sprintf( MX.tmpmsg, "TSX can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "tsy", 0.0, &ParS->tsy, &ParS->tsy_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tsy_is_INDEF) { sprintf( MX.tmpmsg, "TSY can not be INDEF!\n"); goto mx_error2; } status = IrafParDoubleGet_v4( "tsf", 0.0, &ParS->tsf, &ParS->tsf_is_INDEF); mxstatus++; if (status) goto mx_error1; mxstatus++; if (ParS->tsf_is_INDEF) { sprintf( MX.tmpmsg, "TSF can not be INDEF!\n"); goto mx_error2; } ParS->tss = ParS->tsf/2.35; mxstatus++; status = IrafParStringGet_v5( "method", "digital", ParS->method, sizeof(ParS->method), &ParS->method_is_INDEF ); if (status) goto mx_error1; if ( ParS->method[0] == 'd' ) { strcpy( ParS->method, "digital" ); ParS->method_is_digital = MX_TRUE; } else { strcpy( ParS->method, "analytical" ); ParS->method_is_digital = MX_FALSE; } ParS->obe = IRAF_INDEFD; ParS->oebe = IRAF_INDEFD; ParS->obx = IRAF_INDEFD; ParS->oebx = IRAF_INDEFD; ParS->oby = IRAF_INDEFD; ParS->oeby = IRAF_INDEFD; ParS->ose = IRAF_INDEFD; ParS->oese = IRAF_INDEFD; ParS->osx = IRAF_INDEFD; ParS->oesx = IRAF_INDEFD; ParS->osy = IRAF_INDEFD; ParS->oesy = IRAF_INDEFD; ParS->osf = IRAF_INDEFD; ParS->oesf = IRAF_INDEFD; ParS->ochisq = IRAF_INDEFD; ParS->orchsq = IRAF_INDEFD; ParS->oerchsq = IRAF_INDEFD; ParS->ondf = IRAF_INDEFI; ParS->onpar = IRAF_INDEFI; ParS->omfit = IRAF_INDEFI; ParS->oniter = IRAF_INDEFI; ParS->osmag = IRAF_INDEFD; ParS->oesmag = IRAF_INDEFD; strcpy( ParS->SNOWMAN, SNOWMAN_DATE); strcpy( ParS->PROGFILE, "mxtools$src/snowman/snowman.c"); strcpy( ParS->PROGDATE, __DATE__); strcpy( ParS->PROGTIME, __TIME__); ok: status = 0; goto bye; mx_error1: mxp_tmpmsg_init_f0(); mx_error2: mxp_errmsg_append_f3 (mxfunc, mxstatus, MX.tmpmsg); mxp_tmpmsg_init_f0(); status = 1; goto bye; bye: return(status); } /* end-of-file */