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
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
Sebastian Steinlechner
pykat
Commits
5a34780d
Commit
5a34780d
authored
11 years ago
by
Sean Leavey
Browse files
Options
Downloads
Patches
Plain Diff
Implemented scale and pdtype for detector pd
parent
8c01a414
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
+15
-2
15 additions, 2 deletions
pykat/detectors.py
with
15 additions
and
2 deletions
pykat/detectors.py
+
15
−
2
View file @
5a34780d
...
@@ -24,7 +24,7 @@ class Detector(object) :
...
@@ -24,7 +24,7 @@ class Detector(object) :
self
.
__node
=
None
self
.
__node
=
None
self
.
_params
=
[]
self
.
_params
=
[]
self
.
_mask
=
{}
self
.
_mask
=
{}
self
.
__scale
=
""
self
.
__scale
=
None
if
node
.
find
(
'
*
'
):
if
node
.
find
(
'
*
'
):
self
.
_alternate_beam
=
True
self
.
_alternate_beam
=
True
...
@@ -81,12 +81,14 @@ class Detector(object) :
...
@@ -81,12 +81,14 @@ class Detector(object) :
class
pd
(
Detector
):
class
pd
(
Detector
):
def
__init__
(
self
,
name
,
num_demods
,
node_name
,
senstype
=
None
,
alternate_beam
=
False
,
**
kwargs
):
def
__init__
(
self
,
name
,
num_demods
,
node_name
,
senstype
=
None
,
alternate_beam
=
False
,
pdtype
=
None
,
**
kwargs
):
Detector
.
__init__
(
self
,
name
,
node_name
)
Detector
.
__init__
(
self
,
name
,
node_name
)
self
.
__num_demods
=
num_demods
self
.
__num_demods
=
num_demods
self
.
__senstype
=
senstype
self
.
__senstype
=
senstype
self
.
__alternate_beam
=
alternate_beam
self
.
__alternate_beam
=
alternate_beam
self
.
__pdtype
=
pdtype
# create the parameters for all 5 demodulations regardless
# create the parameters for all 5 demodulations regardless
# of how many the user specifies. Later we add properties to
# of how many the user specifies. Later we add properties to
# those which correspond to the number of demodulations
# those which correspond to the number of demodulations
...
@@ -130,6 +132,11 @@ class pd(Detector):
...
@@ -130,6 +132,11 @@ class pd(Detector):
self
.
__num_demods
=
value
self
.
__num_demods
=
value
self
.
__set_demod_attrs
()
self
.
__set_demod_attrs
()
@property
def
pdtype
(
self
):
return
self
.
__pdtype
@pdtype.setter
def
pdtype
(
self
,
value
):
self
.
__pdtype
=
value
def
__get_fphi
(
self
,
name
):
def
__get_fphi
(
self
,
name
):
return
getattr
(
self
,
'
_
'
+
self
.
__class__
.
__name__
+
'
__
'
+
name
)
return
getattr
(
self
,
'
_
'
+
self
.
__class__
.
__name__
+
'
__
'
+
name
)
...
@@ -196,6 +203,12 @@ class pd(Detector):
...
@@ -196,6 +203,12 @@ 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
:
rtn
.
append
(
"
scale {1} {0}
"
.
format
(
self
.
name
,
self
.
scale
))
if
self
.
pdtype
!=
None
:
rtn
.
append
(
"
pdtype {0} {1}
"
.
format
(
self
.
name
,
self
.
pdtype
))
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