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
691dae29
Commit
691dae29
authored
7 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Minor code polishing
parent
9cdbd15a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat/core.py
+24
-13
24 additions, 13 deletions
pyfstat/core.py
with
24 additions
and
13 deletions
pyfstat/core.py
+
24
−
13
View file @
691dae29
...
...
@@ -632,7 +632,8 @@ class ComputeFstat(BaseSearchClass):
self
.
windowRange
.
dt0
=
self
.
Tsft
self
.
windowRange
.
dtau
=
self
.
Tsft
# special treatment of window_type = none ==> replace by rectangular window spanning all the data
# special treatment of window_type = none ==> replace by
# rectangular window spanning all the data
if
self
.
windowRange
.
type
==
lalpulsar
.
TRANSIENT_NONE
:
self
.
windowRange
.
t0
=
int
(
self
.
minStartTime
)
self
.
windowRange
.
t0Band
=
0
...
...
@@ -660,7 +661,9 @@ class ComputeFstat(BaseSearchClass):
if
self
.
dtau
:
self
.
windowRange
.
dtau
=
self
.
dtau
self
.
tCWFstatMapFeatures
,
self
.
gpu_context
=
tcw
.
init_transient_fstat_map_features
(
self
.
tCWFstatMapVersion
==
'
pycuda
'
,
self
.
cudaDeviceName
)
self
.
tCWFstatMapFeatures
,
self
.
gpu_context
=
(
tcw
.
init_transient_fstat_map_features
(
self
.
tCWFstatMapVersion
==
'
pycuda
'
,
self
.
cudaDeviceName
))
def
get_fullycoherent_twoF
(
self
,
tstart
,
tend
,
F0
,
F1
,
F2
,
Alpha
,
Delta
,
asini
=
None
,
period
=
None
,
ecc
=
None
,
tp
=
None
,
...
...
@@ -704,20 +707,28 @@ class ComputeFstat(BaseSearchClass):
# F-stat computation
self
.
windowRange
.
tau
=
int
(
2
*
self
.
Tsft
)
#logging.debug('Calling "%s" version of ComputeTransientFstatMap() with windowRange: (type=%d (%s), t0=%f, t0Band=%f, dt0=%f, tau=%f, tauBand=%f, dtau=%f)...' % (self.tCWFstatMapVersion, self.windowRange.type, self.transientWindowType, self.windowRange.t0, self.windowRange.t0Band, self.windowRange.dt0, self.windowRange.tau, self.windowRange.tauBand, self.windowRange.dtau))
self
.
FstatMap
=
tcw
.
call_compute_transient_fstat_map
(
self
.
tCWFstatMapVersion
,
self
.
tCWFstatMapFeatures
,
self
.
FstatResults
.
multiFatoms
[
0
],
self
.
windowRange
)
# logging.debug(
# 'Calling "%s" version of ComputeTransientFstatMap() with\
# windowRange: (type=%d (%s), t0=%f, t0Band=%f, dt0=%f, tau=%f,\
# tauBand=%f, dtau=%f)...' % (
# self.tCWFstatMapVersion, self.windowRange.type,
# self.transientWindowType, self.windowRange.t0,
# self.windowRange.t0Band, self.windowRange.dt0,
# self.windowRange.tau, self.windowRange.tauBand,
# self.windowRange.dtau))
self
.
FstatMap
=
tcw
.
call_compute_transient_fstat_map
(
self
.
tCWFstatMapVersion
,
self
.
tCWFstatMapFeatures
,
self
.
FstatResults
.
multiFatoms
[
0
],
self
.
windowRange
)
if
self
.
tCWFstatMapVersion
==
'
lal
'
:
F_mn
=
self
.
FstatMap
.
F_mn
.
data
else
:
F_mn
=
self
.
FstatMap
.
F_mn
#logging.debug('maxF: {}'.format(FstatMap.maxF))
#logging.debug('t0_ML: %ds=T0+%fd' % (FstatMap.t0_ML, (FstatMap.t0_ML-tstart)/(3600.*24.)))
#logging.debug('tau_ML: %ds=%fd' % (FstatMap.tau_ML, FstatMap.tau_ML/(3600.*24.)))
# logging.debug('maxF: {}'.format(self.FstatMap.maxF))
# logging.debug('t0_ML: %ds=T0+%fd' % (
# self.FstatMap.t0_ML, (self.FstatMap.t0_ML-tstart)/(3600.*24.)))
# logging.debug('tau_ML: %ds=%fd' % (
# self.FstatMap.tau_ML, self.FstatMap.tau_ML/(3600.*24.)))
# logging.debug('F_mn: {}'.format(F_mn))
twoF
=
2
*
np
.
max
(
F_mn
)
...
...
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