Catalogue maker (catalogue_maker)

Make discrete catalogues from observed or simulated realisations.

SourceCatalogue(*args, **kwargs)

Catalogue from external sources.

RandomCatalogue(*args, **kwargs)

Uniform random catalogue.

SphericalFKPCatalogue(radius[, …])

FKP-style paired catalogues in a spherical domain.

spherical_indicator(cartesian_position, …)

Indicate whether an object lies within the a spherical domain centred at the origin.


harmonia.mapper.catalogue_maker.spherical_indicator(cartesian_position, bounding_radius)[source]

Indicate whether an object lies within the a spherical domain centred at the origin.

Parameters
  • cartesian_position (float, array_like) – Object position in Cartesian coordinates.

  • bounding_radius (float) – Bounding radius of the spherical domain.

Returns

True if the objection position lies within the spherical domain.

Return type

bool numpy.ndarray

class harmonia.mapper.catalogue_maker.SphericalFKPCatalogue(radius, data_catalogue=None, source_file=None, source_kwargs=None, random_catalogue=None, contrast=None, mask=None, selection=None, weight=None, random_seed=None, apply_selection_as_veto=False)[source]

FKP-style paired catalogues in a spherical domain.

Parameters
  • data_catalogue (SourceCatalogue or None, optional) – Data catalogue. Cannot be None (default) unless source_file and source_kwargs are provided as an alternative to read the catalogue source file.

  • source_file (str or None, optional) – Catalogue source file path. This can only be None (default) if data_catalogue is already provided.

  • source_kwargs (dict or None, optional) – Parameters to pass to SourceCatalogue. This can only be None (default) if data_catalogue is already provided.

  • random_catalogue (nbodykit.base.catalog.CatalogSource or None, optional) – Random catalogue (default is None).

  • contrast (float or None, optional) – Mean density contrast compared to the data catalogue used to generate a random catalogue (default is None). Ignored if random_catalogue is provided.

  • mask (callable or None, optional) – Any veto mask function to be applied to both the data and random catalogues. Must be a function of 3-d Cartesian coordinates only, assuming the origin is at the centre of the catalogues.

  • selection (callable or None, optional) – Any selection function (normalised to unity) to be applied to both the data and random catalogues. Must be a function of 3-d Cartesian coordinates only, assuming the origin is at the centre of the catalogues.

  • weight (callable or None, optional) – Any weight function to be applied to both the data and random catalogues. Must be a function of 3-d Cartesian coordinates only, assuming the origin is at the centre of the catalogues.

  • random_seed (int or None, optional) – Random seed of the random catalogue (default is None).

  • apply_selection_as_veto (bool, optional) – If True (default is False), selection returning boolean values is applied to the ‘Selection’ column of the catalogues instead of the ‘NZ’ column (see nbodykit documentation for this peculiarity.)

Variables

Notes

If selection is provided, it must be normalised to the overall mean number density of the data catalogue.