Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
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
Sean Leavey
pykat
Commits
ac57bb98
Commit
ac57bb98
authored
10 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
making sure detectors print the full frequency precision
parent
7607793f
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
pykat/detectors.py
+21
-12
21 additions, 12 deletions
pykat/detectors.py
with
21 additions
and
12 deletions
pykat/detectors.py
+
21
−
12
View file @
ac57bb98
...
@@ -341,7 +341,7 @@ class pd(Detector):
...
@@ -341,7 +341,7 @@ class pd(Detector):
return
getattr
(
self
,
'
_pd__
'
+
name
)
return
getattr
(
self
,
'
_pd__
'
+
name
)
def
__set_f
(
self
,
num
,
value
):
def
__set_f
(
self
,
num
,
value
):
setattr
(
self
,
'
_pd__f
'
+
num
,
float
(
value
)
)
setattr
(
self
,
'
_pd__f
'
+
num
,
value
)
def
__set_phi
(
self
,
num
,
value
):
def
__set_phi
(
self
,
num
,
value
):
if
value
==
None
and
num
!=
self
.
num_demods
:
if
value
==
None
and
num
!=
self
.
num_demods
:
...
@@ -434,11 +434,14 @@ class pd(Detector):
...
@@ -434,11 +434,14 @@ class pd(Detector):
alt_str
=
"
*
"
alt_str
=
"
*
"
for
n
in
range
(
1
,
1
+
self
.
num_demods
):
for
n
in
range
(
1
,
1
+
self
.
num_demods
):
fphi_str
+=
"
"
+
str
(
self
.
__getattribute__
(
"
f
"
+
str
(
n
)))
fphi_str
+=
"
{0:.16g}
"
.
format
(
float
(
self
.
__getattribute__
(
"
f
"
+
str
(
n
)))
)
phi_val
=
self
.
__getattribute__
(
"
phi
"
+
str
(
n
))
phi_val
=
self
.
__getattribute__
(
"
phi
"
+
str
(
n
))
if
phi_val
!=
None
:
if
phi_val
!=
None
:
fphi_str
+=
"
"
+
str
(
phi_val
)
if
type
(
phi_val
)
==
float
:
fphi_str
+=
"
{0:.16g}
"
.
format
(
float
(
phi_val
))
else
:
fphi_str
+=
"
{0}
"
.
format
(
phi_val
)
senstype
=
self
.
senstype
senstype
=
self
.
senstype
...
@@ -448,7 +451,7 @@ class pd(Detector):
...
@@ -448,7 +451,7 @@ class pd(Detector):
rtn
.
append
(
"
pd{0}{1} {2}{3} {4}{5}
"
.
format
(
senstype
,
self
.
num_demods
,
self
.
name
,
fphi_str
,
self
.
node
.
name
,
alt_str
))
rtn
.
append
(
"
pd{0}{1} {2}{3} {4}{5}
"
.
format
(
senstype
,
self
.
num_demods
,
self
.
name
,
fphi_str
,
self
.
node
.
name
,
alt_str
))
if
self
.
scale
!=
None
:
if
self
.
scale
!=
None
:
rtn
.
append
(
"
scale {1} {0}
"
.
format
(
self
.
name
,
self
.
scale
))
rtn
.
append
(
"
scale {1} {0
:.16g
}
"
.
format
(
self
.
name
,
self
.
scale
))
if
self
.
pdtype
!=
None
:
if
self
.
pdtype
!=
None
:
rtn
.
append
(
"
pdtype {0} {1}
"
.
format
(
self
.
name
,
self
.
pdtype
))
rtn
.
append
(
"
pdtype {0} {1}
"
.
format
(
self
.
name
,
self
.
pdtype
))
...
@@ -538,10 +541,13 @@ class qnoised(pd):
...
@@ -538,10 +541,13 @@ class qnoised(pd):
alt_str
=
"
*
"
alt_str
=
"
*
"
for
n
in
range
(
1
,
1
+
self
.
num_demods
):
for
n
in
range
(
1
,
1
+
self
.
num_demods
):
fphi_str
+=
"
"
+
str
(
self
.
__getattribute__
(
"
f
"
+
str
(
n
)))
fphi_str
+=
"
{0:.16g}
"
.
format
(
float
(
self
.
__getattribute__
(
"
f
"
+
str
(
n
)))
)
phi_val
=
self
.
__getattribute__
(
"
phi
"
+
str
(
n
))
phi_val
=
self
.
__getattribute__
(
"
phi
"
+
str
(
n
))
if
phi_val
!=
None
:
if
phi_val
!=
None
:
if
type
(
phi_val
)
==
float
:
fphi_str
+=
"
{0:.16g}
"
.
format
(
float
(
phi_val
))
else
:
fphi_str
+=
"
"
+
str
(
phi_val
)
fphi_str
+=
"
"
+
str
(
phi_val
)
senstype
=
self
.
senstype
senstype
=
self
.
senstype
...
@@ -552,7 +558,7 @@ class qnoised(pd):
...
@@ -552,7 +558,7 @@ class qnoised(pd):
rtn
.
append
(
"
qnoised{5} {0} {1} {2} {3}{4}
"
.
format
(
self
.
name
,
self
.
num_demods
,
fphi_str
,
self
.
node
.
name
,
alt_str
,
senstype
))
rtn
.
append
(
"
qnoised{5} {0} {1} {2} {3}{4}
"
.
format
(
self
.
name
,
self
.
num_demods
,
fphi_str
,
self
.
node
.
name
,
alt_str
,
senstype
))
if
self
.
scale
!=
None
:
if
self
.
scale
!=
None
:
rtn
.
append
(
"
scale {1} {0}
"
.
format
(
self
.
name
,
self
.
scale
))
rtn
.
append
(
"
scale {1} {0
:.16g
}
"
.
format
(
self
.
name
,
self
.
scale
))
for
p
in
self
.
_params
:
for
p
in
self
.
_params
:
rtn
.
extend
(
p
.
getFinesseText
())
rtn
.
extend
(
p
.
getFinesseText
())
...
@@ -628,10 +634,13 @@ class qshot(pd):
...
@@ -628,10 +634,13 @@ class qshot(pd):
alt_str
=
"
*
"
alt_str
=
"
*
"
for
n
in
range
(
1
,
1
+
self
.
num_demods
):
for
n
in
range
(
1
,
1
+
self
.
num_demods
):
fphi_str
+=
"
"
+
str
(
self
.
__getattribute__
(
"
f
"
+
str
(
n
)))
fphi_str
+=
"
{0:.16g}
"
.
format
(
float
(
self
.
__getattribute__
(
"
f
"
+
str
(
n
)))
)
phi_val
=
self
.
__getattribute__
(
"
phi
"
+
str
(
n
))
phi_val
=
self
.
__getattribute__
(
"
phi
"
+
str
(
n
))
if
phi_val
!=
None
:
if
phi_val
!=
None
:
if
type
(
phi_val
)
==
float
:
fphi_str
+=
"
{0:.16g}
"
.
format
(
float
(
phi_val
))
else
:
fphi_str
+=
"
"
+
str
(
phi_val
)
fphi_str
+=
"
"
+
str
(
phi_val
)
senstype
=
self
.
senstype
senstype
=
self
.
senstype
...
@@ -642,7 +651,7 @@ class qshot(pd):
...
@@ -642,7 +651,7 @@ class qshot(pd):
rtn
.
append
(
"
qshot{5} {0} {1} {2} {3}{4}
"
.
format
(
self
.
name
,
self
.
num_demods
,
fphi_str
,
self
.
node
.
name
,
alt_str
,
senstype
))
rtn
.
append
(
"
qshot{5} {0} {1} {2} {3}{4}
"
.
format
(
self
.
name
,
self
.
num_demods
,
fphi_str
,
self
.
node
.
name
,
alt_str
,
senstype
))
if
self
.
scale
!=
None
:
if
self
.
scale
!=
None
:
rtn
.
append
(
"
scale {1} {0}
"
.
format
(
self
.
name
,
self
.
scale
))
rtn
.
append
(
"
scale {1} {0
:.16g
}
"
.
format
(
self
.
name
,
self
.
scale
))
for
p
in
self
.
_params
:
for
p
in
self
.
_params
:
rtn
.
extend
(
p
.
getFinesseText
())
rtn
.
extend
(
p
.
getFinesseText
())
...
@@ -679,7 +688,7 @@ def xd(Detector):
...
@@ -679,7 +688,7 @@ def xd(Detector):
rtn
.
append
(
"
xd {0} {1} {2}
"
.
format
(
self
.
name
,
self
.
component
,
self
.
motion
))
rtn
.
append
(
"
xd {0} {1} {2}
"
.
format
(
self
.
name
,
self
.
component
,
self
.
motion
))
if
self
.
scale
!=
None
:
if
self
.
scale
!=
None
:
rtn
.
append
(
"
scale {1} {0}
"
.
format
(
self
.
name
,
self
.
scale
))
rtn
.
append
(
"
scale {1} {0
:.16g
}
"
.
format
(
self
.
name
,
self
.
scale
))
for
p
in
self
.
_params
:
for
p
in
self
.
_params
:
rtn
.
extend
(
p
.
getFinesseText
())
rtn
.
extend
(
p
.
getFinesseText
())
...
...
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