Home > reduc > whichHostSa.m

whichHostSa

PURPOSE ^

Here we want to have the function know which directory to look for the

SYNOPSIS ^

function [defaultDataDir defaultCalfile defaultReader defaultLogDir] = whichHost()

DESCRIPTION ^

 Here we want to have the function know which directory to look for the
 data depending on the machine name.
 For simplicity, we assign numbers to each hostname as follows:
 0 - cbasscontrol  (OVRO)
 1 - haggis  (CALTECH)
 2 - falcon  (MANCHESTER)
 3 - aslx10  (OXFORD)
 4 - asosx48 (OXFORD)
 5 - asosx39 (OXFORD)
 6  - aslx2   (OXFORD)
 7  - pravda  (Oliver)
 8  - elephant (Oxford)
 9  - redkite (MANCHESTER)
 10 - springbok (CALTECH)
 11 - zap (OVRO)
 12 - tuna (used to be cbassDell) (Cbass-S)
 13 - cyclops== (UKZN)
 13 - sparrow (Manchester)
 14 - elwood ( Rhodes)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [defaultDataDir defaultCalfile defaultReader defaultLogDir] = whichHost()
0002 
0003 % Here we want to have the function know which directory to look for the
0004 % data depending on the machine name.
0005 % For simplicity, we assign numbers to each hostname as follows:
0006 % 0 - cbasscontrol  (OVRO)
0007 % 1 - haggis  (CALTECH)
0008 % 2 - falcon  (MANCHESTER)
0009 % 3 - aslx10  (OXFORD)
0010 % 4 - asosx48 (OXFORD)
0011 % 5 - asosx39 (OXFORD)
0012 % 6  - aslx2   (OXFORD)
0013 % 7  - pravda  (Oliver)
0014 % 8  - elephant (Oxford)
0015 % 9  - redkite (MANCHESTER)
0016 % 10 - springbok (CALTECH)
0017 % 11 - zap (OVRO)
0018 % 12 - tuna (used to be cbassDell) (Cbass-S)
0019 % 13 - cyclops== (UKZN)
0020 % 13 - sparrow (Manchester)
0021 % 14 - elwood ( Rhodes)
0022 
0023   [s w] = unix('hostname');
0024 
0025 hostNum = nan;
0026 
0027 % check for cbasscontrol
0028 host = strfind(w, 'cbasscontrol');
0029 if(~isempty(host))
0030   hostNum = 0;
0031   defaultDataDir = '/mnt/data/cbass/arc';
0032   defaultLogDir  = '/mnt/data/cbass/log';
0033   defaultCalfile = '/home/cbass/gcpCbass/control/conf/cbass/cal';
0034   defaultReader  = '/home/cbass/gcpCbass/matlab/common/';
0035 end
0036 
0037 host = strfind(w, 'zap');
0038 if(~isempty(host))
0039   hostNum = 11;
0040   display('Here');
0041   defaultDataDir = '/misc/data/cbass/arc/';
0042   defaultLogDir  = '/misc/data/cbass/log/';
0043   defaultCalfile = '/home/sjcm/gcpCbass/control/conf/cbass/cal';
0044   defaultReader  = '/home/sjcm/gcpCbass/matlab/common/';
0045 end
0046 
0047 % check for haggis
0048 host = strfind(w, 'haggis');
0049 if(~isempty(host))
0050   hostNum = 1;
0051   defaultDataDir = '/scr/cbassarc/data/arc';
0052   defaultLogDir  = '/scr/cbassarc/data/log';
0053   defaultCalfile = '/home/cbassuser/cbass/gcpCbass/control/conf/cbass/cal';
0054   defaultReader  = '/home/cbassuser/cbass/gcpCbass/matlab/common/';
0055 end
0056 
0057 % check for springbok
0058 host = strfind(w, 'springbok');
0059 if(~isempty(host))
0060   hostNum = 10;
0061   defaultDataDir = '/disk/haggis1/cbassarc/data/arc';
0062   defaultLogDir  = '/disk/haggis1/cbassarc/data/log';
0063   defaultCalfile = '/home/sjcm/cbass/gcpCbass/control/conf/cbass/cal';
0064   defaultReader  = '/home/sjcm/cbass/gcpCbass/matlab/common/';
0065 end
0066 
0067 % check for falcon
0068 host = strfind(w, 'falcon');
0069 if(~isempty(host))
0070   hostNum = 2;
0071   defaultDataDir = '/nas/scratch/cdickins/cbass/CBASS_SOUTHARC/arc';
0072   defaultLogDir = '/nas/scratch/cdickins/cbass/CBASS_SOUTHARC/log';
0073   defaultCalfile = '/home/muchovej/cbass/gcpCbass/control/conf/cbass/cal';
0074   defaultReader  = '/home/muchovej/cbass/gcpCbass/matlab/common/';
0075 end
0076 
0077 % check for redkite
0078 host = strfind(w, 'redkite');
0079 if(~isempty(host))
0080   hostNum = 9;
0081   defaultDataDir = '/scratch/redkite_4/cdickins/cbass/cbassarc/data/arc';
0082   defaultLogDir = '/scratch/redkite_4/cdickins/cbass/cbassarc/data/log';
0083   defaultCalfile = '/home/muchovej/cbass/gcpCbass/control/conf/cbass/cal';
0084   defaultReader  = '/home/muchovej/cbass/gcpCbass/matlab/common/';
0085 end
0086 
0087 % check for sparrow
0088 host = strfind(w, 'sparrow');
0089 if(~isempty(host))
0090   hostNum = 13;
0091   defaultDataDir = '/stripe/scratch/mpeel/cbass_south_arc/arc';
0092   defaultLogDir = '/stripe/scratch/mpeel/cbass_south_arc/log';
0093   defaultCalfile = '/home/muchovej/cbass/gcpCbass/control/conf/cbass/cal';
0094   defaultReader  = '/home/muchovej/cbass/gcpCbass/matlab/common/';
0095 end
0096 
0097 % check for aslx
0098 host = strfind(w, 'aslx10');
0099 if(~isempty(host))
0100   hostNum = 3;
0101   defaultDataDir = '/data/cbassuser/data/arc';
0102   defaultLogDir  = '/data/cbassuser/data/log';
0103   defaultCalfile = '/home/Muchovej/cbass/gcpCbass/control/conf/cbass/cal';
0104   defaultReader  = '/home/Muchovej/cbass/gcpCbass/matlab/common/';
0105 end
0106 
0107 % check for asosx48
0108 host = strfind(w, 'asosx48');
0109 if(~isempty(host))
0110   hostNum = 4;
0111 defaultDataDir = '/Volumes/Data2/CBASS_ARC';
0112 defaultLogDir = '/Volumes/Data2/CBASS_LOG';
0113 %defaultDataDir = '/Volumes/C-BASS-1';
0114 %defaultDataDir = '/Volumes/C-BASS/data';
0115 
0116 defaultCalfile = '/Users/taylorA/CBASS/cbass/gcpCbass/control/conf/cbass/cal';
0117 defaultReader  = '/Users/taylorA/CBASS/cbass/gcpCbass/matlab/common/';
0118 end
0119 
0120 % check for pravda
0121 host = strfind(w, 'pravda');
0122 if(~isempty(host))
0123   hostNum = 7;
0124   defaultDataDir = '/Volumes/DATA/cbass/arc';
0125   defaultLogDir = '/Volumes/DATA/cbass/log';
0126   defaultCalfile = '/Users/oliver/C-BASS/software/cbass/gcpCbass/control/conf/cbass/cal';
0127   defaultReader  = '/Users/oliver/C-BASS/software/cbass/gcpCbass/matlab/common/';
0128 end
0129 
0130 host = strfind(w, 'asosx39');
0131 if(~isempty(host))
0132   hostNum = 5;
0133 defaultDataDir = '/Volumes/My Book/zuntz/cbass/arc';
0134 defaultLogDir = '/Volumes/My Book/zuntz/cbass/log';
0135 defaultCalfile = '/Users/zuntz/src/cbass/cbass/gcpCbass/control/conf/cbass/cal';
0136 defaultReader  = '/Users/zuntz/src/cbass/cbass/gcpCbass/matlab/common/';
0137 end
0138 
0139 host = strfind(w, 'aslx2');
0140 if(~isempty(host))
0141   hostNum = 6;
0142 defaultDataDir = '/home/jxl/cbass_data/arc';
0143 defaultLogDir = '/home/jxl/cbass_data/log';
0144 defaultCalfile = '/home/jxl/cbass/gcpCbass/control/conf/cbass/cal';
0145 defaultReader  = '/home/jxl/cbass/gcpCbass/matlab/common/';
0146 end
0147 
0148 host = strfind(w, 'aslx5');                                                     
0149 if(~isempty(host))
0150  hostNum = 7; 
0151 defaultDataDir = '/home/LeechJ/cbass_data/arc';
0152 defaultLogDir = '/home/LeechJ/cbass_data/log';
0153 defaultCalfile = '/home/LeechJ/cbass/gcpCbass/control/conf/cbass/cal';
0154 defaultReader  = '/home/LeechJ/cbass/gcpCbass/matlab/common/';
0155 end  
0156 
0157 host = strfind(w, 'elephant');                                                     
0158 if(~isempty(host))
0159  hostNum = 8; 
0160 defaultDataDir = '/elephant/CBASS_SOUTHARC/arc/';
0161 defaultLogDir = '/elephant/CBASS_SOUTHARC/log/';
0162 defaultCalfile = '/elephant/CBASS_SOUTHARC/cal';
0163 defaultReader  = '/elephant/cbassSa/gcpCbass/matlab/common/';
0164 end   
0165 
0166 host = strfind(w, 'tuna');
0167 if(~isempty(host))
0168  hostNum = 12;
0169 defaultDataDir = '/localdata/arc/';
0170 defaultLogDir = '/localdata/log/';
0171 defaultCalfile = '/home/cbassuser/cbass/gcpCbass/control/conf/cbass/cal';
0172 defaultReader  = '/home/cbassuser/cbass/gcpCbass/matlab/common/';
0173 end
0174 
0175 host = strfind(w, 'cbaezar');
0176 if(~isempty(host))
0177  hostNum = 9; 
0178 defaultDataDir = '/data/cbassdata/arc/';
0179 %defaultDataDir = '/home/cbassuser/cbassdata/';
0180 defaultLogDir = '/data/cbassdata/log/';
0181 defaultCalfile = '/home/cbassuser/cbass/gcpCbass/control/conf/cbass/cal';
0182 defaultReader  = '/home/cbassuser/cbass/gcpCbass/matlab/common/';
0183 end        
0184 
0185 host = strfind(w, 'cyclops');                                                     
0186 if(~isempty(host))
0187  hostNum = 13; 
0188 defaultDataDir = '/data/charlesc/cbassDataSouth/data/arc/';
0189 defaultLogDir = '/data/charlesc/cbassDataSouth/data/log/';
0190 defaultCalfile = '/home/stephenm/cbass/gcpCbass/control/conf/cbass/cal';
0191 defaultReader  = '/home/stephenm/cbass/gcpCbass/matlab/common/';
0192 end   
0193 
0194 host = strfind(w, 'elwood');
0195 if(~isempty(host))
0196 hostNum = 14;
0197 defaultDataDir = '/net/aretha/vault/copley/cbassDataSouth/arc/';
0198 defaultLogDir = '/net/aretha/vault/copley/cbassDataSouth/log/';
0199 defaultCalfile = '/home/copley/cbass/gcpCbass/control/conf/cbass/cal';
0200 defaultReader  = '/home/copley/cbass/gcpCbass/matlab/common/';
0201 end     
0202              
0203 
0204 
0205 if(isnan(hostNum))
0206   error('Can not match your host name to a recognized one');
0207   error('Update read_arc.m to reflect your host');
0208 end
0209 
0210 return;
0211

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