From 22df35458803ce4f8e634a396e149bc91f8d0168 Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Sat, 29 Jun 2024 01:28:30 +0200 Subject: [PATCH] DOC: update docstrings for `ignore_blank`, `writeto()` --- astropy/io/fits/hdu/base.py | 8 ++++---- astropy/io/fits/hdu/image.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/astropy/io/fits/hdu/base.py b/astropy/io/fits/hdu/base.py index c2847d09cbf6..8c450cbabab5 100644 --- a/astropy/io/fits/hdu/base.py +++ b/astropy/io/fits/hdu/base.py @@ -374,7 +374,7 @@ def readfrom(cls, fileobj, checksum=False, ignore_missing_end=False, **kwargs): def writeto(self, name, output_verify="exception", overwrite=False, checksum=False): """ Write the HDU to a new file. This is a convenience method to - provide a user easier output interface if only one HDU needs + provide a user friendly output interface if only one HDU needs to be written to a file. Parameters @@ -1600,9 +1600,9 @@ def match_header(cls, header): def writeto(self, name, output_verify="exception", overwrite=False, checksum=False): """ - Works similarly to the normal writeto(), but prepends a default - `PrimaryHDU` are required by extension HDUs (which cannot stand on - their own). + Works similarly to :func:`_BaseHDU.writeto`, but prepends a default + `PrimaryHDU` as required by extension HDUs (which cannot be written + on their own). """ from .hdulist import HDUList from .image import PrimaryHDU diff --git a/astropy/io/fits/hdu/image.py b/astropy/io/fits/hdu/image.py index d8eb7991e241..c8f01e257c94 100644 --- a/astropy/io/fits/hdu/image.py +++ b/astropy/io/fits/hdu/image.py @@ -779,9 +779,9 @@ def _convert_pseudo_integer(self, data): Handle "pseudo-unsigned" integers, if the user requested it. Returns the converted data array if so; otherwise returns None. - In this case case, we don't need to handle BLANK to convert it to NAN, - since we can't do NaNs with integers, anyway, i.e. the user is - responsible for managing blanks. + Handling of BLANK is done outside of this function on the converted + uint data, meaning that BLANK needs to be shifted by BZERO as well + before conversion of the corresponding values to NaN. """ dtype = self._dtype_for_bitpix() # bool(dtype) is always False--have to explicitly compare to None; this