Home > matutils > mosaic > survey_sched.m

survey_sched

PURPOSE ^

function int=survey_sched(row,pair,field,start,stop)

SYNOPSIS ^

function int=survey_sched(row,pair,field,start,stop)

DESCRIPTION ^

 function int=survey_sched(row,pair,field,start,stop)

 write survey mosaic schedules

 row - row letter ('A'...'P')
 pair - pair number [1:4]
        1 -> [1 9 2 10]
        2 -> [3 11 4 12]
 field - field name 'dls','jesus','bootes'

 OPTIONAL:  ONLY USE IF YOU HAVE SPECIFIC START/STOP TIMES
  start - start time
  stop  - stop time

 returns schedule of form:  [field]_r[row]p[pair].sch


 for now the calibrator and bandpass is hardcoded
 dls:
   cal=j0854+201  bp=3c84

 jesus:
   cal=j2139+143  bp=j1642+398

 bootes
   cal=j1331+305  bp=j1229+020

 Michael Loh

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function int=survey_sched(row,pair,field,start,stop)
0002 
0003 % function int=survey_sched(row,pair,field,start,stop)
0004 %
0005 % write survey mosaic schedules
0006 %
0007 % row - row letter ('A'...'P')
0008 % pair - pair number [1:4]
0009 %        1 -> [1 9 2 10]
0010 %        2 -> [3 11 4 12]
0011 % field - field name 'dls','jesus','bootes'
0012 %
0013 % OPTIONAL:  ONLY USE IF YOU HAVE SPECIFIC START/STOP TIMES
0014 %  start - start time
0015 %  stop  - stop time
0016 %
0017 % returns schedule of form:  [field]_r[row]p[pair].sch
0018 %
0019 %
0020 % for now the calibrator and bandpass is hardcoded
0021 % dls:
0022 %   cal=j0854+201  bp=3c84
0023 %
0024 % jesus:
0025 %   cal=j2139+143  bp=j1642+398
0026 %
0027 % bootes
0028 %   cal=j1331+305  bp=j1229+020
0029 %
0030 % Michael Loh
0031 
0032 row=upper(row);
0033 % set up row ID
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 % setup calibrator and bp and default start and stop times
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 % get coord
0079 [mpt,origin,offset]=survey_coord(field);
0080 
0081 % schedule name
0082 fn=sprintf('%s_r%sp%u.sch',field,row,pair);
0083 
0084 % field numbers
0085 first=2*pair-1;
0086 pr=[first first+8 first+1 first+9];
0087 
0088 % field names
0089 for i=1:4
0090   src{i}=sprintf('%s%s%u',field,row,pr(i));
0091 end
0092 
0093 % set up parameter structure for timesync2pr
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 % do load cal every other time
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(:)));

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005