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

Memory-handling for feathering large cubes #34

Merged
merged 30 commits into from
May 24, 2022

Conversation

e-koch
Copy link
Contributor

@e-koch e-koch commented May 19, 2022

Continuation of #25.

  • Add memmap feature
  • Dask-enabled cube feathering
  • Add docs page on using memmap and for enabling dask use
  • Also add general cube feathering docs.
  • Handling for varying res cube (but NOT with dask yet)

@e-koch e-koch changed the title Memory-handling for feathering large cubes WIP: Memory-handling for feathering large cubes May 20, 2022
@e-koch e-koch changed the title WIP: Memory-handling for feathering large cubes Memory-handling for feathering large cubes May 23, 2022
@e-koch e-koch requested a review from keflavich May 23, 2022 19:11
@e-koch
Copy link
Contributor Author

e-koch commented May 23, 2022

@keflavich -- This is ready for a first review. VaryingRes cubes aren't handle yet, and there's a couple places where the memory handling might break (needing to reproject the SD cube). But the critical tests pass and it's in good enough shape to start stress-testing locally.

expensive, the spectral-cube dask integration exposes an option to save temporary
intermediate products as zarr files. This is especially useful when rechunking the
data to optimize different computations (e.g., spectral versus spatial regridding.)
To enable this mode, `use_save_to_tmp_dir` can be enabled in `~uvcombine.feather_simple_cube`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To enable this mode, `use_save_to_tmp_dir` can be enabled in `~uvcombine.feather_simple_cube`.
To enable this mode, [`use_save_to_tmp_dir`](https://spectral-cube.readthedocs.io/en/latest/dask.html#saving-intermediate-results-to-disk) can be enabled in `~uvcombine.feather_simple_cube`.

or... how do you do it with intersphinx? I can't remember. Argh.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Think I've fixed this now...

docs/feathering_cubes.rst Outdated Show resolved Hide resolved
uvcombine/tests/test_feather.py Show resolved Hide resolved
uvcombine/uvcombine.py Show resolved Hide resolved
uvcombine/uvcombine.py Outdated Show resolved Hide resolved
uvcombine/uvcombine.py Outdated Show resolved Hide resolved
uvcombine/uvcombine.py Outdated Show resolved Hide resolved
uvcombine/uvcombine.py Outdated Show resolved Hide resolved
uvcombine/uvcombine.py Show resolved Hide resolved
@e-koch e-koch requested a review from keflavich May 24, 2022 16:18
@e-koch
Copy link
Contributor Author

e-koch commented May 24, 2022

@keflavich -- Added some more checks and such. I think this is feature complete now and is at least running on ~few GB cubes for feathering, w/ and w/o dask.

Dask VRSC isn't handled yet. I think that should be revisited later to get these adds wrapped up.

@e-koch e-koch merged commit a10e664 into radio-astro-tools:master May 24, 2022
@e-koch e-koch deleted the feather_big_cubes branch May 24, 2022 22:47
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