IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 5, 2009, 10:42:55 AM (17 years ago)
Author:
Paul Price
Message:

Want to calculate zero point from exposure time of input warp, rather than the actual warp under consideration in ppMops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ipp_serial_mops.pl

    r24336 r24339  
    8080    MAX(diffWarps.diff_id) AS diff_id,
    8181    -- The following trick pulls out the appropriate values for the maximum diff_id
    82     SUBSTRING_INDEX(GROUP_CONCAT(camTemplate.zpt_obs ORDER BY diffWarps.diff_id), ',', 1) AS zpt_obs,
     82    SUBSTRING_INDEX(GROUP_CONCAT(camProcessedTemplate.zpt_obs ORDER BY diffWarps.diff_id), ',', 1) AS zpt_obs,
     83    SUBSTRING_INDEX(GROUP_CONCAT(rawTemplate.exp_time ORDER BY diffWarps.diff_id), ',', 1) AS exp_time,
    8384    CONVERT(SUBSTRING_INDEX(GROUP_CONCAT(diffWarps.inverse ORDER BY diffWarps.diff_id), ',', 1), UNSIGNED) AS inverse
    8485FROM (
     
    117118JOIN warpRun AS warpTemplate ON warpTemplate.warp_id = diffWarps.template_warp
    118119JOIN fakeRun AS fakeTemplate ON fakeTemplate.fake_id = warpTemplate.fake_id
    119 JOIN camProcessedExp AS camTemplate ON camTemplate.cam_id = fakeTemplate.cam_id
     120JOIN camRun AS camTemplate ON camTemplate.cam_id = fakeTemplate.cam_id
     121JOIN camProcessedExp AS camProcessedTemplate ON camProcessedTemplate.cam_id = camTemplate.cam_id
     122JOIN chipRun AS chipTemplate ON chipTemplate.chip_id = camTemplate.chip_id
     123JOIN rawExp AS rawTemplate ON rawTemplate.exp_id = chipTemplate.exp_id
    120124WHERE rawExp.camera = '$camera'
    121125GROUP BY exp_id;";
     
    132136    my $exp_id = $diff->{exp_id};
    133137    my $zp = $diff->{zpt_obs};
     138    my $exp_time = $diff->{exp_time};
    134139    my $diff_id = $diff->{diff_id};
    135140    my $inverse = $diff->{inverse};
     141
     142    (carp "Bad ZP or EXPTIME for $exp_id" and next) if not defined $zp or not defined $exp_time;
     143    $zp += 2.5 * log($exp_time) / log(10);
    136144
    137145    my $sql = "SELECT * FROM diffSkyfile WHERE diff_id = $diff_id AND fault = 0 AND quality = 0;";
Note: See TracChangeset for help on using the changeset viewer.