Skip to content
Snippets Groups Projects
Commit 8aa1ab34 authored by whooie's avatar whooie
Browse files

suppress matplotlib warning for OD render

parent 634b67c6
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import numpy.linalg as la
import lmfit
import pathlib
import toml
import warnings
import PIL.Image
import lib.plotdefs as pd
......@@ -109,6 +110,7 @@ class ImagingData:
for label, array in self.arrays.items():
if printflag: print(f"[imaging] render {label}")
if label == "od":
warnings.filterwarnings("ignore")
H, W = array.shape
(pd.Plotter()
.imshow(array,
......@@ -122,6 +124,7 @@ class ImagingData:
.savefig(T.joinpath(label + ".png"))
.close()
)
warnings.resetwarnings()
else:
PIL.Image.fromarray(array).save(T.joinpath(label + ".png"))
#if printflag: print(" Done.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment