Skip to content

skip filter feature - #29

Merged
sappelhoff merged 3 commits into
sappelhoff:masterfrom
yjmantilla:skip_multitaper
Jun 11, 2020
Merged

sappelhoff merged 3 commits into
sappelhoff:masterfrom
yjmantilla:skip_multitaper

Conversation

@yjmantilla

@yjmantilla yjmantilla commented Jun 7, 2020 •

Copy link
Copy Markdown
Collaborator

Explanation:

If the multitaper filter is skipped there is no need to remove the trend at the beginning since the trend at that point is specifically removed for the multitaper filter and then added back. So if we skip the filter we can jump directly to the robust referencing.

@yjmantilla

yjmantilla commented Jun 7, 2020 •

Copy link
Copy Markdown
Collaborator Author

This is related to #28 , also is a workaround for #18

@codecov-commenter

codecov-commenter commented Jun 7, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #29 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   97.19%   97.20%           
=======================================
  Files           6        6           
  Lines         642      643    +1     
=======================================
+ Hits          624      625    +1     
  Misses         18       18           
Impacted Files Coverage Δ
pyprep/prep_pipeline.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce25032...a12d67c. Read the comment docs.

@sappelhoff

Copy link
Copy Markdown
Owner

Cool, thanks for being so quick!

Can you add to the docstring for this method? Specifically, this part should be extended:

        - line_freqs : 1d array
            - A list of line frequencies to be removed

  • 1d array should become array_like (see docs here)
  • A list of line frequencies to be removed should become something like list of floats indicating frequencies to be remove. Can be an empty list to skip this step.

@sappelhoff

Copy link
Copy Markdown
Owner

Oh and you could add an entry into "whats new" that it's now possible to pass an empty list to skip the line noise removal. It'd go under the "changelog" header, because it's a new feature (although a small one) :)

@yjmantilla

yjmantilla commented Jun 8, 2020 •

Copy link
Copy Markdown
Collaborator Author

@sappelhoff Done, awaiting further instructions.

Weirdly it failed one test of the windows tests (prep_pipeline one). For MAC and Ubuntu it passed it. Could you look into it a bit? Being the commit so simple it surprises me that it fails.

@sappelhoff sappelhoff left a comment •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks! :) Just a few minor comments left.

Regarding the test failure --> yes, we have some randomization in our code where no seed is passed ... so on some test runs this works (randomly) and on some others it doesn't.

generally, for tests we should always do something like:

import numpy as np
rng = np.random.RandomState(12345)
rand_data = rng.randn(10, 20)

instead of

import numpy as np
rand_data = np.random.randn(10, 20)

I fixed this in two parts of the codebase already, but apparently I missed yet another part 🙄 ... I'll look into when I find some time.

Comment thread .mailmap Resolved
Comment thread docs/whats_new.rst Resolved
@sappelhoff
sappelhoff merged commit 31017f8 into sappelhoff:master Jun 11, 2020
@sappelhoff

Copy link
Copy Markdown
Owner

@yjmantilla I just committed my remaining suggestions and merged. thanks for the PR, you can read what I said at a later point when you have time again :-)

@yjmantilla

Copy link
Copy Markdown
Collaborator Author

Thank you. Indeed I have been really busy. I will be more mindful then to give a seed to the random generators of those tests. Makes a lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants