Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gregory Ashton
PyFstat
Commits
87604fa0
Commit
87604fa0
authored
8 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Adds log file for the MCMC searches
parent
fcb2d62c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat.py
+11
-0
11 additions, 0 deletions
pyfstat.py
with
11 additions
and
0 deletions
pyfstat.py
+
11
−
0
View file @
87604fa0
...
...
@@ -98,6 +98,15 @@ class BaseSearchClass(object):
earth_ephem_default
=
earth_ephem
sun_ephem_default
=
sun_ephem
def
add_log_file
(
self
):
'
Log output to a log-file, requires class to have outdir and label
'
logfilename
=
'
{}/{}.log
'
.
format
(
self
.
outdir
,
self
.
label
)
fh
=
logging
.
FileHandler
(
logfilename
)
fh
.
setFormatter
(
logging
.
Formatter
(
'
%(asctime)s %(levelname)-8s: %(message)s
'
,
datefmt
=
'
%y-%m-%d %H:%M
'
))
logging
.
getLogger
().
addHandler
(
fh
)
def
shift_matrix
(
self
,
n
,
dT
):
"""
Generate the shift matrix
"""
m
=
np
.
zeros
((
n
,
n
))
...
...
@@ -517,6 +526,7 @@ class MCMCSearch(BaseSearchClass):
self
.
minStartTime
=
tstart
self
.
maxStartTime
=
tend
self
.
add_log_file
()
logging
.
info
(
'
Set-up MCMC search for model {} on data {}
'
.
format
(
self
.
label
,
self
.
sftfilepath
))
...
...
@@ -1206,6 +1216,7 @@ _ sftfilepath: str
"""
self
.
add_log_file
()
logging
.
info
((
'
Set-up MCMC glitch search with {} glitches for model {}
'
'
on data {}
'
).
format
(
self
.
nglitch
,
self
.
label
,
self
.
sftfilepath
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment