File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,9 @@ def fits_cutouts(self) -> List[fits.HDUList]:
114114 try :
115115 from stdatamodels import asdf_in_fits
116116 except ModuleNotFoundError :
117- warnings .warn ('The `stdatamodels` package is required for ASDF-in-FITS embedding. Skipping embedding for these cutouts. '
118- 'To install astrocut with optional `stdatamodels` support, run: pip install "astrocut[all]"' , ModuleWarning )
117+ warnings .warn ('The `stdatamodels` package is required for ASDF-in-FITS embedding. '
118+ 'Skipping embedding for these cutouts. To install astrocut with optional '
119+ '`stdatamodels` support, run: pip install "astrocut[all]"' , ModuleWarning )
119120 self ._supports_stdatamodels = False
120121 else :
121122 warnings .warn ('ASDF-in-FITS embedding requires Python 3.11 or higher. '
@@ -131,7 +132,7 @@ def fits_cutouts(self) -> List[fits.HDUList]:
131132
132133 # Create a primary FITS header to hold data and WCS
133134 primary_hdu = fits .PrimaryHDU (data = cutout .data , header = cutout .wcs .to_header (relax = True ))
134- primary_hdu .header ['ORIG_FLE' ] = file # Add original file to header
135+ primary_hdu .header ['ORIG_FLE' ] = str ( file ) # Add original file to header
135136 hdul = fits .HDUList ([primary_hdu ])
136137
137138 if self ._supports_stdatamodels :
Original file line number Diff line number Diff line change @@ -56,4 +56,4 @@ class ModuleWarning(AstropyWarning):
5656 """
5757 Warnings to do with optional modules.
5858 """
59- pass
59+ pass
You can’t perform that action at this time.
0 commit comments