class rubin_sim.maf.slicers.HealpixSubsetSlicer(nside, hpid, lon_col='fieldRA', lat_col='fieldDec', lat_lon_deg=True, verbose=True, badval=nan, use_cache=True, leafsize=100, radius=2.45, use_camera=True, camera_footprint_file=None, rot_sky_pos_col_name='rotSkyPos')

Bases: HealpixSlicer

A spatial slicer that evaluates pointings on a subset of a healpix-based grid. The advantage of using this healpixSubsetSlicer (rather than just putting the RA/Dec values into the UserPointsSlicer, which is another valid approach) is that you preserve the full healpix array. This means you could do things like calculate the power spectrum and plot without remapping into healpixels first. The downside is that you must first (externally) define the healpixels that you wish to use - the rubin_sim.featureScheduler.footprints is a useful add-on here.

When plotting with RA/Dec, the default HealpixSkyMap can be used, corresponding to {‘rot’: (0, 0, 0), ‘flip’: ‘astro’}.


The nside parameter of the healpix grid. Must be a power of 2.


The subset of healpix id’s to use to calculate the metric. Because the hpid should be defined based on a particular nside, these first two arguments are not optional for this slicer.

lon_colstr, optional

Name of the longitude (RA equivalent) column to use from the input data. Default fieldRA

lat_colstr, optional

Name of the latitude (Dec equivalent) column to use from the input data. Default fieldDec

lat_lon_degbool, optional

Flag indicating whether the lat and lon values in the input data are in degrees (True) or radians (False). Default True.

verbosebool, optional

Flag to indicate whether or not to write additional information to stdout during runtime. Default True.

badvalfloat, optional

Bad value flag, relevant for plotting. Default the np.nan value (in order to properly flag bad data points for plotting with the healpix plotting routines). This should not be changed.

use_cachebool, optional

Flag allowing the user to indicate whether or not to cache (and reuse) metric results calculated with the same set of simulated data pointings. This can be safely set to True for slicers not using maps and will result in increased speed. When calculating metric results using maps, the metadata at each individual ra/dec point may influence the metric results and so use_cache should be set to False. Default True.

leafsizeint, optional

Leafsize value for kdtree. Default 100.

radiusfloat, optional

Radius for matching in the kdtree. Equivalent to the radius of the FOV. Degrees. Default 1.75.

use_camerabool, optional

Flag to indicate whether to use the LSST camera footprint or not. Default False.

camera_footprint_filestr, optional

Name of the camera footprint map to use. Can be None, which will use the default.

rot_sky_pos_col_namestr, optional

Name of the rotSkyPos column in the input data. Only used if use_camera is True. Describes the orientation of the camera orientation compared to the sky. Default rotSkyPos.

Methods Summary

setup_slicer(sim_data[, maps])

Use sim_data[self.lon_col] and sim_data[self.lat_col] (in radians) to set up KDTree.

Methods Documentation

setup_slicer(sim_data, maps=None)

Use sim_data[self.lon_col] and sim_data[self.lat_col] (in radians) to set up KDTree.


The simulated data, including the location of each pointing.

mapslist of rubin_sim.maf.maps objects, optional

List of maps (such as dust extinction) that will run to build up additional metadata at each slice_point. This additional metadata is available to metrics via the slice_point dictionary. Default None.