! Procedure radec.nic ! Calculate the alpha and delta offsets of each bolometers. ! &1 Delta_RA[nchan] ! &2 Delta_Dec[nchan] ! ! Meaning the Local Standard Time [sec] define real ttempo[nrecord,1] wei[nrecord,1] /global let wei 1 for i 1 to nrecord let ttempo[i,1] lst[i] next define real mean_lst rms_lst /global @ wmean ttempo wei 1 nrecord mean_lst rms_lst 1 del /var ttempo wei ! ! Calculation of the mean paralactic angle pa (degrees) and ! the source elevation Elv_s(radians) define real d_to_r let d_to_r pi|180 !convert degrees to radians define real HA sinHA cosHA Dec sind cosd phi sinphi cosphi define real pa cospa sinpa Elv_s cosel sinel ! ! Angles Unity : Dec, Phi et HA are radians and HA is in between [-pi,pi] let Dec beta*d_to_r let phi site_latitude let HA (mean_lst*15.|3600-lambda)*d_to_r ! let sind sin(Dec) let cosd cos(Dec) let sinphi sin(phi) let cosphi cos(phi) let sinHA sin(HA) let cosHA cos(HA) ! ! Elevation let sinel sind*sinphi+cosd*cosphi*cosHA let Elv_s asin(sinel) let cosel cos(Elv_s) ! ! Paralactic angle let cospa (sinphi-sinel*sind)|(abs(cosel)*cosd) let pa acos(cospa)|d_to_r if (HA.gt.pi) then let HA HA-2*pi else if (HA.lt.-pi) then let HA HA+2*pi endif endif if (HA.le.0.) then let pa -pa endif !exa pa let sinpa sin(pa*d_to_r) ! del /var HA sinHA cosHA Dec sind cosd phi sinphi cosphi cosel sinel del /var mean_lst rms_lst ! ! ! Az/El offset positions of each bolometers define real Daz_b[nchan] Del_b[nchan] RA[nchan] DEC[nchan] define real oa oe ! The array offsets from the center of the field let oa OAZM*3600+wobbler_throw|2*unbal !arcsec let oe OELV*3600 !arcsec ! ! Rotation of the recepteurs position on the sky due to the source elevation let Daz_b -chan_az_off*cos(Elv_s)+chan_el_off*sin(Elv_s) let Del_b chan_az_off*sin(Elv_s)+chan_el_off*cos(Elv_s) let Daz_b Daz_b+oa let Del_b Del_b+oe ! ! Conversion of the coordinate Az/El-->RA/DEC let RA -Daz_b*cospa+Del_b*sinpa let DEC Daz_b*sinpa+Del_b*cospa let &1 RA let &2 DEC del /var Daz_b Del_b pa cospa sinpa oa oe RA DEC