Skip to content

Commit 916f8a3

Browse files
author
martinkilbinger
committed
ÂDebugging Footprint plotter vmax
1 parent df8d076 commit 916f8a3

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

cs_util/plots.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ class FootprintPlotter:
449449

450450
# Dictionary storing region parameters
451451
_regions = {
452-
"NGC": {"ra_0": 180, "extend": [120, 270, 20, 70], "vmax": 60},
453-
"SGC": {"ra_0": 15, "extend": [-20, 45, 20, 45], "vmax": 60},
454-
"fullsky": {"ra_0": 150, "extend": [0, 360, -90, 90], "vmax": 60},
452+
"NGC": {"ra_0": 180, "extend": [120, 270, 20, 70], "vmin": 0, "vmax": 60},
453+
"SGC": {"ra_0": 15, "extend": [-20, 45, 20, 45], "vmin": 0, "vmax": 60},
454+
"fullsky": {"ra_0": 150, "extend": [0, 360, -90, 90], "vmin": 0, "vmax": 60},
455455
}
456456

457457
def __init__(self, nside_coverage=32, nside_map=2048):
@@ -504,6 +504,7 @@ def plot_area(
504504
hsp_map,
505505
ra_0=0,
506506
extend=[120, 270, 29, 70],
507+
vmin=0,
507508
vmax=60,
508509
projection=None,
509510
outpath=None,
@@ -524,6 +525,8 @@ def plot_area(
524525
extend : list, optional
525526
sky region, extend=[ra_low, ra_high, dec_low, dec_high];
526527
default is [120, 270, 29, 70]
528+
vmin : float, optional
529+
minimum pixel value to plot with color; default is 0
527530
vmax : float, optional
528531
maximum pixel value to plot with color; default is 60
529532
projection : skyproj.McBrydeSkyproj
@@ -557,7 +560,12 @@ def plot_area(
557560

558561
# Create new projection
559562
projection = skyproj.McBrydeSkyproj(
560-
ax=ax, lon_0=ra_0, extent=extend, autorescale=True, vmax=vmax
563+
ax=ax,
564+
lon_0=ra_0,
565+
extent=extend,
566+
autorescale=True,
567+
vmin=vmin,
568+
vmax=vmax,
561569
)
562570
else:
563571
ax = None
@@ -596,7 +604,7 @@ def plot_region(self, hsp_map, region, projection=None, outpath=None, title=None
596604
hsp_map : hsp_HealSparseMap
597605
input map
598606
region : dict
599-
region dictionary with keys 'ra_0', 'extend', 'vmax'
607+
region dictionary with keys 'ra_0', 'extend', 'vmin', 'vmax'
600608
projection : skyproj.McBrydeSkyproj, optional
601609
if ``None`` (default), a new plot is created
602610
outpath : str, optional
@@ -620,6 +628,7 @@ def plot_region(self, hsp_map, region, projection=None, outpath=None, title=None
620628
hsp_map,
621629
region["ra_0"],
622630
region["extend"],
631+
region["vmin"],
623632
region["vmax"],
624633
projection=projection,
625634
outpath=outpath,

0 commit comments

Comments
 (0)