IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27851


Ignore:
Timestamp:
May 4, 2010, 9:02:02 AM (16 years ago)
Author:
Paul Price
Message:

Fix query to add 2.5log(t) to zero point.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/publish_mops.pl

    r27813 r27851  
    6767    my $inverse = shift;        # Inverse diff?
    6868
    69     my $exposure = $db->selectrow_hashref("SELECT DISTINCT exp_name, exp_id, chipInput.chip_id, camInput.cam_id, fakeInput.fake_id, warpInput.warp_id, zpt_obs, zpt_stdev, SQRT(sigma_ra*sigma_ra+sigma_dec*sigma_dec) AS astrom_rms FROM diffRun JOIN diffInputSkyfile USING(diff_id) JOIN warpRun AS warpTemplate ON warpTemplate.warp_id = warp1 JOIN fakeRun AS fakeTemplate ON fakeTemplate.fake_id = warpTemplate.fake_id JOIN camProcessedExp ON fakeTemplate.cam_id = camProcessedExp.cam_id JOIN warpRun AS warpInput ON warpInput.warp_id = " . ($inverse ? "warp2" : "warp1") . " JOIN fakeRun AS fakeInput ON fakeInput.fake_id = warpInput.fake_id JOIN camRun AS camInput ON camInput.cam_id = fakeInput.cam_id JOIN chipRun AS chipInput ON chipInput.chip_id = camInput.chip_id JOIN rawExp USING(exp_id) WHERE diff_id = $diff_id") or die "Unable to execute SQL: $DBI::errstr";
     69    my $exposure = $db->selectrow_hashref("SELECT DISTINCT rawInput.exp_name, rawInput.exp_id, chipInput.chip_id, camInput.cam_id, fakeInput.fake_id, warpInput.warp_id, zpt_obs + 2.5*LOG10(rawTemplate.exp_time) AS zp, zpt_stdev, SQRT(sigma_ra*sigma_ra+sigma_dec*sigma_dec) AS astrom_rms FROM diffRun JOIN diffInputSkyfile USING(diff_id) JOIN warpRun AS warpTemplate ON warpTemplate.warp_id = warp1 JOIN fakeRun AS fakeTemplate ON fakeTemplate.fake_id = warpTemplate.fake_id JOIN camProcessedExp ON fakeTemplate.cam_id = camProcessedExp.cam_id JOIN camRun AS camTemplate ON camTemplate.cam_id = fakeTemplate.cam_id JOIN chipRun AS chipTemplate ON chipTemplate.chip_id = camTemplate.chip_id JOIN rawExp AS rawTemplate ON rawTemplate.exp_id = chipTemplate.exp_id JOIN warpRun AS warpInput ON warpInput.warp_id = " . ($inverse ? "warp2" : "warp1") . " JOIN fakeRun AS fakeInput ON fakeInput.fake_id = warpInput.fake_id JOIN camRun AS camInput ON camInput.cam_id = fakeInput.cam_id JOIN chipRun AS chipInput ON chipInput.chip_id = camInput.chip_id JOIN rawExp AS rawInput ON rawInput.exp_id = chipInput.exp_id WHERE diff_id = $diff_id") or die "Unable to execute SQL: $DBI::errstr";
    7070
    7171    my $exp_name = $exposure->{exp_name};
     
    7575    my $fake_id = $exposure->{fake_id};
    7676    my $warp_id = $exposure->{warp_id};
    77     my $zp = $exposure->{zpt_obs};
     77    my $zp = $exposure->{zp};
    7878    my $zp_err = $exposure->{zpt_stdev};
    7979    my $astrom_rms = $exposure->{astrom_rms};
Note: See TracChangeset for help on using the changeset viewer.