0001 function int=survey_sched(row,pair,field,start,stop)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 row=upper(row);
0033
0034 rowid=['A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P'];
0035 loc=find(rowid==row);
0036 if (isempty(loc))
0037 disp('Invalid row');
0038 return
0039 end
0040
0041
0042
0043 switch field
0044 case 'dls'
0045 cal='j0854+201';
0046 bp='3c84';
0047 startd='6:00:00';
0048 stopd='11:50:00';
0049
0050 case 'jesus'
0051 bp = 'j1642+398';
0052 cal ='j2139+143';
0053 startd='18:00:00';
0054 stopd='23:50:00';
0055
0056 case 'bootes'
0057 bp = 'j1229+020';
0058 cal ='j1331+305';
0059 startd='12:00:00';
0060 stopd='17:50:00';
0061
0062 otherwise
0063 disp('Invalid field name')
0064 return
0065 end
0066
0067 if (exist('start') & ~exist('stop'))
0068 disp('Need a stop time')
0069 return
0070 elseif (exist('stop') & ~exist('start'))
0071 disp('Need a start time')
0072 return
0073 elseif (~exist('stop') & ~exist('start'))
0074 start=startd;
0075 stop=stopd;
0076 end
0077
0078
0079 [mpt,origin,offset]=survey_coord(field);
0080
0081
0082 fn=sprintf('%s_r%sp%u.sch',field,row,pair);
0083
0084
0085 first=2*pair-1;
0086 pr=[first first+8 first+1 first+9];
0087
0088
0089 for i=1:4
0090 src{i}=sprintf('%s%s%u',field,row,pr(i));
0091 end
0092
0093
0094 time.start=start;
0095 time.stop=stop;
0096 time.p2p='00:00:14';
0097 time.calt='00:03:00';
0098 time.p2cslew='00:01:00';
0099 time.lt='00:00:12';
0100 time.bp='00:08:00';
0101 time.point='00:05:00';
0102
0103
0104 ld=[1,0;
0105 0,1;
0106 1,0;
0107 0,1];
0108
0109 [t,c,int]=timesync2pr(pr,origin.ra,origin.dec,offset.x(loc,:),...
0110 offset.y(loc,:),ld,1,time);
0111
0112 write_sched(t,c,fn,src,cal,bp,time.start,1,sum(ld(:)));