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

Dev space resample #74

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Dev space resample #74

wants to merge 29 commits into from

Conversation

oscarbates
Copy link
Contributor

Resampling ultility functions implemented, I still have to test that everything is working as expected (i.e. no rounding errors)

stride/problem/acquisitions.py Outdated Show resolved Hide resolved
stride/problem/data.py Outdated Show resolved Hide resolved
stride/problem/data.py Outdated Show resolved Hide resolved
stride/problem/data.py Outdated Show resolved Hide resolved
stride/problem/data.py Outdated Show resolved Hide resolved
stride/problem/problem.py Outdated Show resolved Hide resolved
stride/problem/problem.py Show resolved Hide resolved
stride/problem/problem.py Outdated Show resolved Hide resolved
stride/problem/problem.py Outdated Show resolved Hide resolved
stride/utils/filters.py Outdated Show resolved Hide resolved
stride/problem/data.py Show resolved Hide resolved
stride/problem/data.py Outdated Show resolved Hide resolved
stride/problem/domain.py Outdated Show resolved Hide resolved
stride/problem/domain.py Show resolved Hide resolved
stride/problem/problem.py Outdated Show resolved Hide resolved
stride/problem/problem.py Outdated Show resolved Hide resolved
stride/problem/problem.py Outdated Show resolved Hide resolved
shot.wavelets = shot.wavelets._resample(factor=old_step/new_step, new_num=new_num) # resample wavelet
shot.observed = shot.observed._resample(factor=old_step/new_step, new_num=new_num) # resample observed

shot.wavelets = shot.wavelets._resample( # resample wavelet
Copy link
Contributor

Choose a reason for hiding this comment

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

if resample is an in-place operation then you don't need to assign the result, only call the method

stride/problem/data.py Outdated Show resolved Hide resolved
@oscarbates oscarbates requested a review from ccuetom May 10, 2024 11:10
try:
del self.__dict__['grid']
except:
Copy link
Contributor

Choose a reason for hiding this comment

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

you've creared a _clear_cache method below, why are you not using it?

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.

2 participants