clevar.footprint.artificial module

clevar.footprint.artificial.create_footprint(ra, dec, nside=None, min_density=2, neighbor_fill=None, nest=False)[source]

Create footprint from (Ra, Dec). Can compute optimal NSIDE given a density and also fill holes.

Parameters
  • ra (numpy array) – Ra array in degrees

  • dec (numpy array) – Dec array in degrees

  • nside (int, None) – Number for healpix NSIDE of pixel

  • min_density (float) – Threshold density of obj./pixel to compute nside when nside is not defined

  • neighbor_fill (int, None) – Minimum number of neighbors to fill a pixel: 1<n<8, optimal is 5. If None, the holes are not filled.

  • nest (bool) – Nested ordering. If false use ring.

Returns

ftpt – Footprint

Return type

FootprintZmax object

clevar.footprint.artificial.fill_holes(ftpt, neighbor_fill, nest=False)[source]

Fill holes in a footprint mask

Parameters
  • ftpt (clevar.mask.Footprint object) – Footprint

  • pixels (numpy array) – Array with indices of healpy pixels of the footprint

  • neighbor_fill (int) – Minimum number of neighbors to fill a pixel: 1<n<8, optimal is 5

  • nest (bool) – Nested ordering. If false use ring.

Returns

ftpt – Footprint with holes filled

Return type

clevar.mask.Footprint object

clevar.footprint.artificial.fill_holes_conv(ftpt, neighbor_fill, nest=False)[source]

Interactively fill holes in a footprint mask until convergence, updates ftpt input

Parameters
  • ftpt (FootprintZmax object) – Footprint

  • neighbor_fill (int) – Minimum number of neighbors to fill a pixel: 1<n<8, optimal is 5.

  • nest (bool) – Nested ordering. If false use ring.

Returns

ftpt – Footprint with holes filled

Return type

clevar.mask.Footprint object

clevar.footprint.artificial.nside_from_density(ra, dec, min_density, nest=False)[source]

Compute NSIDE based on a minimum density

Parameters
  • ra (numpy array) – Ra array in degrees

  • dec (numpy array) – Dec array in degrees

  • min_density (float) – Threshold density of obj./pixel

  • nest (bool) – Nested ordering. If false use ring.

Returns

  • nside (int) – Number for healpix NSIDE

  • pixel_set (array) – List of pixels in footprint