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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
David Keitel
PyFstat
Commits
1e111130
Commit
1e111130
authored
8 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Some cleaning of the run_compute_fstat method and fix test
parent
83fa8892
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyfstat.py
+11
-12
11 additions, 12 deletions
pyfstat.py
tests/tests.py
+1
-2
1 addition, 2 deletions
tests/tests.py
with
12 additions
and
14 deletions
pyfstat.py
+
11
−
12
View file @
1e111130
...
@@ -210,11 +210,17 @@ class ComputeFstat(object):
...
@@ -210,11 +210,17 @@ class ComputeFstat(object):
logging
.
info
(
'
Initialising FstatResults
'
)
logging
.
info
(
'
Initialising FstatResults
'
)
self
.
FstatResults
=
lalpulsar
.
FstatResults
()
self
.
FstatResults
=
lalpulsar
.
FstatResults
()
self
.
windowRange
=
lalpulsar
.
transientWindowRange_t
()
self
.
windowRange
.
type
=
lalpulsar
.
TRANSIENT_RECTANGULAR
self
.
windowRange
.
t0Band
=
0
self
.
windowRange
.
dt0
=
1
self
.
windowRange
.
tauBand
=
0
self
.
windowRange
.
dtau
=
1
def
run_computefstatistic_single_point
(
self
,
tstart
,
tend
,
F0
,
F1
,
def
run_computefstatistic_single_point
(
self
,
tstart
,
tend
,
F0
,
F1
,
F2
,
Alpha
,
Delta
):
F2
,
Alpha
,
Delta
):
"""
Compute the F-stat fully-coherently at a single point
"""
"""
Compute the F-stat fully-coherently at a single point
"""
numFreqBins
=
1
self
.
PulsarDopplerParams
.
fkdot
=
np
.
array
([
F0
,
F1
,
F2
,
0
,
0
,
0
,
0
])
self
.
PulsarDopplerParams
.
fkdot
=
np
.
array
([
F0
,
F1
,
F2
,
0
,
0
,
0
,
0
])
self
.
PulsarDopplerParams
.
Alpha
=
Alpha
self
.
PulsarDopplerParams
.
Alpha
=
Alpha
self
.
PulsarDopplerParams
.
Delta
=
Delta
self
.
PulsarDopplerParams
.
Delta
=
Delta
...
@@ -222,21 +228,14 @@ class ComputeFstat(object):
...
@@ -222,21 +228,14 @@ class ComputeFstat(object):
lalpulsar
.
ComputeFstat
(
self
.
FstatResults
,
lalpulsar
.
ComputeFstat
(
self
.
FstatResults
,
self
.
FstatInput
,
self
.
FstatInput
,
self
.
PulsarDopplerParams
,
self
.
PulsarDopplerParams
,
numFreqBins
,
1
,
self
.
whatToCompute
self
.
whatToCompute
)
)
windowRange
=
lalpulsar
.
transientWindowRange_t
()
self
.
windowRange
.
t0
=
int
(
tstart
)
# TYPE UINT4
windowRange
.
type
=
lalpulsar
.
TRANSIENT_RECTANGULAR
self
.
windowRange
.
tau
=
int
(
tend
-
tstart
)
# TYPE UINT4
windowRange
.
t0
=
int
(
tstart
)
# TYPE UINT4
windowRange
.
t0Band
=
0
windowRange
.
dt0
=
1
windowRange
.
tau
=
int
(
tend
-
tstart
)
# TYPE UINT4
windowRange
.
tauBand
=
0
windowRange
.
dtau
=
1
useFReg
=
False
FS
=
lalpulsar
.
ComputeTransientFstatMap
(
FS
=
lalpulsar
.
ComputeTransientFstatMap
(
self
.
FstatResults
.
multiFatoms
[
0
],
windowRange
,
useFReg
)
self
.
FstatResults
.
multiFatoms
[
0
],
self
.
windowRange
,
False
)
return
2
*
FS
.
F_mn
.
data
[
0
][
0
]
return
2
*
FS
.
F_mn
.
data
[
0
][
0
]
...
...
This diff is collapsed.
Click to expand it.
tests/tests.py
+
1
−
2
View file @
1e111130
...
@@ -86,8 +86,7 @@ class TestComputeFstat(unittest.TestCase):
...
@@ -86,8 +86,7 @@ class TestComputeFstat(unittest.TestCase):
search
=
pyfstat
.
ComputeFstat
(
tref
=
Writer
.
tref
,
sftlabel
=
Writer
.
label
,
search
=
pyfstat
.
ComputeFstat
(
tref
=
Writer
.
tref
,
sftlabel
=
Writer
.
label
,
sftdir
=
Writer
.
outdir
)
sftdir
=
Writer
.
outdir
)
FS
=
search
.
run_computefstatistic_single_point
(
Writer
.
tref
,
FS
=
search
.
run_computefstatistic_single_point
(
Writer
.
tstart
,
Writer
.
tstart
,
Writer
.
tend
,
Writer
.
tend
,
Writer
.
F0
,
Writer
.
F0
,
Writer
.
F1
,
Writer
.
F1
,
...
...
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