Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102362340
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
Wed, Feb 19, 22:19
Size
412 B
Mime Type
text/x-perl
Expires
Fri, Feb 21, 22:19 (2 d)
Engine
blob
Format
Raw Data
Handle
24274007
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