Changeset 42253 for trunk/ippScripts
- Timestamp:
- Jul 14, 2022, 2:58:20 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/nightly_science.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/nightly_science.pl
r42229 r42253 1443 1443 diff_queue($date,$target,$filter,$maxFWHM,$pretend); 1444 1444 1445 #Queue up desperate diffs if the conditions are right for them 1445 #Queue up desperate diffs if the conditions are right for them 1446 1446 if ((defined($science_config{$target}{DESPERATE_DIFFS})) && ($science_config{$target}{DESPERATE_DIFFS} == 1)) { 1447 1447 desperate_diff_singles($date,$target,$filter,$maxFWHM,$pretend); … … 1919 1919 1920 1920 } else { 1921 print STDERR "desp_diff_singles: There is a possibility for dirty diffs to be made\n"; 1921 print STDERR "desp_diff_singles: There is a possibility for dirty diffs to be made\n"; 1922 1922 #Consider the case of on-the-fly dirty desperate diffs 1923 1923 #The conditions are: uneven nr of bad quality warps greater than 3, and the most recent observations is more than $desdiffdt hours old 1924 1924 1925 # # Exclude any warps that are not stored in the more general comment_hash.1926 # my @keep_warps = ();1927 # foreach my $this_warp (@{ $warpsBQ }) {1928 # my $this_comment = ${ $this_warp }[3];1929 # my $this_exp_id = ${ $this_warp }[0];1930 # if ((exists($comment_hash{$this_comment}))&&1931 # ($comment_hash{$this_comment} == $this_exp_id)) {1932 # push @keep_warps, $this_warp;1933 # $this_date = ${ $this_warp }[2];1934 # $chunk_name = ${ $this_warp }[6];1935 # }1936 # else {1937 # print STDERR "desp_diff_singles: excluding $this_exp_id for $this_object due to being rejected $this_comment\n";1938 # }1939 # }1940 # @{ $warpsBQ } = @keep_warps;1941 # 1942 # if ($nwarps >= 2) {1943 # #one regular diff has already been made. So, need only one more. Strip a good entry from the array1944 # my $nrem = 0;1945 # my @keep_warps = ();1946 # foreach my $this_warp (@{ $warpsBQ }) {1947 # my $this_comment = ${ $this_warp }[3];1948 # my $this_exp_id = ${ $this_warp }[0];1949 # my $this_fwhm = ${ $this_warp }[7];1950 # if (($nrem <1) && ($this_fwhm <= $maxFWHM)) {1951 # $nrem++;1952 # print STDERR "desp_diff_singles: excluding $this_exp_id for $this_object from dirty desp diffs $this_comment\n";1953 # } else {1954 # push @keep_warps, $this_warp;1955 # }1956 # }1957 # @{ $warpsBQ } = @keep_warps;1958 # }1959 # 1960 # # We are attempting to do the missing diffs, so reverse the list of retained warps.1961 # # Good objects with all visits will be skipped due to the duplicate check.1962 # # Bad objects will have the earliest visit rejected, and the visits repaired in a way that will produce all desired pairs.1963 # @{ $warpsBQ } = reverse @{ $warpsBQ };1964 # 1965 # # Exclude the last entry if we do not have an even number of warps.1966 # if (($#{ $warpsBQ } + 1) % 2 != 0) {1967 # print STDERR "desp_diff_singles: Number of input warps to make dirty diffs is not even for target $target and object $this_object!";1968 # my $rejected_warp = pop @{ $warpsBQ };1969 # my $rejected_exp_id = ${ $rejected_warp }[0];1970 # print STDERR ": Rejecting ${rejected_exp_id} to force visit count.\n";1971 # }1972 # my $nwarpsBQ = ($#{$warpsBQ} + 1);1973 # 1974 # 1975 # if (($nwarpsBQ >= 2) && ($timediff < $desdiffdt)) {1976 # print STDERR "desp_diff_singles: There are potential dirty desperate diffs to be done, but the time criterium is not met.\n";1977 # next;1978 # }1979 # if (($nwarpsBQ <= 1) || ($timediff < $desdiffdt)) {1980 # next;1981 # }1982 # 1983 # while ($#{ $warpsBQ } > -1) {1984 # # The array is sorted in pairs of input/template.1985 # my $template_warp = shift @{ $warpsBQ };1986 # my $input_warp = shift @{ $warpsBQ };1925 # # Exclude any warps that are not stored in the more general comment_hash. 1926 # my @keep_warps = (); 1927 # foreach my $this_warp (@{ $warpsBQ }) { 1928 # my $this_comment = ${ $this_warp }[3]; 1929 # my $this_exp_id = ${ $this_warp }[0]; 1930 # if ((exists($comment_hash{$this_comment}))&& 1931 # ($comment_hash{$this_comment} == $this_exp_id)) { 1932 # push @keep_warps, $this_warp; 1933 # $this_date = ${ $this_warp }[2]; 1934 # $chunk_name = ${ $this_warp }[6]; 1935 # } 1936 # else { 1937 # print STDERR "desp_diff_singles: excluding $this_exp_id for $this_object due to being rejected $this_comment\n"; 1938 # } 1939 # } 1940 # @{ $warpsBQ } = @keep_warps; 1941 # 1942 # if ($nwarps >= 2) { 1943 # #one regular diff has already been made. So, need only one more. Strip a good entry from the array 1944 # my $nrem = 0; 1945 # my @keep_warps = (); 1946 # foreach my $this_warp (@{ $warpsBQ }) { 1947 # my $this_comment = ${ $this_warp }[3]; 1948 # my $this_exp_id = ${ $this_warp }[0]; 1949 # my $this_fwhm = ${ $this_warp }[7]; 1950 # if (($nrem <1) && ($this_fwhm <= $maxFWHM)) { 1951 # $nrem++; 1952 # print STDERR "desp_diff_singles: excluding $this_exp_id for $this_object from dirty desp diffs $this_comment\n"; 1953 # } else { 1954 # push @keep_warps, $this_warp; 1955 # } 1956 # } 1957 # @{ $warpsBQ } = @keep_warps; 1958 # } 1959 # 1960 # # We are attempting to do the missing diffs, so reverse the list of retained warps. 1961 # # Good objects with all visits will be skipped due to the duplicate check. 1962 # # Bad objects will have the earliest visit rejected, and the visits repaired in a way that will produce all desired pairs. 1963 # @{ $warpsBQ } = reverse @{ $warpsBQ }; 1964 # 1965 # # Exclude the last entry if we do not have an even number of warps. 1966 # if (($#{ $warpsBQ } + 1) % 2 != 0) { 1967 # print STDERR "desp_diff_singles: Number of input warps to make dirty diffs is not even for target $target and object $this_object!"; 1968 # my $rejected_warp = pop @{ $warpsBQ }; 1969 # my $rejected_exp_id = ${ $rejected_warp }[0]; 1970 # print STDERR ": Rejecting ${rejected_exp_id} to force visit count.\n"; 1971 # } 1972 # my $nwarpsBQ = ($#{$warpsBQ} + 1); 1973 # 1974 # 1975 # if (($nwarpsBQ >= 2) && ($timediff < $desdiffdt)) { 1976 # print STDERR "desp_diff_singles: There are potential dirty desperate diffs to be done, but the time criterium is not met.\n"; 1977 # next; 1978 # } 1979 # if (($nwarpsBQ <= 1) || ($timediff < $desdiffdt)) { 1980 # next; 1981 # } 1982 # 1983 # while ($#{ $warpsBQ } > -1) { 1984 # # The array is sorted in pairs of input/template. 1985 # my $template_warp = shift @{ $warpsBQ }; 1986 # my $input_warp = shift @{ $warpsBQ }; 1987 1987 # 1988 # my $input_exp_id = ${ $input_warp }[0];1989 # my $input_comment = ${ $input_warp }[3];1990 # 1991 # my $template_exp_id = ${ $template_warp }[0];1992 # my $template_comment = ${ $template_warp }[3];1993 # 1994 # my $input_warp_id = ${ $input_warp }[1];1995 # my $template_warp_id = ${ $template_warp }[1];1996 # 1997 # my $input_warp_state = ${ $input_warp }[4];1998 # my $template_warp_state = ${ $template_warp }[4];1999 # 2000 # my $input_warp_camQuality = ${ $input_warp }[5];2001 # my $template_warp_camQuality = ${ $template_warp }[5];2002 # 2003 # $Npotential++;2004 # 2005 # unless (defined($input_warp_id) && defined($template_warp_id) &&2006 # ($input_warp_state eq 'full')&&($template_warp_state eq 'full')) {2007 # print STDERR "Desp diff for this $date $target $input_exp_id $template_exp_id not fully processed ($input_warp_state $template_warp_state) ($input_warp_camQuality $template_warp_camQuality)\n";2008 # if (($input_warp_camQuality == 4007)||($template_warp_camQuality == 4007)) {2009 # # This should now never be reached.2010 # # CZW: Trigger backup plan here? Or simply set up framework?2011 # print STDERR " ...but this is due to a camera stage astrometry quality\n";2012 # $Npotential--;2013 # }2014 # next;2015 # }2016 # 2017 # if (verify_uniqueness_diff($input_warp_id,$template_warp_id,$date,$target) != 0) {2018 # $Nqueued++;2019 # print STDERR "Desp diffs already queued for this $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";2020 # next;2021 # }2022 # else {2023 # print STDERR "Preparing to dirty diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";2024 # }2025 # 2026 # my $cmd = "$difftool -dbname $dbname -definewarpwarp ";2027 # $cmd .= "-input_label $label -template_label $label -good_frac 0.1 ";2028 # $cmd .= "-backwards "; # Needed because difftool assumes a different date sorting.2029 # $cmd .= "-rerun "; # Needed because we may have some diffs that already use some of the exposures2030 # $cmd .= "-set_workdir $workdir -set_dist_group $dist_group -set_data_group $data_group ";2031 # $cmd .= " -simple -set_label $label -exp_id $input_exp_id -template_exp_id $template_exp_id ";2032 # if (defined($reduction)) {2033 # $cmd .= " -set_reduction $reduction ";2034 # }2035 # 2036 # if (defined($pretend)) {2037 # $cmd .= ' -pretend ';2038 # }2039 # if ($debug == 1) {2040 # $cmd .= ' -pretend ';2041 # print STDERR "desp_diff_singles: $cmd\n";2042 # print STDERR " $input_warp_id $template_warp_id\n";2043 # }2044 # 2045 # if (($debug == 0)&&(!defined($pretend))) {2046 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =2047 # run ( command => $cmd, verbose => $verbose );2048 # unless ($success) {2049 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);2050 # &my_die("Unable to perform difftool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR);2051 # }2052 # $Nqueued++;2053 # }2054 # }1988 # my $input_exp_id = ${ $input_warp }[0]; 1989 # my $input_comment = ${ $input_warp }[3]; 1990 # 1991 # my $template_exp_id = ${ $template_warp }[0]; 1992 # my $template_comment = ${ $template_warp }[3]; 1993 # 1994 # my $input_warp_id = ${ $input_warp }[1]; 1995 # my $template_warp_id = ${ $template_warp }[1]; 1996 # 1997 # my $input_warp_state = ${ $input_warp }[4]; 1998 # my $template_warp_state = ${ $template_warp }[4]; 1999 # 2000 # my $input_warp_camQuality = ${ $input_warp }[5]; 2001 # my $template_warp_camQuality = ${ $template_warp }[5]; 2002 # 2003 # $Npotential++; 2004 # 2005 # unless (defined($input_warp_id) && defined($template_warp_id) && 2006 # ($input_warp_state eq 'full')&&($template_warp_state eq 'full')) { 2007 # print STDERR "Desp diff for this $date $target $input_exp_id $template_exp_id not fully processed ($input_warp_state $template_warp_state) ($input_warp_camQuality $template_warp_camQuality)\n"; 2008 # if (($input_warp_camQuality == 4007)||($template_warp_camQuality == 4007)) { 2009 # # This should now never be reached. 2010 # # CZW: Trigger backup plan here? Or simply set up framework? 2011 # print STDERR " ...but this is due to a camera stage astrometry quality\n"; 2012 # $Npotential--; 2013 # } 2014 # next; 2015 # } 2016 # 2017 # if (verify_uniqueness_diff($input_warp_id,$template_warp_id,$date,$target) != 0) { 2018 # $Nqueued++; 2019 # print STDERR "Desp diffs already queued for this $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n"; 2020 # next; 2021 # } 2022 # else { 2023 # print STDERR "Preparing to dirty diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n"; 2024 # } 2025 # 2026 # my $cmd = "$difftool -dbname $dbname -definewarpwarp "; 2027 # $cmd .= "-input_label $label -template_label $label -good_frac 0.1 "; 2028 # $cmd .= "-backwards "; # Needed because difftool assumes a different date sorting. 2029 # $cmd .= "-rerun "; # Needed because we may have some diffs that already use some of the exposures 2030 # $cmd .= "-set_workdir $workdir -set_dist_group $dist_group -set_data_group $data_group "; 2031 # $cmd .= " -simple -set_label $label -exp_id $input_exp_id -template_exp_id $template_exp_id "; 2032 # if (defined($reduction)) { 2033 # $cmd .= " -set_reduction $reduction "; 2034 # } 2035 # 2036 # if (defined($pretend)) { 2037 # $cmd .= ' -pretend '; 2038 # } 2039 # if ($debug == 1) { 2040 # $cmd .= ' -pretend '; 2041 # print STDERR "desp_diff_singles: $cmd\n"; 2042 # print STDERR " $input_warp_id $template_warp_id\n"; 2043 # } 2044 # 2045 # if (($debug == 0)&&(!defined($pretend))) { 2046 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 2047 # run ( command => $cmd, verbose => $verbose ); 2048 # unless ($success) { 2049 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 2050 # &my_die("Unable to perform difftool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 2051 # } 2052 # $Nqueued++; 2053 # } 2054 # } 2055 2055 2056 2056 … … 2285 2285 # print STDERR "desp_diff_queue: excluding $this_exp_id for $this_object due to being rejected $this_comment\n"; 2286 2286 # } 2287 # }2288 # @{ $warpsBQ } = @keep_warps;2289 # 2290 # if ($nwarps >= 2) {2291 # #one regular diff has already been made. So, need only one more. Strip a good entry from the array2292 # my $nrem = 0;2293 # my @keep_warps = ();2294 # foreach my $this_warp (@{ $warpsBQ }) {2295 # my $this_comment = ${ $this_warp }[3];2296 # my $this_exp_id = ${ $this_warp }[0];2297 # my $this_fwhm = ${ $this_warp }[7];2298 # if (($nrem <1) && ($this_fwhm <= $maxFWHM)) {2299 # $nrem++;2300 # print STDERR "desp_diff_queue: excluding $this_exp_id for $this_object from dirty desp diffs $this_comment\n";2301 # } else {2302 # push @keep_warps, $this_warp;2303 # }2304 # }2305 # @{ $warpsBQ } = @keep_warps;2306 # }2307 # 2308 # # We are attempting to do the missing diffs, so reverse the list of retained warps.2309 # # Good objects with all visits will be skipped due to the duplicate check.2310 # # Bad objects will have the earliest visit rejected, and the visits repaired in a way that will produce all desired pairs.2311 # @{ $warpsBQ } = reverse @{ $warpsBQ };2312 # 2313 # # Exclude the last entry if we do not have an even number of warps.2314 # if (($#{ $warpsBQ } + 1) % 2 != 0) {2315 # print STDERR "desp_diff_queue: Number of input warps to make dirty diffs is not even for target $target and object $this_object!";2316 # my $rejected_warp = pop @{ $warpsBQ };2317 # my $rejected_exp_id = ${ $rejected_warp }[0];2318 # print STDERR ": Rejecting ${rejected_exp_id} to force visit count.\n";2319 # }2320 # my $nwarpsBQ = ($#{$warpsBQ} + 1);2321 # 2322 # 2323 # while ($#{ $warpsBQ } > -1) {2324 # # The array is sorted in pairs of input/template.2325 # my $template_warp = shift @{ $warpsBQ };2326 # my $input_warp = shift @{ $warpsBQ };2287 # } 2288 # @{ $warpsBQ } = @keep_warps; 2289 # 2290 # if ($nwarps >= 2) { 2291 # #one regular diff has already been made. So, need only one more. Strip a good entry from the array 2292 # my $nrem = 0; 2293 # my @keep_warps = (); 2294 # foreach my $this_warp (@{ $warpsBQ }) { 2295 # my $this_comment = ${ $this_warp }[3]; 2296 # my $this_exp_id = ${ $this_warp }[0]; 2297 # my $this_fwhm = ${ $this_warp }[7]; 2298 # if (($nrem <1) && ($this_fwhm <= $maxFWHM)) { 2299 # $nrem++; 2300 # print STDERR "desp_diff_queue: excluding $this_exp_id for $this_object from dirty desp diffs $this_comment\n"; 2301 # } else { 2302 # push @keep_warps, $this_warp; 2303 # } 2304 # } 2305 # @{ $warpsBQ } = @keep_warps; 2306 # } 2307 # 2308 # # We are attempting to do the missing diffs, so reverse the list of retained warps. 2309 # # Good objects with all visits will be skipped due to the duplicate check. 2310 # # Bad objects will have the earliest visit rejected, and the visits repaired in a way that will produce all desired pairs. 2311 # @{ $warpsBQ } = reverse @{ $warpsBQ }; 2312 # 2313 # # Exclude the last entry if we do not have an even number of warps. 2314 # if (($#{ $warpsBQ } + 1) % 2 != 0) { 2315 # print STDERR "desp_diff_queue: Number of input warps to make dirty diffs is not even for target $target and object $this_object!"; 2316 # my $rejected_warp = pop @{ $warpsBQ }; 2317 # my $rejected_exp_id = ${ $rejected_warp }[0]; 2318 # print STDERR ": Rejecting ${rejected_exp_id} to force visit count.\n"; 2319 # } 2320 # my $nwarpsBQ = ($#{$warpsBQ} + 1); 2321 # 2322 # 2323 # while ($#{ $warpsBQ } > -1) { 2324 # # The array is sorted in pairs of input/template. 2325 # my $template_warp = shift @{ $warpsBQ }; 2326 # my $input_warp = shift @{ $warpsBQ }; 2327 2327 # 2328 # my $input_exp_id = ${ $input_warp }[0];2329 # my $input_comment = ${ $input_warp }[3];2330 # 2331 # my $template_exp_id = ${ $template_warp }[0];2332 # my $template_comment = ${ $template_warp }[3];2333 # 2334 # my $input_warp_id = ${ $input_warp }[1];2335 # my $template_warp_id = ${ $template_warp }[1];2336 # 2337 # my $input_warp_state = ${ $input_warp }[4];2338 # my $template_warp_state = ${ $template_warp }[4];2339 # 2340 # my $input_warp_camQuality = ${ $input_warp }[5];2341 # my $template_warp_camQuality = ${ $template_warp }[5];2342 # 2343 # $Npotential++;2344 # 2345 # unless (defined($input_warp_id) && defined($template_warp_id) &&2346 # ($input_warp_state eq 'full')&&($template_warp_state eq 'full')) {2347 # print STDERR "Desp diff for this $date $target $input_exp_id $template_exp_id not fully processed ($input_warp_state $template_warp_state) ($input_warp_camQuality $template_warp_camQuality)\n";2348 # if (($input_warp_camQuality == 4007)||($template_warp_camQuality == 4007)) {2349 # # This should now never be reached.2350 # # CZW: Trigger backup plan here? Or simply set up framework?2351 # print STDERR " ...but this is due to a camera stage astrometry quality\n";2352 # $Npotential--;2353 # }2354 # next;2355 # }2356 # 2357 # if (verify_uniqueness_diff($input_warp_id,$template_warp_id,$date,$target) != 0) {2358 # $Nqueued++;2359 # print STDERR "Desp diffs already queued for this $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";2360 # next;2361 # }2362 # else {2363 # print STDERR "Preparing to dirty diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";2364 # }2365 # 2366 # my $cmd = "$difftool -dbname $dbname -definewarpwarp ";2367 # $cmd .= "-input_label $label -template_label $label -good_frac 0.1 ";2368 # $cmd .= "-backwards "; # Needed because difftool assumes a different date sorting.2369 # $cmd .= "-rerun "; # Needed because we may have some diffs that already use some of the exposures2370 # $cmd .= "-set_workdir $workdir -set_dist_group $dist_group -set_data_group $data_group ";2371 # $cmd .= " -simple -set_label $label -exp_id $input_exp_id -template_exp_id $template_exp_id ";2372 # if (defined($reduction)) {2373 # $cmd .= " -set_reduction $reduction ";2374 # }2375 # 2376 # if (defined($pretend)) {2377 # $cmd .= ' -pretend ';2378 # }2379 # if ($debug == 1) {2380 # $cmd .= ' -pretend ';2381 # print STDERR "desp_diff_queue: $cmd\n";2382 # print STDERR " $input_warp_id $template_warp_id\n";2383 # }2384 # 2385 # if (($debug == 0)&&(!defined($pretend))) {2386 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =2387 # run ( command => $cmd, verbose => $verbose );2388 # unless ($success) {2389 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);2390 # &my_die("Unable to perform difftool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR);2391 # }2392 # $Nqueued++;2393 # }2394 # }2395 2396 2397 2398 }2328 # my $input_exp_id = ${ $input_warp }[0]; 2329 # my $input_comment = ${ $input_warp }[3]; 2330 # 2331 # my $template_exp_id = ${ $template_warp }[0]; 2332 # my $template_comment = ${ $template_warp }[3]; 2333 # 2334 # my $input_warp_id = ${ $input_warp }[1]; 2335 # my $template_warp_id = ${ $template_warp }[1]; 2336 # 2337 # my $input_warp_state = ${ $input_warp }[4]; 2338 # my $template_warp_state = ${ $template_warp }[4]; 2339 # 2340 # my $input_warp_camQuality = ${ $input_warp }[5]; 2341 # my $template_warp_camQuality = ${ $template_warp }[5]; 2342 # 2343 # $Npotential++; 2344 # 2345 # unless (defined($input_warp_id) && defined($template_warp_id) && 2346 # ($input_warp_state eq 'full')&&($template_warp_state eq 'full')) { 2347 # print STDERR "Desp diff for this $date $target $input_exp_id $template_exp_id not fully processed ($input_warp_state $template_warp_state) ($input_warp_camQuality $template_warp_camQuality)\n"; 2348 # if (($input_warp_camQuality == 4007)||($template_warp_camQuality == 4007)) { 2349 # # This should now never be reached. 2350 # # CZW: Trigger backup plan here? Or simply set up framework? 2351 # print STDERR " ...but this is due to a camera stage astrometry quality\n"; 2352 # $Npotential--; 2353 # } 2354 # next; 2355 # } 2356 # 2357 # if (verify_uniqueness_diff($input_warp_id,$template_warp_id,$date,$target) != 0) { 2358 # $Nqueued++; 2359 # print STDERR "Desp diffs already queued for this $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n"; 2360 # next; 2361 # } 2362 # else { 2363 # print STDERR "Preparing to dirty diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n"; 2364 # } 2365 # 2366 # my $cmd = "$difftool -dbname $dbname -definewarpwarp "; 2367 # $cmd .= "-input_label $label -template_label $label -good_frac 0.1 "; 2368 # $cmd .= "-backwards "; # Needed because difftool assumes a different date sorting. 2369 # $cmd .= "-rerun "; # Needed because we may have some diffs that already use some of the exposures 2370 # $cmd .= "-set_workdir $workdir -set_dist_group $dist_group -set_data_group $data_group "; 2371 # $cmd .= " -simple -set_label $label -exp_id $input_exp_id -template_exp_id $template_exp_id "; 2372 # if (defined($reduction)) { 2373 # $cmd .= " -set_reduction $reduction "; 2374 # } 2375 # 2376 # if (defined($pretend)) { 2377 # $cmd .= ' -pretend '; 2378 # } 2379 # if ($debug == 1) { 2380 # $cmd .= ' -pretend '; 2381 # print STDERR "desp_diff_queue: $cmd\n"; 2382 # print STDERR " $input_warp_id $template_warp_id\n"; 2383 # } 2384 # 2385 # if (($debug == 0)&&(!defined($pretend))) { 2386 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 2387 # run ( command => $cmd, verbose => $verbose ); 2388 # unless ($success) { 2389 # $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 2390 # &my_die("Unable to perform difftool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 2391 # } 2392 # $Nqueued++; 2393 # } 2394 # } 2395 2396 2397 2398 } 2399 2399 } 2400 2400 }
Note:
See TracChangeset
for help on using the changeset viewer.
