generate_catalog

generate_catalog#

generate_catalog(n_base, n_layer, seed=None, ra_range=(0.0, 360.0), dec_range=(-90, 90), search_region=None, **kwargs)[source]#

Generates a toy catalog.

Parameters:
n_baseint

The number of rows to generate for the base layer

n_layerint, or dict

The number of rows per n_base row to generate for a nested layer. Alternatively, a dictionary of layer label, layer_size pairs may be specified to created multiple nested columns with custom sizing.

seedint

A seed to use for random generation of data

ra_rangetuple

A tuple of the min and max values for the ra column in degrees

dec_rangetuple

A tuple of the min and max values for the dec column in degrees

search_regionAbstractSearch

A search region to apply to the generated data. Currently supports the ConeSearch and BoxSearch regions. Note that if provided, this will override the ra_range and dec_range parameters.

**kwargs

Additional keyword arguments to pass to lsdb.from_dataframe.

Returns:
Catalog

The constructed LSDB Catalog.

Examples

>>> from lsdb.nested.datasets import generate_catalog
>>> gen_cat = generate_catalog(10,100)
>>> gen_cat = generate_catalog(1000, 10, ra_range=(0.,10.), dec_range=(-5.,0.))

Constraining spatial ranges:

>>> gen_cat = generate_data(10, 100, ra_range=(0., 10.), dec_range=(-5., 0.))

Using a search region:

>>> from lsdb import ConeSearch
>>> gen_cat = generate_data(10, 100, search_region=ConeSearch(5, 5, 1))