Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PyFstat
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gregory Ashton
PyFstat
Commits
793e1f4e
Commit
793e1f4e
authored
Feb 05, 2018
by
Gregory Ashton
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'printAtoms' into 'master'
writer function for atoms (TransientGridSearch) See merge request
!14
parents
d952cd3e
f8f2b07e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
pyfstat/core.py
pyfstat/core.py
+12
-0
pyfstat/grid_based_searches.py
pyfstat/grid_based_searches.py
+4
-1
No files found.
pyfstat/core.py
View file @
793e1f4e
...
...
@@ -907,6 +907,18 @@ class ComputeFstat(BaseSearchClass):
else
:
return
ax
def
write_atoms_to_file
(
self
,
fnamebase
=
''
):
multiFatoms
=
getattr
(
self
.
FstatResults
,
'multiFatoms'
,
None
)
if
multiFatoms
and
multiFatoms
[
0
]:
dopplerName
=
lalpulsar
.
PulsarDopplerParams2String
(
self
.
PulsarDopplerParams
)
#fnameAtoms = os.path.join(self.outdir,'Fstatatoms_%s.dat' % dopplerName)
fnameAtoms
=
fnamebase
+
'_Fstatatoms_%s.dat'
%
dopplerName
fo
=
lal
.
FileOpen
(
fnameAtoms
,
'w'
)
lalpulsar
.
write_MultiFstatAtoms_to_fp
(
fo
,
multiFatoms
[
0
]
)
del
fo
# instead of lal.FileClose() which is not SWIG-exported
else
:
raise
RuntimeError
(
'Cannot print atoms vector to file: no FstatResults.multiFatoms, or it is None!'
)
class
SemiCoherentSearch
(
ComputeFstat
):
""" A semi-coherent search """
...
...
pyfstat/grid_based_searches.py
View file @
793e1f4e
...
...
@@ -354,7 +354,8 @@ class TransientGridSearch(GridSearch):
input_arrays
=
False
,
assumeSqrtSX
=
None
,
transientWindowType
=
None
,
t0Band
=
None
,
tauBand
=
None
,
dt0
=
None
,
dtau
=
None
,
outputTransientFstatMap
=
False
):
outputTransientFstatMap
=
False
,
outputAtoms
=
False
):
"""
Parameters
----------
...
...
@@ -442,6 +443,8 @@ class TransientGridSearch(GridSearch):
thisCand
+=
[
windowRange
.
t0
+
maxidx
[
0
]
*
windowRange
.
dt0
,
windowRange
.
tau
+
maxidx
[
1
]
*
windowRange
.
dtau
]
data
.
append
(
thisCand
)
if
self
.
outputAtoms
:
self
.
search
.
write_atoms_to_file
(
os
.
path
.
splitext
(
self
.
out_file
)[
0
])
data
=
np
.
array
(
data
,
dtype
=
np
.
float
)
if
return_data
:
...
...
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