Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93483654
bayesRemoveEvid.pl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 29, 03:07
Size
412 B
Mime Type
text/x-perl
Expires
Sun, Dec 1, 03:07 (2 d)
Engine
blob
Format
Raw Data
Handle
22646682
Attached To
R1448 Lenstool-HPC
bayesRemoveEvid.pl
View Options
#!/usr/bin/perl
# Remove the Evidence line and Evidence column in old bayes.dat
# files.
#
if( @ARGV > 0 )
{
$file = $ARGV[0];
}
else
{
$file = "bayes.dat";
}
open(IN, $file) || die "$file not found.";
while( $line = <IN> )
{
if( $line =~ "#" )
{
print $line if( $line ne "#Evidence\n" );
}
else
{
@fld = split " ", $line;
printf "%s\n", join( " ", @{ [ @fld[0..1], @fld[3..$#fld] ] } );
}
}
Event Timeline
Log In to Comment