atbound 3 set $1 = ($1 < $2) ? $1+360. : $1 set $1 = ($1 >= $3) ? $1-360. : $1 atbound2 2 atbound $1 -180. 180. set _i = 0, dimen($1)-1 set _indx = _i if ($1>90.) if(dimen(_indx)>0) { set $1[_indx] = 180.-$1[_indx] set $2[_indx] = $2[_indx]+180. } atbound $1 -180. 180. atbound $2 0. 360. eqsdss 4 # eqsdss ra dec eta lambda # Convert from Equatorial to Survey coordinates define realRa0 275. define realDec0 0. define surveyRa0 57.5 set _ra = $1 set _dec = $2 set _lambda = asind(sind($realDec0)*sind(_dec)+cosd($realDec0)*cosd(_dec)*cosd(_ra-$realRa0)) set _eta = $surveyRa0+atan2d(cosd(_dec)*sind(_ra-$realRa0),cosd($realDec0)*sind(_dec)-sind($realDec0)*cosd(_dec)*cosd(_ra-$realRa0)) atbound2 _eta _lambda set $3 = _eta set $4 = _lambda foreach i (_lambda _eta _ra _dec) {delete $i} sdsseq 4 # sdsseq eta lambda ra dec # Convert from Survey to Equatorial coordinates define realRa0 275. define realDec0 0. define surveyRa0 57.5 set _eta = $1 set _lambda = $2 set _dec = asind(sind($realDec0)*sind(_lambda)+cosd($realDec0)*cosd(_lambda)*cosd(_eta-$surveyRa0)) set _ra = $realRa0 + atan2d(cosd(_lambda)*sind(_eta-$surveyRa0),cosd($realDec0)*sind(_lambda)-sind($realDec0)*cosd(_lambda)*cosd(_eta-$surveyRa0)) atbound2 _dec _ra set $3 = _ra set $4 = _dec foreach i (_lambda _eta _ra _dec) {delete $i} eqgc 6 # eqgc ra dec nu mu anode ainc # Convert from equatorial to Great Circle coordinates # # To convert to and from Great Circle coordinates, you must input the # node and inclination of the reference great circle. For "normal" drift # scan great circles, use anode=95. and ainc=-25.+2.5*n # define _anode $5 define _ainc $6 set _ra = $1 set _dec = $2 set _x1 = cosd(_ra-$_anode)*cosd(_dec) set _y1 = sind(_ra-$_anode)*cosd(_dec) set _z1 = sind(_dec) set _x2 = _x1 set _y2 = _y1*cosd($_ainc)+_z1*sind($_ainc) set _z2 = -_y1*sind($_ainc)+_z1*cosd($_ainc) set _mu = atan2d(_y2,_x2)+$_anode set _nu = asind(_z2) atbound2 _nu _mu set $3 = _nu set $4 = _mu foreach i (_x1 _x2 _y1 _y2 _z1 _z2 _mu _nu _ra _dec) {delete $i} gceq 6 # gceq nu mu ra dec anode ainc # Convert from equatorial to Great Circle coordinates # # To convert to and from Great Circle coordinates, you must input the # node and inclination of the reference great circle. For "normal" drift # scan great circles, use anode=95. and ainc=-25.+2.5*n # define _anode $5 define _ainc $6 set _nu = $1 set _mu = $2 set _x2 = cosd(_mu-$_anode)*cosd(_nu) set _y2 = sind(_mu-$_anode)*cosd(_nu) set _z2 = sind(_nu) set _x1 = _x2 set _y1 = _y2*cosd($_ainc)-_z2*sind($_ainc) set _z1 = _y2*sind($_ainc)+_z2*cosd($_ainc) set _ra = atan2d(_y1,_x1)+$_anode set _dec = asind(_z1) atbound2 _dec _ra set $3 = _ra set $4 = _dec foreach i (_x1 _x2 _y1 _y2 _z1 _z2 _mu _nu _ra _dec) {delete $i}