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

Added Discrete Cosine Transform and Tests #480

Merged
merged 15 commits into from
Feb 18, 2023

Conversation

dikwickley
Copy link
Contributor

Added the DCT operator.
Example is yet to be added.
issue: #46

@mrava87
Copy link
Collaborator

mrava87 commented Feb 2, 2023

Alright, very good start :)

I see you fail the flake8 test. Please run pre-commit on your codes before commiting/pushing as explained here https://pylops.readthedocs.io/en/latest/installation.html#install-pre-commit-hooks

Also, i reccomend to look at https://pylops.readthedocs.io/en/stable/api/generated/pylops.signalprocessing.DWT.html#pylops.signalprocessing.DWT as a guideline when you write the docstring (especially the Notes section), right now it’s a bit rough

Apart from these minor issue, the PR looks very good :) I’ll start and review and give you details comments on the code itself

pylops/transforms/__init__.py Outdated Show resolved Hide resolved
pylops/transforms/__init__.py Outdated Show resolved Hide resolved
pylops/transforms/discreetcosine.py Outdated Show resolved Hide resolved
pylops/transforms/discreetcosine.py Outdated Show resolved Hide resolved
pytests/test_transforms.py Outdated Show resolved Hide resolved
pytests/test_transforms.py Outdated Show resolved Hide resolved
pytests/test_transforms.py Outdated Show resolved Hide resolved
@dikwickley
Copy link
Contributor Author

@mrava87 @cako I have moved dct to signalprocessing. exposed more functionality from the scipy dctn. added more test cases.

@dikwickley dikwickley changed the title Added Discreet Cosine Transform and Tests Added Discrete Cosine Transform and Tests Feb 4, 2023
@mrava87
Copy link
Collaborator

mrava87 commented Feb 4, 2023

Alright, great! Can you please also reply to each of the comments above so it’s easier for us to check that you have implemented the suggested changes.

Also please add the example in the meantime so we can have everything in one PR 😀

@mrava87
Copy link
Collaborator

mrava87 commented Feb 4, 2023

Great work!

I left a few more comments. Once you have taken those into account and added the example, we should be ready to go :)

@mrava87
Copy link
Collaborator

mrava87 commented Feb 5, 2023

@dikwickley I went through your PR and made some minor changes trying to improve its consistency with the rest of Pylops's codebase.

I suggest we wait until @cako takes a look as well, after that it is perhaps better if you make a brand new PR making sure you start from the latest dev (right now for example your doc conf.py file is not the latest one - old documentation).

Copy link
Collaborator

@cako cako left a comment

Choose a reason for hiding this comment

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

Excellent PR. Most of the changes are relatively cosmetic, with the exception of no touching .pre-commit-config.yaml. But they should all be very straighforward. Thanks!

.pre-commit-config.yaml Outdated Show resolved Hide resolved
pylops/signalprocessing/dct.py Show resolved Hide resolved
pylops/signalprocessing/dct.py Outdated Show resolved Hide resolved
pylops/signalprocessing/dct.py Show resolved Hide resolved
pytests/test_dct.py Outdated Show resolved Hide resolved
pytests/test_dct.py Outdated Show resolved Hide resolved
pytests/test_dct.py Outdated Show resolved Hide resolved
pytests/test_dct.py Outdated Show resolved Hide resolved
@cako cako merged commit 3cf1601 into PyLops:dev Feb 18, 2023
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