Home
> APEX Sites
> Chajnantor
> Atmosphere at Chajnantor
> Tau bolometers estimation
function watersabocafunction($water1){
$readwater=$water1;
$fp = @fopen("/data/httpd/www/html/dbtest/atm/saboca-trans-bandpass.dat", "r");
$line = trim(fgets($fp, 5000));
// echo "$line
";
$trans = explode(" ",$line);
fclose($fp);
$col = round($readwater*20.0-1);
$t1 = $trans[$col];
$test = round($readwater-($col+1)*0.05,3);
//echo "test: $test col: $col trans: $t1 water: $readwater
";
if ($test < 0)
{
// $t2 = $trans[$col-1];
$t2 = 1.0;
$transmission = $t1+($t1-$t2)*$test/0.05;
}
if ($test > 0)
{
$t2 = $trans[$col+1];
$transmission = $t1-($t1-$t2)*$test/0.05;
}
if ($test == 0)
{
$transmission = $trans[$col];
}
//$transmission = 0.66696*exp(-$water1*1.49663);
$tau=-1*log($transmission);
return round($tau,4);
//return $transmission;
}
function waterlabocafunction($water){
$readwater=$water;
$fp = @fopen("/data/httpd/www/html/dbtest/atm/laboca-trans-bandpass.dat", "r");
$line = trim(fgets($fp, 5000));
// echo "$line
";
$trans = explode(" ",$line);
fclose($fp);
$col = round($readwater*20.0-1);
$t1 = $trans[$col];
$test = round($readwater-($col+1)*0.05,3);
//echo "test: $test
";
if ($test < 0)
{
$t2 = $trans[$col-1];
$transmission = $t1+($t1-$t2)*$test/0.05;
}
if ($test > 0)
{
$t2 = $trans[$col+1];
$transmission = $t1-($t1-$t2)*$test/0.05;
}
if ($test == 0)
{
$transmission = $trans[$col];
}
$tau=-1*log($transmission);
return round($tau,4);
}
function waterzspecfunction($water1){
$readwater=$water1;
$fp = @fopen("zspec-trans-bandpass.dat", "r");
$line = trim(fgets($fp, 5000));
// echo "$line
";
$trans = explode(" ",$line);
fclose($fp);
$col = round($readwater*20.0-1);
$t1 = $trans[$col];
$test = round($readwater-($col+1)*0.05,3);
//echo "test: $test col: $col trans: $t1 water: $readwater
";
if ($test < 0)
{
// $t2 = $trans[$col-1];
$t2 = 1.0;
$transmission = $t1+($t1-$t2)*$test/0.05;
}
if ($test > 0)
{
$t2 = $trans[$col+1];
$transmission = $t1-($t1-$t2)*$test/0.05;
}
if ($test == 0)
{
$transmission = $trans[$col];
}
//$transmission = 0.66696*exp(-$water1*1.49663);
$tau=-1*log($transmission);
return round($tau,4);
//return $transmission;
}
?>
|