Home > . > getifo.m

getifo

PURPOSE ^

GETIFO - get detector coordinates

SYNOPSIS ^

function Cordnt = getifo(detId)

DESCRIPTION ^

 GETIFO - get detector coordinates

 Cordnt = getifo(detId)

 detId      detector identifier string in any form of mixed case

 Cordnt    structure containing coordinate info for IFO
   .V         X-arm unit vector in Cartesian coordinates
   .W         Y-arm unit vector in Cartesian coordinates
   .LAT       beam splitter latitude in rad
   .CODEC     cosine of the beam splitter co-declination
   .LONG      beam splitter longitude in rad
   .WGS84     beam splitter location in WGS-84 coordinates in m
   .R         beam splitter distance from center of the earth in m

 Currently supported detectors are:
       'H1'    LIGO 4km IFO at LHO
       'H2'    LIGO 2km IFO at LHO
       'L1'    LIGO 4km IFO at LLO

 $Id: getifo.m,v 1.9 2005/04/05 13:14:23 tzs Exp $

 SEE ALSO: GRAVEN, IFODELAY, DETPROJ, MAKELIST

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function Cordnt = getifo(detId)
0002 
0003 % GETIFO - get detector coordinates
0004 %
0005 % Cordnt = getifo(detId)
0006 %
0007 % detId      detector identifier string in any form of mixed case
0008 %
0009 % Cordnt    structure containing coordinate info for IFO
0010 %   .V         X-arm unit vector in Cartesian coordinates
0011 %   .W         Y-arm unit vector in Cartesian coordinates
0012 %   .LAT       beam splitter latitude in rad
0013 %   .CODEC     cosine of the beam splitter co-declination
0014 %   .LONG      beam splitter longitude in rad
0015 %   .WGS84     beam splitter location in WGS-84 coordinates in m
0016 %   .R         beam splitter distance from center of the earth in m
0017 %
0018 % Currently supported detectors are:
0019 %       'H1'    LIGO 4km IFO at LHO
0020 %       'H2'    LIGO 2km IFO at LHO
0021 %       'L1'    LIGO 4km IFO at LLO
0022 %
0023 % $Id: getifo.m,v 1.9 2005/04/05 13:14:23 tzs Exp $
0024 %
0025 % SEE ALSO: GRAVEN, IFODELAY, DETPROJ, MAKELIST
0026 
0027 % DETERMINE desired detector
0028 % GENERATE structure containing coordinates
0029 % RETURN structure
0030 
0031 % Initalize Cordnt struct
0032 Cordnt = deal(struct('V', [], 'W', [], 'LAT', [], 'CODEC', [], 'LONG', ...
0033     [], 'WGS84', [], 'R', []));
0034 
0035 % Define converstion constant from degrees to radians
0036 DEG2RAD = pi/180;
0037 
0038 % Make detId all uppercase
0039 detId = upper(detId);
0040 
0041 % All LIGO coordinates (except CODEC & R) are verbatim from LIGO-P000006-D-E:
0042 %   Rev. Sci. Instrum., Vol. 72, No. 7, July 2001
0043 
0044 if strcmp(detId, 'H1') || strcmp(detId, 'H2')
0045     % Generate coordinates for LHO:
0046     
0047     % X-arm unit vector
0048     Cordnt.V = [-0.223891216, 0.799830697, 0.556905359];
0049     % Y-arm unit vector
0050     Cordnt.W = [-0.913978490, 0.0260953206, -0.404922650];
0051     % Beam splitter latitude
0052     Cordnt.LAT = dms2dec('N', [46, 27, 18.527841])*DEG2RAD; % rad
0053     % Beam splitter co-declination determined from latitude
0054     Cordnt.CODEC = cos((pi/2)-Cordnt.LAT);
0055     % Beam splitter longitude
0056     Cordnt.LONG = dms2dec('W', [119, 24, 27.565681])*DEG2RAD; % rad
0057     % WGS-84 coordinates of beam splitter (Only one coordinate specified in
0058     % the document for both H1 and H2)
0059     Cordnt.WGS84 = [-2.161414928e+6, -3.834695183e+6, 4.600350224e+6]; % m
0060     % Beam splitter distance from center of the Earth determined from
0061     % WGS-84 coordinates
0062     Cordnt.R = sqrt(sum(Cordnt.WGS84.^2)); % m
0063 elseif strcmp(detId, 'L1')
0064     % Generate coordinates for LLO:
0065     
0066     % X-arm unit vector
0067     Cordnt.V = [-0.954574615, -0.141579994, -0.262187738];
0068     % Y-arm unit vector
0069     Cordnt.W = [0.297740169, -0.487910627, -0.820544948]; % rad
0070     % Beam splitter latitude
0071     Cordnt.LAT = dms2dec('N', [30, 33, 46.419531])*DEG2RAD; % rad
0072     % Beam splitter co-declination determined from latitude
0073     Cordnt.CODEC = cos((pi/2)-Cordnt.LAT);
0074     % Beam splitter longitude
0075     Cordnt.LONG = dms2dec('W', [90, 46, 27.265294])*DEG2RAD; % rad
0076     % WGS-84 coordinates of beam splitter
0077     Cordnt.WGS84 = [-74276.04192, -5.496283721e+6, 3.224257016e+6]; % m
0078     % Beam splitter distance from center of the Earth determined from
0079     % WGS-84 coordinates
0080     Cordnt.R = sqrt(sum(Cordnt.WGS84.^2)); % m
0081 elseif strcmp(detId, 'GEO')
0082     % Generate coordinates for GEO600
0083     
0084     % Calculated from coordinates on
0085     % http://www.geo600.uni-hannover.de/geo600/project/location.html
0086     % X-arm unit vector
0087     Cordnt.V = [-0.6260, -0.5522, 0.5507];    
0088     % Y-arm unit vector
0089     Cordnt.W = [-0.4452, 0.8665, 0.2257];
0090     
0091     % From http://www.geo600.uni-hannover.de/geo600/project/location.html
0092     % and reference 45 of Anderson et al Phys. Rev. D 63, 042003
0093     % Beam splitter latitiude
0094     Cordnt.LAT = dms2dec('N', [52, 14, 42.528])*DEG2RAD; % rad
0095     % Beam splitter co-declination determined from latitude
0096     Cordnt.CODEC = cos((pi/2)-Cordnt.LAT);    
0097     % Beam splitter longitude
0098     Cordnt.LONG = dms2dec('E', [9, 48, 25.894])*DEG2RAD; % rad
0099     % WGS-84 coordinates of beam splitter
0100     Cordnt.WGS84 = [3.85630994953e6, 666598.956352, 5.01964141692e6]; %m
0101     % Beam splitter distance from center of the Earth determined from
0102     % WGS-84 coordinates
0103     Cordnt.R = sqrt(sum(Cordnt.WGS84.^2)); % m
0104     
0105 elseif strcmp(detId, 'TAMA')
0106     % Generate coordinates for TAMA300
0107     
0108     % From Anderson et al Phys. Rev. D 63, 042003
0109     % X-arm unit vector
0110     Cordnt.V = [0.6490, 0.7608, 0];
0111     % Y-arm unit vector
0112     Cordnt.W = [-0.4437, 0.3785, -0.8123];
0113     % Beam splitter latitiude
0114     Cordnt.LAT = dms2dec('N', [35, 40, 35.6])*DEG2RAD; %rad
0115     % Beam splitter co-declination determined from latitude
0116     Cordnt.CODEC = cos((pi/2)-Cordnt.LAT);    
0117     % Beam splitter longitude
0118     Cordnt.LONG = dms2dec('E', [139, 32, 9.8])*DEG2RAD; %rad
0119     % WGS-84 coordinates of beam splitter
0120     Cordnt.WGS84 = [-3.946409, 3.366259, 3.699151]*1e6; %m
0121     % Beam splitter distance from center of the Earth determined from
0122     % WGS-84 coordinates
0123     Cordnt.R = sqrt(sum(Cordnt.WGS84.^2)); % m
0124     
0125 elseif strcmp(detId, 'VIRGO')
0126     % Generate coordinates for VIRGO
0127     
0128     % From Anderson et al Phys. Rev. D 63, 042003
0129     % X-arm unit vector
0130     Cordnt.V = [-0.7005, 0.2085, 0.6826];
0131     % Y-arm unit vector
0132     Cordnt.W = [-0.0538, -0.9691 0.2408];
0133     % Beam splitter latitiude
0134     Cordnt.LAT = dms2dec('N', [43, 37, 53.0921])*DEG2RAD; %rad
0135     % Beam splitter co-declination determined from latitude
0136     Cordnt.CODEC = cos((pi/2)-Cordnt.LAT);    
0137     % Beam splitter longitude
0138     Cordnt.LONG = dms2dec('E', [10, 30, 16.1878])*DEG2RAD; %rad
0139     % WGS-84 coordinates of beam splitter
0140     Cordnt.WGS84 = [4.546374, 0.842990, 4.378577]*1e6; %m
0141     % Beam splitter distance from center of the Earth determined from
0142     % WGS-84 coordinates
0143     Cordnt.R = sqrt(sum(Cordnt.WGS84.^2)); % m
0144     
0145 else
0146     error('getifo: The detId you entered is not currently listed.')
0147 end
0148 
0149 return
0150 
0151 % ~~~ END MAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0152 
0153 function degdec = dms2dec(nsew, coord)
0154 
0155 % DMS2DEC - convert longitude and latitude in dms to degrees decimal
0156 %
0157 % deg2dec = dms2dec(nsew, coord)
0158 %
0159 % nsew    string indicating whether longitude is measured east ('E') or
0160 %         west ('W') or latitude is measured north ('N') or south ('S')
0161 % coord   1x3 vector defining the coordinates in degrees (coord(1)),
0162 %         minutes (coord(2)) and seconds (coord(3))
0163 %
0164 % degdec    coordinates in degrees decimal.  A negative longiude indicates
0165 %           Western Hemisphere while a negative latitude value indicates
0166 %           Southern Hemisphere
0167 
0168 % MAKE nsew upper case for ease of comparison
0169 % DEFINE sign of converted coordinates
0170 % CONVERT coordinates
0171 
0172 % Make nsew all upper case for ease in using strcmp
0173 nsew = upper(nsew);
0174 
0175 % Define sign of converted coordinates
0176 if strcmp(nsew, 'S')
0177     % If in Southern Hemisphere, the coordinates will be negative
0178     pm = -1;
0179 elseif strcmp(nsew, 'N')
0180     % If in the Northern Hemisphere, the coordinates will be positive
0181     pm = 1;
0182 elseif strcmp(nsew, 'W')
0183     % If in the Western Hemisphere, the coordinates will be negative
0184     pm = -1;
0185 elseif strcmp(nsew, 'E')
0186     % If in the Eastern Hemisphere, the coordinates will be postive
0187     pm = 1;
0188 else
0189     error(['getifo -> dms2dec: Please enter ''N'', ''S'', ''E'' ' ...
0190             'or ''W'' for nsew'])
0191 end
0192 
0193 % Convert dms into degrees decimal
0194 degdec = pm*(coord(1)+(coord(2)/60)+(coord(3)/3600));
0195 
0196 return

Generated on Thu 12-May-2005 11:48:48 by m2html © 2003