@@ -518,7 +518,7 @@ def write_as_asdf(self, output_dir: Union[str, Path] = '.') -> List[str]:
518518 return self ._write_as_format (output_format = '.asdf' , output_dir = output_dir )
519519
520520 def write_as_zip (self , output_dir : Union [str , Path ] = '.' , filename : Union [str , Path , None ] = None ,
521- * , format : str = '.asdf' ) -> str :
521+ * , output_format : str = '.asdf' ) -> str :
522522 """
523523 Package the ASDF or FITS cutouts into a zip archive without writing intermediates.
524524
@@ -530,15 +530,15 @@ def write_as_zip(self, output_dir: Union[str, Path] = '.', filename: Union[str,
530530 Name (or path) of the output zip file. If not provided, defaults to
531531 'cutouts_{YYYYmmdd_HHMMSS}.zip'. If provided without a '.zip' suffix,
532532 the suffix is added automatically.
533- format : str, optional
533+ output_format : str, optional
534534 Either '.asdf' (default) or '.fits'. Determines which in-memory representation is zipped.
535535
536536 Returns
537537 -------
538538 str
539539 Path to the created zip file.
540540 """
541- fmt = format .lower ().strip ()
541+ fmt = output_format .lower ().strip ()
542542 fmt = '.' + fmt if not fmt .startswith ('.' ) else fmt
543543 if fmt not in ('.asdf' , '.fits' ):
544544 raise InvalidInputError ("File format must be either '.asdf' or '.fits'" )
@@ -551,7 +551,7 @@ def build_entries():
551551 arcname = self ._make_cutout_filename (file , fmt )
552552 yield arcname , objs [i ]
553553
554- return super (). write_as_zip (output_dir = output_dir , filename = filename , build_entries = build_entries )
554+ return self . _write_cutouts_to_zip (output_dir = output_dir , filename = filename , build_entries = build_entries )
555555
556556
557557def get_center_pixel (gwcsobj : gwcs .wcs .WCS , ra : float , dec : float ) -> Tuple [Tuple [int , int ], WCS ]:
0 commit comments