Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PAF Backend Simulator
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
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Niclas Esser
PAF Backend Simulator
Commits
4ad76b06
Commit
4ad76b06
authored
8 months ago
by
Niclas Esser
Browse files
Options
Downloads
Patches
Plain Diff
draft
parent
f07dd694
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
[add]: hdf5 file reader: h5reader.py
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pafsim/processor/generator.py
+8
-3
8 additions, 3 deletions
pafsim/processor/generator.py
with
8 additions
and
3 deletions
pafsim/processor/generator.py
+
8
−
3
View file @
4ad76b06
...
...
@@ -52,6 +52,8 @@ class FrontEndSimACMReader(h5.File):
def
npol
(
self
)
->
int
:
return
len
(
set
(
self
[
"
array/element_ids
"
]))
def
PafLayout
(
self
):
pass
def
exists
(
self
,
path
)
->
bool
:
if
path
in
self
:
...
...
@@ -114,14 +116,14 @@ class Generator(Processor):
self
.
duration
=
self
.
conf
.
get
(
"
duration
"
,
0.000001
)
self
.
fs
=
self
.
conf
.
get
(
"
fs
"
,
-
1
)
self
.
mode
=
self
.
conf
.
get
(
"
mode
"
,
"
wideband
"
)
self
.
reader
=
FrontEndSimACMReader
(
self
.
dataset
)
def
wideband
(
self
):
reader
=
FrontEndSimACMReader
(
self
.
dataset
)
signals
=
reader
.
signal
(
self
.
signal
)
signals
=
self
.
reader
.
signal
(
self
.
signal
)
# noise = reader.noise(self.noise)
# rfi = reader.rfi(self.rfi)
freq
=
reader
.
signal
(
self
.
signal
,
"
frequencies
"
)[
0
]
*
1e9
freq
=
self
.
reader
.
signal
(
self
.
signal
,
"
frequencies
"
)[
0
]
*
1e9
# Nyquist sample
if
self
.
fs
==
-
1
:
bw
=
freq
[
-
1
]
-
freq
[
0
]
...
...
@@ -138,6 +140,9 @@ class Generator(Processor):
def
plot
(
self
):
print
(
self
.
output
.
shape
)
def
plotPafLayout
(
self
):
self
.
reader
.
plotPaf
()
@property
def
shape
(
self
):
return
self
.
output
.
shape
...
...
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