-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map Creation Error when norm_kwargs dictionary is sparse. #84
Comments
Thanks for reporting. I will look into this. |
It looks the # Normalization kwargs
norm_kwargs = {
'F200W.fits':dict(stretch='log',min_percent=30, max_percent=99.9),
'Segmentation.png':dict(stretch='log',min_percent=10, max_percent=99.9) # this image shouldn't have any norm kwargs
} Do you get the same error if you give a norm kwargs map for just the fits files? The code doesn't currently validate the I will add some norm_kwargs validation. In the mean time, you need to provide either:
or
|
It does not give me an error when I only include the FITS files. However, it also does not give me an error when I include some of the PNGs and FITS files, only certain combinations cause errors. For example: norm_kwargs={
'RGB.png':dict(stretch="log",min_percent=30,max_percent=99.9),
'F200W.fits':dict(stretch="log",min_percent=30,max_percent=99.9),
'F200W-307.0.fits':dict(stretch="log",min_percent=30,max_percent=99.9),
'Segmentation.png':dict(stretch="log",min_percent=30,max_percent=99.9)
} causes no errors. |
Thanks for checking. It will only give the error when there is a FITS file that doesn't contain an entry in the dictionary. The offending code is here: image_engine = IMG_ENGINE_MPL if file_location.endswith(".fits") else IMG_ENGINE_PIL
if image_engine == IMG_ENGINE_MPL:
image_norm = norm_kwargs.get(os.path.basename(file_location), norm_kwargs)
mpl_norm, mpl_cmap = build_mpl_objects(array.array, image_norm) If you put a PNG in there it won't ever get checked because the code only uses the I need to add some code to validate the Thanks again for reporting! |
Ah okay I understand now, thanks for checking! |
There is some unpredictable behavior with a per-file norm_kwargs dictionary.
I have a directory with the following structure:
The following code snippet results in the following error:
The error occurs after converting the F200W.fits file and the index.html file is not created.
Behaviour is a little unpredictable, depending on which files are called as input, their order, and how many are used in the
norm_kwargs
file.The text was updated successfully, but these errors were encountered: