IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28439


Ignore:
Timestamp:
Jun 23, 2010, 2:29:49 PM (16 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20100621
Files:
22 edited
3 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/dbconfig/changes.txt

    r28375 r28439  
    17841784    quality SMALLINT NOT NULL,       -- bad quality flag
    17851785    software_ver VARCHAR(16),                       -- software version for run
     1786    magicked BIGINT NOT NULL DEFAULT 0, -- magic mask applied
    17861787    PRIMARY KEY(diff_phot_id, skycell_id),
    17871788    KEY(fault),
  • branches/eam_branches/ipp-20100621/dbconfig/diffphot.md

    r28343 r28439  
    2121    quality          S16        0       # Key
    2222    software_ver     STR        16
     23    magicked         S64        0
    2324END
  • branches/eam_branches/ipp-20100621/ippMonitor/Makefile.in

    r28166 r28439  
    1616$(DESTBIN)/czartool_getLabels.pl \
    1717$(DESTBIN)/czartool_checkServer.pl \
    18 $(DESTBIN)/czartool_getServerStatus.pl
     18$(DESTBIN)/czartool_getServerStatus.pl \
     19$(DESTBIN)/build_histogram.dvo \
     20
    1921
    2022RAWSRC = \
     
    5052$(DESTWWW)/czartool_labels.php \
    5153$(DESTWWW)/czartool_servers.php \
     54$(DESTWWW)/histogram.php \
     55$(DESTWWW)/show_and_delete_image.php \
    5256
    5357
  • branches/eam_branches/ipp-20100621/ippMonitor/raw/ipp.imfiles.dat

    r28148 r28439  
    2222menutop   | menutop      | link    | simple plot - cam            | simplePlotcam.php
    2323menutop   | menutop      | link    | czartool                     | czartool_labels.php
     24menutop   | menutop      | link    | histogram                    | histogram.php
    2425
  • branches/eam_branches/ipp-20100621/ippMonitor/raw/ipp.php

    r28043 r28439  
    564564}
    565565
     566//
     567function button_restrict_checkbox ($key, $line) {
     568  $htmlkey = preg_replace ('|\.|', '_', $key);
     569  if ($_SERVER[REQUEST_METHOD] == 'GET') {
     570    $value = $_GET[$htmlkey];
     571  } else {
     572    $value = $_POST[$htmlkey];
     573  }
     574  if ($value != "") {
     575    if ($line) {
     576      $line = $line . "&$htmlkey=$value";
     577    } else {
     578      $line = "$htmlkey=$value";
     579    }
     580  }
     581  return $line;
     582}
     583
     584//
     585function button_restrict_radio ($key, $line) {
     586  $htmlkey = preg_replace ('|\.|', '_', $key);
     587  if ($_SERVER[REQUEST_METHOD] == 'GET') {
     588    $value = $_GET[$htmlkey];
     589  } else {
     590    $value = $_POST[$htmlkey];
     591  }
     592  if ($value != "") {
     593    if ($line) {
     594      $line = $line . "&$htmlkey=$value";
     595    } else {
     596      $line = "$htmlkey=$value";
     597    }
     598  }
     599  return $line;
     600}
     601
    566602function write_header_cell ($class, $name) {
    567 
    568603  echo "<th class=\"$class\">$name</th>\n";
    569604}
     
    637672  if ($value != "") {
    638673    echo "value=\"$value\">";
    639   }
     674  } else {
     675    echo ">";
     676  }
    640677  echo "</td>\n";
     678}
     679
     680// checkbox
     681function write_query_checkbox ($key, $comment) {
     682  $htmlkey = preg_replace ('|\.|', '_', $key);
     683
     684  if ($_SERVER[REQUEST_METHOD] == 'GET') {
     685    $value = $_GET[$htmlkey];
     686  } else {
     687    $value = $_POST[$htmlkey];
     688  }
     689  echo "<td> <input type=\"checkbox\" name=\"$htmlkey\"";
     690  if ($value == "on") {
     691    echo " checked>";
     692  } else {
     693    echo ">";
     694  }
     695  echo "$comment ($htmlkey/$value)</td>\n";
     696}
     697
     698// checkbox
     699function write_query_radio ($value, $key) {
     700  $htmlkey = preg_replace ('| |', '_', $key);
     701  $htmlvalue = preg_replace ('|\.|', '_', $value);
     702
     703  if ($_SERVER[REQUEST_METHOD] == 'GET') {
     704    $value = $_GET[$htmlkey];
     705  } else {
     706    $value = $_POST[$htmlkey];
     707  }
     708  if ($htmlvalue == get_value_from_key($htmlkey, TRUE)) {
     709    $checked = "checked";
     710  } else {
     711    $checked = "";
     712  }
     713  echo "<td> <input type=\"radio\" name=\"$htmlkey\" value=\"$htmlvalue\" $checked/>";
     714  echo "$key ($htmlkey/$htmlvalue)</td>\n";
    641715}
    642716
     
    778852// $myPage = $_SERVER[SCRIPT_NAME] . "?pass=$pass";
    779853
     854//////////////////////////////////////////////////////////////////////////
     855// Return the value associated to the key (GET or POST method)
     856// If convertKeyToHtmlkey is true, the key is converted to a
     857// so-called HTML, i.e. the key where '.' are replaced by '_'
     858// (e.g. the conversion of 'f.o.o.b_a_r' is 'f_o_o_b_a_r'.
     859//
     860function get_value_from_key ($key, $convertKeyToHtmlkey) {
     861  if ($convertKeyToHtmlkey) {
     862    $htmlkey = preg_replace ('|\.|', '_', $key);
     863  } else {
     864    $htmlkey = $key;
     865  }
     866  if ($_SERVER[REQUEST_METHOD] == 'GET') {
     867    return $_GET[$htmlkey];
     868  } else {
     869    return $_POST[$htmlkey];
     870  }
     871}
     872
    780873?>
  • branches/eam_branches/ipp-20100621/ippScripts/scripts/automate_stacks.pl

    r28388 r28439  
    1717my $missing_tools = 0;
    1818my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1);
     19my $dqstatstool = can_run('dqstatstool') or (warn "Can't find dqstatstool" and $missing_tools = 1);
    1920my $warptool = can_run('warptool') or (warn "Can't find warptool" and $missing_tools = 1);
    2021my $stacktool= can_run('stacktool') or (warn "Can't find stacktool" and $missing_tools = 1);
     
    2829    exit($PS_EXIT_CONFIG_ERROR);
    2930}
    30 
    31 # my @filter_list = ('g.00000','r.00000','i.00000','z.00000','y.00000');
    32 # my @target_list = ('CMB','M31','MD01','MD02','MD03','MD04','MD05','MD06','MD07','MD08','MD09','MD10',
    33 #                  'STS','SVS','SweetSpot','ThreePi');
    34 # my %tessID_list = ('CMB' => 'RINGS.V0', 'M31' => 'M31', 'MD01' => 'MD01', 'MD02' => 'MD02',
    35 #                  'MD03' => 'MD03', 'MD04' => 'MD04', 'MD05' => 'MD05', 'MD06' => 'MD06',
    36 #                  'MD07' => 'MD07', 'MD08' => 'MD08', 'MD09' => 'MD09', 'MD10' => 'MD10',
    37 #                  'STS' => 'STS', 'SVS' => 'RINGS.V0', 'SweetSpot' => 'RINGS.V0', 'ThreePi' => 'RINGS.V0');
    38 # my %comment_list = ('CMB' => 'CMB_Cold%', 'M31' => 'M31%', 'MD01' => 'MD01%', 'MD02' => 'MD02%',
    39 #                   'MD03' => 'MD03%', 'MD04' => 'MD04%', 'MD05' => 'MD05%', 'MD06' => 'MD06%',
    40 #                   'MD07' => 'MD07%', 'MD08' => 'MD08%', 'MD09' => 'MD09%', 'MD10' => 'MD10%',
    41 #                   'STS' => 'Stellar Transit%', 'SVS' => 'SVS%', 'SweetSpot' => 'Sweetspot%', 'ThreePi' => 'ThreePi%');
    42 # my %stackable_list = ('CMB' => 0, 'M31' => 1, 'MD01' => 1, 'MD02' => 1,
    43 #                   'MD03' => 1, 'MD04' => 1, 'MD05' => 1, 'MD06' => 1,
    44 #                   'MD07' => 1, 'MD08' => 1, 'MD09' => 1, 'MD10' => 1,
    45 #                   'STS' => 1, 'SVS' => 0, 'SweetSpot' => 0, 'ThreePi' => 0);
    46 # my $retention_time = 9000;  # days.
    47 
    4831
    4932my $db;
     
    6043my ( $check_registration, $define_burntool, $queue_burntool, $check_chips, $queue_chips);
    6144my ( $check_stacks, $queue_stacks, $check_diffs, $queue_diffs, $clean_old);
    62 my ( $check_detrends, $queue_detrends);
     45my ( $check_detrends, $queue_detrends, $check_dqstats, $queue_dqstats);
    6346
    6447GetOptions(
     
    8366    'check_stacks'         => \$check_stacks,
    8467    'queue_stacks'         => \$queue_stacks,
    85     'check_detrends'          => \$check_detrends,
    86     'queue_detrends'          => \$queue_detrends,
     68    'check_detrends'       => \$check_detrends,
     69    'queue_detrends'       => \$queue_detrends,
     70    'check_dqstats'        => \$check_dqstats,
     71    'queue_dqstats'        => \$queue_dqstats,
    8772    'check_diffs'          => \$check_diffs,
    8873    'queue_diffs'          => \$queue_diffs,
     
    11196           --check_detrends       Confirm that detrend verify runs can be built.
    11297           --queue_detrends       Issue dettool commands to queue detrend verify runs.
     98           --check_dqstats        Confirm that dqstats tables can be built.
     99           --queue_dqstats        Issue dqstatstool commands to queue dqstat tables.
    113100           --check_diffs          Confirm that diffs can be done.
    114101           --queue_diffs          Issue difftool commands to queue diffs.
     
    121108          ) unless
    122109    defined $check_registration or defined $define_burntool or defined $queue_burntool or
    123     defined $queue_chips or defined $queue_stacks or $queue_detrends or
    124     defined $check_chips or defined $check_stacks or $check_detrends or
     110    defined $queue_chips or defined $queue_stacks or $queue_detrends or $queue_dqstats or
     111    defined $check_chips or defined $check_stacks or $check_detrends or $check_dqstats or
    125112    defined $test_mode or defined $clean_old or defined $check_mode;
    126113
     
    132119my %object_list = ();
    133120my %comment_list= ();
     121my %cleanmods_list = ();
    134122my %stackable_list = ();
    135123my %reduction_class = ();
     
    144132my %clean_retention = ();
    145133my %noclean_list = ();
     134my %clean_alternate = ();
    146135# Grab the configuration data.
    147136my $conf_cmd = "$ppConfigDump -dump-recipe NIGHTLY_SCIENCE -";
     
    150139unless ($success) {
    151140    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    152     &my_die("Unable to perform ppConfigDUmp: $error_code", $date, $PS_EXIT_SYS_ERROR);
     141    &my_die("Unable to perform ppConfigDump: $error_code", $date, $PS_EXIT_SYS_ERROR);
    153142}
    154143
     
    169158                $clean_retention{$this_mode} = ${ $mentry }{value};
    170159            }
     160            elsif (${ $mentry }{name} eq 'ALTERNATE_CMD') {
     161                $clean_alternate{$this_mode} = ${ $mentry }{value};
     162            }
    171163        }
    172164    }
     
    202194            elsif (${ $tentry }{name} eq 'NOCLEAN') {
    203195                $noclean_list{$this_target} = ${ $tentry }{value};
     196            }
     197            else {
     198                if (exists($clean_commands{ ${ $tentry }{name} })) {
     199                    $cleanmods_list{$this_target}{${ $tentry }{name} } = ${ $tentry }{value};
     200                }
    204201            }
    205202        }
     
    292289    unless (defined($test_mode) || defined($check_mode)) { exit(0); }
    293290}
    294 if (defined($check_detrends) || defined($test_mode)) {
     291if (defined($check_dqstats) || defined($test_mode)) {
     292    $metadata_out{nsState} = 'CHECKDQSTATS';
     293    &execute_dqstats($date,"pretend");
     294    return_metadata($date);
     295    unless (defined($test_mode) || defined($check_mode)) { exit(0); }
     296}
     297if (defined($queue_dqstats) || defined($test_mode)) {
     298    $metadata_out{nsState} = 'QUEUEDQSTATS';
     299    &execute_dqstats($date);
     300    return_metadata($date);
     301    unless (defined($test_mode)) { exit(0); }
     302}
     303if (defined($check_detrends) || defined($test_mode) || defined($check_mode)) {
    295304    $metadata_out{nsState} = 'CHECKDETRENDS';
    296305    &execute_detrends($date,"pretend");
     
    300309if (defined($queue_detrends)) {
    301310    $metadata_out{nsState} = 'QUEUEDETRENDS';
    302     &execute_detrends($date,"pretend");
     311    &execute_detrends($date);
    303312    return_metadata($date);
    304313    exit(0);
     
    613622}
    614623
    615 
    616 
    617624sub chip_queue {
    618625    my $date = shift;
     
    660667}
    661668
     669#
     670# DQstats
     671################################################################################
     672
     673sub construct_dqstats_cmd {
     674    my $date = shift;
     675
     676    my $select = "-dateobs_end ${date}T23:59:59 ";
     677
     678    my $cmd = "$dqstatstool";
     679    $cmd .= " -simple -dbname $dbname -definebyquery ";
     680    $cmd .= " $select ";
     681    $cmd .= " -label %.nightlyscience ";
     682    $cmd .= " -set_label dqstats.nightlyscience ";
     683    if ($debug == 1) {
     684        $cmd .= ' -pretend ';
     685    }
     686    print STDERR "$cmd\n";
     687    return($cmd);
     688}
     689
     690sub pre_dqstats_queue {
     691    my $date = shift;
     692   
     693#     my $db = init_gpc_db();
     694#     my $trunc_date = $date; $trunc_date =~ s/-//g;
     695
     696#     my $where = " label LIKE '%.nightlyscience' AND data_group' ";
     697#     my $chip_sth = "SELECT * from chipRun WHERE (state = 'full' OR state = 'new' OR state = 'cleaned') AND $where ";
     698#     my $cam_sth = "SELECT * from camRun WHERE state = 'full' AND $where ";
     699
     700#     my $chip_ref = $db->selectall_arrayref( $chip_sth );
     701#     my $cam_ref = $db->selectall_arrayref( $cam_sth );
     702   
     703    my $command = construct_dqstats_cmd($date) . ' -pretend ';
     704    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     705        run ( command => $command, verbose => $verbose );
     706    unless ($success) {
     707        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     708        &my_die("Unable to perform dqstatstool: $error_code",1,1,,$date, $PS_EXIT_SYS_ERROR);
     709    }
     710   
     711    my @input_exposures = split /\n/, (join '', @$stdout_buf);
     712
     713    return($#input_exposures + 1,1,1); # $#{ $chip_ref } + 1, $#{ $cam_ref } + 1);
     714}
     715 
     716sub dqstats_queue {
     717    my $date = shift;
     718
     719    my $command = construct_dqstatstool_cmd($date);
     720    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     721        run ( command => $command, verbose => $verbose );
     722    unless ($success) {
     723        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     724        &my_die("Unable to perform dqstatstool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR);
     725    }
     726    return(0);
     727
     728}
     729sub execute_dqstats {
     730    my $date = shift;
     731    my $pretend = shift;
     732    my ($Nexposures,$Nchips,$Ncams) = pre_dqstats_queue($date);
     733    if ($Nexposures == 0) {
     734        print STDERR "execute_dqstats: No exposures on date $date.\n";
     735    }
     736    elsif ($Ncams != $Nchips) {
     737        print STDERR "execute_dqstats: Not done processing data through camera stage.\n";
     738    }
     739    else {
     740        unless(defined($pretend)) {
     741            dqstats_queue($date);
     742        }
     743    }
     744}   
    662745#
    663746# Detrend verification
     
    735818    $metadata_out{nsState} = 'DETREND_QUEUED';
    736819    return(0);
    737 }
    738 
     820
     821}
    739822sub execute_detrends {
    740823    my $date = shift;
     
    754837    if ($exposures == 0) {
    755838        $metadata_out{nsState} = 'DETREND_DROP';
     839    }
     840    if (($metadata_out{nsState} eq 'CHECKDETRENDS') && ($exposures > 0)) {
     841        $metadata_out{nsState} eq 'QUEUE_DETRENDS';
    756842    }
    757843}
     
    9141000
    9151001    my $command = $clean_commands{$mode};
    916     my $retention_time = $clean_retention{$mode};
     1002    my $retention_time;
     1003    if (exists($cleanmods_list{$target}{$mode})) {
     1004        $retention_time = $cleanmods_list{$target}{$mode};
     1005    }
     1006    else {
     1007        $retention_time = $clean_retention{$mode};
     1008    }
     1009    if ($retention_time <= 0) {
     1010        return("no clean","true");
     1011    }
    9171012
    9181013    my ($year,$month,$day) = split /-/,$date;
     
    9201015                               hour => 0, minute => 0, second => 0, nanosecond => 0,
    9211016                               time_zone => 'Pacific/Honolulu');
     1017       
    9221018    $dt->subtract(days => $retention_time);
    9231019    my $cleaning_date = $dt->ymd;
     
    9251021    my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($cleaning_date,$target);
    9261022    my $args = $command;
    927     $args .= " -dbname $dbname -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label $label -data_group $data_group ";
     1023    if ((exists($clean_alternate{$mode})) && ($clean_alternate{$mode})) {
     1024        $args .= " -dbname $dbname -updaterun -set_state goto_cleaned -full -set_label goto_cleaned -time_stamp_end $cleaning_date ";
     1025    }
     1026    else {
     1027        $args .= " -dbname $dbname -updaterun -set_state goto_cleaned -state full -set_label goto_cleaned -label $label -data_group $data_group ";
     1028    }
    9281029    if ($debug == 1) {
    9291030        $args .= ' -pretend ';
     
    9361037    my $pretend = shift;
    9371038
    938     foreach my $mode (keys (%clean_commands)) {
    939         foreach my $target (@target_list) {
    940             if (exists($noclean_list{$target})) {
     1039    foreach my $mode (sort (keys (%clean_commands))) {
     1040        if ((exists($clean_alternate{$mode})) && ($clean_alternate{$mode})) {
     1041            my ($cleaning_date,$command) = construct_cleantool_args($date,"",$mode);
     1042            if ($cleaning_date eq 'no clean') {
    9411043                next;
    9421044            }
    943             my ($cleaning_date,$command) = construct_cleantool_args($date,$target,$mode);
    944 
    9451045            print STDERR "$command\n";
    9461046            if (!(defined($pretend) || $debug == 1)) {
     
    9511051                    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    9521052                    &my_die("Unable to perform stacktool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR);
     1053                }
     1054            }
     1055        }
     1056        else {
     1057            foreach my $target (@target_list) {
     1058                if (exists($noclean_list{$target})) {
     1059                    next;
     1060                }
     1061                my ($cleaning_date,$command) = construct_cleantool_args($date,$target,$mode);
     1062                if ($cleaning_date eq 'no clean') {
     1063                    next;
     1064                }               
     1065                print STDERR "$command\n";
     1066                if (!(defined($pretend) || $debug == 1)) {
     1067#           print STDERR "BEAR IS DRIVING!?\n";
     1068                    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1069                        run ( command => $command, verbose => $verbose );
     1070                    unless ($success) {
     1071                        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1072                        &my_die("Unable to perform stacktool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR);
     1073                    }
    9531074                }
    9541075            }
  • branches/eam_branches/ipp-20100621/ippScripts/scripts/diffphot.pl

    r28362 r28439  
    7070# Get input components
    7171my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    72 my ($inputPath, $camera);                     # Input path and camera
    73 my $bothways;                                 # Diff was done both ways?
     72my $inputPath;                                  # Input path
     73my $camera;                                     # Camera name
     74my $bothways;                           # Diff was done both ways?
     75my $magicked;                           # Magic status
    7476{
    7577    my $command = "$diffphottool -input -diff_phot_id $diff_phot_id -skycell_id $skycell_id";
     
    8991    $camera = $file->{camera};
    9092    $bothways = $file->{bothways};
     93    $magicked = $file->{magicked};
    9194}
    9295
     
    252255    my $command = "$diffphottool -diff_phot_id $diff_phot_id -skycell_id $skycell_id";
    253256    $command .= " -done -path_base $outroot";
     257    $command .= " -magicked $magicked" if $magicked;
    254258    $command .= " -quality $quality" if defined $quality;
    255259    $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
  • branches/eam_branches/ipp-20100621/ippTasks

  • branches/eam_branches/ipp-20100621/ippTasks/ipphosts.mhpcc.config

    r27561 r28439  
    11ipphosts MULTI
    22
     3# In this file, we assign all storage hosts to chip and skycells any
     4# hosts which are having problems are removed as active volumes from
     5# nebulous.  data targeted to those machines are simply re-distributed
     6# randomly.  the only exception is ipp004, which is the DVO db host
     7
     8# NOTE: wave 1 machines have 10TB; wave 2 & 3 machines have 20TB
     9# for balance, use 1 host per 10 TB in the partition
    310ipphosts METADATA
    411  camera STR skycell
    5   count S32  46
    6   sky00 STR  ipp006
    7   sky01 STR  ipp007
    8   sky02 STR  ipp008
    9   sky03 STR  ipp009
    10   sky04 STR  ipp010
    11   sky05 STR  ipp011
    12   sky06 STR  ipp012
    13   sky07 STR  ipp013
    14 #  sky08 STR  ipp014
    15   sky08 STR  ipp047
    16   sky09 STR  ipp015
    17 #  sky10 STR  ipp016
    18   sky10 STR  ipp042
    19   sky11 STR  ipp017
    20   sky12 STR  ipp018
    21   sky13 STR  ipp019
    22   sky14 STR  ipp020
    23   sky15 STR  ipp021
    24   sky16 STR  ipp023
    25   sky17 STR  ipp024
    26   sky18 STR  ipp025
    27   sky19 STR  ipp026
    28   sky20 STR  ipp027
    29   sky21 STR  ipp028
    30   sky22 STR  ipp029
    31   sky23 STR  ipp030
    32   sky24 STR  ipp031
    33   sky25 STR  ipp032
    34   sky26 STR  ipp033
    35   sky27 STR  ipp034
    36   sky28 STR  ipp035
    37   sky29 STR  ipp036
    38   sky30 STR  ipp038
    39   sky31 STR  ipp039
    40   sky32 STR  ipp040
    41   sky33 STR  ipp041
    42   sky34 STR  ipp042
    43   sky35 STR  ipp043
    44   sky36 STR  ipp044
    45   sky37 STR  ipp045
    46   sky38 STR  ipp046
    47   sky39 STR  ipp047
    48   sky40 STR  ipp048
    49   sky41 STR  ipp049
    50   sky42 STR  ipp050
    51   sky43 STR  ipp051
    52   sky44 STR  ipp052
    53   sky45 STR  ipp053
     12  count S32  79
     13  sky00 STR  ipp005
     14  sky01 STR  ipp006
     15  sky02 STR  ipp007
     16  sky03 STR  ipp008
     17  sky04 STR  ipp009
     18  sky05 STR  ipp010
     19  sky06 STR  ipp011
     20  sky07 STR  ipp012
     21  sky08 STR  ipp013
     22  sky09 STR  ipp014
     23  sky10 STR  ipp015
     24  sky11 STR  ipp016
     25  sky12 STR  ipp017
     26  sky13 STR  ipp018
     27  sky14 STR  ipp019
     28  sky15 STR  ipp020
     29  sky16 STR  ipp021
     30  sky17 STR  ipp023
     31  sky18 STR  ipp024
     32  sky19 STR  ipp025
     33  sky20 STR  ipp026
     34  sky21 STR  ipp027
     35  sky22 STR  ipp028
     36  sky23 STR  ipp029
     37  sky24 STR  ipp030
     38  sky25 STR  ipp031
     39  sky26 STR  ipp032
     40  sky27 STR  ipp033
     41  sky28 STR  ipp034
     42  sky29 STR  ipp035
     43  sky30 STR  ipp036
     44  sky31 STR  ipp037
     45  sky32 STR  ipp038
     46  sky33 STR  ipp039
     47  sky34 STR  ipp040
     48  sky35 STR  ipp041
     49  sky36 STR  ipp042
     50  sky37 STR  ipp043
     51  sky38 STR  ipp044
     52  sky39 STR  ipp045
     53  sky40 STR  ipp046
     54  sky41 STR  ipp047
     55  sky42 STR  ipp048
     56  sky43 STR  ipp049
     57  sky44 STR  ipp050
     58  sky45 STR  ipp051
     59  sky46 STR  ipp052
     60  sky47 STR  ipp053
     61  sky48 STR  ipp023
     62  sky49 STR  ipp024
     63  sky50 STR  ipp025
     64  sky51 STR  ipp026
     65  sky52 STR  ipp027
     66  sky53 STR  ipp028
     67  sky54 STR  ipp029
     68  sky55 STR  ipp030
     69  sky56 STR  ipp031
     70  sky57 STR  ipp032
     71  sky58 STR  ipp033
     72  sky59 STR  ipp034
     73  sky60 STR  ipp035
     74  sky61 STR  ipp036
     75  sky62 STR  ipp037
     76  sky63 STR  ipp038
     77  sky64 STR  ipp039
     78  sky65 STR  ipp040
     79  sky66 STR  ipp041
     80  sky67 STR  ipp042
     81  sky68 STR  ipp043
     82  sky69 STR  ipp044
     83  sky70 STR  ipp045
     84  sky71 STR  ipp046
     85  sky72 STR  ipp047
     86  sky73 STR  ipp048
     87  sky74 STR  ipp049
     88  sky75 STR  ipp050
     89  sky76 STR  ipp051
     90  sky77 STR  ipp052
     91  sky78 STR  ipp053
    5492END
     93
     94# we have 18 10TB nodes and 30 20TB nodes (ipp037 is used for dvo)
     95# 1 x W1 + 1 x W2 + 1 x W3 + 12 more nodes...
    5596
    5697ipphosts METADATA
    5798  camera STR GPC1
    5899
    59 #  XY01  STR  ipp014
    60 #  XY02  STR  ipp014
    61   XY01  STR  ipp047
    62   XY02  STR  ipp047
    63   XY03  STR  ipp038
     100  XY01  STR  ipp037
     101  XY02  STR  ipp005
     102  XY03  STR  ipp006
    64103  XY04  STR  ipp038
    65104
    66   XY05  STR  ipp023
     105  XY05  STR  ipp007
    67106  XY06  STR  ipp023
    68   XY10  STR  ipp039
     107  XY10  STR  ipp008
    69108  XY11  STR  ipp039
    70109
    71   XY12  STR  ipp024
     110  XY12  STR  ipp009
    72111  XY13  STR  ipp024
    73   XY14  STR  ipp040
     112  XY14  STR  ipp010
    74113  XY15  STR  ipp040
    75114
    76   XY16  STR  ipp026
     115  XY16  STR  ipp011
    77116  XY17  STR  ipp026
    78   XY20  STR  ipp041
     117  XY20  STR  ipp012
    79118  XY21  STR  ipp041
    80119
    81   XY22  STR  ipp042
     120  XY22  STR  ipp013
    82121  XY23  STR  ipp042
    83   XY24  STR  ipp043
     122  XY24  STR  ipp014
    84123  XY25  STR  ipp043
    85124
    86   XY26  STR  ipp028
     125  XY26  STR  ipp027
    87126  XY27  STR  ipp028
    88   XY30  STR  ipp044
     127  XY30  STR  ipp016
    89128  XY31  STR  ipp044
    90129
    91   XY32  STR  ipp029
     130  XY32  STR  ipp017
    92131  XY33  STR  ipp029
    93   XY34  STR  ipp045
     132  XY34  STR  ipp018
    94133  XY35  STR  ipp045
    95134
    96   XY36  STR  ipp030
     135  XY36  STR  ipp019
    97136  XY37  STR  ipp030
    98   XY40  STR  ipp046
     137  XY40  STR  ipp020
    99138  XY41  STR  ipp046
    100139
    101   XY42  STR  ipp031
     140  XY42  STR  ipp021
    102141  XY43  STR  ipp031
    103142  XY44  STR  ipp047
     
    129168  XY72  STR  ipp052
    130169
    131   XY73  STR  ipp015
     170  XY73  STR  ipp053
    132171  XY74  STR  ipp015
    133172  XY75  STR  ipp025
     
    138177  camera STR gpc1
    139178
    140 #  ota01  STR  ipp014
    141 #  ota02  STR  ipp014
    142   ota01  STR  ipp047
    143   ota02  STR  ipp047
    144   ota03  STR  ipp038
     179  ota01  STR  ipp037
     180  ota02  STR  ipp005
     181  ota03  STR  ipp006
    145182  ota04  STR  ipp038
    146 
    147   ota05  STR  ipp023
     183                   
     184  ota05  STR  ipp007
    148185  ota06  STR  ipp023
    149   ota10  STR  ipp039
     186  ota10  STR  ipp008
    150187  ota11  STR  ipp039
    151 
    152   ota12  STR  ipp024
     188                   
     189  ota12  STR  ipp009
    153190  ota13  STR  ipp024
    154   ota14  STR  ipp040
     191  ota14  STR  ipp010
    155192  ota15  STR  ipp040
    156 
    157   ota16  STR  ipp026
     193                   
     194  ota16  STR  ipp011
    158195  ota17  STR  ipp026
    159   ota20  STR  ipp041
     196  ota20  STR  ipp012
    160197  ota21  STR  ipp041
    161 
    162   ota22  STR  ipp042
     198                   
     199  ota22  STR  ipp013
    163200  ota23  STR  ipp042
    164   ota24  STR  ipp043
     201  ota24  STR  ipp014
    165202  ota25  STR  ipp043
    166 
    167   ota26  STR  ipp028
     203                   
     204  ota26  STR  ipp027
    168205  ota27  STR  ipp028
    169   ota30  STR  ipp044
     206  ota30  STR  ipp016
    170207  ota31  STR  ipp044
    171 
    172   ota32  STR  ipp029
     208                   
     209  ota32  STR  ipp017
    173210  ota33  STR  ipp029
    174   ota34  STR  ipp045
     211  ota34  STR  ipp018
    175212  ota35  STR  ipp045
    176 
    177   ota36  STR  ipp030
     213                   
     214  ota36  STR  ipp019
    178215  ota37  STR  ipp030
    179   ota40  STR  ipp046
     216  ota40  STR  ipp020
    180217  ota41  STR  ipp046
    181 
    182   ota42  STR  ipp031
     218                   
     219  ota42  STR  ipp021
    183220  ota43  STR  ipp031
    184221  ota44  STR  ipp047
    185222  ota45  STR  ipp047
    186 
     223                   
    187224  ota46  STR  ipp032
    188225  ota47  STR  ipp032
    189226  ota50  STR  ipp048
    190227  ota51  STR  ipp048
    191 
     228                   
    192229  ota52  STR  ipp033
    193230  ota53  STR  ipp033
    194231  ota54  STR  ipp049
    195232  ota55  STR  ipp049
    196 
     233                   
    197234  ota56  STR  ipp034
    198235  ota57  STR  ipp034
    199236  ota60  STR  ipp050
    200237  ota61  STR  ipp050
    201 
     238                   
    202239  ota62  STR  ipp035
    203240  ota63  STR  ipp035
    204241  ota64  STR  ipp051
    205242  ota65  STR  ipp051
    206 
     243                   
    207244  ota66  STR  ipp036
    208245  ota67  STR  ipp036
    209246  ota71  STR  ipp052
    210247  ota72  STR  ipp052
    211 
    212   ota73  STR  ipp015
     248                   
     249  ota73  STR  ipp053
    213250  ota74  STR  ipp015
    214251  ota75  STR  ipp025
     
    217254
    218255# this list is no longer used
    219 ipphosts METADATA
    220   camera STR distribution
    221   count  S32  26
    222   0      STR ipp021
    223   1      STR ipp023
    224   2      STR ipp024
    225   3      STR ipp026
    226   4      STR ipp028
    227   5      STR ipp029
    228   6      STR ipp030
    229   7      STR ipp031
    230   8      STR ipp032
    231   9      STR ipp033
    232  10      STR ipp034
    233  11      STR ipp035
    234  12      STR ipp036
    235  13      STR ipp038
    236  14      STR ipp039
    237  15      STR ipp040
    238  16      STR ipp041
    239  17      STR ipp043
    240  18      STR ipp044
    241  19      STR ipp045
    242  20      STR ipp046
    243  21      STR ipp047
    244  22      STR ipp048
    245  23      STR ipp050
    246  24      STR ipp051
    247  25      STR ipp052
    248 END
     256# XXX : delete if this does not cause trouble
     257## ipphosts METADATA
     258##   camera STR distribution
     259##   count  S32  26
     260##   0      STR ipp021
     261##   1      STR ipp023
     262##   2      STR ipp024
     263##   3      STR ipp026
     264##   4      STR ipp028
     265##   5      STR ipp029
     266##   6      STR ipp030
     267##   7      STR ipp031
     268##   8      STR ipp032
     269##   9      STR ipp033
     270##  10      STR ipp034
     271##  11      STR ipp035
     272##  12      STR ipp036
     273##  13      STR ipp038
     274##  14      STR ipp039
     275##  15      STR ipp040
     276##  16      STR ipp041
     277##  17      STR ipp043
     278##  18      STR ipp044
     279##  19      STR ipp045
     280##  20      STR ipp046
     281##  21      STR ipp047
     282##  22      STR ipp048
     283##  23      STR ipp050
     284##  24      STR ipp051
     285##  25      STR ipp052
     286## END
    249287
    250288ipphosts METADATA
     
    252290  count S32   60
    253291
    254 #  XY01  STR  ipp014
    255 #  XY02  STR  ipp014
    256   XY01  STR  ipp047
    257   XY02  STR  ipp047
    258   XY03  STR  ipp038
     292  XY01  STR  ipp037
     293  XY02  STR  ipp005
     294  XY03  STR  ipp006
    259295  XY04  STR  ipp038
    260 
    261   XY05  STR  ipp023
     296                   
     297  XY05  STR  ipp007
    262298  XY06  STR  ipp023
    263   XY10  STR  ipp039
     299  XY10  STR  ipp008
    264300  XY11  STR  ipp039
    265 
    266   XY12  STR  ipp024
     301                   
     302  XY12  STR  ipp009
    267303  XY13  STR  ipp024
    268   XY14  STR  ipp040
     304  XY14  STR  ipp010
    269305  XY15  STR  ipp040
    270 
    271   XY16  STR  ipp026
     306                   
     307  XY16  STR  ipp011
    272308  XY17  STR  ipp026
    273   XY20  STR  ipp041
     309  XY20  STR  ipp012
    274310  XY21  STR  ipp041
    275 
    276   XY22  STR  ipp042
     311                   
     312  XY22  STR  ipp013
    277313  XY23  STR  ipp042
    278   XY24  STR  ipp043
     314  XY24  STR  ipp014
    279315  XY25  STR  ipp043
    280 
    281   XY26  STR  ipp028
     316                   
     317  XY26  STR  ipp027
    282318  XY27  STR  ipp028
    283   XY30  STR  ipp044
     319  XY30  STR  ipp016
    284320  XY31  STR  ipp044
    285 
    286   XY32  STR  ipp029
     321                   
     322  XY32  STR  ipp017
    287323  XY33  STR  ipp029
    288   XY34  STR  ipp045
     324  XY34  STR  ipp018
    289325  XY35  STR  ipp045
    290 
    291   XY36  STR  ipp030
     326                   
     327  XY36  STR  ipp019
    292328  XY37  STR  ipp030
    293   XY40  STR  ipp046
     329  XY40  STR  ipp020
    294330  XY41  STR  ipp046
    295 
    296   XY42  STR  ipp031
     331                   
     332  XY42  STR  ipp021
    297333  XY43  STR  ipp031
    298334  XY44  STR  ipp047
    299335  XY45  STR  ipp047
    300 
     336                   
    301337  XY46  STR  ipp032
    302338  XY47  STR  ipp032
    303339  XY50  STR  ipp048
    304340  XY51  STR  ipp048
    305 
     341                   
    306342  XY52  STR  ipp033
    307343  XY53  STR  ipp033
    308344  XY54  STR  ipp049
    309345  XY55  STR  ipp049
    310 
     346                   
    311347  XY56  STR  ipp034
    312348  XY57  STR  ipp034
    313349  XY60  STR  ipp050
    314350  XY61  STR  ipp050
    315 
     351                   
    316352  XY62  STR  ipp035
    317353  XY63  STR  ipp035
    318354  XY64  STR  ipp051
    319355  XY65  STR  ipp051
    320 
     356                   
    321357  XY66  STR  ipp036
    322358  XY67  STR  ipp036
    323359  XY71  STR  ipp052
    324360  XY72  STR  ipp052
    325 
    326   XY73  STR  ipp015
     361                   
     362  XY73  STR  ipp053
    327363  XY74  STR  ipp015
    328364  XY75  STR  ipp025
     
    333369  camera STR dist_skycell
    334370  count S32  46
    335   sky00 STR  ipp006
    336   sky01 STR  ipp007
    337   sky02 STR  ipp008
    338   sky03 STR  ipp009
    339   sky04 STR  ipp010
    340   sky05 STR  ipp011
    341   sky06 STR  ipp012
    342   sky07 STR  ipp013
    343 #  sky08 STR  ipp014
    344   sky08 STR  ipp047
    345   sky09 STR  ipp015
    346 #  sky10 STR  ipp016
    347   sky10 STR  ipp042
    348   sky11 STR  ipp017
    349   sky12 STR  ipp018
    350   sky13 STR  ipp019
    351   sky14 STR  ipp020
    352   sky15 STR  ipp021
    353   sky16 STR  ipp023
    354   sky17 STR  ipp024
    355   sky18 STR  ipp025
    356   sky19 STR  ipp026
    357   sky20 STR  ipp027
    358   sky21 STR  ipp028
    359   sky22 STR  ipp029
    360   sky23 STR  ipp030
    361   sky24 STR  ipp031
    362   sky25 STR  ipp032
    363   sky26 STR  ipp033
    364   sky27 STR  ipp034
    365   sky28 STR  ipp035
    366   sky29 STR  ipp036
    367   sky30 STR  ipp038
    368   sky31 STR  ipp039
    369   sky32 STR  ipp040
    370   sky33 STR  ipp041
    371   sky34 STR  ipp042
    372   sky35 STR  ipp043
    373   sky36 STR  ipp044
    374   sky37 STR  ipp045
    375   sky38 STR  ipp046
    376   sky39 STR  ipp047
    377   sky40 STR  ipp048
    378   sky41 STR  ipp049
    379   sky42 STR  ipp050
    380   sky43 STR  ipp051
    381   sky44 STR  ipp052
    382   sky45 STR  ipp053
     371  sky00 STR  ipp005
     372  sky01 STR  ipp006
     373  sky02 STR  ipp007
     374  sky03 STR  ipp008
     375  sky04 STR  ipp009
     376  sky05 STR  ipp010
     377  sky06 STR  ipp011
     378  sky07 STR  ipp012
     379  sky08 STR  ipp013
     380  sky09 STR  ipp014
     381  sky10 STR  ipp015
     382  sky11 STR  ipp016
     383  sky12 STR  ipp017
     384  sky13 STR  ipp018
     385  sky14 STR  ipp019
     386  sky15 STR  ipp020
     387  sky16 STR  ipp021
     388  sky17 STR  ipp023
     389  sky18 STR  ipp024
     390  sky19 STR  ipp025
     391  sky20 STR  ipp026
     392  sky21 STR  ipp027
     393  sky22 STR  ipp028
     394  sky23 STR  ipp029
     395  sky24 STR  ipp030
     396  sky25 STR  ipp031
     397  sky26 STR  ipp032
     398  sky27 STR  ipp033
     399  sky28 STR  ipp034
     400  sky29 STR  ipp035
     401  sky30 STR  ipp036
     402  sky31 STR  ipp037
     403  sky32 STR  ipp038
     404  sky33 STR  ipp039
     405  sky34 STR  ipp040
     406  sky35 STR  ipp041
     407  sky36 STR  ipp042
     408  sky37 STR  ipp043
     409  sky38 STR  ipp044
     410  sky39 STR  ipp045
     411  sky40 STR  ipp046
     412  sky41 STR  ipp047
     413  sky42 STR  ipp048
     414  sky43 STR  ipp049
     415  sky44 STR  ipp050
     416  sky45 STR  ipp051
     417  sky46 STR  ipp052
     418  sky47 STR  ipp053
     419  sky48 STR  ipp023
     420  sky49 STR  ipp024
     421  sky50 STR  ipp025
     422  sky51 STR  ipp026
     423  sky52 STR  ipp027
     424  sky53 STR  ipp028
     425  sky54 STR  ipp029
     426  sky55 STR  ipp030
     427  sky56 STR  ipp031
     428  sky57 STR  ipp032
     429  sky58 STR  ipp033
     430  sky59 STR  ipp034
     431  sky60 STR  ipp035
     432  sky61 STR  ipp036
     433  sky62 STR  ipp037
     434  sky63 STR  ipp038
     435  sky64 STR  ipp039
     436  sky65 STR  ipp040
     437  sky66 STR  ipp041
     438  sky67 STR  ipp042
     439  sky68 STR  ipp043
     440  sky69 STR  ipp044
     441  sky70 STR  ipp045
     442  sky71 STR  ipp046
     443  sky72 STR  ipp047
     444  sky73 STR  ipp048
     445  sky74 STR  ipp049
     446  sky75 STR  ipp050
     447  sky76 STR  ipp051
     448  sky77 STR  ipp052
     449  sky78 STR  ipp053
    383450END
  • branches/eam_branches/ipp-20100621/ippTasks/nightly_stacks.pro

    r28416 r28439  
    66    ns.initday.on
    77    ns.detrends.off
     8    ns.dqstats.on
    89    ns.registration.on
    910    ns.burntool.on
     
    5152end
    5253
     54macro ns.dqstats.on
     55  task ns.dqstats.load
     56    active true
     57  end
     58end
     59
    5360macro ns.registration.on
    5461  task ns.registration.load
     
    9299macro ns.detrends.off
    93100  task ns.detrends.load
     101    active false
     102  end
     103end
     104
     105macro ns.dqstats.off
     106  task ns.dqstats.load
    94107    active false
    95108  end
     
    227240  task.exit       0
    228241    # nothign to do here
     242  end
     243  # locked list
     244  task.exit       default
     245    showcommand failure
     246  end
     247  task.exit       crash
     248    showcommand crash
     249  end
     250  # operation times out
     251  task.exit       timeout
     252    showcommand timeout
     253  end
     254end
     255
     256#
     257# Queue dqstats runs
     258#
     259task              ns.dqstats.load
     260  host            local
     261  periods         -poll 3600
     262  periods         -exec $LOADEXEC
     263  periods         -timeout 30
     264  trange          22:00:00 23:59:59
     265  trange          00:00:00 10:00:00
     266  npending        1
     267
     268  task.exec
     269    stdout $LOGDIR/ns.dqstats.log
     270    stderr $LOGDIR/ns.dqstats.log
     271    $today = `date +%Y-%m-%d`
     272
     273    command automate_stacks.pl --queue_dqstats --date $today
     274  end
     275
     276  task.exit       0
     277    # nothing to do here
    229278  end
    230279  # locked list
  • branches/eam_branches/ipp-20100621/ippToPsps/src/ippToPspsBatchDetection.c

    r28305 r28439  
    1313#include "fitsio.h"
    1414
    15 // Gets flux from magnitude
     15// Gets uncalibrated instrumental flux from magnitude
    1616static __inline bool ippToPsps_getFlux(const float zeroPoint, const float exposureTime, const float magnitude, float* flux) {
    1717
    18     // use uncalibrated instrumental flux
    1918    *flux = powf(10.0, -0.4*magnitude) / exposureTime;
    20 
    21     // use calibrated flux in Janskys, where 3631 Jy is the zero point flux for the filter: constant over all filters because we're using AB magnitudes
    22     //float flux = 3631 * powf(10.0, -0.4*(magnitude + zeroPoint)) / exposureTime;
    23 
    24     //    printf("mag=%f\texpTime=%f\tzeroPoint=%f\tflux=%f\n", magnitude, exposureTime, zeroPoint, flux);
    2519    return (!isfinite(*flux) || *flux < 0.000001) ? false : true;
    2620}
     
    10498    int maxDvoDetId = -1;
    10599    int numDvoDetections = -1;
    106     Image *pImage = NULL;
     100    Image *image = NULL;
    107101
    108102    // stuff for detections table
     
    157151    long maxObjID = LONG_MIN;
    158152    long minObjID = LONG_MAX;
     153    uint64_t imageFlags;
    159154    short nOta = 0;
    160155    long i;
     
    163158    uint32_t numInvalidFlux;
    164159    long numDetectionsOut;
     160    long totalDetectionsOut = 0;
    165161    long removeList[MAXDETECT];
    166162    long thisObjId;
     
    203199
    204200            // access DVO database
    205             skylist = dvoSkyListByExternID(this->dvoConfig, sourceId, imageId, &pImage);
     201            skylist = dvoSkyListByExternID(this->dvoConfig, sourceId, imageId, &image);
    206202            if (skylist == NULL) {
    207203                psError(PS_ERR_IO, false,
     
    212208
    213209            // create unique int from 'frameID' (aka exposure ID) and ccd number
    214             pspsImageId = (this->expId*100) + pImage->ccdnum;
     210            pspsImageId = (this->expId*100) + image->ccdnum;
    215211
    216212            // now get DVO detections
    217213            dvoDetections = NULL;
    218             numDvoDetections = dvoGetDetections(skylist, pImage->imageID, &dvoDetections, &maxDvoDetId);
     214            numDvoDetections = dvoGetDetections(skylist, image->imageID, &dvoDetections, &maxDvoDetId);
    219215
    220216            // TODO check nDet < MAXDETECT
     
    224220            psfFwhm = (fwhmMaj+fwhmMin)/2;
    225221            momentFwhm = (momentMaj+momentMin)/2;
     222            imageFlags = (uint64_t)image->flags;
    226223            fits_write_col(this->fitsOut, TLONGLONG, IMAGEMETA_IMAGEID, 1, 1, 1, &pspsImageId, &status);
    227224            fits_write_col(this->fitsOut, TLONG, IMAGEMETA_FRAMEID, 1, 1, 1, &this->expId, &status);
    228             fits_write_col(this->fitsOut, TSHORT, IMAGEMETA_CCDID, 1, 1, 1, &pImage->ccdnum, &status);
    229             fits_write_col(this->fitsOut, TLONG, IMAGEMETA_PHOTOCALID, 1, 1, 1, &pImage->photcode, &status);
     225            fits_write_col(this->fitsOut, TSHORT, IMAGEMETA_CCDID, 1, 1, 1, &image->ccdnum, &status);
     226            fits_write_col(this->fitsOut, TLONG, IMAGEMETA_PHOTOCALID, 1, 1, 1, &image->photcode, &status);
    230227            fits_write_col(this->fitsOut, TBYTE, IMAGEMETA_FILTERID, 1, 1, 1, &filterID, &status);
    231228            fits_write_col(this->fitsOut, TFLOAT, IMAGEMETA_PHOTOSCAT, 1, 1, 1, &zptObs, &status);
     
    233230            fits_write_col(this->fitsOut, TFLOAT, IMAGEMETA_MOMENTFWHM, 1, 1, 1, &momentFwhm, &status);
    234231            fits_write_col(this->fitsOut, TFLOAT, IMAGEMETA_PHOTOZERO, 1, 1, 1, &zptObs, &status);
     232            fits_write_col(this->fitsOut, TLONGLONG, IMAGEMETA_QAFLAGS, 1, 1, 1, &imageFlags, &status);
    235233
    236234            // now move BACK to detections table in smf
     
    365363                    extensionName, nDet, numDetectionsOut, unmatched, numOfDuplicates, numInvalidFlux);
    366364
     365            totalDetectionsOut += numDetectionsOut;
     366
    367367            if (dvoDetections!= NULL) dvoFree(dvoDetections);
    368368            SkyListFree(skylist);
    369369        }
    370370    }
     371
     372    psLogMsg("ippToPsps", PS_LOG_INFO, "Total detections for this exposure = %ld\n", totalDetectionsOut);
    371373
    372374    for (uint32_t i=0; i<MAXDETECT;i++) free(assocDate[i]);
     
    390392        if (fprintf(this->resultsFile, "%ld\n", maxObjID) < 1 )
    391393            psError(PS_ERR_IO, false, "Unable to write max Object ID to'%s'\n", this->resultsPath);
     394        if (fprintf(this->resultsFile, "%ld\n", totalDetectionsOut) < 1 )
     395            psError(PS_ERR_IO, false, "Unable to write totalDetectionsOut to'%s'\n", this->resultsPath);
    392396    }
    393397
  • branches/eam_branches/ipp-20100621/ippTools/share/diffphottool_input.sql

    r28367 r28439  
    22    diffPhotRun.*,
    33    diffSkyfile.path_base,
     4    diffSkyfile.magicked,
    45    diffRun.bothways,
    56    rawExp.camera
  • branches/eam_branches/ipp-20100621/ippTools/share/diffphottool_pending.sql

    r28367 r28439  
    99WHERE diffPhotSkyfile.skycell_id IS NULL
    1010    AND diffRun.state = 'full'
     11    AND diffSkyfile.magicked >= 0
    1112    AND diffSkyfile.fault = 0
    1213    AND diffSkyfile.quality = 0
  • branches/eam_branches/ipp-20100621/ippTools/share/pubtool_definerun.sql

    r28411 r28439  
    5656        AND publishClient.active = 1
    5757        AND diffPhotRun.state IN ('full', 'cleaned', 'goto_cleaned')
    58         AND (diffRun.diff_mode = 4 OR publishClient.magicked = 0) -- diffPhotRun doesn't respect magic
     58        AND (diffPhotRun.magicked != 0 OR diffRun.diff_mode = 4 OR publishClient.magicked = 0)
    5959    -- WHERE hook %s
    6060    ) AS publishToDo
  • branches/eam_branches/ipp-20100621/ippTools/share/pubtool_pending.sql

    r28411 r28439  
    7474        AND publishRun.state = 'new'
    7575        AND diffPhotRun.state IN ('full', 'cleaned', 'goto_cleaned')
    76         AND (diffRun.diff_mode = 4 OR publishClient.magicked = 0) -- diffPhotRun doesn't respect magic
     76        AND (diffPhotRun.magicked != 0 OR diffRun.diff_mode = 4 OR publishClient.magicked = 0)
    7777        -- WHERE hook %s
    7878) AS publishToDo
  • branches/eam_branches/ipp-20100621/ippTools/share/pxadmin_create_tables.sql

    r28375 r28439  
    17551755    quality SMALLINT NOT NULL,       -- bad quality flag
    17561756    software_ver VARCHAR(16),                       -- software version
     1757    magicked BIGINT NOT NULL DEFAULT 0, -- magic mask applied
    17571758    PRIMARY KEY(diff_phot_id, skycell_id),
    17581759    KEY(fault),
  • branches/eam_branches/ipp-20100621/ippTools/src/diffphottool.c

    r28412 r28439  
    371371    PXOPT_LOOKUP_STR(ver_ppstats, config->args, "-ver_ppstats", false, false);
    372372    PXOPT_LOOKUP_STR(ver_psphot, config->args, "-ver_psphot", false, false);
     373    PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false);
    373374
    374375    psString version = pxMergeCodeVersions(ver_pslib, ver_psmodules);
     
    377378
    378379    if (!diffPhotSkyfileInsert(config->dbh, diff_phot_id, skycell_id, path_base, dtime_script, hostname,
    379                                fault, quality, version)) {
     380                               fault, quality, version, magicked)) {
    380381        psError(psErrorCodeLast(), false, "database error");
    381382        return false;
  • branches/eam_branches/ipp-20100621/ippTools/src/diffphottoolConfig.c

    r28412 r28439  
    100100    psMetadataAddStr(doneArgs, PS_LIST_TAIL, "-ver_ppstats", 0, "define ppStats version", NULL);
    101101    psMetadataAddStr(doneArgs, PS_LIST_TAIL, "-ver_psphot", 0, "define psphot version", NULL);
     102    psMetadataAddS64(doneArgs, PS_LIST_TAIL, "-magicked", 0, "define magicked state", 0);
    102103
    103104    // -advance
  • branches/eam_branches/ipp-20100621/ippTools/src/dqstatstool.c

    r27304 r28439  
    8585
    8686  if (label) {
    87     PXOPT_COPY_STR(config->args, where, "-label", "camRun.label", "==");
     87    pxAddLabelSearchArgs (config, where, "-label", "camRun.label", "LIKE"); // define using cam label
    8888  }
    8989  // use psDBGenerateWhereConditionSQL because the SQL ends in a WHERE
     
    654654        psError(PS_EXIT_CONFIG_ERROR, false, "Unable to find max value for %s",colname);
    655655        return(false);
    656       }     
     656      }
     657      psString filter = psMetadataLookupStr(&status,rule,"FILTER");
     658      if (!status) {
     659        status = true;
     660      }
     661      if (filter) {
     662        psString imfilter = psMetadataLookupStr(&status,tableRow,"FILTER");
     663        if (strcmp(filter,imfilter) != 0) {
     664          continue;
     665        }
     666      }
    657667      // Not happy with this being set to a F32. Can this ever be something else?
    658668      psF32 value      = psMetadataLookupF32(&status,tableRow,colname);
  • branches/eam_branches/ipp-20100621/ippconfig/recipes/dqStatsTool.config

    r27304 r28439  
    77        COLNAME STR FWHM_MAJOR
    88        MINIMUM F32 0.0
    9         MAXIMUM F32 5.0
     9        MAXIMUM F32 9.3            # 90-percentile 2010-02-14 through 2010-06-20 = 2.4"
    1010    END
    1111    RULE METADATA
    1212        COLNAME STR FWHM_MINOR
    1313        MINIMUM F32 0.0
    14         MAXIMUM F32 5.0
     14        MAXIMUM F32 8.44           # 90-percentile 2010-02-14 through 2010-06-20 = 2.18"
     15    END
     16    RULE METADATA
     17         COLNAME STR ZEROPOINT
     18         FILTER  STR g.00000
     19         MINIMUM F32 24.3051           # (median 2010-02-14 through 2010-06-20) - 0.25 magnitudes
     20         MAXIMUM F32 99.9999           # We refuse to believe in negative clouds.
     21    END
     22    RULE METADATA
     23         COLNAME STR ZEROPOINT
     24         FILTER  STR r.00000
     25         MINIMUM F32 24.5294           # (median 2010-02-14 through 2010-06-20) - 0.25 magnitudes
     26         MAXIMUM F32 99.9999           # We refuse to believe in negative clouds.
     27    END
     28    RULE METADATA
     29         COLNAME STR ZEROPOINT
     30         FILTER  STR i.00000
     31         MINIMUM F32 24.4641           # (median 2010-02-14 through 2010-06-20) - 0.25 magnitudes
     32         MAXIMUM F32 99.9999           # We refuse to believe in negative clouds.
     33    END
     34    RULE METADATA
     35         COLNAME STR ZEROPOINT
     36         FILTER  STR z.00000
     37         MINIMUM F32 24.1128           # (median 2010-02-14 through 2010-06-20) - 0.25 magnitudes
     38         MAXIMUM F32 99.9999           # We refuse to believe in negative clouds.
     39    END
     40    RULE METADATA
     41         COLNAME STR ZEROPOINT
     42         FILTER  STR y.00000
     43         MINIMUM F32 23.1503           # (median 2010-02-14 through 2010-06-20) - 0.25 magnitudes
     44         MAXIMUM F32 99.9999           # We refuse to believe in negative clouds.
     45    END
     46    RULE METADATA
     47         COLNAME STR ZEROPOINT
     48         FILTER  STR w.00000
     49         MINIMUM F32 25.8944           # (median 2010-02-14 through 2010-06-20) - 0.25 magnitudes
     50         MAXIMUM F32 99.9999           # We refuse to believe in negative clouds.
    1551    END
    1652#    TYPE VAL COLNAME      MINIMUM        MAXIMUM
  • branches/eam_branches/ipp-20100621/ippconfig/recipes/nightly_science.config

    r28408 r28439  
    66  COMMAND STR chiptool
    77  RETENTION_TIME U16 30
     8  ALTERNATE_CMD BOOL F
    89END
    910CLEAN_MODES METADATA
     
    1112  COMMAND STR warptool
    1213  RETENTION_TIME U16 7
    13 END
    14 # CLEAN_MODES METADATA
    15 #  MODE STR DIFF
    16 #  COMMAND STR difftool
    17 #  RETENTION_TIME U16 30
    18 # END
     14  ALTERNATE_CMD BOOL F
     15END
     16CLEAN_MODES METADATA
     17  MODE STR DIFF
     18  COMMAND STR difftool
     19# RETENTION_TIME U16 30
     20  RETENTION_TIME S16 -1
     21  ALTERNATE_CMD BOOL F
     22END
     23CLEAN_MODES METADATA
     24  MODE STR DIST
     25  COMMAND STR disttool
     26  RETENTION_TIME S16 7
     27  ALTERNATE_CMD BOOL T
     28END
    1929
    2030FILTERS MULTI
     
    128138# OBJECT STR SS
    129139  STACKABLE BOOL FALSE
    130   NOCLEAN BOOL TRUE
     140#  NOCLEAN BOOL TRUE
     141  WARP S16 60
    131142END
    132143TARGETS METADATA
     
    293304DETRENDS METADATA
    294305  NAME     STR DARK
    295   DETTYPE     STR DARK
     306  DETTYPE  STR DARK
    296307  EXPTYPE  STR dark
    297308  REF_ID   S64 299
     
    303314DETRENDS METADATA
    304315  NAME     STR FLAT_G
    305   DETTYPE     STR FLAT
     316  DETTYPE  STR FLAT
    306317  EXPTYPE  STR skyflat
    307318  REF_ID   S64 300
     
    313324DETRENDS METADATA
    314325  NAME     STR FLAT_R
    315   DETTYPE     STR FLAT
     326  DETTYPE  STR FLAT
    316327  EXPTYPE  STR skyflat
    317328  REF_ID   S64 301
     
    323334DETRENDS METADATA
    324335  NAME     STR FLAT_I
    325   DETTYPE     STR FLAT
     336  DETTYPE  STR FLAT
    326337  EXPTYPE  STR skyflat
    327338  REF_ID   S64 302
     
    333344DETRENDS METADATA
    334345  NAME     STR FLAT_Z
    335   DETTYPE     STR FLAT
     346  DETTYPE  STR FLAT
    336347  EXPTYPE  STR skyflat
    337348  REF_ID   S64 303
     
    343354DETRENDS METADATA
    344355  NAME     STR FLAT_Y
    345   DETTYPE     STR FLAT
     356  DETTYPE  STR FLAT
    346357  EXPTYPE  STR skyflat
    347358  REF_ID   S64 304
     
    353364DETRENDS METADATA
    354365  NAME     STR FLAT_W
    355   DETTYPE     STR FLAT
     366  DETTYPE  STR FLAT
    356367  EXPTYPE  STR skyflat
    357368  REF_ID   S64 305
  • branches/eam_branches/ipp-20100621/ppBackground/src/ppBackgroundArguments.c

    r28290 r28439  
    3030    fprintf(stderr, "\n");
    3131    psArgumentHelp(arguments);
    32     psFree(arguments);
    3332    psFree(data);
    3433
Note: See TracChangeset for help on using the changeset viewer.