define the antenna being used
0001 function d = pipe_readSa(start, stop, d) 0002 0003 %define the antenna being used 0004 antenna='ovro'; 0005 0006 % reads, sets up all registers, etc etc 0007 if(nargin<3) 0008 d = read_arcSouth(start, stop); 0009 end 0010 display('Finished with read_arc'); 0011 % do the rudimentary flagging 0012 d = flagMaskSouth(d); 0013 d = flagDataSouth(d, [0 1 5 6 7 8 10 12], []); 0014 % NOTE: RFI flagging occurss in deglitch module 0015 d = determineIndicesSouth(d); 0016 d = fillRegistersSouth(d); 0017 d=statusRegisterSouth(d); 0018 % calculate the apparent az/el right off the bat; 0019 %display('Calculating apparent Azimuth and Elevation'); 0020 %d = apparentAzEl(d); 0021 0022 %Added by CJC 3/5/2010 to update the structure with the RA/DEC- stored in 0023 %d.antenna0.servo.equa 0024 %d.antenna0.servo.equa(:,1) -> RA (in radians) 0025 %d.antenna0.servo.equa(:,2) - >DEC (in radians) 0026 display('Calculating RA/DEC Values') 0027 if strcmp(antenna,'ovro') 0028 long=-118.2822; 0029 lat=37.2339; 0030 end 0031 0032 %az = d.antenna0.servo.apparent(:,1); 0033 %el = d.antenna0.servo.apparent(:,2); 0034 %jd=mjd2jd(d.antenna0.receiver.utc); 0035 %%%%%%%%%%%%%%%%%%%%%%%% 0036 % ogk edit here: removed call to deg2rad: needs special toolbox 0037 %[equa] = horiz_coo([deg2rad(az) deg2rad(el)],jd,[deg2rad(long) deg2rad(lat)],'e'); 0038 %[equa] = horiz_coo([pi/180*(az) pi/180*(el)],jd,[pi/180*(long) pi/180*(lat)],'e'); 0039 %d.antenna0.servo.equa=equa; 0040 %[galactic,to]=coco(d.antenna0.servo.equa,'j2000.0','g','r','r'); 0041 %display('Calculating Galactic Long/Lat') 0042 %d.antenna0.servo.galactic=galactic; 0043 %%%%%%%%%%%%%%%%%%%%%%%% 0044 0045 return;