Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pyLIAF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Nunez Barreto
pyLIAF
Commits
1a439271
Commit
1a439271
authored
Jun 12, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dummies de dispositivos
parent
52acfe80
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
dummies.py
pyLIAF/artiq/dummies.py
+26
-0
No files found.
pyLIAF/artiq/dummies.py
0 → 100644
View file @
1a439271
import
time
from
random
import
normalvariate
import
numpy
as
np
from
scipy.stats
import
poisson
__all__
=
[
"PMT"
,
"RedPitaya"
]
class
PMT
:
#{{{
def
__init__
(
self
,
mean
=
50
):
self
.
mean
=
mean
def
count
(
self
):
return
poisson
.
rvs
(
self
.
mean
)
def
change_mean
(
self
,
new_mean
):
self
.
mean
=
new_mean
# }}}
class
RedPitaya
:
#{{{
def
__init__
(
self
,
mean
=
10.
,
std
=
1.
):
self
.
mean
=
mean
self
.
std
=
std
def
give_measurement
(
self
):
return
self
.
mean
+
normalvariate
(
0
,
1
)
*
self
.
std
#}}}
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