Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
casparvitch committed May 20, 2024
1 parent dea3e06 commit 1676462
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions examples/magnetization/mz_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@

FIT_RES_DIR = OUTPUT_DIR + "/data/"
# set below to "" or None or False to *not* load prev fit
PREV_FIT = "" # FIT_RES_DIR[:]
# PREV_FIT = "" # FIT_RES_DIR[:]
PREV_FIT = FIT_RES_DIR[:]

# === START SCRIPT

Expand Down Expand Up @@ -213,8 +214,10 @@
b_nv_sbg,
name="sub_bg b_nvs",
opath=OUTPUT_DIR + f"b_nvs-sub_bg.{FIG_FORMAT}",
c_range_type="percentile",
c_range_values=(2, 98),
# c_range_type="percentile",
c_range_type="strict_range",
# c_range_values=(2, 98),
c_range_values=(-1.3e-6, 1.3e-6),
raw_pixel_size=raw_pixel_size,
applied_binning=ADDITIONAL_BINS,
annotate_polygons=ANNOTATE_POLYS,
Expand All @@ -225,8 +228,10 @@
dshifts,
name="dshifts",
opath=OUTPUT_DIR + f"dshifts.{FIG_FORMAT}",
c_range_type="percentile",
c_range_values=(2, 98),
# c_range_type="percentile",
c_range_type="strict_range",
# c_range_values=(2, 98),
c_range_values=(2876, 2880),
raw_pixel_size=raw_pixel_size,
applied_binning=ADDITIONAL_BINS,
)
Expand Down
2 changes: 1 addition & 1 deletion src/dukit/itool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ def get_colormap_range(

if c_range_type == "strict_range":
if (
not isinstance(c_range_vals, (float, int))
not isinstance(c_range_vals, (list, tuple))
or len(c_range_vals) != 2 # noqa: W503
or (not isinstance(c_range_vals[0], (float, int))) # noqa: W503
or (not isinstance(c_range_vals[1], (float, int))) # noqa: W503
Expand Down

0 comments on commit 1676462

Please sign in to comment.