include "polarimetry.h" # READ_PAOFFSET -- read the position angle offset table # # Description: # ------------ # Read position angle offsets from an SDAS table. # # Input table column names # ------------------------ # # "FILTER_NAME" filter name # "DTHETA" position angle offset # "DTHETA_ERR" position angle offset's error # # Input table parameters # ---------------------- # (none) # # Date Author Description # ---- ------ ----------- # 21-Jun-1990 J.-C. Hsu design and coding #------------------------------------------------------------------------------ procedure read_paoffset (tp_paoffset, filter_pa, pa0, pa0_err, npts_paoffset) pointer tp_paoffset # input: pointer of the position angle offset table int npts_paoffset # input: number of rows in position angle offset table char filter_pa[SZ_FILTER, npts_paoffset] # output: aperture names in the p.a. offset table real pa0[npts_paoffset] # output: position angle offsets real pa0_err[npts_paoffset] # output: position angle offsets' errors pointer sp, null pointer colptr[10] #============================================================================== begin call smark (sp) # read data in the position angle offset table call salloc (null, npts_paoffset, TY_BOOL) call tbcfnd (tp_paoffset, "FILTER_NAME", colptr[1], 1) call tbcfnd (tp_paoffset, "DTHETA", colptr[2], 1) call tbcfnd (tp_paoffset, "DTHETA_ERR", colptr[3], 1) call tbcgtt (tp_paoffset, colptr[1], filter_pa, Memb[null], SZ_FILTER, 1, npts_paoffset) call tbcgtr (tp_paoffset, colptr[2], pa0, Memb[null], 1, npts_paoffset) call tbcgtr (tp_paoffset, colptr[3], pa0_err, Memb[null], 1, npts_paoffset) call tbtclo (tp_paoffset) call sfree (sp) end