IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2012, 9:57:42 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120905
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905

  • branches/eam_branches/ipp-20120905/ippScripts/scripts/destreak_restore_camera.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20120905/ippScripts/scripts/ipp_apply_burntool_single.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20120905/ippScripts/scripts/magic_destreak.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20120905/ippScripts/scripts/skycalibration.pl

    r34151 r34747  
    3333my $psastro = can_run('psastro') or (warn "Can't find psastro" and $missing_tools = 1);
    3434my $fhead = can_run('fhead') or (warn "Can't find fhead" and $missing_tools = 1);
     35my $fields = can_run('fields') or (warn "Can't find fields" and $missing_tools = 1);
    3536my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);
    3637my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
     
    191192}
    192193
     194my $resolved = $ipprc->file_resolve($file);
     195if (!$resolved) {
     196    &my_die("Unable to find input file: $file", $skycal_id, $PS_EXIT_SYS_ERROR);
     197}
     198
     199# read the input header to find the number of detections and the number of detections
     200# with extended model
     201my $n_detections = 0;
     202my $n_extended = 0;
     203{
     204    my $command = "echo $resolved | $fields -n SkyChip.psf NAXIS2";
     205    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     206            run(command => $command, verbose => 0);
     207        # fields does not return 0 on success
     208    (undef, $n_detections)  = split " ", join "", @$stdout_buf;
     209    chomp $n_detections;
     210    &my_die("Unable to find number of detections from $file: ", $skycal_id, $PS_EXIT_SYS_ERROR)
     211        unless defined $n_detections;
     212
     213    $command = "echo $resolved | $fields -n SkyChip.hdr NDET_EXT";
     214    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     215            run(command => $command, verbose => 0);
     216    (undef, $n_extended)  = split " ", join "", @$stdout_buf;
     217    chomp $n_extended;
     218    &my_die("Unable to find number of extended objects from $file: ", $skycal_id, $PS_EXIT_SYS_ERROR)
     219        unless defined $n_extended;
     220}
     221
     222
    193223# Perform psastro analysis
    194224my $output_sources_filerule =  'PSASTRO.OUTPUT.CMF';
     
    246276{
    247277    my $command = "$staticskytool -skycal_id $skycal_id";
     278    $command .= " -n_detections $n_detections";
     279    $command .= " -n_extended $n_extended";
    248280    $command .= " -addskycalresult -path_base $outroot";
    249281    $command .= " $cmdflags";
  • branches/eam_branches/ipp-20120905/ippScripts/scripts/staticsky.pl

    r34566 r34747  
    124124my $nInputs = @$files;
    125125
    126 if ($nInputs > 1) {
     126if (1) {
    127127        my $recipe_psphot  = $ipprc->reduction($reduction, 'STACKPHOT_PSPHOT'); # Recipe to use for psphot
    128128        my $recipe_ppsub   = $ipprc->reduction($reduction, 'STACKPHOT_PPSUB'); # Recipe to use for ppsub
     
    266266        }
    267267} else {
     268    # XXX This mode is no longer used. We run psphotStack even if there is only one filter
    268269        # single input. Run psphot
    269270        # find the recipe
Note: See TracChangeset for help on using the changeset viewer.