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
c161d0eb
Commit
c161d0eb
authored
8 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Rename sftfile path for consistency, use Cairo temp.
parent
f0b06a90
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
+12
-12
12 additions, 12 deletions
pyfstat.py
with
12 additions
and
12 deletions
pyfstat.py
+
12
−
12
View file @
c161d0eb
...
...
@@ -13,7 +13,7 @@ from collections import OrderedDict
import
numpy
as
np
import
matplotlib
matplotlib
.
use
(
'
Agg
'
)
matplotlib
.
use
(
'
cairo
'
)
import
matplotlib.pyplot
as
plt
import
emcee
import
corner
...
...
@@ -1004,12 +1004,12 @@ class MCMCSearch(BaseSearchClass):
pickle
.
dump
(
d
,
File
)
def
get_list_of_matching_sfts
(
self
):
matches
=
glob
.
glob
(
self
.
sft
_
filepath
)
matches
=
glob
.
glob
(
self
.
sftfilepath
)
if
len
(
matches
)
>
0
:
return
matches
else
:
raise
IOError
(
'
No sfts found matching {}
'
.
format
(
self
.
sft
_
filepath
))
self
.
sftfilepath
))
def
get_saved_data
(
self
):
with
open
(
self
.
pickle_path
,
"
r
"
)
as
File
:
...
...
@@ -1597,10 +1597,10 @@ class Writer(BaseSearchClass):
np
.
array
([
delta_phi
,
delta_F0
,
delta_F1
,
delta_F2
]).
T
)
numSFTs
=
int
(
float
(
self
.
duration
)
/
self
.
Tsft
)
self
.
sft
_
filename
=
lalpulsar
.
OfficialSFTFilename
(
self
.
sftfilename
=
lalpulsar
.
OfficialSFTFilename
(
'
H
'
,
'
1
'
,
numSFTs
,
self
.
Tsft
,
self
.
tstart
,
self
.
duration
,
self
.
label
)
self
.
sft
_
filepath
=
'
{}/{}
'
.
format
(
self
.
outdir
,
self
.
sft
_
filename
)
self
.
sftfilepath
=
'
{}/{}
'
.
format
(
self
.
outdir
,
self
.
sftfilename
)
self
.
calculate_fmin_Band
()
def
make_data
(
self
):
...
...
@@ -1659,28 +1659,28 @@ transientTauDays={:1.3f}\n""")
getmtime
=
os
.
path
.
getmtime
if
os
.
path
.
isfile
(
self
.
sft
_
filepath
)
is
False
:
if
os
.
path
.
isfile
(
self
.
sftfilepath
)
is
False
:
logging
.
info
(
'
No SFT file matching {} found
'
.
format
(
self
.
sft
_
filepath
))
self
.
sftfilepath
))
return
False
else
:
logging
.
info
(
'
Matching SFT file found
'
)
if
getmtime
(
self
.
sft
_
filepath
)
<
getmtime
(
self
.
config_file_name
):
if
getmtime
(
self
.
sftfilepath
)
<
getmtime
(
self
.
config_file_name
):
logging
.
info
(
(
'
The config file {} has been modified since the sft file {}
'
+
'
was created
'
).
format
(
self
.
config_file_name
,
self
.
sft
_
filepath
))
self
.
config_file_name
,
self
.
sftfilepath
))
return
False
logging
.
info
(
'
The config file {} is older than the sft file {}
'
.
format
(
self
.
config_file_name
,
self
.
sft
_
filepath
))
self
.
config_file_name
,
self
.
sftfilepath
))
logging
.
info
(
'
Checking contents of cff file
'
)
logging
.
info
(
'
Execute: {}
'
.
format
(
'
lalapps_SFTdumpheader {} | head -n 20
'
.
format
(
self
.
sft
_
filepath
)))
'
lalapps_SFTdumpheader {} | head -n 20
'
.
format
(
self
.
sftfilepath
)))
output
=
subprocess
.
check_output
(
'
lalapps_SFTdumpheader {} | head -n 20
'
.
format
(
self
.
sft
_
filepath
),
'
lalapps_SFTdumpheader {} | head -n 20
'
.
format
(
self
.
sftfilepath
),
shell
=
True
)
calls
=
[
line
for
line
in
output
.
split
(
'
\n
'
)
if
line
[:
3
]
==
'
lal
'
]
if
calls
[
0
]
==
cl
:
...
...
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