## 2003dec13 LAMA Memo 803 writeup version # # Usage # # include 'almatau.g' # pwv := 1.0; # freq := 225; # tau225 := 0.06 # myalmatau := almatau() # myalmatau.plottrans(pwv) # myalmatau.gettau(freq, pwv) # myalmatau.getpwv(tau225) # myalmatau.getwet(freq) # myalmatau.getdry(freq) # myalmatau.done() # myalmatau.totaufreq(tau225, freq) # vectau225 := [0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1] # myalmatau.vectotaufreq(vectau225, freq) # # # pragma include once; include 'quanta.g' include 'measures.g' include 'pgplotter.g' #const almatau := subsequence () { private := [=]; # private.taudry225 := 0.008664; these are the old terms # private.tauwet225 := 0.043064; these are the old terms # # We have done some work at 20 MHz resolution and integrated # over the bands, fitting wet and dry terms (but with a single # temperature atmospheric layer) -- a linear fit was sufficient private.taudry225 := 0.00967; private.tauwet225 := 0.04293; private.pg := F; # This is a bit ugly, but it encapsulates all the opacity data # into this .g file, no data files are required. # To update this data, we just need the wet and dry terms # for frequencies of [1:1000] GHz # These WET and DRY terms were obtained from Juan Pardo's # ALMA ATM code in MAY 2003. # # private.maxfreq := 1000; private.minfreq := 1; private.dfreq := 1.0; private.freq := [1:1000]; private.tauwet := [0.000000,0.000002,0.000007,0.000013,0.000022,0.000033,0.000045,0.000060,0.000078,0.000101,0.000127,0.000158,0.000198,0.000250,0.000322,0.000425,0.000585,0.000856,0.001370,0.002480,0.005162,0.010304,0.008503,0.004726,0.002924,0.002081,0.001648,0.001408,0.001270,0.001190,0.001145,0.001125,0.001121,0.001129,0.001146,0.001170,0.001200,0.001235,0.001274,0.001316,0.001362,0.001410,0.001461,0.001515,0.001571,0.001630,0.001693,0.001761,0.001838,0.001928,0.001980,0.002030,0.002090,0.002200,0.002300,0.002300,0.002000,0.003000,0.002998,0.002001,0.003000,0.002001,0.003000,0.003000,0.003000,0.003160,0.003260,0.003350,0.003440,0.003534,0.003632,0.003732,0.003835,0.003940,0.004048,0.004159,0.004276,0.004403,0.004551,0.004740,0.004871,0.004909,0.004986,0.005087,0.005201,0.005322,0.005451,0.005583,0.005702,0.005825,0.005953,0.006085,0.006219,0.006355,0.006494,0.006635,0.006777,0.006921,0.007066,0.007216,0.007367,0.007519,0.007672,0.007829,0.007987,0.008147,0.008309,0.008474,0.008641,0.008811,0.008982,0.009156,0.009332,0.009512,0.009690,0.009880,0.010070,0.010300,0.010500,0.010760,0.010980,0.011120,0.011274,0.011461,0.011661,0.011868,0.012082,0.012300,0.012524,0.012753,0.012986,0.013224,0.013468,0.013719,0.013978,0.014248,0.014537,0.014857,0.015144,0.015395,0.015685,0.016018,0.016412,0.016781,0.017015,0.017304,0.017640,0.018005,0.018396,0.018814,0.019263,0.019724,0.020190,0.020695,0.021253,0.021842,0.022477,0.023167,0.023918,0.024743,0.025654,0.026668,0.027805,0.029092,0.030561,0.032256,0.034235,0.036572,0.039372,0.042777,0.046989,0.052302,0.059151,0.068211,0.080566,0.098035,0.123837,0.164124,0.231556,0.354855,0.605616,1.160429,2.152020,1.783308,0.930122,0.516913,0.323531,0.223395,0.166203,0.130868,0.107698,0.091835,0.080723,0.072794,0.065951,0.060736,0.056799,0.053759,0.051411,0.049664,0.048585,0.048624,0.050779,0.049224,0.045626,0.043883,0.042937,0.042309,0.041858,0.041539,0.041312,0.041159,0.041063,0.041017,0.041012,0.041045,0.041112,0.041207,0.041332,0.041483,0.041664,0.041879,0.042145,0.042507,0.043064,0.043643,0.043476,0.043457,0.043605,0.043832,0.044098,0.044390,0.044699,0.045015,0.045353,0.045704,0.046073,0.046469,0.046913,0.047465,0.048218,0.048711,0.048701,0.048872,0.049174,0.049535,0.049926,0.050337,0.050763,0.051203,0.051664,0.052150,0.052691,0.053339,0.054069,0.054310,0.054580,0.054971,0.055422,0.055904,0.056409,0.056938,0.057499,0.058122,0.058880,0.059782,0.060081,0.060344,0.060771,0.061277,0.061821,0.062389,0.062975,0.063573,0.064181,0.064799,0.065431,0.066074,0.066729,0.067395,0.068075,0.068768,0.069475,0.070197,0.070934,0.071686,0.072461,0.073253,0.074062,0.074899,0.075758,0.076643,0.077558,0.078505,0.079488,0.080509,0.081574,0.082690,0.083873,0.085103,0.086419,0.087820,0.089323,0.090966,0.092743,0.094648,0.096777,0.099243,0.102040,0.105353,0.108989,0.113128,0.118408,0.124839,0.132473,0.142787,0.157058,0.177355,0.208574,0.261530,0.354555,0.480732,0.755680,1.423380,2.548927,1.771425,0.914139,0.540534,0.370851,0.283978,0.234839,0.204907,0.185712,0.173033,0.164572,0.158473,0.154044,0.151122,0.149310,0.148325,0.148009,0.148216,0.148882,0.149938,0.151363,0.153128,0.155232,0.157651,0.160411,0.163523,0.167006,0.170906,0.175249,0.180095,0.185507,0.191576,0.198399,0.206104,0.214861,0.224854,0.236351,0.249685,0.265280,0.283695,0.305700,0.332301,0.364930,0.405540,0.457200,0.524230,0.613390,0.735692,0.909745,1.168925,1.577824,2.272272,3.570509,6.305092,12.66117,23.87153,17.01934,8.355206,4.539417,2.804310,1.915821,1.410339,1.094849,0.890435,0.756485,0.672998,0.600305,0.523407,0.468381,0.428651,0.398528,0.374944,0.356118,0.340924,0.328562,0.318469,0.310232,0.303534,0.298126,0.293813,0.290447,0.287903,0.286084,0.284931,0.284359,0.284340,0.284822,0.285790,0.287230,0.289121,0.291469,0.294270,0.297546,0.301320,0.305620,0.310480,0.315970,0.322150,0.329200,0.337000,0.346000,0.356100,0.367720,0.381280,0.397140,0.416020,0.438940,0.467480,0.504347,0.554550,0.628968,0.756357,1.023580,1.511325,2.569799,1.931904,1.531066,1.675537,2.213503,2.726019,4.036484,7.153923,14.89627,26.31809,15.04579,7.262012,4.076718,2.636173,1.891984,1.465577,1.201659,1.028863,0.911112,0.828499,0.769568,0.727345,0.697528,0.677479,0.665778,0.662178,0.666431,0.675864,0.699624,0.749510,0.859898,1.136100,1.516250,1.336936,1.621040,2.767681,3.417666,1.883010,1.224025,0.973145,0.864328,0.813630,0.790290,0.784540,0.787880,0.802130,0.830780,0.886180,1.006200,1.263700,1.314270,1.088620,0.989660,0.951340,0.944625,0.952857,0.968962,0.989910,1.014435,1.041896,1.072148,1.105490,1.142919,1.188514,1.260766,1.314429,1.330751,1.364384,1.416415,1.482554,1.562851,1.612319,1.656049,1.715788,1.786020,1.864140,1.949340,2.041373,2.141202,2.249575,2.367793,2.498190,2.633342,2.781840,2.945346,3.124737,3.322020,3.538528,3.777645,4.042596,4.336918,4.665407,5.033507,5.446999,5.913355,6.443620,7.049332,7.746192,8.555008,9.489307,10.58489,11.88761,13.44885,15.34273,17.67546,20.60424,24.37885,29.42706,36.38564,44.73041,54.49800,69.52104,92.86831,130.3187,194.0312,313.4917,559.5615,1072.260,1619.958,995.3753,524.2478,299.4989,188.5199,128.1800,92.39765,69.63169,54.32336,43.56353,35.72481,29.84228,25.31720,21.76460,18.92310,16.61689,14.71773,13.13623,11.80573,10.67500,9.706009,8.869600,8.142414,7.506379,6.946793,6.451847,6.012096,5.619641,5.267798,4.951418,4.665783,4.407145,4.172312,3.958495,3.763430,3.584982,3.421781,3.272248,3.135580,3.011234,2.900101,2.805774,2.737595,2.680800,2.552695,2.444423,2.358141,2.285484,2.219467,2.163702,2.115089,2.073986,2.041206,2.018032,2.007018,2.012228,2.040662,2.104702,2.227725,2.458004,2.905393,3.856410,6.167658,12.09943,15.45059,7.935911,4.453857,3.050511,2.388224,2.026731,1.805889,1.659175,1.554872,1.476729,1.415604,1.366319,1.325403,1.290670,1.260532,1.234143,1.210720,1.189722,1.170690,1.153396,1.137701,1.123235,1.110140,1.097876,1.086561,1.076109,1.066415,1.057500,1.049358,1.041826,1.035042,1.028988,1.023710,1.019530,1.016800,1.016500,1.019984,1.023980,1.015480,1.004025,0.997299,0.993245,0.990696,0.988981,0.988116,0.987738,0.988013,0.988661,0.989704,0.991310,0.993422,0.995879,0.998914,1.002410,1.006303,1.010790,1.015780,1.021232,1.027216,1.033823,1.041073,1.048802,1.057209,1.066361,1.076159,1.086863,1.098539,1.111251,1.125711,1.143162,1.168354,1.205138,1.203472,1.208532,1.222876,1.240997,1.261466,1.283656,1.307680,1.333365,1.360960,1.390492,1.422008,1.455830,1.491969,1.530791,1.572428,1.617166,1.665356,1.717078,1.772990,1.833260,1.898510,1.969220,2.046000,2.129400,2.220360,2.319640,2.428380,2.547710,2.678946,2.823867,2.984310,3.162502,3.361065,3.583449,3.833196,4.115234,4.435137,4.800000,5.218500,5.701623,6.263332,6.921497,7.699310,8.627466,9.747144,11.11509,12.80981,14.94470,17.68854,21.30188,26.21243,33.15941,43.25494,56.88538,78.28874,115.6962,185.9315,332.2679,652.2633,1081.698,685.5356,350.1496,195.1496,120.9199,81.41315,58.32708,43.79521,34.10084,27.32882,22.41864,18.74957,15.93759,13.73475,11.97810,10.55539,9.385680,8.413680,7.596910,6.904020,6.311100,5.799800,5.356001,4.968400,4.627200,4.325860,4.058310,3.819800,3.606070,3.413970,3.240610,3.083720,2.941240,2.811450,2.692950,2.584340,2.484780,2.393190,2.308730,2.230730,2.158570,2.091770,2.029760,1.972188,1.917242,1.868260,1.821324,1.776068,1.734563,1.695913,1.659721,1.625739,1.593829,1.563830,1.535670,1.509079,1.484100,1.460532,1.438270,1.417170,1.397292,1.378530,1.360770,1.344026,1.328149,1.313118,1.299026,1.285647,1.272990,1.261170,1.250190,1.240209,1.231330,1.224690,1.222060,1.224750,1.211050,1.193770,1.181930,1.172950,1.165450,1.158800,1.152900,1.147600,1.143150,1.139240,1.135150,1.131440,1.126570,1.122280,1.118800,1.116000,1.113590,1.111930,1.111090,1.112200,1.117130,1.123700,1.114030,1.107040,1.103928,1.102879,1.102217,1.101515,1.101698,1.103080,1.106250,1.111641,1.115072,1.112130,1.109250,1.108480,1.109049,1.110276,1.112090,1.114275,1.116804,1.119580,1.122734,1.126139,1.129716,1.133639,1.137840,1.142409,1.147253,1.152449,1.157972,1.163857,1.170197,1.176961,1.184150,1.192010,1.200450,1.209667,1.219830,1.231050,1.243900,1.259166,1.278273,1.304070,1.345636,1.418803,1.457250,1.417640,1.409700,1.416180,1.436068,1.465996,1.502442,1.547290,1.606693,1.686585,1.805787,2.020156,2.374111,2.369011,2.391060,2.604710,2.995390,3.642241,4.759090,6.872065,11.40537,22.29800,41.75723,28.73434,14.26528,8.209620,5.506310,4.128396,3.354193,2.883991,2.581083,2.377700,2.237450,2.138960,2.069410,2.020706,1.987415,1.965850,1.953740,1.948980,1.950640,1.957760,1.969480,1.985740,2.006337,2.029870,2.056570,2.087350,2.122250,2.162230,2.209030,2.260090,2.302870,2.353700,2.412190,2.477100,2.548810,2.627830,2.714980,2.811590,2.919040,3.039220,3.174660,3.328530,3.505040,3.709530,3.949920,4.239210,4.596200,5.051240,5.657630,6.515570,7.833230,10.09854,14.62871,25.30336,47.66159,39.36331,22.22496,15.78935,13.70320,13.42752,14.15190,15.65077,17.95057,21.25752,25.98867,32.90453,43.41606,60.30073,89.51846,145.1885,263.6569,526.2282,821.2185,477.5882,241.9677,136.3774,85.87965,58.97803,43.58377,33.69197,26.34911,21.30605,17.73734,15.11020,13.11466]; private.taudry := [0.002578,0.002701,0.002742,0.002776,0.002814,0.002858,0.002910,0.002969,0.003040,0.003120,0.003223,0.003301,0.003408,0.003529,0.003670,0.003812,0.003967,0.004142,0.004334,0.004545,0.004776,0.005030,0.005309,0.005641,0.005951,0.006323,0.006726,0.007180,0.007789,0.008429,0.008849,0.009532,0.010301,0.011170,0.012155,0.013546,0.014548,0.016075,0.017708,0.019679,0.022002,0.024766,0.028119,0.032133,0.037106,0.043327,0.051358,0.061970,0.076532,0.097960,0.135480,0.221910,0.456940,1.140800,2.826500,6.979700,15.19100,14.87000,18.58500,19.23300,19.66500,17.40399,21.04500,5.254400,2.055700,0.795140,0.344080,0.188540,0.127230,0.095952,0.076466,0.062718,0.052584,0.044856,0.038798,0.034065,0.030137,0.026836,0.024476,0.021805,0.019891,0.018239,0.016831,0.015621,0.014574,0.013669,0.012886,0.012211,0.011631,0.011138,0.010734,0.010389,0.010154,0.012187,0.009827,0.010345,0.009755,0.009796,0.009921,0.010164,0.010670,0.011925,0.011640,0.013107,0.013388,0.014704,0.016466,0.018893,0.022146,0.026726,0.035294,0.041836,0.055983,0.079911,0.127410,0.221810,0.500790,1.805600,4.905800,0.879610,0.322980,0.164330,0.099986,0.075828,0.050122,0.038236,0.030404,0.025595,0.021362,0.018487,0.016807,0.014681,0.013410,0.012352,0.011352,0.010679,0.010874,0.009551,0.009142,0.009108,0.008625,0.012696,0.008293,0.007928,0.012127,0.007480,0.007248,0.007188,0.007509,0.006965,0.006818,0.006753,0.006765,0.013252,0.006658,0.006842,0.006540,0.006473,0.006458,0.006448,0.006425,0.006433,0.006479,0.006651,0.015792,0.010902,0.006768,0.006626,0.007107,0.006587,0.006488,0.006473,0.006551,0.006595,0.007249,0.006725,0.006583,0.006566,0.006584,0.008325,0.006694,0.006771,0.006880,0.008692,0.008328,0.006997,0.006969,0.006945,0.006937,0.006902,0.006952,0.007036,0.007532,0.007431,0.009051,0.008973,0.007370,0.007518,0.007457,0.007326,0.007276,0.007304,0.007370,0.007470,0.007482,0.008742,0.007670,0.008158,0.009192,0.008074,0.009243,0.007825,0.007856,0.008042,0.026992,0.008481,0.007983,0.008154,0.008040,0.008177,0.008120,0.008167,0.008258,0.008374,0.008664,0.016298,0.008695,0.008768,0.009122,0.009729,0.013855,0.011845,0.013925,0.031400,0.014656,0.017460,0.026699,0.011829,0.038856,0.013671,0.011352,0.015090,0.014040,0.014166,0.010316,0.010076,0.010606,0.022506,0.012361,0.079367,0.010898,0.010178,0.010095,0.010054,0.010089,0.010137,0.010435,0.012469,0.015101,0.010757,0.010574,0.010870,0.015361,0.016844,0.016482,0.011111,0.014946,0.011556,0.010963,0.010908,0.011617,0.011856,0.054865,0.012976,0.012418,0.011514,0.019373,0.011631,0.011989,0.013832,0.015908,0.012278,0.013889,0.012100,0.012835,0.044274,0.014093,0.013297,0.090038,0.013334,0.020449,0.012870,0.020063,0.013578,0.012988,0.013324,0.014408,0.017590,0.017597,0.015187,0.016901,0.031200,0.025127,0.014914,0.015117,0.013852,0.013673,0.013637,0.013810,0.022417,0.013911,0.013852,0.014072,0.015021,0.015277,0.035673,0.017962,0.015015,0.015186,0.195290,0.015235,0.018918,0.014860,0.015120,0.015273,0.016875,0.058731,0.020346,0.015769,0.015642,0.015881,0.017553,0.031958,0.016787,0.017518,0.016387,0.016046,0.016088,0.016230,0.016265,0.016431,0.016834,0.020808,0.017492,0.017047,0.017102,0.017318,0.017669,0.018339,0.018547,0.019024,0.026404,0.030791,0.020555,0.086893,0.021644,0.023311,0.034806,0.060919,0.029786,0.026579,0.029685,0.034140,0.046115,0.055150,0.079889,0.173610,0.630760,0.639100,0.167440,0.176920,0.052668,0.043615,0.034175,0.046276,0.039628,0.027691,0.033808,0.027825,0.024465,0.023660,0.024194,0.023283,0.023190,0.023379,0.023761,0.036551,0.025365,0.024055,0.024092,0.024535,0.027223,0.031779,0.026099,0.034812,0.028006,0.064422,0.028306,0.029898,0.064371,0.054668,0.064256,0.041154,0.038577,0.033873,0.034527,0.036156,0.047589,0.042191,0.042000,0.045238,0.051680,0.111730,0.081549,0.071291,0.078790,0.093694,0.116650,0.151530,0.211540,0.323190,0.560640,1.235400,4.238600,11.90400,2.218900,0.834480,0.440490,0.283680,0.195140,0.143960,0.111720,0.093383,0.078750,0.069092,0.062823,0.062020,0.058575,0.050701,0.048096,0.060734,0.074963,0.042397,0.040081,0.052816,0.054577,0.038722,0.037906,0.083202,0.036988,0.034882,0.034827,0.033816,0.034723,0.034741,0.034037,0.040928,0.037701,0.033802,0.034105,0.034902,0.041681,0.067092,0.057142,0.039909,0.041786,0.048656,0.339790,0.071872,0.148300,0.379250,0.045264,0.110860,0.045419,0.047034,0.327490,0.050375,0.053455,0.060902,0.110210,0.119810,0.115620,0.133550,0.199870,0.365820,0.937420,4.939900,1.875700,0.561130,0.268680,0.163140,0.136160,0.088875,0.073643,0.064938,0.086390,0.091265,0.088604,0.058652,0.047510,0.043681,0.041586,0.040034,0.039271,0.041149,0.039416,0.041885,0.090746,0.042749,0.037681,0.036651,0.040212,0.036480,0.036260,0.120760,0.037027,0.043998,0.041125,0.039107,0.112410,0.042458,0.167960,0.062854,0.043663,0.037080,0.036072,0.035855,0.035704,0.036682,0.039293,0.045193,0.036101,0.036545,0.043680,0.038068,0.067508,0.037393,0.037693,0.044108,0.041389,0.038143,0.037268,0.037530,0.038755,0.069142,0.037937,0.037359,0.037581,0.056999,0.039957,0.426680,0.041288,0.038742,0.038196,0.038429,0.039408,0.041604,0.084674,0.042130,0.060993,0.040063,0.039958,0.041354,0.042315,0.046629,0.082471,0.099189,0.051719,0.046800,0.105400,1.097900,0.046103,0.070270,0.046763,0.043266,0.044999,0.045391,0.042200,0.041186,0.043721,0.044507,0.095753,0.050804,0.047459,0.042202,0.041982,0.043117,0.041755,0.044988,0.045405,0.129970,0.046218,0.049319,0.044752,0.128120,0.044666,0.043099,0.043026,0.043205,0.106600,0.045905,0.043577,0.044759,0.043716,0.043533,0.044698,0.045311,0.051014,0.050194,0.087368,0.075582,0.051472,0.047438,0.046898,0.055375,0.048996,0.048607,0.046990,0.048042,0.057570,0.121410,0.050889,0.051343,0.061389,0.051176,0.049869,0.051911,0.057725,0.049928,0.049271,0.048996,0.075481,0.053297,0.059030,0.055368,0.049557,0.049480,0.051978,0.144710,0.080004,0.052999,0.066865,0.057560,0.055824,0.085939,0.064591,0.057585,0.109000,0.054842,0.056474,0.074358,0.073212,0.067190,0.112870,1.037500,1.141700,0.096516,0.261120,0.066420,0.056475,0.061001,0.058355,0.055204,0.055319,0.061884,0.080262,0.068287,0.059839,0.058696,0.131590,0.062578,0.082421,0.065386,0.102390,0.055897,0.082510,0.062320,0.054968,0.057284,0.054777,0.054927,0.055998,0.057291,0.064239,0.056841,0.056837,0.056461,0.056749,0.057289,0.058238,0.061446,0.085562,0.075428,0.071368,0.079424,0.088703,0.064134,0.062244,0.135620,0.067535,0.140240,0.069308,0.066792,0.066670,0.068131,0.072009,0.074272,0.087734,0.086044,0.097522,0.116910,0.149540,0.231190,0.501380,2.180700,1.454800,0.417740,0.236260,0.152320,0.148090,0.099254,0.089733,0.116590,0.085098,0.076835,0.075151,0.079904,0.073966,0.074463,0.168900,0.108300,0.083777,0.075168,0.079903,0.198390,0.071733,0.071056,0.070903,0.072190,0.093294,0.078455,0.075118,0.079566,0.073588,0.075057,0.088610,0.161260,0.083730,0.098434,0.082038,0.096694,0.101040,0.084372,0.090334,0.090330,0.090044,0.124850,0.098916,0.097783,0.104160,0.108180,0.116360,0.123430,0.136400,0.170240,0.197900,0.214610,0.263220,0.347320,0.508290,0.849980,1.797900,5.939200,24.21600,3.794500,1.413800,0.733640,0.455790,0.327200,0.268630,0.207130,0.190290,0.168080,0.150860,0.154850,0.125950,0.113660,0.107920,0.105210,0.102670,0.108570,0.105130,0.150830,0.097040,0.091612,0.091158,0.087940,0.087976,0.095932,0.086137,0.085687,0.087779,0.085561,0.084971,0.085970,0.085930,0.093621,0.106000,0.088068,0.100730,0.138930,0.094208,0.141370,0.727530,0.090074,0.088651,0.088482,0.091174,0.094553,0.107310,0.094530,0.097810,0.099791,0.107270,0.119810,0.179740,0.139650,0.298050,0.171630,0.225870,0.882950,0.602650,1.468200,8.842200,2.129500,0.697250,0.458060,0.318550,0.219460,0.250930,0.474120,0.402600,1.330500,0.149210,0.116570,0.108010,0.101400,0.102270,0.247200,0.110270,0.094560,0.093072,0.096521,0.091583,0.091885,0.092502,0.106120,0.600050,0.094159,0.092228,0.100670,0.101050,0.249820,0.092251,0.091124,0.126410,0.090225,0.089296,0.112620,0.090866,0.088761,0.088384,0.088361,0.092460,0.089091,0.089447,0.089051,0.089128,0.089443,0.090003,0.094339,0.094750,0.422390,0.096850,0.095033,0.102170,0.116750,0.170400,0.097934,0.093627,0.093630,0.094264,0.097197,0.107450,0.162460,0.320300,0.101620,0.095932,0.094304,0.094158,0.105710,0.095207,0.094115,0.093913,0.094344,0.095789,0.098289,0.146740,0.121090,0.119410,0.096059,0.130210,0.095535,0.096625,0.096000,0.095769,0.096659,0.098721,0.124480,0.105190,0.098404,0.097507,0.098209,0.099817,0.136600,0.113450,0.106240,0.107390,0.099594,0.099485,0.100350,0.105860,0.245720,0.109260,0.101640,0.108620,0.104660,0.099963,0.100030,0.102530,0.101050,0.100950,0.102670,0.101770,0.119810,0.102130,0.103000,0.107510,0.183000,0.111290,0.131870,0.107420,0.106810,0.111060,0.115180,0.167740,0.121270,0.124660,0.124170,0.109480,0.105490,0.105700,0.105160,0.105170,0.106230,0.106270,0.107460,0.112290,0.314640,0.339400,0.115690,0.111040,0.771650,0.112800,0.109480,0.109100,0.112230,0.109420,0.112480,0.284330,0.112470,0.117940,0.280270,0.114540,0.111460,0.163080,0.111740,0.111480,0.111720,0.112220,0.112530,0.117350,0.131970,0.163230,0.128020,0.119880,0.114940,0.116660,0.129790,0.118340]; self.done := function() { wider self, private; private.donepgplotter(); private.tauwet := F; private.freq := F; private.drytau := F; val self := F; val public := F; return T; } # Returns dry term give freq in GHz self.getdry := function(freq) { ifreq := private.getfreqindex(freq); if (!is_fail(ifreq)) { return private.taudry[ifreq]; } else { return F } } # Returns wet term give freq in GHz self.getwet := function(freq) { ifreq := private.getfreqindex(freq); if (!is_fail(ifreq)) { return private.tauwet[ifreq]; } else { return F } } # Returns opacity for this freq[GHz] and PWV self.gettau := function(freq=225, pwv=1) { dry := self.getdry(freq); wet := self.getwet(freq); if (is_fail(dry)) { fail; } return (dry + pwv * wet); } # From Tau225, determines pwv self.getpwv := function(tau225=1) { pwv := (tau225 - private.taudry225 ) / private.tauwet225 return pwv; } self.plottau := function(pwv=1.0, taumax=2, fmin=1, fmax=1000) { private.getpgplotter(); y := private.taudry + private.tauwet * pwv; y[(y>taumax)] := taumax; x := private.freq[ ( private.freq >= fmin & private.freq <= fmax ) ]; y2 := y[ ( private.freq >= fmin & private.freq <= fmax ) ]; private.pg.plotxy(x=x, y=y2, plotlines=T, xtitle='Freq[GHz]', ytitle='Opacity', title='Opacity vs Frequency'); return T; } self.plottrans := function(pwv=1.0, fmin=1, fmax=1000) { private.getpgplotter(); y := exp(-(private.taudry + private.tauwet * pwv)); x := private.freq[ ( private.freq >= fmin & private.freq <= fmax ) ]; y2 := y[ ( private.freq >= fmin & private.freq <= fmax ) ]; private.pg.plotxy(x=x, y=y2, plotlines=T, xtitle='Freq[GHz]', ytitle='Transmission', title='Transmission vs Frequency'); return T; } # given tau225, calculates tau at the target freq self.totaufreq := function(tau225=0.1, freq=300) { wetfreq := self.getwet( freq ); dryfreq := self.getdry( freq ); pwv := (tau225 - private.taudry225 ) / private.tauwet225 taufreq := pwv * wetfreq + dryfreq; return taufreq; } # given tau225, calculates vector of tau at the target freq self.vectotaufreq := function(ref tau225=[], freq=300) { wetfreq := self.getwet( freq ); dryfreq := self.getdry( freq ); pwv := (tau225 - private.taudry225 ) / private.tauwet225 taufreq := pwv * wetfreq + dryfreq; return taufreq; } #################### private functions ######################### # Returns the nearest freq at which we have data private.getfreq := function(freq) { freq1 := private.dfreq * as_integer(freq/private.dfreq + 0.5); if (freq1 < private.minfreq) { print 'getfreq(): freq[Ghz] must be >= ', private.minfreq; fail; } else if (freq1 > private.maxfreq) { print 'getfreq(): freq[Ghz] must be <= ', private.maxfreq; fail; } else { return freq1; } } # Returns the INDEX of the nearest freq at which we have data private.getfreqindex := function(freq) { freq1 := private.getfreq(freq); if (is_fail(freq1)) { fail; } ifreq := private.freq[( private.freq==freq1 )]; if (len(ifreq) == 0) { print 'getfreqindex() failed to get index'; fail; } return ifreq; } private.getpgplotter := function() { wider private; if (!is_tool(private.pg)) { private.pg := pgplotter(); } return T; } private.donepgplotter := function() { wider private; if (is_tool(private.pg) ) { private.pg.done(); private.pg := F; } return T; } } # end of almatau constructor