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

diff: support time-series files with different resolutions #1268

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

eedyyidi
Copy link

@eedyyidi eedyyidi commented Sep 9, 2024

support time-series files with different resolutions: diff.py
timeseries_SET.h5 file size in y/x: (361, 387)
time
ion.h5 file size in y/x: (120, 193)
ion
do diff.py timeseries_SET.h5 ion.h5 -o timeseries_SET_ion.h5 --force
timeseries_SET_ion.h5 file size in y/x: (361, 387)
diff

Reminders

  • Fix #xxxx
  • Pass Pre-commit check (green)
  • Pass Codacy code review (green)
  • Pass Circle CI test (green)
  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

Copy link

welcome bot commented Sep 9, 2024

💖 Thanks for opening this pull request! Please check out our contributing guidelines. 💖
Keep in mind that all new features should be documented. It helps to write the comments next to the code or below your functions describing all arguments, and return types before writing the code. This will help you think about your code design and usually results in better code.

@yunjunz yunjunz self-requested a review September 9, 2024 15:03
@yunjunz
Copy link
Member

yunjunz commented Sep 9, 2024

@eedyyidi thank you for the PR. Could you add an example command line usage (and let me know an example data file/path for testing offline), and check the failed checks above?

@yunjunz yunjunz changed the title Add diff resampling diff: support time-series files with different resolutions Sep 15, 2024
yunjunz and others added 4 commits September 20, 2024 16:52
+ utils.readfile.read(): add `resize2shape` argument to support resizing directly, to facilitate the differencing between two files with different size/resolution.
Copy link

codeautopilot bot commented Nov 21, 2024

PR summary

This Pull Request introduces a new feature to handle time-series files with different resolutions in the diff.py module. The primary change is the addition of a resampling function that allows for the differencing of time-series data even when the files have different sizes or resolutions. This is achieved by resizing the data from one file to match the dimensions of the other before performing the differencing operation. The changes also include updates to the readfile.read() function to support resizing directly, which facilitates this new functionality. The implications of this PR are significant for users who need to compare datasets of varying resolutions, as it automates the resampling process and ensures compatibility between different datasets.

Suggestion

  1. Consider adding unit tests to verify the correctness of the resampling functionality and ensure that the differencing operation produces expected results across various scenarios.
  2. Provide more detailed documentation or examples on how to use the new resampling feature, especially for users unfamiliar with handling datasets of different resolutions.
  3. Evaluate the performance impact of the resampling process, especially for large datasets, and consider optimizations if necessary.

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 0.00%

Have feedback or need help?
Discord
Documentation
support@codeautopilot.com

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