hpmcm.object module

class hpmcm.object.ObjectData(cluster, object_id, mask, recurse=0)[source]

Bases: object

Small class to define ‘Objects’, i.e., sets of associated sources

Parameters:
  • cluster (ClusterData)

  • object_id (int)

  • mask (np.ndarray | None)

  • recurse (int)

parent_cluster

Parent cluster that this object is build from

Type:

ClusterData

object_id

Unique object identifier

Type:

int

mask

Mask of which source in parent cluster are in this object

Type:

np.ndarray[bool]

catalog_id

Indicies showing which catalog each source belongs to

Type:

np.ndarray[int]

n_src

Number of sources in this object

Type:

int

n_unique

Number of catalogs contributing to this object

Type:

int

data

Data the sources in this object

Type:

pandas.DataFrame

recurse

Recursion level needed to make this object

Type:

int

x_cent

X Centeroid of this object in global pixel coordinates

Type:

float

y_cent

Y Centeroid of this object in global pixel coordinates

Type:

float

rms_dist

RMS distance of sources to the centroid

Type:

float

dist_2

Distances of sources to the centroid

Type:

np.ndarray

extract()[source]

Extract data from parent cluster

Return type:

None

hasRefCatalog(ref_cat_id=0)[source]

Is there a source from the reference catalog

Return type:

bool

Parameters:

ref_cat_id (int)

sourceIds()[source]

Return the source ids for the sources in the object

Return type:

ndarray

sourceIdxs()[source]

Return the source indices for the sources in the object

Return type:

ndarray

property x_cluster: ndarray

Return the x-position of the sources within the footprint

property x_pix: ndarray

Return the x-position of the sources within the cell

property y_cluster: ndarray

Return the y-position of the sources within the footprint

property y_pix: ndarray

Return the y-position of the sources within the cell

class hpmcm.object.ShearObjectData(cluster, object_id, mask, recurse=0)[source]

Bases: ObjectData

Subclass of ObjectData that can compute shear statisitics

Parameters:
  • cluster (ClusterData)

  • object_id (int)

  • mask (np.ndarray | None)

  • recurse (int)

shearStats()[source]

Return the shear statistics

Return type:

dict