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 11 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 functionality to handle time-series files with different resolutions in the diff.py script. It adds the ability to resample datasets to a common resolution before performing differencing operations. This is achieved by integrating the resize function from the skimage.transform module. The changes ensure that users can force the differencing of files with different sizes using a --force option. Additionally, the readfile.read() function is updated to include a resize2shape argument, allowing for direct resizing of datasets during reading.

Suggestion

  1. Documentation: It would be beneficial to update the documentation to include examples and explanations of the new resize2shape argument and the --force option in diff.py.
  2. Error Handling: Consider adding more descriptive error messages or warnings when resizing operations might lead to significant data loss or distortion.
  3. Testing: Ensure comprehensive tests are added to verify the functionality of the new features, especially the resizing and differencing operations with various file sizes and resolutions.
  4. Performance: Evaluate the performance impact of the resizing operation on 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
[email protected]

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