; ---------------------------------------------------------------------- ; Find rowoff value for a given arcsec value (and nso and column). ; If IMG.el > 5. (degrees), then apply Differential Atmospheric Refraction.. ; ( Returns 'rowoff' position of object as it appears on actual image data. ; So if a fixed arcsec is requested, that value will be adjusted by the DAR ; (before using AVP inverse formula) such as to follow the centroid of the ; object along the slit. ) ; function nsxng_AVPinv, AVP, nso, col, arcsec, IMG, WSC ; common nsx order = 2 as = arcsec if (IMG.el ge 5.) then begin zt = 90. - IMG.el theta = IMG.rotposn - IMG.parang xv = col - WSC[nso].xoff wave= cpolyval(WSC[nso].order+1,WSC[nso].coef,xv) as = as + (nsxng_difatmref(wave,zt) * cos(degtorad(theta))) ; endif xv = as - AVP[nso].xoffinv[col] rowoff = cpolyval( order+1, AVP[nso].coefinv[col,*], xv ) return, rowoff end