diff --git a/astrodata/adfactory.py b/astrodata/adfactory.py index 02eff5a7..ffffe790 100644 --- a/astrodata/adfactory.py +++ b/astrodata/adfactory.py @@ -229,8 +229,8 @@ def createFromScratch( def create_from_scratch(self, phu, extensions=None): """Create an AstroData object from a collection of objects. - Parameters - ---------- + Arguments + --------- phu : `fits.PrimaryHDU` or `fits.Header` or `dict` or `list` FITS primary HDU or header, or something that can be used to create a fits.Header (a dict, a list of "cards"). diff --git a/astrodata/testing.py b/astrodata/testing.py index f12aa763..a0df7c8f 100644 --- a/astrodata/testing.py +++ b/astrodata/testing.py @@ -165,8 +165,8 @@ def get_corners(shape): This is a recursive function to calculate the corner indices of an array of the specified shape. - Parameters - ---------- + Arguments + --------- shape : tuple of ints Length of the dimensions of the array @@ -216,8 +216,8 @@ def assert_most_close( -------- :func:`~numpy.testing.assert_allclose` - Parameters - ---------- + Arguments + --------- actual : array_like Array obtained. @@ -485,8 +485,8 @@ def download_multiple_files( ): """Download multiple files from the archive and store them at a given path. - Parameters - ---------- + Arguments + --------- files : list of str List of filenames to download. @@ -701,8 +701,8 @@ def get_associated_calibrations(filename, nbias=5): This function quieries the Gemini Observatory Archive for calibrations associated with a given data file. - Parameters - ---------- + Arguments + --------- filename : str Input file name """ @@ -762,8 +762,8 @@ def run_comparison( ): """Perform a comparison between the two AD objects in this instance. - Parameters - ---------- + Arguments + --------- max_miss: int maximum number of elements in each array that can disagree @@ -1055,10 +1055,11 @@ def format_errordict(self, errordict): def ad_compare(ad1, ad2, **kwargs): """Compare the tags, headers, and pixel values of two images. - This is a wrapper for ADCompare.run_comparison() for backward-compatibility. + This is a wrapper for ADCompare.run_comparison() for + backward-compatibility. - Parameters - ---------- + Arguments + --------- ad1: AstroData first AD objects @@ -1254,8 +1255,8 @@ def test_script_file( All matches (i.e., stdout_result and stderr_result) can use regular expressions. - Parameters - ---------- + Arguments + --------- script_path : str The path to the script to be run. @@ -1358,8 +1359,8 @@ def _reg_assert(result, expected): def process_string_to_python_script(string: str) -> str: """Format a stirng to be used as a Python script. - Parameters - ---------- + Arguments + --------- string : str The string to be processed. """ @@ -1392,8 +1393,8 @@ def get_program_observations(): def expand_file_range(files: str) -> list[str]: """Expand a range of files into a list of file names. - Parameters - ---------- + Arguments + --------- files : str A range of files, e.g., "N20170614S0201-205". This would produce: diff --git a/astrodata/utils.py b/astrodata/utils.py index 589f1878..49d59f8f 100644 --- a/astrodata/utils.py +++ b/astrodata/utils.py @@ -34,8 +34,8 @@ class AstroDataDeprecationWarning(DeprecationWarning): def deprecated(reason): """Mark a function as deprecated. - Parameters - ---------- + Arguments + --------- reason : str The reason why the function is deprecated @@ -260,7 +260,12 @@ def returns_list(fn): .. code-block:: python - from astrodata import AstroData, astro_data_descriptor, returns_list, NDAstroData + from astrodata import ( + AstroData, + astro_data_descriptor, + returns_list, + NDAstroData + ) class MyAstroData(AstroData): @astro_data_descriptor @@ -431,7 +436,7 @@ def axis_dict(self): return dict(zip(self._axis_names, self)) def __getnewargs__(self): - """Return the arguments needed to create a new instance of this object.""" + """Return arguments needed to create an equivalent Section instance.""" return tuple(self) def __getattr__(self, attr): @@ -546,7 +551,8 @@ def contains(self, section): Returns ------- bool - True if the Section is entirely within this Section, otherwise False. + True if the Section is entirely within this Section, otherwise + False. Raises ------ @@ -616,8 +622,8 @@ def overlap(self, section): Notes ----- - If sections do not overlap, a warning is logged when None is returned. This is to - help with debugging, as it is often not an error condition. + If sections do not overlap, a warning is logged when None is returned. + This is to help with debugging, as it is often not an error condition. """ if self.ndim != section.ndim: raise ValueError("Sections have different dimensionality")