File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,11 @@ def get_annotations(o):
4747
4848from pdr .errors import AlreadyLoadedError , DuplicateKeyWarning
4949from pdr .formats import check_special_fn , special_image_constants
50- from pdr .loaders .utility import DESKTOP_IMAGE_STANDARDS
50+ from pdr .loaders .utility import (
51+ DESKTOP_IMAGE_STANDARDS ,
52+ FITS_EXTENSIONS ,
53+ looks_like_this_kind_of_file ,
54+ )
5155from pdr .parselabel .pds3 import (
5256 depointerize ,
5357 get_pds3_pointers ,
@@ -1069,7 +1073,12 @@ def dump_browse(
10691073 self [obj ].__class__ .__name__ == "ndarray"
10701074 and len (self [obj ].shape ) != 1
10711075 ):
1072- if scaled == "both" :
1076+ if looks_like_this_kind_of_file (self .filename , FITS_EXTENSIONS ) \
1077+ and (scaled == "both" or scaled is False ):
1078+ warnings .warn ("Scaling for FITS files cannot be turned "
1079+ "off, dumping scaled products." )
1080+ dump_it (self [obj ], outfile + "_scaled" )
1081+ elif scaled == "both" :
10731082 dump_it (
10741083 self .get_scaled (obj , float_dtype = fdt ),
10751084 outfile + "_scaled" ,
You can’t perform that action at this time.
0 commit comments