Changeset 10296 for trunk/ippScripts/scripts/detrend_norm_calc.pl
- Timestamp:
- Nov 29, 2006, 1:43:22 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_norm_calc.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_calc.pl
r9869 r10296 58 58 59 59 # Get the list of inputs 60 my $files; # The input files60 my @files; # The input files 61 61 { 62 62 my $command = "$dettool -processedimfile -det_id $detId"; # Command to run … … 68 68 print $stdout . "\n"; 69 69 70 # Parse the output 71 my $metadata = $mdcParser->parse($stdout) 72 or die "unable to parse metadata config doc"; 73 $files = parse_md_list($metadata); 70 # Because of the length, need to split into individual metadatas --- it parses SO much quicker! 71 my @whole = split /\n/, $stdout; 72 my @single = (); 73 while ( scalar @whole > 0 ) { 74 my $value = shift @whole; 75 push @single, $value; 76 if ($value =~ /^\s*END\s*$/) { 77 push @single, "\n"; 78 79 my $list = parse_md_list( $mdcParser->parse( join( "\n", @single ) ) ) or 80 die "Unable to parse output from dettool.\n"; 81 push @files, $list; 82 } 83 } 74 84 } 75 76 85 77 86 my $norms; # MDC with normalisations … … 79 88 80 89 my %matrix; # Matrix of statistics as a function of exposures and classes 81 foreach my $file (@ $files) {90 foreach my $file (@files) { 82 91 my $expTag = $file->{'exp_tag'}; # Exposure ID 83 92 my $classId = $file->{'class_id'}; # Class ID … … 116 125 # It's something that doesn't need normalisation --- just push in a normalisation of 1 117 126 my %classes; # List of unique classes 118 foreach my $file (@ $files) {127 foreach my $file (@files) { 119 128 my $classId = $file->{'class_id'}; # Class Id 120 129 $classes{$classId} = 1;
Note:
See TracChangeset
for help on using the changeset viewer.
