Changeset 28096
- Timestamp:
- May 25, 2010, 3:05:00 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
dbconfig/changes.txt (modified) (1 diff)
-
dbconfig/staticsky.md (modified) (1 diff)
-
ippScripts/scripts/staticsky.pl (modified) (6 diffs)
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 diff)
-
ippTools/share/staticskytool_inputs.sql (modified) (1 diff)
-
ippTools/src/staticskytool.c (modified) (3 diffs)
-
ippTools/src/staticskytoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbconfig/changes.txt
r28090 r28096 1700 1700 dtime_script FLOAT, -- elapsed time for script 1701 1701 sources INT, -- number of sources 1702 num_inputs INT, -- number inputs used 1702 1703 hostname VARCHAR(64) NOT NULL, -- host that executed script 1703 1704 good_frac FLOAT, -- good fraction of skycell -
trunk/dbconfig/staticsky.md
r28090 r28096 21 21 staticskyResult METADATA 22 22 sky_id S64 0 # Primary Key fkey(sky_id) ref staticskyRun(sky_id) 23 stack_id S64 0 # Primary Key fkey(stack_id) ref stackSumSkyfile(stack_id)24 23 path_base STR 255 25 24 dtime_phot F32 0.0 26 25 dtime_script F32 0.0 27 26 sources S32 0 27 num_inputs S32 0 28 28 hostname STR 64 29 29 good_frac F32 0.0 # Key -
trunk/ippScripts/scripts/staticsky.pl
r28092 r28096 21 21 use PS::IPP::Metadata::List qw( parse_md_list ); 22 22 use Data::Dumper; 23 use File::Temp qw( tempfile ); 24 use File::Basename; 23 25 use PS::IPP::Config 1.01 qw( :standard ); 24 26 … … 36 38 } 37 39 38 my ($sky_id, $ dbname, $threads, $outroot, $reduction, $inverse, $run_state, $verbose, $no_update, $no_op, $redirect, $save_temps);40 my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $inverse, $run_state, $verbose, $no_update, $no_op, $redirect, $save_temps); 39 41 GetOptions( 40 42 'sky_id=s' => \$sky_id, # Diff identifier 43 'camera|c=s' => \$camera, # Camera name 41 44 'dbname|d=s' => \$dbname, # Database name 42 45 'threads=s' => \$threads, # Number of threads to use … … 53 56 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 54 57 pod2usage( 55 -msg => "Required options: --sky_id --outroot ",58 -msg => "Required options: --sky_id --outroot --camera (--run_state)", 56 59 -exitval => 3, 57 60 ) unless 58 61 defined $sky_id and 59 defined $outroot ;60 61 my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $sky_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 62 63 # XXX camera is not known here; cannot use filerules... 64 # my $logDest = $ipprc->filename("LOG.EXP", $outroot); 65 my $logDest = "$outroot.log";66 $logDest .= ".update" if $run_state eq "update";62 defined $outroot and 63 defined $camera; 64 # and defined $run_state; 65 66 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $sky_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 67 68 my $logDest = $ipprc->filename("LOG.EXP", $outroot); 69 # $logDest .= ".update" if $run_state eq "update"; 67 70 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $sky_id, $PS_EXIT_SYS_ERROR ) if $redirect; 68 71 69 my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_DIFF);72 # my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_STATICSKY); 70 73 71 74 my $outbase = basename($outroot); … … 91 94 } 92 95 93 # XXX do we NEED to define the camera?94 # &my_die("Unable to identify camera", $sky_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless defined $camera;95 # $ipprc->define_camera($camera);96 97 96 # generate the input 98 97 print $listFile "INPUT MULTI\n"; 98 my $nInputs = @$files; 99 99 100 100 foreach my $file (@$files) { … … 103 103 # XXX if we take the input from 'warp', we will need to make different selections here 104 104 my $path_base = $file->{path_base}; 105 print "input: $path_base\n"; 106 105 107 my $imageCnv = $ipprc->filename("PPSTACK.OUTPUT", $path_base ); # Image name 106 108 my $maskCnv = $ipprc->filename("PPSTACK.OUTPUT.MASK", $path_base ); # Mask name … … 235 237 # if ($run_state eq 'new') { 236 238 $command .= " -addresult -path_base $outroot"; 239 $command .= " -num_inputs $nInputs"; 237 240 $command .= " $cmdflags"; 238 241 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); -
trunk/ippTools/share/pxadmin_create_tables.sql
r28091 r28096 1650 1650 dtime_script FLOAT, -- elapsed time for script 1651 1651 sources INT, -- number of sources 1652 num_inputs INT, -- number of input images 1652 1653 hostname VARCHAR(64) NOT NULL, -- host that executed script 1653 1654 good_frac FLOAT, -- good fraction of skycell -
trunk/ippTools/share/staticskytool_inputs.sql
r28091 r28096 1 1 SELECT 2 2 staticskyRun.*, 3 staticskyInput.stack_id, 3 4 stackSumSkyfile.path_base 4 5 FROM staticskyRun -
trunk/ippTools/src/staticskytool.c
r28091 r28096 511 511 // required 512 512 PXOPT_LOOKUP_S64(sky_id, config->args, "-sky_id", true, false); 513 PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false);514 513 515 514 // optional … … 520 519 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 521 520 PXOPT_LOOKUP_F32(good_frac, config->args, "-good_frac", false, false); 521 PXOPT_LOOKUP_S32(num_inputs, config->args, "-num_inputs", false, false); 522 522 523 523 // default values … … 533 533 if (!staticskyResultInsert(config->dbh, 534 534 sky_id, 535 stack_id,536 535 path_base, 537 536 dtime_phot, 538 537 dtime_script, 539 538 sources, 539 num_inputs, 540 540 hostname, 541 541 good_frac, -
trunk/ippTools/src/staticskytoolConfig.c
r28091 r28096 90 90 psMetadata *addresultArgs = psMetadataAlloc(); 91 91 psMetadataAddS64(addresultArgs, PS_LIST_TAIL, "-sky_id", 0, "define sky ID (required)", 0); 92 psMetadataAddS64(addresultArgs, PS_LIST_TAIL, "-stack_id", 0, "define stack ID (required)", 0);93 92 psMetadataAddStr(addresultArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", 0); 94 93 psMetadataAddF32(addresultArgs, PS_LIST_TAIL, "-dtime_phot", 0, "define photometry time", NAN); 95 94 psMetadataAddF32(addresultArgs, PS_LIST_TAIL, "-dtime_script", 0, "define elapsed time in script (seconds)", NAN); 96 95 psMetadataAddS32(addresultArgs, PS_LIST_TAIL, "-sources", 0, "number of sources", 0); 96 psMetadataAddS32(addresultArgs, PS_LIST_TAIL, "-num_inputs", 0, "number of inputs", 0); 97 97 psMetadataAddStr(addresultArgs, PS_LIST_TAIL, "-hostname", 0, "define hostname", 0); 98 98 psMetadataAddF32(addresultArgs, PS_LIST_TAIL, "-good_frac", 0, "define fraction of good pixels", NAN);
Note:
See TracChangeset
for help on using the changeset viewer.
