star_set(lst) Find the set of stars which are bright and available for pointing at a given LST To get the lst type "print $time(lst)" in szaViewer e.g.: star_set(19.1) Take the resulting list of numbers and paste it into /home/szadaq/carma/sza/array/sch/point_manual.sch Then run using: schedule /home/szadaq/carma/sza/array/sch/point_manual.sch Then center up each star using widget and hit the button Be sure to keep a note of which data file in /home/szadaq/arc contains the data from the star pointing run
0001 function star_set(lst,ellim,maglim,lat, minuteDiff) 0002 % star_set(lst) 0003 % 0004 % Find the set of stars which are bright and available for pointing 0005 % at a given LST 0006 % 0007 % To get the lst type "print $time(lst)" in szaViewer 0008 % 0009 % e.g.: star_set(19.1) 0010 % 0011 % Take the resulting list of numbers and paste it into 0012 % /home/szadaq/carma/sza/array/sch/point_manual.sch 0013 % 0014 % Then run using: 0015 % schedule /home/szadaq/carma/sza/array/sch/point_manual.sch 0016 % 0017 % Then center up each star using widget and hit the button 0018 % Be sure to keep a note of which data file in 0019 % /home/szadaq/arc contains the data from the star pointing run 0020 0021 if(~exist('ellim')) 0022 ellim=[]; 0023 end 0024 if(~exist('maglim')) 0025 maglim=[]; 0026 end 0027 if(~exist('lat')) 0028 lat=[]; 0029 end 0030 0031 if(isempty(ellim)) 0032 ellim=30; 0033 end 0034 if(isempty(maglim)) 0035 maglim=4.0; 0036 end 0037 if(isempty(lat)) 0038 lat=37; % OVRO 0039 end 0040 0041 0042 % Read in star catalog data 0043 [cat.name,ra,dec,cat.mag] = ... 0044 textread('stars.cat','J2000 %s %s %s %*s %*s # %f','commentstyle','matlab'); 0045 0046 % Convert ra,dec to fractional degrees 0047 [cat.ra,cat.dec]=ast2fracdeg(ra,dec); 0048 0049 % Calc hour angle for given lst 0050 cat.ha=lst*15-cat.ra; 0051 0052 % Calc az,el for site at given latitude 0053 d2r=pi/180; r2d=180/pi; 0054 [cat.az,cat.el]=hdl2ae(cat.ha*d2r,cat.dec*d2r,lat*d2r); 0055 cat.az=cat.az*r2d; cat.el=cat.el*r2d; 0056 0057 % Cut down to stars above elevation and magnitude limits 0058 ind=cat.el>ellim&cat.mag<maglim; 0059 cat=structcut(cat,ind); 0060 0061 % Cut out stars close to zenith as causes hangup 0062 ind=cat.el<83; 0063 cat=structcut(cat,ind); 0064 0065 % Move az<-90 sources to +ve 0066 ind=cat.az<-90; 0067 cat.az(ind)=cat.az(ind)+360; 0068 0069 % Sort to decreasing azimuth order to make for an efficent 0070 % star pointing run 0071 [x,ind]=sort(cat.az); 0072 cat=structcut(cat,flipud(ind)); 0073 0074 % Print list for inclusion into pointing script 0075 junk = lst:minuteDiff/60:(lst + minuteDiff/60*length(cat.az)); 0076 for i=1:length(cat.az) 0077 disp(sprintf('{%8s, %3.2f}, # %7.2f %6.2f %5.2f',... 0078 cat.name{i},junk(i),cat.az(i),cat.el(i),cat.mag(i))); 0079 end 0080