Objects Detections

Everything related to objects detection is documented bellow:

hostphot.objects_detect.extract_objects(data, err, host_ra, host_dec, threshold, img_wcs)

Extracts objects and their ellipse parameters. The function sep.extract() is used.

Parameters
  • data (2D array) – Image data.

  • err (2D array) – Background error of the image.

  • host_ra (float) – Host-galaxy Right ascension of the galaxy in degrees.

  • host_dec (float) – Host-galaxy Declination of the galaxy in degrees.

  • threshold (float) – Source with flux above threshold*bkg_rms are extracted. See sep.extract() for more information.

Returns

  • gal_obj (numpy array) – Galaxy object extracted.

  • nogal_objs (numpy array) – All objects extracted except for the galaxy.

hostphot.objects_detect.find_gaia_objects(ra, dec, img_wcs, rad=0.15)

Finds objects using the Gaia DR3 catalog for the given coordinates in a given radius.

Parameters
  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • img_wcs (WCS object) – WCS of an image.

  • rad (float, default 0.15) – Search radius in degrees.

Returns

gaia_coord – Coordinates of the objects found.

Return type

SkyCoor object

hostphot.objects_detect.find_catalog_objects(ra, dec, img_wcs, rad=0.15)

Finds objects using the TESS image cutouts (Tic) catalog for the given coordinates in a given radius.

Note: this catalog includes objects from these sources:

HIP, TYC, UCAC, TWOMASS, SDSS, ALLWISE, GAIA, APASS, KIC

Parameters
  • ra (float) – Right ascension in degrees.

  • dec (float) – Declination in degrees.

  • img_wcs (WCS object) – WCS of an image.

  • rad (float, default 0.15) – Search radius in degrees.

Returns

cat_coord – Coordinates of the objects found.

Return type

SkyCoor object

hostphot.objects_detect.cross_match(objects, img_wcs, coord, dist_thresh=1.0)

Cross-matches objects with a given set of coordinates. Those with a distance of less than dist_thresh are selected.

Parameters
  • objects (array) – Objects detected with sep.extract().

  • img_wcs (WCS) – WCS of the image from which the objects where extracted.

  • coord (SkyCoor object) – Coordinates for the cross-match.

  • dist_thresh (float, default 1.0) – Distance in arcsec to crossmatch the objects with the given coordinates.

hostphot.objects_detect.plot_detected_objects(data, objects, scale, img_wcs, ra=None, dec=None, outfile=None)

Plots the objects extracted with sep.extract()`().

Parameters
  • data (2D array) – Data of an image.

  • objects (array) – Objects detected with sep.extract().

  • scale (float) – Scale of the ellipse’s semi-mayor and semi-minor axes.

  • img_wcs (WCS) – Image’s WCS.

  • ra (float, default None) – Right ascension of an object, in degrees. Used for plotting the position of the object.

  • dec (float, default None) – Declination of an object, in degrees. Used for plotting the position of the object.

  • outfile (str, default None) – If given, path where to save the output figure.