<& /htmlheader &> <& modelheader &>

Tracklet Efficiency, MJD <% $epoch_mjd %>

% my $tot_found = 0; % my $tot_avail = 0; % foreach my $item ($goo->[-1], @{$goo}) { % if ($item->{fieldId}) { % $field = modcf_retrieve($inst, fieldId => $item->{fieldId}); % } else { % } % { my $color_str = "#FFFFFF"; % $color_str = "#FFFF99" if $item->{clean} < $item->{avail}; % $color_str = "#FFFF00" if $item->{clean} < 0.75*$item->{avail}; % $color_str = "#FF6600" if $item->{clean} < 0.5*$item->{avail}; % $color_str = "#FF0000" if $item->{clean} < 0.25*$item->{avail}; % } % { my $color_str = "#FFFFFF"; % $color_str = "#FFFF99" if $item->{mixed} > 0.; % } % { my $color_str = "#FFFFFF"; % $color_str = "#FFFF99" if $item->{bad} > 0.; % } % }
Field ID Available Found (%) Clean (%) Unfound (%) Mixed (%) Bad (%) Nonsynthetic Details
<% $item->{fieldId}%> <% 'Total' %> <% $item->{avail} %> <% $item->{clean} %> <% sprintf "%.1f", 100 * $item->{clean} / ($item->{avail} || 1) %> <% $item->{clean} %> <% sprintf "%.1f", 100 * $item->{clean} / ($item->{avail} || 1) %> <% $item->{unfound} %> <% sprintf "%.1f", 100 * $item->{unfound} / ($item->{avail} || 1) %> <% $item->{mixed} %> <% sprintf "%.1f", 100 * $item->{mixed} / ($item->{avail} || 1) %> <% $item->{bad} %> <% sprintf "%.1f", 100 * $item->{bad} / ($item->{avail} || 1) %> <% $item->{nonsynthetic} %> Details
<& /htmlfooter &> <%args> $epoch_mjd => undef $nn => undef <%init> use PS::MOPS::Lib qw(:all); use PS::MOPS::DC::Field; use PS::MOPS::DC::Efficiency; my $inst = $m->notes('INST'); my $config = $inst->getConfig(); my $gmt_offset_hours = $config->{site}->{gmt_offset_hours}; if ($nn) { $epoch_mjd = mopslib_nn2mjd($nn, $gmt_offset_hours); } sub _sum { my @data = @_; my $tot = 0; $tot += $_ foreach @_; return $tot; } my $field; my $goo = modce_retrieve($inst, category => $EFF_TRACKLETS, epoch_mjd => $epoch_mjd); # Create sum row. Cheesy. push @{$goo}, { fieldID => undef, found => _sum(map { $_->{found} } @{$goo}), avail => _sum(map { $_->{avail} } @{$goo}), clean => _sum(map { $_->{clean} } @{$goo}), unfound => _sum(map { $_->{unfound} } @{$goo}), mixed => _sum(map { $_->{mixed} } @{$goo}), bad => _sum(map { $_->{bad} } @{$goo}), nonsynthetic => _sum(map { $_->{nonsynthetic} } @{$goo}), };