C+ C NAME: C smei_skyd_node2sky C PURPOSE: C Drop node on skymap (equatorial or polar maps) C CALLING SEQUENCE: subroutine smei_skyd_node2sky(level,node_id,nvote,ngood,xgood,img,xmg) C INPUTS: C node_i integer C level integer C node_id integer C nvote integer (not used) C ngood integer (not used) C xgood real response of node (return value of C smei_skyd_combinevotes. C xmg(*) real accumulated totals for equatorial map C img(*) real total counts for equatorial map C OUTPUTS: C xmg(*) real updated sky map arrays C img(*) real C INCLUDE: include 'smei_skyd_dim.h' C SEE ALSO: C smei_skyd_combine C PROCEDURE: C MODIFICATION HISTORY: C JAN-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer level integer node_id integer nvote integer ngood real xgood real img(*) real xmg(*) include 'smei_skyd_fnc.h' i = level*level n_eq = i*SKYD__N_EQ n_pl = i*SKYD__N_PL ip = node_id if (ip .le. n_eq) then ! Bin from equatorial map i_eq = level*SKYD__NXEQ ix = 1+mod(ip-1,i_eq) ! Column index jy = 1+(ip-1)/i_eq ! Row index ix = nint( origin(1, 0)+(ix-origin(level, 0))/level ) jy = nint( origin(1,SKYD__NYEQ)+(jy-origin(level,SKYD__NYEQ))/level ) i = ip_eq(1,ix,jy) else ! Bin from one of the polar maps ip = ip-n_eq kp = 1+(ip-1)/n_pl ! 1 for North; 2 for South ip = 1+mod(ip-1,n_pl) ! Linear array index i_pl = level*SKYD__NXPL ix = 1+mod(ip-1,i_pl) ! Column index jy = 1+(ip-1)/i_pl ! Row index ix = nint( origin(1,SKYD__NXPL)+(ix-origin(level,SKYD__NXPL))/level ) jy = nint( origin(1,SKYD__NYPL)+(jy-origin(level,SKYD__NYPL))/level ) i = ip_pl(1,ix,jy,kp) end if !weight = float(ngood)/float(nvote) weight = 1.0 img(i) = img(i)+weight xmg(i) = xmg(i)+weight*xgood return end