diff --git a/README b/README index fb15f8a..69e84ff 100644 --- a/README +++ b/README @@ -4,28 +4,80 @@ Developer: Jonathan Pober (jpober uw edu). =============================================================================== +This code has been modified by Pallav Chanda (pallav16 iiserb ac in) during a summer internship at IIT Indore under the guidance of Abhirup Datta (abhirup datta iiti ac in) in Summer 2019. + +The work involves understanding the code, upgrading the dependencies, increasing its efficiency, adding new funtions and more. Please read project_report.pdf to understand how to run the code. It also contains more details about the new fuctions and the changes. + +DO THE FOLLOWING TO RUN: + +python fast_mk_array_file.py -C hera127 +This generates an array file for calc_sense. Change calibration file as needed from calibration_files folder (DO NOT include folder_name and .py, eg. mwa_compact replaces hera127 for MWA Compact). + +python calc_sense.py [*.npz] +Calculates sensitivity +([*.npz] is name of generated array file from fast_mk_array_file.py) +(Result stored in another array file) + +python plot_sense.py [*.npz] +Image of the calculated sensitivity and saves a .csv file for the same. +([*.npz] is name of earlier generated array file from calc_sense.py) + +Please direct any Questions, comments, or feedback about the edits to pallav16 iiserb ac in. + +=============================================================================== + Dependencies: -numpy -scipy -aipy (https://github.com/AaronParsons/aipy) +Python 2 + +numpy (Tested on v1.16.6) +scipy (Tested on v1.2.3) +aipy (https://github.com/AaronParsons/aipy) (Tested on v3.0.1) +healpy (Tested on v1.13.0) =============================================================================== There are two main code pieces: mk_array_file.py and calc_sense.py. The array files produced by mk_array_file are the inputs to calc_sense.py. The inputs to mk_array_file.py are calibration files, which are also python scripts, but not executable. Each of these components will be described in turn. + calibration files: -These files will contain all the information about the array you are trying to calculate sensitivities for. Most importantly, they contain the positions of all the antennas, but also information about the antenna size and system temperature. An example calibration file for use with this package has been included: hera127.py. To modify for other arrays, you should only need to change the values in the "ARRAY SPECIFIC PARAMETERS" section. +These files will contain all the information about the array you are trying to calculate sensitivities for. Most importantly, they contain the positions of all the antennas, but also information about the antenna size and system temperature. Few calibration files have been included in the folder calibration_files for use with this package. To modify for other arrays, you should only need to change the values in the "ARRAY SPECIFIC PARAMETERS" section. +[Edits by Pallav Chanda: Added calibration files for MWA Compact Baseline, MWA Long Baseline, SKA and VLA arrays.] + mk_array_file.py: This code takes calibration files as input (note that when calling a calibration file from the command line, one needs to omit the '.py' on the end), and returns a .npz file that can be read by calc_sense.py. As it stands, this code should require no user modification for a drift scan with any antenna array. For a tracked scan, the opts.track keyword should be set to the length of the track in hours. Note that no correction is made for the dipole beam of phased array tiles while tracking. Therefore, this calculation will break down for very long tracks. The opts.bl_max keyword can also be specified to set a maximum size of the uv plane simulated (by default the longest baseline in the array is always included). This can be useful for speeding up calculations where outrigger antennas greatly increase the size of the uv plane but provide little EoR sensitivity. +[Edits by Pallav Chanda: Upgraded dependencies and minor changes.] + + +fast_mk_array_file.py: +[Added by Pallav Chanda] + +Implements 3-D arrays for storing data and also a few function definitions in mk_array_file.py so as to speed up the code by as much as 10-12% while consuming 4-6 times the memory. The user can choose to use it depending on machine configuration. + + +calc_sense.py: + +This is the main portion of the package. To run with defaults, it should only need an array file as input. Through the command line, the user can change the foreground avoidance/subtraction model, the observing frequency, the epoch of reionization model (which is required to calculate sample variance), and the total observing time. A redshift 9.5 ~50% ionization model produced by 21cmFAST has been included. The code can natively handle any power spectrum output from 21cmFAST, but should be easily modifiable to include other models. Since the calculated sensitivities are for a single frequency, one should change the observing frequency if one uses a power spectrum from a redshift other than the default (z = 9.5). Changing more detailed parameters, like the sky temperature model, will require editing of the code itself. The code also now contains the opts.no_ns option, which excludes the u = 0 column of the uv plane; this effectively removes north/south oriented baselines from the sensitivity ccalculation, which can be corrupted by systematics due to their low fringe rate. +[Edits by Pallav Chanda: Changed system, antenna temperature model and minor changes.] + + +calc_sense_mcquinn.py +[Written by Pallav Chanda, available in main-pallav branch] + +This code modifies calc_sense.py to implement formulae from McQuinn (2008). Please check main-pallav branch for further details. + + +plot_sense.py: +[Added by Pallav Chanda] + +Plots the calculated sensitivity and saves a CSV file for the same. Code doesn't automatically name files according to input. Do rename both output files manually or it will get replaced in the next run for plot_sense.py + -calc_sense.py: +[Further edits by Pallav Chanda: Solved various dependencies. Updated README with dependencies. Few files sorted for better understanding and codes modified accordingly. Added instructions to use the code in README.] -This is the main portion of the package. To run with defaults, it should only need an array file as input. Through the command line, the user can change the foreground avoidance/subtraction model, the observing frequency, the epoch of reionization model (which is required to calculate sample variance), and the total observing time. A redshift 9.5 ~50% ionization model produced by 21cmFAST has been included. The code can natively handle any power spectrum output from 21cmFAST, but should be easily modifiable to include other models. Since the calculated sensitivities are for a single frequency, one should change the observing frequency if one uses a power spectrum from a redshift other than the default (z = 9.5). Changing more detailed parameters, like the sky temperature model, will require editing of the code itself. The code also now contains the opts.no_ns option, -which excludes the u = 0 column of the uv plane; this effectively removes north/south oriented baselines from the sensitivity ccalculation, which can be corrupted by systematics due to their low fringe rate. =========================================================================== @@ -59,4 +111,4 @@ noise_interp2d: -Questions, comments, or feedback should be directed to jpober uw edu.If you use this code in any of your work, please acknowledge Pober et al. 2013AJ....145...65P and Pober et al. 2014ApJ...782...66P and provide a link to this repository. +Questions, comments, or feedback should be directed to jpober uw edu. If you use this code in any of your work, please acknowledge Pober et al. 2013AJ....145...65P and Pober et al. 2014ApJ...782...66P and provide a link to this repository. diff --git a/calc_sense.py b/calc_sense.py index 2ae6886..0618547 100755 --- a/calc_sense.py +++ b/calc_sense.py @@ -88,7 +88,8 @@ def find_nearest(array,value): nchan = opts.nchan kpls = dk_deta(z) * n.fft.fftfreq(nchan,B/nchan) -Tsky = 60e3 * (3e8/(array['freq']*1e9))**2.55 # sky temperature in mK +Tsky = 180e3 * (array['freq']*1e3/180)**-2.5 # sky temperature in mK +Tsys = Tsky #Trx not being added here as Tsky being calculated according to given formula n_lstbins = opts.n_per_day*60./obs_duration #===============================EOR MODEL=================================== @@ -143,7 +144,6 @@ def find_nearest(array,value): if k > n.max(mk): continue tot_integration = uv_coverage[iv,iu] * opts.ndays delta21 = p21(k) - Tsys = Tsky + Trx bm2 = bm/2. #beam^2 term calculated for Gaussian; see Parsons et al. 2014 bm_eff = bm**2 / bm2 # this can obviously be reduced; it isn't for clarity scalar = X2Y(z) * bm_eff * B * k**3 / (2*n.pi**2) @@ -175,8 +175,11 @@ def find_nearest(array,value): sense1d[ind] = kbin**-.5 Tsense1d[ind] = Tsense1d[ind]**-.5 +#save the power spectrum in an array +power = p21(kmag) + #save results to output npz -n.savez('%s_%s_%.3f.npz' % (name,opts.model,array['freq']),ks=kmag,errs=sense1d,T_errs=Tsense1d) +n.savez('%s_%s_%.3f.npz' % (name,opts.model,array['freq']), ks=kmag, errs=sense1d, T_errs=Tsense1d, ps21=power) #calculate significance with least-squares fit of amplitude A = p21(kmag) diff --git a/calibration_files/antpos_for_other_arrays/mwa_compact_antpos.csv b/calibration_files/antpos_for_other_arrays/mwa_compact_antpos.csv new file mode 100644 index 0000000..ace5ff8 --- /dev/null +++ b/calibration_files/antpos_for_other_arrays/mwa_compact_antpos.csv @@ -0,0 +1,129 @@ +Tile, Lat, Long, Height, m East, m North +11,-26.70094317,116.6692851,377.018,-149.785,265.814 +12,-26.70090368,116.6698319,377.291,-95.365,270.188 +13,-26.70094128,116.6699007,377.315,-88.512,266.021 +14,-26.70100978,116.6699993,377.297,-78.698,258.431 +15,-26.70109983,116.6699165,377.344,-86.94,248.452 +16,-26.70113922,116.6697619,377.264,-102.325,244.088 +17,-26.70115554,116.6698521,377.275,-93.346,242.279 +18,-26.70135417,116.6692997,377.22,-148.33,220.271 +21,-26.70079159,116.6694543,377.01,-132.939,282.611 +22,-26.70085578,116.6693847,377.026,-139.867,275.498 +23,-26.70077134,116.6695475,377.058,-123.667,284.854 +24,-26.70080288,116.6698567,377.261,-92.889,281.358 +25,-26.70078951,116.670008,377.26,-77.835,282.839 +26,-26.70083713,116.6699513,377.307,-83.476,277.563 +27,-26.70088158,116.6700165,377.304,-76.988,272.637 +28,-26.7007258,116.6690216,376.632,-176.006,289.903 +31,-26.70152311,116.6705527,376.808,-23.62,201.546 +32,-26.70133534,116.6705509,376.876,-23.802,222.353 +33,-26.70121967,116.6703832,376.965,-40.489,235.17 +34,-26.70119849,116.6702422,377.128,-54.527,237.518 +35,-26.70107852,116.6701385,377.244,-64.851,250.813 +36,-26.70100101,116.670086,377.272,-70.075,259.402 +37,-26.70096243,116.6701866,377.186,-60.057,263.676 +38,-26.70095459,116.6702809,377.106,-50.676,264.546 +41,-26.70089542,116.6701069,377.242,-67.99,271.103 +42,-26.70088818,116.6701866,377.21,-60.058,271.905 +43,-26.70082579,116.6700778,377.259,-70.885,278.818 +44,-26.70087608,116.6703325,377.072,-45.54,273.245 +45,-26.7008488,116.670256,377.096,-53.156,276.268 +46,-26.70096226,116.6705624,376.954,-22.659,263.694 +47,-26.70077645,116.6702365,377.188,-55.097,284.285 +48,-26.70087043,116.6706403,376.916,-14.9,273.87 +61,-26.70138204,116.6697322,377.26,-105.281,217.18 +62,-26.70126489,116.6698001,377.265,-98.53,230.162 +63,-26.70127233,116.6699677,377.275,-81.845,229.337 +64,-26.701193,116.6699909,377.275,-79.541,238.128 +65,-26.70111292,116.6700353,377.26,-75.12,247.002 +66,-26.70121284,116.6700765,377.244,-71.017,235.929 +67,-26.70127548,116.6701614,377.214,-62.567,228.987 +68,-26.70133957,116.6702807,377.082,-50.691,221.885 +81,-26.69816917,116.6691778,374.801,-160.465,573.207 +82,-26.70017899,116.6695035,376.581,-128.046,350.494 +83,-26.70068851,116.670089,377.199,-69.771,294.031 +84,-26.70065938,116.669999,377.203,-78.731,297.259 +85,-26.70062641,116.6697457,377.058,-103.941,300.914 +86,-26.70073486,116.6697836,377.164,-100.172,288.896 +87,-26.69999265,116.6668168,374.538,-395.452,371.152 +88,-26.69982907,116.6681421,375.339,-263.547,389.274 +91,-26.70150438,116.6740669,373.957,326.141,203.608 +92,-26.70159479,116.6725325,375.037,173.425,193.595 +93,-26.70069923,116.6707648,376.899,-2.515,292.841 +94,-26.70074772,116.6703223,377.122,-46.554,287.469 +95,-26.70067144,116.670226,377.163,-56.141,295.922 +96,-26.70017396,116.6704514,376.986,-33.705,351.048 +97,-26.69850344,116.6712937,376.204,50.127,536.159 +98,-26.69865699,116.6716429,376.336,84.88,519.141 +HexE01,-26.700755,116.671683,376.24,86.373,284.121 +HexE02,-26.700755,116.671824,376.172,100.347,284.097 +HexE03,-26.700755,116.671964,375.922,114.346,284.092 +HexE04,-26.700755,116.672105,375.764,128.34,284.104 +HexE05,-26.700865,116.671613,376.232,79.369,271.986 +HexE06,-26.700865,116.671753,376.061,93.339,271.976 +HexE07,-26.700865,116.671894,375.941,107.365,271.957 +HexE08,-26.700865,116.672035,375.816,121.355,271.991 +HexE09,-26.700865,116.672175,375.651,135.367,271.962 +HexE10,-26.700974,116.671542,376.226,72.38,259.848 +HexE11,-26.700974,116.671683,376.091,86.349,259.844 +HexE12,-26.700974,116.671824,375.948,100.373,259.847 +HexE13,-26.700974,116.671964,375.814,114.357,259.839 +HexE14,-26.700974,116.672105,375.685,128.346,259.848 +HexE15,-26.700974,116.672246,375.498,142.36,259.849 +HexE16,-26.701084,116.671472,376.221,65.362,247.723 +HexE17,-26.701084,116.671613,376.088,79.366,247.742 +HexE18,-26.701084,116.671753,375.943,93.355,247.743 +HexE19,-26.701084,116.672035,375.71,121.369,247.744 +HexE20,-26.701084,116.672175,375.576,135.353,247.721 +HexE21,-26.701084,116.672316,375.392,149.358,247.731 +HexE22,-26.701193,116.671543,376.085,72.363,235.61 +HexE23,-26.701193,116.671683,375.969,86.344,235.606 +HexE24,-26.701193,116.671824,375.853,100.367,235.616 +HexE25,-26.701193,116.671964,375.74,114.335,235.598 +HexE26,-26.701193,116.672105,375.559,128.349,235.61 +HexE27,-26.701193,116.672245,375.442,142.34,235.586 +HexE28,-26.701302,116.671613,375.995,79.374,223.474 +HexE29,-26.701302,116.671753,375.867,93.343,223.488 +HexE30,-26.701303,116.671894,375.747,107.357,223.462 +HexE31,-26.701303,116.672035,375.56,121.372,223.488 +HexE32,-26.701303,116.672175,375.466,135.352,223.486 +HexE33,-26.701412,116.671683,375.877,86.362,211.341 +HexE34,-26.701412,116.671824,375.742,100.364,211.338 +HexE35,-26.701412,116.671964,375.593,114.359,211.353 +HexE36,-26.701412,116.672105,375.475,128.345,211.358 +HexS01,-26.701889,116.670715,376.542,-9.985,158.452 +HexS02,-26.70189,116.670855,376.411,4.006,158.456 +HexS03,-26.70189,116.670996,376.27,18.022,158.439 +HexS04,-26.70189,116.671137,376.158,32.013,158.442 +HexS05,-26.701999,116.670644,376.596,-17.013,146.309 +HexS06,-26.701999,116.670785,376.428,-2.985,146.316 +HexS07,-26.701999,116.670926,376.323,11.022,146.311 +HexS08,-26.701999,116.671067,376.16,25.002,146.32 +HexS09,-26.701999,116.671207,376.042,39.014,146.304 +HexS10,-26.702108,116.670574,376.578,-23.966,134.201 +HexS11,-26.702108,116.670715,376.416,-9.983,134.185 +HexS12,-26.702108,116.670855,376.314,4.005,134.206 +HexS13,-26.702108,116.670996,376.164,17.99,134.182 +HexS14,-26.702108,116.671137,376.056,32.009,134.184 +HexS15,-26.702108,116.671278,375.935,46.016,134.221 +HexS16,-26.702218,116.670504,376.602,-30.991,122.075 +HexS17,-26.702218,116.670644,376.457,-16.989,122.07 +HexS18,-26.702218,116.670785,376.332,-2.972,122.058 +HexS19,-26.702218,116.671067,376.089,25.015,122.055 +HexS20,-26.702218,116.671207,375.961,39.014,122.09 +HexS21,-26.702218,116.671348,375.822,53.019,122.052 +HexS22,-26.702327,116.670574,376.51,-23.994,109.937 +HexS23,-26.702327,116.670715,376.345,-9.98,109.944 +HexS24,-26.702327,116.670855,376.229,3.996,109.951 +HexS25,-26.702327,116.670996,376.088,18.025,109.959 +HexS26,-26.702327,116.671137,375.978,32.024,109.944 +HexS27,-26.702327,116.671277,375.834,46.022,109.949 +HexS28,-26.702437,116.670644,376.369,-16.987,97.81 +HexS29,-26.702437,116.670785,376.228,-2.998,97.819 +HexS30,-26.702437,116.670926,376.149,11.019,97.833 +HexS31,-26.702437,116.671067,375.997,25.004,97.836 +HexS32,-26.702437,116.671207,375.917,39.021,97.82 +HexS33,-26.702546,116.670715,376.251,-9.987,85.702 +HexS34,-26.702546,116.670855,376.169,4.018,85.698 +HexS35,-26.702546,116.670996,376.049,18.018,85.716 +HexS36,-26.702546,116.671137,375.92,32.013,85.713 diff --git a/calibration_files/antpos_for_other_arrays/mwa_long_baseline_antpos.csv b/calibration_files/antpos_for_other_arrays/mwa_long_baseline_antpos.csv new file mode 100644 index 0000000..6dcd9ec --- /dev/null +++ b/calibration_files/antpos_for_other_arrays/mwa_long_baseline_antpos.csv @@ -0,0 +1,129 @@ +Tile,Lat,Long,Height,m East,m North,, +51.0,-26.70221568,116.6702318,376.804,-55.56,124.801,, +52.0,-26.70373329,116.6725731,375.008,177.467,-43.377,, +53.0,-26.702647,116.6705719,376.352,-21.71,77.005,, +54.0,-26.70406892,116.6717125,375.761,91.809,-80.565,, +55.0,-26.70568753,116.6723343,376.483,153.7,-259.929,, +56.0,-26.70354372,116.670111,376.175,-67.582,-22.361,, +57.0,-26.70370178,116.6696041,376.055,-118.037,-39.873,, +58.0,-26.70221212,116.6699107,377.033,-87.516,125.197,, +71.0,-26.70162921,116.6688209,377.167,-195.98,189.795,, +72.0,-26.70248331,116.6687987,377.028,-198.194,95.15,, +73.0,-26.7051124,116.667932,374.91,-284.457,-196.181,, +74.0,-26.70373931,116.6668901,375.384,-388.152,-44.022,, +75.0,-26.70348584,116.6662417,375.127,-452.686,-15.933,, +76.0,-26.70167088,116.6660796,374.772,-468.817,185.187,, +77.0,-26.7016897,116.6671275,375.752,-364.524,183.098,, +78.0,-26.7009372,116.6670764,375.256,-369.608,266.484,, +101.0,-26.69763418,116.665585,372.657,-518.046,632.503,, +102.0,-26.69788627,116.6658674,372.955,-489.943,604.568,, +103.0,-26.69959694,116.6650071,373.414,-575.557,415.008,, +104.0,-26.70425834,116.6649055,375.24,-585.675,-101.53,, +105.0,-26.70205837,116.6642244,374.497,-653.467,142.255,, +106.0,-26.70142747,116.6639072,374.276,-685.027,212.168,, +107.0,-26.70255699,116.6599428,377.101,-1079.598,87.018,, +108.0,-26.69815754,116.6604806,374.147,-1026.074,574.527,, +111.0,-26.68835506,116.6674367,371.294,-333.758,1660.732,, +112.0,-26.695237,116.6685078,373.762,-227.151,898.129,, +113.0,-26.69628823,116.6690446,374.267,-173.717,781.638,, +114.0,-26.69529227,116.6682083,373.56,-256.952,892.005,, +115.0,-26.69645739,116.6688306,374.142,-195.018,762.893,, +116.0,-26.69673882,116.6682817,373.844,-249.647,731.709,, +117.0,-26.69698595,116.6677688,373.56,-300.696,704.326,, +118.0,-26.69352253,116.6618531,370.536,-889.471,1088.136,, +121.0,-26.69066023,116.677988,374.798,716.393,1405.255,, +122.0,-26.6977624,116.6736844,375.171,288.066,618.265,, +123.0,-26.69640744,116.6731845,375.856,238.31,768.413,, +124.0,-26.6959444,116.6730797,375.805,227.878,819.724,, +125.0,-26.69598479,116.6714074,376.054,61.443,815.255,, +126.0,-26.69602746,116.6701985,375.222,-58.874,810.53,, +127.0,-26.69476663,116.671144,376.346,35.224,950.242,, +128.0,-26.69059632,116.6708003,373.839,1.015,1412.363,, +131.0,-26.69440553,116.6792294,372.828,839.943,990.227,, +132.0,-26.69559297,116.6826189,372.289,1177.294,858.632,, +133.0,-26.69834768,116.6839885,370.513,1313.611,553.372,, +134.0,-26.70113541,116.6763777,372.313,556.122,244.485,, +135.0,-26.7001001,116.6765326,372.545,571.541,359.21,, +136.0,-26.6995066,116.6757018,373.0,488.857,424.98,, +137.0,-26.69847588,116.6761011,372.834,528.598,539.194,, +138.0,-26.69745014,116.6746188,374.296,381.069,652.864,, +141.0,-26.70197201,116.6818518,369.162,1100.945,151.76,, +142.0,-26.70734153,116.6828584,368.456,1201.132,-443.25,, +143.0,-26.70572952,116.6758,373.245,498.629,-264.594,, +144.0,-26.70378357,116.6738163,374.625,301.193,-48.952,, +145.0,-26.70368845,116.6745141,374.351,370.648,-38.415,, +146.0,-26.70416431,116.6762591,372.836,544.324,-91.152,, +147.0,-26.70337076,116.675882,372.823,506.793,-3.216,, +148.0,-26.70266045,116.6760522,372.635,523.727,75.494,, +151.0,-26.71270664,116.6773588,371.189,653.774,-1037.748,, +152.0,-26.71087981,116.6752409,372.321,442.99,-835.306,, +153.0,-26.7079022,116.6701992,372.933,-58.801,-505.332,, +154.0,-26.70699719,116.6711624,374.047,37.065,-405.05,, +155.0,-26.70657154,116.6731295,375.276,232.842,-357.891,, +156.0,-26.7066488,116.6733821,375.237,257.984,-366.453,, +157.0,-26.70621611,116.6740624,375.045,325.688,-318.508,, +158.0,-26.70610601,116.6740665,375.144,326.101,-306.307,, +161.0,-26.70703353,116.6666459,373.996,-412.457,-409.06,, +162.0,-26.70713452,116.6693643,373.518,-141.898,-420.261,, +163.0,-26.71071785,116.6659645,375.791,-480.27,-817.324,, +164.0,-26.71113713,116.6650074,375.607,-575.533,-863.782,, +165.0,-26.7091075,116.6640178,375.408,-674.021,-638.871,, +166.0,-26.70555404,116.664446,375.58,-631.403,-245.107,, +167.0,-26.70487049,116.6644276,375.65,-633.237,-169.362,, +168.0,-26.7056673,116.6650776,375.277,-568.54,-257.66,, + LBA1 ,-26.701451,116.650721,372.921,-1999.81,206.85,, + LBA2 ,-26.702835,116.653029,374.44,-1770.14,53.59,, + LBA3 ,-26.703898,116.654736,375.535,-1600.21,-64.26,, + LBA4 ,-26.705072,116.656012,376.218,-1473.17,-194.32,, + LBA5 ,-26.707413,116.657076,374.906,-1367.27,-453.65,, + LBA6 ,-26.708461,116.659029,374.774,-1172.92,-569.74,, + LBA7 ,-26.709624,116.659752,374.122,-1100.97,-698.66,, + LBA8 ,-26.710356,116.661879,374.406,-889.29,-779.73,, + LBB1 ,-26.680184,116.662484,369.515,-829.33,2563.46,, + LBB2 ,-26.677782,116.667494,373.367,-330.61,2829.62,, + LBB3 ,-26.684914,116.66624,370.946,-455.36,2039.45,, + LBB4 ,-26.679455,116.669056,373.959,-175.09,2644.3,, + LBB5 ,-26.68398,116.670287,373.188,-52.55,2142.93,, + LBB6 ,-26.680435,116.678617,377.701,776.55,2535.7,, + LBB7 ,-26.682091,116.676048,376.345,520.82,2352.17,, + LBB8 ,-26.68561,116.67411,374.381,327.91,1962.28,, + LBC1 ,-26.68945,116.674472,374.634,363.95,1536.78,, + LBC2 ,-26.683633,116.679612,377.049,875.57,2181.3,, + LBC3 ,-26.688088,116.679654,376.532,879.78,1687.73,, + LBC4 ,-26.681128,116.684488,380.61,1360.97,2458.85,, + LBC5 ,-26.683885,116.687729,380.989,1683.51,2153.35,, + LBC6 ,-26.686498,116.684593,378.974,1371.37,1863.8,, + LBC7 ,-26.689801,116.687205,376.743,1631.27,1497.8,, + LBC8 ,-26.690798,116.68312,376.459,1224.7,1387.35,, + LBD1 ,-26.692061,116.689981,375.325,1907.59,1247.36,, + LBD2 ,-26.687295,116.691461,378.581,2054.93,1775.43,, + LBD3 ,-26.683334,116.694927,380.84,2400.04,2214.24,, + LBD4 ,-26.687202,116.695345,377.353,2441.55,1785.7,, + LBD5 ,-26.690973,116.694389,375.661,2346.29,1367.78,, + LBD6 ,-26.686117,116.698653,378.428,2770.82,1905.8,, + LBD7 ,-26.688512,116.702017,376.795,3105.64,1640.33,, + LBD8 ,-26.690184,116.699673,376.452,2872.28,1455.11,, + LBE1 ,-26.695692,116.687438,372.223,1654.37,845.05,, + LBE2 ,-26.697635,116.690855,373.703,1994.47,629.74,, + LBE3 ,-26.694055,116.6942,374.519,2327.42,1026.38,, + LBE4 ,-26.699628,116.693304,371.502,2238.17,408.81,, + LBE5 ,-26.694909,116.697929,373.229,2698.58,931.59,, + LBE6 ,-26.698146,116.697646,371.787,2670.33,572.92,, + LBE7 ,-26.703104,116.694988,369.349,2405.67,23.61,, + LBE8 ,-26.693431,116.701253,373.69,3029.46,1095.29,, + LBF1 ,-26.710655,116.678885,371.037,803.01,-812.85,, + LBF2 ,-26.701698,116.685604,369.243,1471.78,179.53,, + LBF3 ,-26.709562,116.682652,368.31,1177.92,-691.74,, + LBF4 ,-26.707635,116.68767,366.646,1677.27,-478.33,, + LBF5 ,-26.711732,116.686485,367.407,1559.38,-932.27,, + LBF6 ,-26.704281,116.689719,368.26,1881.27,-106.66,, + LBF7 ,-26.70559,116.693781,367.949,2285.48,-251.75,, + LBF8 ,-26.711807,116.690826,365.145,1991.31,-940.61,, + LBG1 ,-26.712268,116.672481,370.3,165.76,-991.57,, + LBG2 ,-26.716739,116.675954,368.752,511.31,-1486.98,, + LBG3 ,-26.721963,116.674217,365.986,338.49,-2065.83,, + LBG4 ,-26.716032,116.678913,367.881,805.81,-1408.62,, + LBG5 ,-26.713602,116.681927,370.544,1105.72,-1139.39,, + LBG6 ,-26.721151,116.680182,365.385,931.99,-1975.87,, + LBG7 ,-26.720171,116.684245,366.173,1336.34,-1867.29,, + LBG8 ,-26.715554,116.68754,365.878,1664.29,-1355.78,, diff --git a/calibration_files/antpos_for_other_arrays/ska_antpos.csv b/calibration_files/antpos_for_other_arrays/ska_antpos.csv new file mode 100644 index 0000000..932c06f --- /dev/null +++ b/calibration_files/antpos_for_other_arrays/ska_antpos.csv @@ -0,0 +1,513 @@ +x,y,z +-2560349.01945,5076213.46015,-2875119.26806 +-2560250.17674,5076374.44987,-2874923.03848 +-2560329.82816,5076267.18347,-2875041.50458 +-2560166.47837,5076351.54978,-2875038.00776 +-2560308.19494,5076309.61018,-2874985.85883 +-2560297.13804,5076392.68542,-2874849.01662 +-2560278.55642,5076350.84094,-2874939.4521 +-2560267.02749,5076306.47579,-2875028.05409 +-2560379.97829,5076298.2625,-2874941.96758 +-2560172.86089,5076397.17119,-2874951.77049 +-2560213.30968,5076377.46218,-2874950.55096 +-2560432.58481,5076304.02333,-2874884.94402 +-2560260.89407,5076282.01938,-2875076.69707 +-2560296.04669,5076276.51167,-2875055.1178 +-2560248.63694,5076341.84715,-2874981.97698 +-2560118.89151,5076402.27877,-2874990.81137 +-2560328.60001,5076335.36982,-2874922.20296 +-2560416.70738,5076282.59238,-2874936.92571 +-2560234.46525,5076319.23498,-2875034.52283 +-2560317.17286,5076289.44458,-2875013.46939 +-2560414.19769,5076258.93175,-2874980.93804 +-2560422.61385,5076222.14125,-2875038.40169 +-2560324.3686,5076247.52319,-2875081.07901 +-2560268.01502,5076390.44957,-2874878.90089 +-2560392.5488,5076329.99393,-2874874.74313 +-2560239.03498,5076417.78267,-2874856.44503 +-2560312.85096,5076361.2372,-2874890.55351 +-2560270.79929,5076242.09844,-2875138.36056 +-2560218.11776,5076296.42927,-2875089.34673 +-2560358.75113,5076335.78771,-2874894.61302 +-2560353.3225,5076244.40024,-2875060.80857 +-2560371.60717,5076358.19203,-2874843.6026 +-2560198.04304,5076284.6327,-2875128.05075 +-2560451.41535,5076263.84058,-2874939.12464 +-2560199.58735,5076326.43304,-2875052.87225 +-2560143.26574,5076334.28005,-2875089.1701 +-2560345.24702,5076289.60103,-2874988.19172 +-2560183.35378,5076366.78691,-2874996.07648 +-2560305.48583,5076222.93109,-2875141.31359 +-2560130.30702,5076422.02754,-2874945.77503 +-2560216.7014,5076358.64774,-2874980.75149 +-2560452.50192,5076245.06266,-2874971.31278 +-2560104.57159,5076378.15919,-2875046.15048 +-2560334.46133,5076310.74356,-2874960.46599 +-2560188.62095,5076270.73249,-2875160.98256 +-2560159.89028,5076427.75537,-2874909.31695 +-2560386.07445,5076207.53751,-2875096.72635 +-2560133.11819,5076380.61998,-2875016.38574 +-2560330.49373,5076391.39196,-2874821.5942 +-2560418.21147,5076201.493,-2875078.77889 +-2560338.9657,5076362.5984,-2874864.89253 +-2560234.75585,5076271.77441,-2875118.06145 +-2560203.25634,5076408.21118,-2874905.20882 +-2560379.58992,5076280.61415,-2874973.47499 +-2560454.68885,5076223.33254,-2875007.73295 +-2560132.01909,5076354.86187,-2875062.84474 +-2560291.76264,5076253.78333,-2875099.06219 +-2560175.34223,5076309.80481,-2875103.82119 +-2560283.54705,5076330.79006,-2874970.41177 +-2560383.30163,5076248.66398,-2875026.58252 +-2560138.21608,5076315.56326,-2875126.71316 +-2560160.94312,5076293.74844,-2875144.99197 +-2560207.69346,5076342.19722,-2875017.8196 +-2560204.03064,5076431.58438,-2874863.24728 +-2560272.12898,5076418.06416,-2874826.47537 +-2560234.38247,5076244.8566,-2875165.91915 +-2560153.67491,5076386.6958,-2874987.35224 +-2560404.16531,5076344.05713,-2874839.5649 +-2560400.40658,5076308.75328,-2874905.2505 +-2560281.54038,5076369.31753,-2874904.16988 +-2560390.98159,5076224.16299,-2875063.00252 +-2560452.88585,5076282.64243,-2874904.61641 +-2560275.21709,5076222.21263,-2875169.536 +-2560110.39078,5076350.23084,-2875090.28047 +-2560355.31472,5076268.79794,-2875015.95707 +-2560420.35141,5076166.60411,-2875138.47169 +-2560417.47462,5076149.35527,-2875171.48682 +-2560161.39082,5076498.05299,-2874783.84769 +-2560357.03987,5076176.12767,-2875178.03784 +-2560050.72224,5076483.81634,-2874907.53973 +-2560292.23589,5076165.59283,-2875254.34372 +-2560119.29934,5076290.92346,-2875187.06061 +-2560560.23323,5076248.24415,-2874869.74589 +-2560095.77548,5076315.10263,-2875165.31683 +-2560494.57106,5076299.49245,-2874837.73707 +-2560156.44073,5076259.83289,-2875208.88076 +-2560059.60361,5076388.46541,-2875067.99472 +-2560279.1279,5076194.29287,-2875215.34642 +-2560192.35021,5076468.09874,-2874809.17148 +-2560033.80295,5076471.28968,-2874944.72518 +-2560085.64587,5076296.60361,-2875206.99742 +-2560045.73736,5076446.42893,-2874977.99589 +-2560232.16276,5076486.4619,-2874741.28833 +-2560503.8978,5076142.57548,-2875106.49242 +-2560090.60943,5076445.67225,-2874939.3747 +-2560085.34313,5076498.45419,-2874850.86231 +-2560409.94645,5076365.87535,-2874795.8894 +-2560525.90022,5076219.90539,-2874950.36242 +-2560333.72806,5076161.77022,-2875224.14491 +-2560347.97439,5076196.27287,-2875150.54378 +-2560280.53555,5076459.52293,-2874745.77856 +-2560233.86941,5076452.45007,-2874799.82887 +-2560476.65276,5076167.96902,-2875085.92235 +-2560479.4138,5076340.36997,-2874779.05582 +-2560289.85762,5076431.37826,-2874787.17591 +-2560114.25947,5076501.3391,-2874820.01742 +-2560516.08306,5076248.47548,-2874908.66004 +-2560079.9897,5076401.27722,-2875027.22057 +-2560455.50185,5076361.11482,-2874763.7216 +-2560382.22651,5076400.20201,-2874759.96271 +-2560090.48989,5076343.6921,-2875119.5459 +-2560239.83938,5076214.25082,-2875215.09537 +-2560129.16667,5076256.50137,-2875239.04785 +-2560115.21873,5076475.8711,-2874864.1354 +-2560010.68839,5076395.54977,-2875099.04135 +-2560163.54729,5076444.24002,-2874876.952 +-2560386.86523,5076180.83603,-2875143.16518 +-2560323.70653,5076449.21997,-2874725.5234 +-2560510.20337,5076276.98606,-2874863.5549 +-2560456.27798,5076194.86504,-2875056.58043 +-2560096.77239,5076466.83992,-2874896.50931 +-2560345.87195,5076419.32639,-2874758.5705 +-2560467.91591,5076297.10488,-2874865.69332 +-2560529.02075,5076188.04067,-2875003.84515 +-2560061.05031,5076327.56039,-2875174.24138 +-2560467.57359,5076143.09519,-2875137.92395 +-2560024.99041,5076347.19965,-2875171.67436 +-2560055.63269,5076347.1619,-2875144.45713 +-2560023.58417,5076409.61821,-2875062.71872 +-2560189.2399,5076226.17078,-2875239.1064 +-2560494.24759,5076242.99572,-2874937.78306 +-2560386.2995,5076153.09792,-2875192.64118 +-2560531.03767,5076291.73991,-2874818.94672 +-2560418.92107,5076388.27406,-2874748.3437 +-2560024.26551,5076428.20231,-2875029.29842 +-2560539.01085,5076153.93142,-2875055.17138 +-2560158.6741,5076476.4469,-2874824.42029 +-2560367.57524,5076433.05038,-2874715.00582 +-2560212.32588,5076475.15925,-2874778.91392 +-2560061.94336,5076363.06899,-2875110.75229 +-2560449.89961,5076131.47737,-2875174.1749 +-2560215.31251,5076234.8099,-2875200.63793 +-2560379.52079,5076138.57899,-2875224.31062 +-2560550.76534,5076198.584,-2874965.86309 +-2560449.50018,5076167.04009,-2875111.74358 +-2560476.42804,5076323.36728,-2874811.73858 +-2560505.62548,5076210.2488,-2874985.46985 +-2560323.70647,5076412.79486,-2874789.84523 +-2560506.70946,5076317.76247,-2874794.66489 +-2560486.26549,5076270.11448,-2874897.00844 +-2560009.65836,5076467.31014,-2874973.25172 +-2559978.12606,5076427.50249,-2875071.61756 +-2560639.11643,5076106.01691,-2875050.61181 +-2559914.89731,5076442.78463,-2875100.93265 +-2560418.12687,5076448.48589,-2874642.72313 +-2560283.29852,5076131.12741,-2875323.14856 +-2560060.3009,5076254.32498,-2875304.2072 +-2560172.04275,5076193.72567,-2875311.6998 +-2560598.14831,5076086.02942,-2875122.3878 +-2559937.09924,5076397.20675,-2875161.63845 +-2560328.2202,5076505.83328,-2874621.52805 +-2560097.67396,5076523.91923,-2874794.91396 +-2560519.4732,5076084.1773,-2875195.72418 +-2560399.47095,5076091.0122,-2875290.52185 +-2560652.76862,5076138.61047,-2874980.9053 +-2560435.55487,5076426.4752,-2874666.06953 +-2560352.84608,5076134.82874,-2875254.68506 +-2560005.06182,5076513.6421,-2874895.53288 +-2560548.58677,5076116.22551,-2875113.21514 +-2560002.16878,5076534.63721,-2874861.03543 +-2560371.29663,5076113.59289,-2875275.74599 +-2560333.63188,5076121.14782,-2875295.94757 +-2560204.77187,5076143.97293,-2875370.39216 +-2560470.21022,5076099.85014,-2875211.92506 +-2560199.5884,5076541.35553,-2874673.36112 +-2560045.42355,5076539.15766,-2874814.53491 +-2560116.78617,5076217.54208,-2875318.85304 +-2559989.36635,5076456.95415,-2875009.6064 +-2560359.05128,5076468.37427,-2874660.2188 +-2560596.65184,5076227.41898,-2874874.08027 +-2560587.07584,5076196.82388,-2874936.631 +-2560037.92,5076513.1271,-2874867.18277 +-2560557.14333,5076356.58294,-2874681.19252 +-2560019.77763,5076270.24719,-2875312.17708 +-2560005.407,5076338.44707,-2875204.56436 +-2560001.08573,5076491.03623,-2874938.99068 +-2560568.35067,5076129.12143,-2875072.84501 +-2560616.89618,5076150.25035,-2874992.30378 +-2560629.27345,5076217.37578,-2874862.75808 +-2560652.99076,5076163.61658,-2874936.55558 +-2560250.49006,5076164.72556,-2875293.04717 +-2559961.88392,5076341.2594,-2875238.35029 +-2560295.97457,5076511.31192,-2874640.57276 +-2560029.75534,5076296.81916,-2875256.38085 +-2560531.85948,5076355.1742,-2874706.20097 +-2560566.35025,5076308.77843,-2874757.4075 +-2560223.6913,5076184.76782,-2875281.52595 +-2560606.18638,5076125.47214,-2875045.59083 +-2560029.09194,5076566.14244,-2874781.42645 +-2560490.95129,5076181.28938,-2875049.67013 +-2560104.89241,5076199.46783,-2875361.35167 +-2560150.02374,5076222.16547,-2875281.0963 +-2559917.18893,5076503.72446,-2874991.29065 +-2560273.44635,5076117.82962,-2875355.39711 +-2559967.59374,5076484.29949,-2874980.70882 +-2560295.84488,5076144.34646,-2875288.63952 +-2560500.27481,5076420.75171,-2874618.53023 +-2560466.41442,5076445.0646,-2874605.755 +-2560494.19461,5076396.95271,-2874665.97328 +-2560458.95532,5076404.51721,-2874684.00277 +-2560469.3068,5076423.2113,-2874641.7705 +-2560525.50445,5076392.6809,-2874645.62866 +-2559878.57622,5076482.31405,-2875063.47584 +-2559941.00286,5076449.83833,-2875065.23417 +-2559898.37762,5076495.37846,-2875022.77709 +-2559863.96314,5076465.30168,-2875106.52516 +-2559845.13328,5076488.85208,-2875081.70812 +-2559921.00566,5076472.44002,-2875043.13194 +-2560494.56888,5076036.87692,-2875301.40801 +-2560466.18874,5076060.34911,-2875285.24299 +-2560479.67466,5076078.11739,-2875241.86491 +-2560433.83781,5076067.18041,-2875301.99147 +-2560495.62886,5076056.49384,-2875265.83222 +-2560433.47929,5076086.23294,-2875268.67508 +-2560234.44337,5076597.46635,-2874543.22626 +-2560210.42251,5076624.2784,-2874517.26877 +-2560241.3935,5076617.19762,-2874502.18922 +-2560188.55639,5076645.97532,-2874498.42529 +-2560269.97225,5076617.49367,-2874476.21179 +-2560224.57798,5076655.69692,-2874449.17249 +-2559755.07134,5076789.58339,-2874630.84599 +-2559722.96109,5076822.90183,-2874600.59589 +-2559826.15816,5076777.82543,-2874588.30986 +-2559774.2223,5076804.62085,-2874587.23517 +-2559741.5877,5076836.56902,-2874559.87165 +-2559806.13251,5076806.39161,-2874555.69194 +-2559247.79914,5076782.05671,-2875095.76384 +-2559280.41706,5076767.13932,-2875093.06979 +-2559213.82604,5076818.60023,-2875061.47638 +-2559282.17234,5076787.57262,-2875055.4264 +-2559250.33369,5076805.24852,-2875052.55571 +-2559266.10344,5076815.98623,-2875019.5571 +-2558965.22034,5076442.80611,-2875946.18124 +-2559002.77483,5076428.45198,-2875938.10266 +-2559015.0117,5076443.22657,-2875901.13483 +-2559052.10389,5076428.48394,-2875894.15262 +-2558967.41877,5076476.21979,-2875885.24451 +-2559004.21046,5076478.29474,-2875848.84405 +-2559803.04148,5076318.63778,-2875419.70443 +-2559852.38758,5076295.42108,-2875416.76139 +-2559885.58899,5076282.43393,-2875410.13113 +-2559839.14327,5076316.36075,-2875391.58484 +-2559873.0101,5076304.45058,-2875382.46102 +-2559827.02035,5076345.34237,-2875351.21175 +-2560086.67885,5075987.47496,-2875751.78881 +-2560017.53835,5076022.58164,-2875751.37207 +-2560051.82099,5076013.19458,-2875737.42235 +-2560024.71014,5076036.95617,-2875719.61481 +-2560096.42432,5076008.27398,-2875706.40029 +-2560058.24767,5076033.75943,-2875695.40141 +-2560672.51911,5075624.95841,-2875870.04774 +-2560637.53882,5075642.83251,-2875869.64787 +-2560602.9591,5075670.18005,-2875852.17096 +-2560658.0793,5075648.69806,-2875841.00652 +-2560619.70966,5075683.51307,-2875813.72443 +-2560671.54159,5075667.62846,-2875795.60844 +-2561476.87596,5075413.10936,-2875527.60085 +-2561471.40548,5075433.05782,-2875497.26386 +-2561503.87479,5075420.79846,-2875489.97877 +-2561449.42945,5075462.47549,-2875464.9155 +-2561510.43525,5075437.40923,-2875454.81536 +-2561481.92123,5075467.3944,-2875427.28923 +-2560772.50406,5075990.32694,-2875136.06343 +-2560744.65804,5076017.50188,-2875112.88768 +-2560712.62758,5076037.15352,-2875106.72064 +-2560778.92277,5076004.85667,-2875104.6944 +-2560764.88264,5076033.51233,-2875066.6075 +-2560800.68498,5076019.59667,-2875059.28739 +-2561021.0809,5076104.14456,-2874713.67909 +-2560970.02153,5076137.01555,-2874701.12328 +-2561003.05863,5076127.5736,-2874688.36402 +-2560957.43877,5076163.97872,-2874664.72096 +-2561040.77799,5076126.50875,-2874656.64048 +-2561020.4817,5076152.21604,-2874629.32773 +-2560966.74107,5076461.73428,-2874130.58358 +-2560945.21253,5076494.5214,-2874091.85529 +-2560898.75385,5076522.13264,-2874084.48195 +-2560991.18462,5076478.284,-2874079.57168 +-2560922.90046,5076527.80494,-2874052.94724 +-2560964.94067,5076511.81526,-2874043.73004 +-2560357.98018,5077041.08302,-2873649.5706 +-2560312.97761,5077067.70848,-2873642.62569 +-2560390.14977,5077038.68799,-2873625.13936 +-2560351.75064,5077068.0933,-2873607.39994 +-2560376.11216,5077072.3432,-2873578.18516 +-2560326.46467,5077098.15591,-2873576.81463 +-2559341.32822,5075711.70265,-2876901.74967 +-2559397.58534,5075699.32105,-2876873.54648 +-2559346.15405,5075728.50103,-2876867.81893 +-2559311.10575,5075752.88752,-2876855.97291 +-2559384.89246,5075727.51883,-2876835.08857 +-2559365.85445,5075754.37158,-2876804.64796 +-2560364.04194,5074869.26901,-2877477.86701 +-2560402.96423,5074857.15036,-2877464.60694 +-2560369.22673,5074894.80889,-2877428.20961 +-2560424.985,5074872.275,-2877418.33743 +-2560337.67372,5074920.38926,-2877411.16965 +-2560410.57193,5074895.9937,-2877389.32998 +-2562061.68281,5074073.46805,-2877370.21849 +-2562096.14779,5074062.81702,-2877358.31248 +-2562035.31402,5074097.29198,-2877351.68535 +-2562128.21975,5074055.39429,-2877342.84388 +-2562074.07345,5074101.33087,-2877310.05042 +-2562108.55473,5074092.91275,-2877294.19186 +-2564200.95426,5073686.01571,-2876147.54145 +-2564251.63799,5073670.72963,-2876129.31983 +-2564167.56135,5073717.01507,-2876122.62748 +-2564246.54862,5073694.97447,-2876091.08757 +-2564214.70489,5073712.58563,-2876088.41062 +-2564172.94933,5073737.26712,-2876082.09727 +-2566070.59289,5074208.97018,-2873556.34002 +-2566109.77849,5074204.8258,-2873528.66534 +-2566077.84081,5074230.00967,-2873512.71511 +-2566146.00866,5074206.75599,-2873492.90233 +-2566120.64216,5074227.3411,-2873479.20485 +-2566079.39253,5074248.27401,-2873479.07683 +-2559221.22072,5077594.30104,-2873684.71782 +-2559224.44719,5077616.68834,-2873642.28728 +-2559284.67053,5077596.68866,-2873623.99114 +-2559194.52675,5077644.04576,-2873620.5941 +-2559251.73578,5077618.4183,-2873614.92741 +-2559219.6261,5077647.31953,-2873592.45613 +-2557983.65165,5077826.30575,-2874376.56658 +-2558029.79359,5077803.60049,-2874375.61392 +-2558012.48122,5077825.21529,-2874352.83653 +-2558056.51772,5077817.76252,-2874326.81211 +-2557981.3945,5077857.22728,-2874323.94917 +-2558026.46795,5077843.49526,-2874308.09533 +-2556904.76093,5077512.89622,-2875889.74619 +-2556868.95727,5077545.94598,-2875863.22724 +-2556943.91402,5077511.47052,-2875857.45254 +-2556917.09234,5077536.63393,-2875836.87194 +-2556944.87402,5077537.9744,-2875809.80416 +-2556887.71147,5077569.81982,-2875804.40152 +-2556490.86263,5076464.89756,-2878106.94957 +-2556525.37322,5076448.71034,-2878104.84649 +-2556563.59012,5076447.77822,-2878072.54333 +-2556539.27708,5076468.66578,-2878057.29792 +-2556507.93122,5076490.63031,-2878046.39955 +-2556541.31169,5076490.87953,-2878016.30844 +-2557546.63789,5074546.43104,-2880551.11294 +-2557507.43769,5074575.20046,-2880535.23516 +-2557554.63105,5074564.78081,-2880511.68971 +-2557507.52604,5074595.2314,-2880499.86836 +-2557601.54688,5074559.42941,-2880479.46092 +-2557534.27371,5074598.1027,-2880471.06128 +-2562213.75132,5075600.37751,-2874540.39811 +-2562253.52208,5075585.00237,-2874532.09624 +-2562200.97482,5075624.28346,-2874509.57519 +-2562239.51281,5075612.54363,-2874495.95337 +-2562289.32642,5075597.75038,-2874477.67152 +-2562242.20315,5075629.25749,-2874464.04273 +-2562441.9422,5076220.90735,-2873240.95624 +-2562492.66859,5076196.54609,-2873238.75598 +-2562464.56575,5076225.13557,-2873213.30957 +-2562430.86702,5076243.56484,-2873210.80363 +-2562501.51802,5076210.04625,-2873207.01247 +-2562480.53749,5076240.41211,-2873172.07515 +-2561845.44633,5077321.81571,-2871827.30832 +-2561812.94907,5077344.57624,-2871816.0575 +-2561878.46792,5077311.61817,-2871815.87983 +-2561907.48526,5077309.56924,-2871793.61637 +-2561877.11272,5077332.02386,-2871781.01164 +-2561847.92477,5077353.14671,-2871769.7042 +-2560082.18174,5078769.61136,-2870839.50396 +-2560152.96466,5078746.46446,-2870817.33089 +-2560071.59999,5078790.38766,-2870812.18493 +-2560113.25733,5078777.27388,-2870798.23603 +-2560087.572,5078800.90244,-2870779.33966 +-2560146.4077,5078777.80494,-2870767.73341 +-2557190.90505,5080133.61506,-2871002.98297 +-2557220.67988,5080133.64252,-2870976.41378 +-2557151.43906,5080171.47158,-2870971.14878 +-2557190.76584,5080157.33673,-2870961.13196 +-2557219.1832,5080161.26845,-2870928.86287 +-2557171.37836,5080187.04114,-2870925.83825 +-2565666.77693,5071514.45953,-2878669.15025 +-2565636.10545,5071539.33454,-2878652.66272 +-2565722.41931,5071498.09347,-2878648.3903 +-2565680.57145,5071536.01356,-2878618.8821 +-2565661.34019,5071563.02237,-2878588.43839 +-2565726.85276,5071532.30291,-2878584.16893 +-2568338.17691,5070329.73625,-2878373.91155 +-2568291.68989,5070357.82538,-2878365.91111 +-2568320.32314,5070363.77318,-2878329.88474 +-2568389.49236,5070331.68281,-2878324.6936 +-2568308.50131,5070385.98742,-2878301.30124 +-2568369.59314,5070359.66197,-2878293.16285 +-2567516.55889,5068039.32697,-2883136.67732 +-2567484.9231,5068071.0964,-2883109.00445 +-2567436.22249,5068099.30688,-2883102.78329 +-2567521.18598,5068065.72817,-2883086.1476 +-2567490.94595,5068089.96259,-2883070.47668 +-2567455.32094,5068108.78959,-2883069.10632 +-2575697.30178,5068180.64548,-2875581.56803 +-2575625.46236,5068218.67828,-2875578.88203 +-2575666.78746,5068203.14743,-2875569.24041 +-2575635.52393,5068233.7025,-2875543.38947 +-2575694.36362,5068205.89784,-2875539.69236 +-2575671.98574,5068228.09393,-2875520.61543 +-2581026.72928,5067248.35636,-2872444.27581 +-2580986.66701,5067288.99325,-2872408.58578 +-2581019.29094,5067274.01188,-2872405.70052 +-2581074.31193,5067253.40519,-2872392.61311 +-2581017.5298,5067298.78612,-2872363.5778 +-2581071.72588,5067271.85792,-2872362.38379 +-2585427.97701,5070718.15755,-2862345.28706 +-2585409.42171,5070740.72671,-2862322.06515 +-2585472.25324,5070718.52165,-2862304.64869 +-2585419.02386,5070755.81952,-2862286.65404 +-2585454.50148,5070740.72037,-2862281.35716 +-2585381.85608,5070778.03583,-2862280.8684 +-2593099.67262,5067179.08775,-2861672.79411 +-2593064.36887,5067206.03275,-2861657.0725 +-2593159.03336,5067162.10112,-2861649.08204 +-2593089.77454,5067210.62342,-2861625.92229 +-2593126.24496,5067197.36336,-2861616.35417 +-2593098.11612,5067224.96114,-2861592.97479 +-2553112.15086,5077740.22098,-2878856.29954 +-2553135.37129,5077747.03082,-2878823.695 +-2553170.95357,5077730.88412,-2878820.61795 +-2553110.39356,5077769.6722,-2878805.91121 +-2553150.49555,5077764.85495,-2878778.84265 +-2553108.31863,5077789.68116,-2878772.4584 +-2549946.63744,5077322.81775,-2882395.90454 +-2549980.63565,5077307.01522,-2882393.66343 +-2550005.00934,5077311.84211,-2882363.59787 +-2549901.65806,5077364.61382,-2882362.07173 +-2549948.9709,5077348.18945,-2882349.14765 +-2549954.77555,5077363.813,-2882316.4908 +-2546717.11276,5080845.79879,-2879041.31899 +-2546673.92823,5080875.24028,-2879027.56083 +-2546643.04768,5080898.03872,-2879014.64183 +-2546703.13525,5080873.52001,-2879004.76112 +-2546689.03139,5080898.39944,-2878973.32949 +-2546726.01832,5080886.61019,-2878961.41725 +-2547726.91206,5075594.20624,-2887398.83548 +-2547697.24414,5075612.34489,-2887393.12817 +-2547736.15966,5075609.27094,-2887364.19412 +-2547691.15897,5075640.54535,-2887348.92468 +-2547772.52685,5075606.40046,-2887337.15021 +-2547722.27258,5075633.39538,-2887334.03982 +-2547876.98668,5071964.68643,-2893637.5171 +-2547859.06566,5071988.77397,-2893611.07585 +-2547902.65525,5071973.63247,-2893599.23468 +-2547937.59419,5071962.10323,-2893588.67836 +-2547861.75719,5072007.39547,-2893576.06545 +-2547912.84003,5071998.91639,-2893545.94775 +-2552254.77955,5066860.16475,-2898717.75292 +-2552222.12043,5066892.41794,-2898690.13057 +-2552261.16905,5066874.96252,-2898686.2609 +-2552301.63796,5066862.59371,-2898672.24869 +-2552217.52337,5066911.44379,-2898660.92087 +-2552272.82732,5066900.30819,-2898631.69129 +-2549908.16877,5064429.89231,-2905023.09744 +-2549868.33161,5064457.52187,-2905009.89681 +-2549947.88726,5064422.44853,-2905001.21085 +-2549903.38343,5064454.25531,-2904984.82458 +-2549863.62981,5064477.936,-2904978.43454 +-2549930.6568,5064453.21039,-2904962.70634 +-2561806.95631,5079683.48438,-2867682.30757 +-2561778.74315,5079705.6452,-2867668.25649 +-2561748.30806,5079724.06187,-2867662.82214 +-2561820.52622,5079697.58006,-2867645.21631 +-2561791.42395,5079718.92631,-2867633.40229 +-2561772.10776,5079742.80845,-2867608.3533 +-2566210.17142,5079090.90214,-2864793.52902 +-2566181.75451,5079113.52702,-2864778.87149 +-2566222.19479,5079104.85424,-2864758.02235 +-2566194.63512,5079125.16762,-2864746.69496 +-2566259.47487,5079095.05807,-2864741.99515 +-2566226.29846,5079132.48969,-2864705.34912 +-2559269.63564,5083093.1265,-2863903.66447 +-2559341.69884,5083060.4403,-2863897.27973 +-2559305.34346,5083088.59741,-2863879.79319 +-2559345.0984,5083085.36949,-2863849.99498 +-2559267.06261,5083126.29345,-2863847.09561 +-2559315.73475,5083103.97903,-2863843.20594 +-2555937.10302,5086334.63598,-2861123.29273 +-2555975.367,5086320.85779,-2861113.60397 +-2555923.65726,5086356.42537,-2861096.56816 +-2555964.67937,5086346.65315,-2861077.29392 +-2555935.28498,5086373.05945,-2861056.60885 +-2555975.04552,5086360.17897,-2861043.98716 +-2551587.40215,5089813.50046,-2858818.15787 +-2551618.61748,5089806.29755,-2858803.12095 +-2551599.05474,5089832.08813,-2858774.66382 +-2551566.08391,5089849.95846,-2858772.27491 +-2551627.33354,5089835.34708,-2858743.62095 +-2551579.65341,5089864.67585,-2858733.95997 +-2543505.6994,5091437.70205,-2863124.49664 +-2543555.40853,5091420.86957,-2863110.26904 +-2543484.60296,5091467.77774,-2863089.75457 +-2543522.69342,5091452.64867,-2863082.82005 +-2543554.19189,5091445.03983,-2863068.3679 +-2543496.05051,5091485.00281,-2863048.95298 +-2537573.20101,5100180.49231,-2852809.52666 +-2537638.16281,5100160.44311,-2852787.5857 +-2537591.67156,5100193.35402,-2852770.1029 +-2537637.0199,5100179.90739,-2852753.80422 +-2537564.56148,5100218.77134,-2852748.77631 +-2537602.25054,5100208.21046,-2852734.13203 diff --git a/calibration_files/antpos_for_other_arrays/vla_antpos.csv b/calibration_files/antpos_for_other_arrays/vla_antpos.csv new file mode 100644 index 0000000..661dcf6 --- /dev/null +++ b/calibration_files/antpos_for_other_arrays/vla_antpos.csv @@ -0,0 +1,28 @@ +x, y, z, , +-1601614.061201, -5042001.676547, 3554652.455603, 25. W08, +-1602592.823528, -5042055.013423, 3554140.652770, 25. W16, +-1604008.701913, -5042135.835806, 3553403.666765, 25. W24, +-1605808.598184, -5042230.070459, 3552459.167358, 25. W32, +-1607962.411673, -5042338.157771, 3551324.887280, 25. W40, +-1610451.987125, -5042471.380472, 3550021.011562, 25. W48, +-1613255.373440, -5042613.052534, 3548545.864364, 25. W56, +-1616361.554136, -5042770.440739, 3546911.386423, 25. W64, +-1619757.278011, -5042937.574555, 3545120.332832, 25. W72, +-1600801.880602, -5042219.386677, 3554706.382285, 25. E08, +-1599926.059409, -5042772.992580, 3554319.742840, 25. E16, +-1598663.046405, -5043581.426755, 3553766.973356, 25. E24, +-1597053.095558, -5044604.747750, 3553058.947311, 25. E32, +-1595124.918941, -5045829.515575, 3552210.615356, 25. E40, +-1592894.065650, -5047229.198656, 3551221.180045, 25. E48, +-1590380.588363, -5048810.325262, 3550108.401088, 25. E56, +-1587600.201930, -5050575.976082, 3548885.379419, 25. E64, +-1584460.899441, -5052385.734791, 3547599.958930, 25. E72, +-1601147.885235, -5041733.855114, 3555235.914849, 25. N08, +-1601061.915919, -5041175.907706, 3556057.981979, 25. N16, +-1600929.966850, -5040316.401791, 3557330.277550, 25. N24, +-1600780.996259, -5039347.463556, 3558761.487153, 25. N32, +-1600592.692550, -5038121.380641, 3560574.803338, 25. N40, +-1600374.808396, -5036704.253012, 3562667.855946, 25. N48, +-1600128.313994, -5035104.177252, 3565024.645048, 25. N56, +-1599855.570998, -5033332.403323, 3567636.578590, 25. N64, +-1599557.838366, -5031396.391942, 3570494.716758, 25. N72, diff --git a/hera127.py b/calibration_files/hera127.py similarity index 100% rename from hera127.py rename to calibration_files/hera127.py diff --git a/calibration_files/mwa_compact.py b/calibration_files/mwa_compact.py new file mode 100644 index 0000000..034857a --- /dev/null +++ b/calibration_files/mwa_compact.py @@ -0,0 +1,103 @@ +import aipy as a, numpy as n, os +import csv + +class AntennaArray(a.pol.AntennaArray): + def __init__(self, *args, **kwargs): + a.pol.AntennaArray.__init__(self, *args, **kwargs) + self.array_params = {} + def get_ant_params(self, ant_prms={'*':'*'}): + prms = a.fit.AntennaArray.get_params(self, ant_prms) + for k in ant_prms: + top_pos = n.dot(self._eq2zen, self[int(k)].pos) + if ant_prms[k] == '*': + prms[k].update({'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]}) + else: + for val in ant_prms[k]: + if val == 'top_x': prms[k]['top_x'] = top_pos[0] + elif val == 'top_y': prms[k]['top_y'] = top_pos[1] + elif val == 'top_z': prms[k]['top_z'] = top_pos[2] + return prms + def set_ant_params(self, prms): + changed = a.fit.AntennaArray.set_params(self, prms) + for i, ant in enumerate(self): + ant_changed = False + top_pos = n.dot(self._eq2zen, ant.pos) + try: + top_pos[0] = prms[str(i)]['top_x'] + ant_changed = True + except(KeyError): pass + try: + top_pos[1] = prms[str(i)]['top_y'] + ant_changed = True + except(KeyError): pass + try: + top_pos[2] = prms[str(i)]['top_z'] + ant_changed = True + except(KeyError): pass + if ant_changed: ant.pos = n.dot(n.linalg.inv(self._eq2zen), top_pos) + changed |= ant_changed + return changed + def get_arr_params(self): + return self.array_params + def set_arr_params(self, prms): + for param in prms: + self.array_params[param] = prms[param] + if param == 'dish_size_in_lambda': + FWHM = 1.037*(1/prms[param]) #FWHM in radians = 1.03*(1/dish_size_in_lambda) + self.array_params['obs_duration'] = 24*60.*FWHM / (2*a.const.pi) # minutes it takes the sky to drift through beam FWHM = 24*60('minutes in a day')*FWHM('in radians')/(2*pi)('radians covered by sky in a day') + if param == 'antpos': + bl_lens = n.sum(n.array(prms[param])**2,axis=1)**.5 + return self.array_params + +#===========================ARRAY SPECIFIC PARAMETERS========================== + +#Set antenna positions here; antpos should just be a list of [x,y,z] coords in light-nanoseconds +x = [] +y = [] +z = [] +antpos = [] #initialize arrays + +with open('calibration_files/antpos_for_other_arrays/mwa_compact_antpos.csv') as f: + csvreader = csv.reader(f) + for row in csvreader: + x.append(row[4]) + y.append(row[5]) + z.append(row[3]) + +for i in xrange(len(x)): #to convert string values to float. + if i > 0: + ax = float(x[i]) * 1e2 / a.const.len_ns + by = float(y[i]) * 1e2 / a.const.len_ns + cz = float(z[i]) * 1e2 / a.const.len_ns + antpos.append((ax, by, cz)) + +#Set other array parameters here +prms = { + 'name': os.path.basename(__file__)[:-3], #remove .py from filename + 'loc': ('-26:42:11.95', '116:40:14.93'), #The MWA is located within the Murchison Radio-astronomy Observatory (MRO) in the Shire of Murchison in Western Australia (WA). + 'antpos': antpos, + 'beam': a.fit.Beam2DGaussian, + 'dish_size_in_lambda': 4.0 * (150.0*1e6) / (a.const.c*1e-2), #in units of wavelengths at 150 MHz; this will also define the observation duration + 'Trx': 1e5 #receiver temp in mK +} + +#=======================END ARRAY SPECIFIC PARAMETERS========================== + +def get_aa(freqs): + '''Return the AntennaArray to be used for simulation.''' + location = prms['loc'] + antennas = [] + nants = len(prms['antpos']) + for i in range(nants): + beam = prms['beam'](freqs, xwidth=(0.45/prms['dish_size_in_lambda']), ywidth=(0.45/prms['dish_size_in_lambda'])) #as it stands, the size of the beam as defined here is not actually used anywhere in this package, but is a necessary parameter for the aipy Beam2DGaussian object + antennas.append(a.fit.Antenna(0, 0, 0, beam)) + aa = AntennaArray(prms['loc'], antennas) + p = {} + for i in range(nants): + top_pos = prms['antpos'][i] + p[str(i)] = {'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]} + aa.set_ant_params(p) + aa.set_arr_params(prms) + return aa + +def get_catalog(*args, **kwargs): return a.src.get_catalog(*args, **kwargs) diff --git a/calibration_files/mwa_long_baseline.py b/calibration_files/mwa_long_baseline.py new file mode 100644 index 0000000..1f9c892 --- /dev/null +++ b/calibration_files/mwa_long_baseline.py @@ -0,0 +1,103 @@ +import aipy as a, numpy as n, os +import csv + +class AntennaArray(a.pol.AntennaArray): + def __init__(self, *args, **kwargs): + a.pol.AntennaArray.__init__(self, *args, **kwargs) + self.array_params = {} + def get_ant_params(self, ant_prms={'*':'*'}): + prms = a.fit.AntennaArray.get_params(self, ant_prms) + for k in ant_prms: + top_pos = n.dot(self._eq2zen, self[int(k)].pos) + if ant_prms[k] == '*': + prms[k].update({'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]}) + else: + for val in ant_prms[k]: + if val == 'top_x': prms[k]['top_x'] = top_pos[0] + elif val == 'top_y': prms[k]['top_y'] = top_pos[1] + elif val == 'top_z': prms[k]['top_z'] = top_pos[2] + return prms + def set_ant_params(self, prms): + changed = a.fit.AntennaArray.set_params(self, prms) + for i, ant in enumerate(self): + ant_changed = False + top_pos = n.dot(self._eq2zen, ant.pos) + try: + top_pos[0] = prms[str(i)]['top_x'] + ant_changed = True + except(KeyError): pass + try: + top_pos[1] = prms[str(i)]['top_y'] + ant_changed = True + except(KeyError): pass + try: + top_pos[2] = prms[str(i)]['top_z'] + ant_changed = True + except(KeyError): pass + if ant_changed: ant.pos = n.dot(n.linalg.inv(self._eq2zen), top_pos) + changed |= ant_changed + return changed + def get_arr_params(self): + return self.array_params + def set_arr_params(self, prms): + for param in prms: + self.array_params[param] = prms[param] + if param == 'dish_size_in_lambda': + FWHM = 1.037*(1/prms[param]) #FWHM in radians = 1.03*(1/dish_size_in_lambda) + self.array_params['obs_duration'] = 24*60.*FWHM / (2*a.const.pi) # minutes it takes the sky to drift through beam FWHM = 24*60('minutes in a day')*FWHM('in radians')/(2*pi)('radians covered by sky in a day') + if param == 'antpos': + bl_lens = n.sum(n.array(prms[param])**2,axis=1)**.5 + return self.array_params + +#===========================ARRAY SPECIFIC PARAMETERS========================== + +#Set antenna positions here; antpos should just be a list of [x,y,z] coords in light-nanoseconds +x = [] +y = [] +z = [] +antpos = [] #initialize arrays + +with open('calibration_files/antpos_for_other_arrays/mwa_long_baseline_antpos.csv') as f: + csvreader = csv.reader(f) + for row in csvreader: + x.append(row[4]) + y.append(row[5]) + z.append(row[3]) + +for i in xrange(len(x)): #to convert string values to float. + if i > 0: + ax = float(x[i]) * 1e2 / a.const.len_ns + by = float(y[i]) * 1e2 / a.const.len_ns + cz = float(z[i]) * 1e2 / a.const.len_ns + antpos.append((ax, by, cz)) + +#Set other array parameters here +prms = { + 'name': os.path.basename(__file__)[:-3], #remove .py from filename + 'loc': ('-26:42:11.95', '116:40:14.93'), #The MWA is located within the Murchison Radio-astronomy Observatory (MRO) in the Shire of Murchison in Western Australia (WA). + 'antpos': antpos, + 'beam': a.fit.Beam2DGaussian, + 'dish_size_in_lambda': 4.0 * (150.0*1e6) / (a.const.c*1e-2), #in units of wavelengths at 150 MHz; this will also define the observation duration + 'Trx': 1e5 #receiver temp in mK +} + +#=======================END ARRAY SPECIFIC PARAMETERS========================== + +def get_aa(freqs): + '''Return the AntennaArray to be used for simulation.''' + location = prms['loc'] + antennas = [] + nants = len(prms['antpos']) + for i in range(nants): + beam = prms['beam'](freqs, xwidth=(0.45/prms['dish_size_in_lambda']), ywidth=(0.45/prms['dish_size_in_lambda'])) #as it stands, the size of the beam as defined here is not actually used anywhere in this package, but is a necessary parameter for the aipy Beam2DGaussian object + antennas.append(a.fit.Antenna(0, 0, 0, beam)) + aa = AntennaArray(prms['loc'], antennas) + p = {} + for i in range(nants): + top_pos = prms['antpos'][i] + p[str(i)] = {'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]} + aa.set_ant_params(p) + aa.set_arr_params(prms) + return aa + +def get_catalog(*args, **kwargs): return a.src.get_catalog(*args, **kwargs) diff --git a/calibration_files/ska512.py b/calibration_files/ska512.py new file mode 100644 index 0000000..5d4d33d --- /dev/null +++ b/calibration_files/ska512.py @@ -0,0 +1,104 @@ +import aipy as a, numpy as n, os +import csv + +class AntennaArray(a.pol.AntennaArray): + def __init__(self, *args, **kwargs): + a.pol.AntennaArray.__init__(self, *args, **kwargs) + self.array_params = {} + def get_ant_params(self, ant_prms={'*':'*'}): + prms = a.fit.AntennaArray.get_params(self, ant_prms) + for k in ant_prms: + top_pos = n.dot(self._eq2zen, self[int(k)].pos) + if ant_prms[k] == '*': + prms[k].update({'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]}) + else: + for val in ant_prms[k]: + if val == 'top_x': prms[k]['top_x'] = top_pos[0] + elif val == 'top_y': prms[k]['top_y'] = top_pos[1] + elif val == 'top_z': prms[k]['top_z'] = top_pos[2] + return prms + def set_ant_params(self, prms): + changed = a.fit.AntennaArray.set_params(self, prms) + for i, ant in enumerate(self): + ant_changed = False + top_pos = n.dot(self._eq2zen, ant.pos) + try: + top_pos[0] = prms[str(i)]['top_x'] + ant_changed = True + except(KeyError): pass + try: + top_pos[1] = prms[str(i)]['top_y'] + ant_changed = True + except(KeyError): pass + try: + top_pos[2] = prms[str(i)]['top_z'] + ant_changed = True + except(KeyError): pass + if ant_changed: ant.pos = n.dot(n.linalg.inv(self._eq2zen), top_pos) + changed |= ant_changed + return changed + def get_arr_params(self): + return self.array_params + def set_arr_params(self, prms): + for param in prms: + self.array_params[param] = prms[param] + if param == 'dish_size_in_lambda': + FWHM = 1.037*(1/prms[param]) #FWHM in radians = 1.03*(1/dish_size_in_lambda) + self.array_params['obs_duration'] = 24*60.*FWHM / (2*a.const.pi) # minutes it takes the sky to drift through beam FWHM = 24*60('minutes in a day')*FWHM('in radians')/(2*pi)('radians covered by sky in a day') + if param == 'antpos': + bl_lens = n.sum(n.array(prms[param])**2,axis=1)**.5 + return self.array_params + +#===========================ARRAY SPECIFIC PARAMETERS========================== + +#Set antenna positions here; antpos should just be a list of [x,y,z] coords in light-nanoseconds +x = [] +y = [] +z = [] +antpos = [] #initialize arrays + +# 512 SKA antenna (station) positions are given here in ECEF coordinate frame (Earth center earth fixed). +with open('calibration_files/antpos_for_other_arrays/ska_antpos.csv') as f: + csvreader = csv.reader(f) + for row in csvreader: + x.append(row[0]) + y.append(row[1]) + z.append(row[2]) + +for i in xrange(len(x)): #to convert string values to float + if i > 0: + ax = float(x[i]) * 1e2 / a.const.len_ns + by = float(y[i]) * 1e2 / a.const.len_ns + cz = float(z[i]) * 1e2 / a.const.len_ns + antpos.append((ax, by, cz)) + +#Set other array parameters here +prms = { + 'name': os.path.basename(__file__)[:-3], #remove .py from filename + 'loc': ('-26:49:29.18', '116:45:51.84'), #The Square Kilometre Array (SKA) is a radio telescope project proposed to be built in Australia and South Africa. Lat, Long are for Australia Centre + 'antpos': antpos, + 'beam': a.fit.Beam2DGaussian, + 'dish_size_in_lambda': 40.0 * (150.0*1e6) / (a.const.c*1e-2), #in units of wavelengths at 150 MHz; this will also define the observation duration for a drift scan. So we have taken 40m as station diameter now. + 'Trx': 1e5 #receiver temp in mK +} + +#=======================END ARRAY SPECIFIC PARAMETERS========================== + +def get_aa(freqs): + '''Return the AntennaArray to be used for simulation.''' + location = prms['loc'] + antennas = [] + nants = len(prms['antpos']) + for i in range(nants): + beam = prms['beam'](freqs, xwidth=(0.45/prms['dish_size_in_lambda']), ywidth=(0.45/prms['dish_size_in_lambda'])) #as it stands, the size of the beam as defined here is not actually used anywhere in this package, but is a necessary parameter for the aipy Beam2DGaussian object + antennas.append(a.fit.Antenna(0, 0, 0, beam)) + aa = AntennaArray(prms['loc'], antennas) + p = {} + for i in range(nants): + top_pos = prms['antpos'][i] + p[str(i)] = {'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]} + aa.set_ant_params(p) + aa.set_arr_params(prms) + return aa + +def get_catalog(*args, **kwargs): return a.src.get_catalog(*args, **kwargs) diff --git a/calibration_files/vla.py b/calibration_files/vla.py new file mode 100644 index 0000000..d75f340 --- /dev/null +++ b/calibration_files/vla.py @@ -0,0 +1,104 @@ +import aipy as a, numpy as n, os +import csv + +class AntennaArray(a.pol.AntennaArray): + def __init__(self, *args, **kwargs): + a.pol.AntennaArray.__init__(self, *args, **kwargs) + self.array_params = {} + def get_ant_params(self, ant_prms={'*':'*'}): + prms = a.fit.AntennaArray.get_params(self, ant_prms) + for k in ant_prms: + top_pos = n.dot(self._eq2zen, self[int(k)].pos) + if ant_prms[k] == '*': + prms[k].update({'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]}) + else: + for val in ant_prms[k]: + if val == 'top_x': prms[k]['top_x'] = top_pos[0] + elif val == 'top_y': prms[k]['top_y'] = top_pos[1] + elif val == 'top_z': prms[k]['top_z'] = top_pos[2] + return prms + def set_ant_params(self, prms): + changed = a.fit.AntennaArray.set_params(self, prms) + for i, ant in enumerate(self): + ant_changed = False + top_pos = n.dot(self._eq2zen, ant.pos) + try: + top_pos[0] = prms[str(i)]['top_x'] + ant_changed = True + except(KeyError): pass + try: + top_pos[1] = prms[str(i)]['top_y'] + ant_changed = True + except(KeyError): pass + try: + top_pos[2] = prms[str(i)]['top_z'] + ant_changed = True + except(KeyError): pass + if ant_changed: ant.pos = n.dot(n.linalg.inv(self._eq2zen), top_pos) + changed |= ant_changed + return changed + def get_arr_params(self): + return self.array_params + def set_arr_params(self, prms): + for param in prms: + self.array_params[param] = prms[param] + if param == 'dish_size_in_lambda': + FWHM = 1.037*(1/prms[param]) #FWHM in radians = 1.03*(1/dish_size_in_lambda) + self.array_params['obs_duration'] = 24*60.*FWHM / (2*a.const.pi) # minutes it takes the sky to drift through beam FWHM = 24*60('minutes in a day')*FWHM('in radians')/(2*pi)('radians covered by sky in a day') + if param == 'antpos': + bl_lens = n.sum(n.array(prms[param])**2,axis=1)**.5 + return self.array_params + +#===========================ARRAY SPECIFIC PARAMETERS========================== + +#Set antenna positions here; antpos should just be a list of [x,y,z] coords in light-nanoseconds +x = [] +y = [] +z = [] +antpos = [] #initialize arrays + +# VLA antenna (station) positions are given here in ECEF coordinate frame (Earth center earth fixed). +with open('calibration_files/antpos_for_other_arrays/vla_antpos.csv') as f: + csvreader = csv.reader(f) + for row in csvreader: + x.append(row[0]) + y.append(row[1]) + z.append(row[2]) + +for i in xrange(len(x)): #to convert string values to float + if i > 0: + ax = float(x[i]) * 1e2 / a.const.len_ns + by = float(y[i]) * 1e2 / a.const.len_ns + cz = float(z[i]) * 1e2 / a.const.len_ns + antpos.append((ax, by, cz)) + +#Set other array parameters here +prms = { + 'name': os.path.basename(__file__)[:-3], #remove .py from filename + 'loc': ('34:04:43', '-107:37:04'), #Socorro County, US + 'antpos': antpos, + 'beam': a.fit.Beam2DGaussian, + 'dish_size_in_lambda': 25.0 * (150.0*1e6) / (a.const.c*1e-2), #in units of wavelengths at 150 MHz; this will also define the observation duration for a drift scan. + 'Trx': 1e5 #receiver temp in mK +} + +#=======================END ARRAY SPECIFIC PARAMETERS========================== + +def get_aa(freqs): + '''Return the AntennaArray to be used for simulation.''' + location = prms['loc'] + antennas = [] + nants = len(prms['antpos']) + for i in range(nants): + beam = prms['beam'](freqs, xwidth=(0.45/prms['dish_size_in_lambda']), ywidth=(0.45/prms['dish_size_in_lambda'])) #as it stands, the size of the beam as defined here is not actually used anywhere in this package, but is a necessary parameter for the aipy Beam2DGaussian object + antennas.append(a.fit.Antenna(0, 0, 0, beam)) + aa = AntennaArray(prms['loc'], antennas) + p = {} + for i in range(nants): + top_pos = prms['antpos'][i] + p[str(i)] = {'top_x':top_pos[0], 'top_y':top_pos[1], 'top_z':top_pos[2]} + aa.set_ant_params(p) + aa.set_arr_params(prms) + return aa + +def get_catalog(*args, **kwargs): return a.src.get_catalog(*args, **kwargs) diff --git a/fast_mk_array_file.py b/fast_mk_array_file.py new file mode 100644 index 0000000..fe06827 --- /dev/null +++ b/fast_mk_array_file.py @@ -0,0 +1,151 @@ +#! /usr/bin/env python +''' +Creates an array file for use by calc_sense.py. The main product is the uv coverage produced by the array during the time it takes the sky to drift through the primary beam; other array parameters are also saved. Array specific information comes from an aipy cal file. If opts.track is set, produces the uv coverage +for the length specified instead of that set by the primary beam.''' +import aipy as a, numpy as n +import optparse, sys + +o = optparse.OptionParser() +o.set_usage('mk_array_file.py -C [calfile]') +a.scripting.add_standard_options(o,cal=True) +o.add_option('--track', dest='track', default=None, type=float, + help="If set, calculate sensitivity for a tracked observation of this duration in hours; otherwise, calculate for a drift scan.") +o.add_option('--bl_min', dest='bl_min', default=0., type=float, + help="Set the minimum baseline (in meters) to include in the uv plane.") +o.add_option('--bl_max', dest='bl_max', default=None, type=float, + help="Set the maximum baseline (in meters) to include in the uv plane. Use to exclude outriggers with little EoR sensitivity to speed up calculation.") +o.add_option('-f', '--freq', dest='freq', default=0.135, type=float, + help="The central frequency of the observation in GHz. Default is 0.135 GHz, corresponding to z = 9.5, which matches the default model power spectrum used in calc_sense.py.") +opts, args = o.parse_args(sys.argv[1:]) + +# insert folder path for calibration files +sys.path.append('calibration_files/') + +#============================SIMPLE GRIDDING FUNCTION======================= + +mgr = n.mgrid +nz = n.zeros + +def beamgridder(xcen,ycen,size): + crds = mgr[0:size,0:size] + cen = size/2 - 0.5 # correction for centering + xcen += cen + ycen = -1*ycen + cen + beam = nz((size,size)) + if round(ycen) > size - 1 or round(xcen) > size - 1 or ycen < 0. or xcen <0.: + return beam + else: + beam[int(round(ycen)),int(round(xcen))] = 1. #single pixel gridder + return beam + +#==============================READ ARRAY PARAMETERS========================= + +#load cal file +aa = a.cal.get_aa(opts.cal,n.array([.150])) +nants = len(aa) +prms = aa.get_arr_params() +if opts.track: + obs_duration=60.*opts.track + name = prms['name']+'_track_%.1fhr' % opts.track +else: + obs_duration = prms['obs_duration']*(0.15/opts.freq) #scales observing time linearly with frequency to account for change in beam FWHM + name = prms['name']+'_drift'; print name +dish_size_in_lambda = prms['dish_size_in_lambda'] +print obs_duration + +#==========================FIDUCIAL OBSERVATION PARAMETERS=================== + +#while poor form to hard code these to arbitrary values, they have very little effect on the end result + +#observing time +t_int = 60. #how many seconds a single visibility has integrated +cen_jd = 2454600.90911 +start_jd = cen_jd - (1./24)*((obs_duration/t_int)/2) +end_jd = cen_jd + (1./24)*(((obs_duration-1)/t_int)/2) +times = n.arange(start_jd,end_jd,(1./24/t_int)) +print 'Observation duration:', start_jd, end_jd + +ref_fq = .150 + +#================================MAIN CODE=================================== + +cnt = 0 +uvbins = {} + +cat = a.src.get_catalog(opts.cal,'z') #create zenith source object +aa.set_jultime(cen_jd) +obs_lst = aa.sidereal_time() +obs_zen = a.phs.RadioFixedBody(obs_lst,aa.lat) +obs_zen.compute(aa) #observation is phased to zenith of the center time of the drift + +uvw = aa.gen_uvw +#find redundant baselines +bl_len_min = opts.bl_min / (a.const.c/(ref_fq*1e11)) #converts meters to lambda +bl_len_max = 0. +min_bl_len = 100. +for i in xrange(nants): + print 'working on antenna %i of %i' % (i+1, len(aa)) + for j in xrange(nants): + if i == j: continue #no autocorrelations + u,v,w = uvw(i,j,src=obs_zen) + bl_len = n.sqrt(u**2 + v**2) + if min_bl_len > bl_len : min_bl_len = bl_len + if bl_len > bl_len_max: bl_len_max = bl_len + if bl_len < bl_len_min: continue + if round(u,1) == 0.0: u = 0.0 + if round(v,1) == 0.0: v = 0.0 + uvbin = '%.1f,%.1f' % (u,v) + cnt +=1 + if not uvbins.has_key(uvbin): uvbins[uvbin] = ['%i,%i' % (i,j)] + else: uvbins[uvbin].append('%i,%i' % (i,j)) +print 'There are %i baseline types' % len(uvbins.keys()) + +print 'The shortest baseline is %.2f meters' % (min_bl_len*(a.const.c/(ref_fq*1e11))) #1e11 converts from GHz to cm +print 'The longest baseline is %.2f meters' % (bl_len_max*(a.const.c/(ref_fq*1e11))) #1e11 converts from GHz to cm +if opts.bl_max: + bl_len_max = opts.bl_max / (a.const.c/(ref_fq*1e11)) #units of wavelength + print 'The longest baseline being included is %.2f m' % (bl_len_max*(a.const.c/(ref_fq*1e11))) + +def beamfortime(time, dimen): #Function to speed up calculation in loop + aa.set_jultime(time) + lst = aa.sidereal_time() + obs_zen.compute(aa) + bl = uvbins[uvbin][0] + i, j = bl.split(',') + i, j = int(i), int(j) + u,v,w = uvw(i,j,src=obs_zen) + _beam = beamgridder(xcen=u/dish_size_in_lambda, ycen=v/dish_size_in_lambda, size=int(dimen)) + return _beam + +#grid each baseline type into uv plane +dim = n.round(bl_len_max/dish_size_in_lambda)*2 + 1 #round to nearest odd +uvsum, quadsum = nz((int(dim),int(dim))), nz((int(dim),int(dim))) #quadsum adds all non-instantaneously-redundant baselines incoherently +uvplstr = nz((len(times),int(dim),int(dim))) +for cnt, uvbin in enumerate(uvbins): + print 'working on %i of %i uvbins' % (cnt+1, len(uvbins)) + k = 0 + uvplane = nz((int(dim),int(dim))) + for t in times: + nbls = len(uvbins[uvbin]) + _beam_ = beamfortime(time=t, dimen=dim) + uvplstr[k] = nbls*_beam_ + k += 1 + for ii in range(0,k): + uvplane += uvplstr[ii] + uvsum += uvplane + quadsum += (uvplane)**2 + +quadsum = quadsum**.5 + +print "Saving file as %s_blmin%0.f_blmax%0.f_%.3fGHz_arrayfile.npz" % (name, bl_len_min, bl_len_max, opts.freq) + +n.savez('%s_blmin%0.f_blmax%0.f_%.3fGHz_arrayfile.npz' % (name, bl_len_min, bl_len_max, opts.freq), +uv_coverage = uvsum, +uv_coverage_pess = quadsum, +name = name, +obs_duration = obs_duration, +dish_size_in_lambda = dish_size_in_lambda, +Trx = prms['Trx'], +t_int = t_int, +freq=opts.freq +) diff --git a/mk_array_file.py b/mk_array_file.py index 86f2575..c10b995 100755 --- a/mk_array_file.py +++ b/mk_array_file.py @@ -18,6 +18,9 @@ help="The central frequency of the observation in GHz. Default is 0.135 GHz, corresponding to z = 9.5, which matches the default model power spectrum used in calc_sense.py.") opts, args = o.parse_args(sys.argv[1:]) +# insert folder path for calibration files +sys.path.append('calibration_files/') + #============================SIMPLE GRIDDING FUNCTION======================= def beamgridder(xcen,ycen,size): @@ -29,7 +32,7 @@ def beamgridder(xcen,ycen,size): if round(ycen) > size - 1 or round(xcen) > size - 1 or ycen < 0. or xcen <0.: return beam else: - beam[round(ycen),round(xcen)] = 1. #single pixel gridder + beam[int(round(ycen)),int(round(xcen))] = 1. #single pixel gridder return beam #==============================READ ARRAY PARAMETERS========================= @@ -40,10 +43,10 @@ def beamgridder(xcen,ycen,size): prms = aa.get_arr_params() if opts.track: obs_duration=60.*opts.track - name = prms['name']+'track_%.1fhr' % opts.track + name = prms['name']+'_track_%.1fhr' % opts.track else: obs_duration = prms['obs_duration']*(0.15/opts.freq) #scales observing time linearly with frequency to account for change in beam FWHM - name = prms['name']+'drift'; print name + name = prms['name']+'_drift'; print name dish_size_in_lambda = prms['dish_size_in_lambda'] #==========================FIDUCIAL OBSERVATION PARAMETERS=================== @@ -75,13 +78,15 @@ def beamgridder(xcen,ycen,size): bl_len_min = opts.bl_min / (a.const.c/(ref_fq*1e11)) #converts meters to lambda bl_len_max = 0. for i in xrange(nants): - print 'working on antenna %i of %i' % (i, len(aa)) + print 'working on antenna %i of %i' % (i+1, len(aa)) for j in xrange(nants): if i == j: continue #no autocorrelations u,v,w = aa.gen_uvw(i,j,src=obs_zen) bl_len = n.sqrt(u**2 + v**2) if bl_len > bl_len_max: bl_len_max = bl_len if bl_len < bl_len_min: continue + if round(u,1) == 0.0: u = 0.0 + if round(v,1) == 0.0: v = 0.0 uvbin = '%.1f,%.1f' % (u,v) cnt +=1 if not uvbins.has_key(uvbin): uvbins[uvbin] = ['%i,%i' % (i,j)] @@ -95,10 +100,10 @@ def beamgridder(xcen,ycen,size): #grid each baseline type into uv plane dim = n.round(bl_len_max/dish_size_in_lambda)*2 + 1 # round to nearest odd -uvsum,quadsum = n.zeros((dim,dim)), n.zeros((dim,dim)) #quadsum adds all non-instantaneously-redundant baselines incoherently +uvsum,quadsum = n.zeros((int(dim),int(dim))), n.zeros((int(dim),int(dim))) #quadsum adds all non-instantaneously-redundant baselines incoherently for cnt, uvbin in enumerate(uvbins): print 'working on %i of %i uvbins' % (cnt+1, len(uvbins)) - uvplane = n.zeros((dim,dim)) + uvplane = n.zeros((int(dim),int(dim))) for t in times: aa.set_jultime(t) lst = aa.sidereal_time() @@ -108,7 +113,7 @@ def beamgridder(xcen,ycen,size): i, j = bl.split(',') i, j = int(i), int(j) u,v,w = aa.gen_uvw(i,j,src=obs_zen) - _beam = beamgridder(xcen=u/dish_size_in_lambda,ycen=v/dish_size_in_lambda,size=dim) + _beam = beamgridder(xcen=u/dish_size_in_lambda,ycen=v/dish_size_in_lambda,size=int(dim)) uvplane += nbls*_beam uvsum += nbls*_beam quadsum += (uvplane)**2 diff --git a/pallav_project_report.pdf b/pallav_project_report.pdf new file mode 100644 index 0000000..abeed8c Binary files /dev/null and b/pallav_project_report.pdf differ diff --git a/plot_sense.py b/plot_sense.py new file mode 100644 index 0000000..bf1c358 --- /dev/null +++ b/plot_sense.py @@ -0,0 +1,43 @@ +'''Takes input as *.npz file and shows a plot of Sensitivity data. Do not run before you have already run mk_array_file.py and subsequent calc_sense.py''' + +import numpy as n +import optparse, sys +from matplotlib import pyplot as plt + +o = optparse.OptionParser() +o.set_usage('plot_sense.py [options] *.npz') +o.set_description(__doc__) +opts, args = o.parse_args(sys.argv[1:]) + +#Load in data from array file + +array = n.load(args[0]) +k_s = array['ks'] +sense = array['errs'] +Tsense = array['T_errs'] +P21 = array['ps21'] + +#Write array to csv file + +l = len(k_s) +with open('sensitivity.csv','w+') as f: + f.write('k, Power Spectrum (interpolated), Full Sensitivity, Sensitivity [Thermal Noise Only]\n') + for i in xrange(l): + f.write('%f, %f, %f, %f\n' % (k_s[i], P21[i], sense[i], Tsense[i])) + +#Plotting + +plt.figure(figsize = (12,4)) + +plt.plot(k_s, sense, 'y--', drawstyle = 'steps', label = 'Full Sensitivity') +plt.plot(k_s, Tsense, 'r:', drawstyle = 'steps', label = 'Sensitivity [Thermal Noise Only]') +plt.plot(k_s, P21, 'c-', label = r'$\Delta^{2}_{21}(k)$') +plt.xscale('log') +plt.yscale('log') +plt.title('Sensitivity') +plt.xlabel(r'$k\ [h\ Mpc^{-1}]$') +plt.ylabel(r'$\delta\Delta^{2}(k)\ [mK^{2}]$') +plt.legend() +plt.savefig('sensitivity_plot.png', dpi = 600) + +plt.show()