Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Gitlab is now running v13.9.0 - More info ->
here
<-
Open sidebar
cosmotools
CAMEL
Commits
acff223b
Commit
acff223b
authored
Jun 28, 2019
by
Plaszczynski Stephane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use basename for mcmc output files
parent
f98d9514
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
+26
-3
src/camel/MCMC/exec/mainMCMC.cc
src/camel/MCMC/exec/mainMCMC.cc
+8
-3
src/cxxsupport/cxxutils.cc
src/cxxsupport/cxxutils.cc
+12
-0
src/cxxsupport/cxxutils.h
src/cxxsupport/cxxutils.h
+2
-0
work/ref/hlpTT_PS_H0.cml
work/ref/hlpTT_PS_H0.cml
+4
-0
No files found.
src/camel/MCMC/exec/mainMCMC.cc
View file @
acff223b
...
...
@@ -19,6 +19,8 @@
#include "Chi2Factory.hh"
#include "cxxsupport/paramfile.h"
#include "cxxsupport/cxxutils.h"
#include "Chi2Combiner.hh"
#include "Parser.hh"
...
...
@@ -48,9 +50,12 @@ int main(int argc, char *argv[])
std
::
cout
<<
"output file "
+
fileName
+
" already exists: removing it"
<<
endl
;
remove_file
(
fileName
);
}
string
ar_file
=
string
(
"ar_vs_length_"
)
+
fileName
;
string
scale_file
=
string
(
"scale_"
)
+
fileName
;
string
cor_file
=
string
(
"last_step_"
)
+
fileName
;
string
base
=
BaseName
(
fileName
);
string
ar_file
=
string
(
"ar_vs_length_"
)
+
base
;
string
scale_file
=
string
(
"scale_"
)
+
base
;
string
cor_file
=
string
(
"last_step_"
)
+
base
;
cout
<<
"output files:"
<<
endl
;
cout
<<
ar_file
<<
" "
<<
scale_file
<<
" "
<<
cor_file
<<
" "
<<
endl
;
...
...
src/cxxsupport/cxxutils.cc
View file @
acff223b
...
...
@@ -294,3 +294,15 @@ string DirName(string source)
source
.
erase
(
std
::
find
(
source
.
rbegin
(),
source
.
rend
(),
'/'
).
base
(),
source
.
end
());
return
source
;
}
string
BaseName
(
string
source
)
{
if
(
source
.
size
()
<=
1
)
//Make sure it's possible to check the last character.
{
return
source
;
}
planck_assert
(
*
(
source
.
rbegin
()
+
1
)
!=
'/'
,
source
+
" had no BaseName"
);
source
.
erase
(
source
.
begin
(),
std
::
find
(
source
.
rbegin
(),
source
.
rend
(),
'/'
).
base
());
return
source
;
}
src/cxxsupport/cxxutils.h
View file @
acff223b
...
...
@@ -264,6 +264,8 @@ inline unsigned int healpix_repcount (int npix)
//acess directory name without trailing slash
std
::
string
DirName
(
std
::
string
x
);
std
::
string
BaseName
(
std
::
string
x
);
...
...
work/ref/hlpTT_PS_H0.cml
View file @
acff223b
...
...
@@ -83,3 +83,7 @@ set_tol=0.00001
remove_cosmo_limits=false
doHesse=true
###############################################################
#MCMC
algo=ada
length = 50000
proposal_cov = hlpTT_PS_H0_min_ref/covmat8.dat
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment