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

Updated ppv_cube.py to avoid deprecated function 'update_all_headers' #225

Merged
merged 3 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions yt_astro_analysis/ppv_cube/ppv_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@
w.wcs.ctype = ["LINEAR", "LINEAR", vtype]

fib = FITSImageData(self.data.transpose(), fields=self.field, wcs=w)
fib.update_all_headers("bunit", re.sub("()", "", str(self.proj_units)))
fib.update_all_headers("btype", self.field)
fib.update_header("all", "bunit", re.sub("()", "", str(self.proj_units)))
fib.update_header("all", "btype", self.field)

Check warning on line 378 in yt_astro_analysis/ppv_cube/ppv_cube.py

View check run for this annotation

Codecov / codecov/patch

yt_astro_analysis/ppv_cube/ppv_cube.py#L377-L378

Added lines #L377 - L378 were not covered by tests
if sky_scale is not None and sky_center is not None:
fib.create_sky_wcs(sky_center, sky_scale)
fib.writeto(filename, overwrite=overwrite, **kwargs)
Expand Down