Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add auto-tiling and fix weighting after merging #7

Merged
merged 23 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5351226
add auto-tiling and fix weighting after merging
renerichter Sep 27, 2021
fdc38c8
add minimal overlap
renerichter Sep 29, 2021
6db742e
Merge remote-tracking branch 'origin/master' into renerichter-rl
the-lay Nov 8, 2021
c10c04c
Code linting
the-lay Nov 9, 2021
a14beea
Added ndarray types; Throw an exception in case of non-matching data.…
the-lay Nov 18, 2021
ab58cd3
Removing flattop window since it has negative values
the-lay Nov 18, 2021
46e948b
Code linting
the-lay Nov 19, 2021
a6e56e4
Added dtype keyword to Merger that specifies dtype of data buffer
the-lay Dec 10, 2021
4474666
Added apply_padding method; overlap now can be given as a numpy array
the-lay Dec 10, 2021
3640e2d
Small documentation fixes
the-lay Dec 10, 2021
ae79a80
Saving Merger data_visits is now optional
the-lay Dec 10, 2021
ebac20a
Fixed data visits check
the-lay Dec 10, 2021
51cc98c
Added an uncovered edge case test
the-lay Dec 11, 2021
5eee24b
Added test for Merger with disabled save_visits
the-lay Dec 11, 2021
aa86420
Refactored normalization by weights in merging
the-lay Dec 11, 2021
69ab5c9
Fixed explicit padding for odd data shapes
the-lay Dec 11, 2021
d0a559e
Hiding division by zero warning when normalizing by weight
the-lay Dec 11, 2021
f0b1f9b
Code linting
the-lay Dec 11, 2021
bd1cd9e
Updated documentation
the-lay Dec 11, 2021
f032b09
Fixing trying to submit coveralls on pull requests
the-lay Dec 11, 2021
054b5d7
Teaser image generated script now actually tiles and merges the image :)
the-lay Dec 11, 2021
a02c0c6
Merger buffer dtypes are now hardcoded, optional casting to specified…
the-lay Dec 11, 2021
c230be4
Refactored extra padding system and updated examples
the-lay Dec 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removing flattop window since it has negative values
  • Loading branch information
the-lay committed Nov 18, 2021
commit ab58cd37227b822cbb830ffd0304b6bd299ebf89
27 changes: 0 additions & 27 deletions tests/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,33 +160,6 @@ def test_basic(self):
)


class TestFlatTop(unittest.TestCase):
def test_basic(self):
np.testing.assert_allclose(
_windows._flattop(6),
[
-0.000421051,
-0.0677142520762119,
0.6068721525762117,
0.6068721525762117,
-0.0677142520762119,
-0.000421051,
],
)
np.testing.assert_allclose(
_windows._flattop(7),
[
-0.000421051,
-0.051263156,
0.19821053,
1.0,
0.19821053,
-0.051263156,
-0.000421051,
],
)


class TestBartlett(unittest.TestCase):
def test_basic(self):
np.testing.assert_allclose(_windows._bartlett(6), [0, 0.4, 0.8, 0.8, 0.4, 0])
Expand Down
15 changes: 0 additions & 15 deletions tiler/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,6 @@ def _blackmanharris(m: int):
return _general_cosine(m, [0.35875, 0.48829, 0.14128, 0.01168])


def _flattop(m: int):
"""Return a flat top window.

Args:
m (int): Number of points in the output window. If zero or less, an empty array is returned.

Returns:
np.ndarray: a flat top window
"""
return _general_cosine(
m, [0.21557895, 0.41663158, 0.277263158, 0.083578947, 0.006947368]
)


def _bartlett(m: int):
"""Return a Bartlett window.

Expand Down Expand Up @@ -228,7 +214,6 @@ def _hamming(m: int):
"blackman": _blackman,
"nuttall": _nuttall,
"blackmanharris": _blackmanharris,
"flattop": _flattop,
"bartlett": _bartlett,
"hann": _hann,
"barthann": _barthann,
Expand Down
3 changes: 0 additions & 3 deletions tiler/merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class Merger:
"hamming",
"hann",
"bartlett",
"flattop",
"parzen",
"bohman",
"blackmanharris",
Expand All @@ -39,8 +38,6 @@ class Merger:
Hann window.
- 'bartlett'
Bartlett window.
- 'flattop'
Flat top window.
- 'parzen'
Parzen window.
- 'bohman'
Expand Down