Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qutil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qutech
qutil
Commits
d951bc1d
Commit
d951bc1d
authored
1 year ago
by
Tobias Hangleiter
Browse files
Options
Downloads
Plain Diff
Merge branch 'bugfixes' into 'master'
Bugfixes See merge request
!112
parents
557dc688
e3ab151e
Branches
Branches containing commit
No related tags found
1 merge request
!112
Bugfixes
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
qutil/functools.py
+11
-1
11 additions, 1 deletion
qutil/functools.py
qutil/image.py
+1
-1
1 addition, 1 deletion
qutil/image.py
qutil/signal_processing/real_space.py
+4
-3
4 additions, 3 deletions
qutil/signal_processing/real_space.py
with
16 additions
and
5 deletions
qutil/functools.py
+
11
−
1
View file @
d951bc1d
...
...
@@ -65,6 +65,7 @@ class FunctionChain:
Args:
*args: Positional arguments that get passed to each function besides the previous function
'
s return value.
**kwargs: Keyword arguments that get passed to each function.
Returns:
...
...
@@ -96,7 +97,16 @@ def chain(*functions: callable, n_args: int = 1, inspect_kwargs: bool = False) -
5
Args:
*functions: Functions to be chained.
*functions : callable
Functions to be chained.
n_args : int
Number of arguments accepted and returned by functions.
inspect_kwargs : bool
If true, only pass kwargs actually accepted by the functions.
Inspects the signature and therefore has some overhead.
Returns:
Callable object that chains arguments.
"""
...
...
This diff is collapsed.
Click to expand it.
qutil/image.py
+
1
−
1
View file @
d951bc1d
...
...
@@ -66,5 +66,5 @@ def convert_tiff(file: _pathT, fps: float, format: str = '.mp4', threads: Option
data
=
np
.
broadcast_to
(
data
,
data
.
shape
[:
3
]
+
(
3
,))
clip
=
ImageSequenceClip
(
list
(
data
),
fps
=
fps
)
clip
.
write_videofile
(
out_name
,
fps
,
audio
=
False
,
threads
=
threads
,
clip
.
write_videofile
(
str
(
out_name
)
,
fps
,
audio
=
False
,
threads
=
threads
,
logger
=
logger
)
This diff is collapsed.
Click to expand it.
qutil/signal_processing/real_space.py
+
4
−
3
View file @
d951bc1d
...
...
@@ -441,8 +441,8 @@ def _fft_helper(x, win, detrend_func, normalize_func, nperseg, noverlap, nfft, s
# Detrend and normalize each data segment individually
result
=
normalize_func
(
detrend_func
(
result
))
# Apply window by multiplication
result
*
=
win
# Apply window by multiplication
. No inplace op here since result might have uncastable type
result
=
win
*
result
# Perform the fft. Acts on last axis by default. Zero-pads automatically
if
sides
==
'
twosided
'
:
...
...
@@ -451,4 +451,5 @@ def _fft_helper(x, win, detrend_func, normalize_func, nperseg, noverlap, nfft, s
result
=
result
.
real
func
=
fft
.
rfft
return
func
(
result
,
n
=
nfft
,
workers
=
workers
)
# Can overwrite because a new array is created above
return
func
(
result
,
n
=
nfft
,
workers
=
workers
,
overwrite_x
=
True
)
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