Images (pyobs.images)

Some info about pyobs.images.Image.

Image

class Image(data: Optional[numpy.ndarray[Any, numpy.dtype[Any]]] = None, header: Optional[astropy.io.fits.header.Header] = None, mask: Optional[numpy.ndarray[Any, numpy.dtype[Any]]] = None, uncertainty: Optional[numpy.ndarray[Any, numpy.dtype[Any]]] = None, catalog: Optional[astropy.table.table.Table] = None, meta: Optional[Dict[Any, Any]] = None, *args: Any, **kwargs: Any)

Image class.

Init a new image.

Parameters:
  • data – Numpy array containing data for image.

  • header – Header for the new image.

  • mask – Mask for the image.

  • uncertainty – Uncertainty image.

  • catalog – Catalog table.

  • meta – Dictionary with meta information (note: not preserved in I/O operations!).

Image Processors (pyobs.images.processors)

Astrometry

class Astrometry(**kwargs: Any)

Base class for astrometry processors

Init new image processor.

class AstrometryDotNet(url: str, source_count: int = 50, radius: float = 3.0, **kwargs: Any)

Perform astrometry using astrometry.net

Init new astronomy.net processor.

Parameters:
  • url – URL to service.

  • source_count – Number of sources to send.

  • radius – Radius to search in.

Source Detection

class DaophotSourceDetection(fwhm: float = 3.0, threshold: float = 4.0, bkg_sigma: float = 3.0, bkg_box_size: Tuple[int, int] = (50, 50), bkg_filter_size: Tuple[int, int] = (3, 3), **kwargs: Any)

Detect source using Daophot.

Initializes a wrapper for photutils. See its documentation for details.

Parameters:
  • fwhm – Full-width at half maximum for Gaussian kernel.

  • threshold – Threshold pixel value for detection.

  • bkg_sigma – Sigma for background kappa-sigma clipping.

  • bkg_box_size – Box size for background estimation.

  • bkg_filter_size – Filter size for background estimation.

class SepSourceDetection(threshold: float = 1.5, minarea: int = 5, deblend_nthresh: int = 32, deblend_cont: float = 0.005, clean: bool = True, clean_param: float = 1.0, **kwargs: Any)

Detect sources using SEP.

Initializes a wrapper for SEP. See its documentation for details.

Highly inspired by LCO’s wrapper for SEP, see: https://github.com/LCOGT/banzai/blob/master/banzai/photometry.py

Parameters:
  • threshold – Threshold pixel value for detection.

  • minarea – Minimum number of pixels required for detection.

  • deblend_nthresh – Number of thresholds used for object deblending.

  • deblend_cont – Minimum contrast ratio used for object deblending.

  • clean – Perform cleaning?

  • clean_param – Cleaning parameter (see SExtractor manual).

class SourceDetection(**kwargs: Any)

Base class for source detection.

Init new image processor.

Exposure Time estimators

class ExpTimeEstimator(min_exp_time: float = 0.0, max_exp_time: Optional[float] = None, **kwargs: Any)

Estimate exposure time.

Init new exposure time estimator.

class StarExpTimeEstimator(source_detection: Union[Dict[str, Any], pyobs.images.processors.detection.SourceDetection], edge: float = 0.1, bias: float = 0.0, saturated: float = 0.7, **kwargs: Any)

Estimate exposure time from a star.

Create new exp time estimator from single star.

Parameters:
  • source_detection – Source detection to use.

  • edge – Fraction of image to ignore at each border.

  • bias – Bias level of image.

  • saturated – Fraction of saturation that is used as brightness limit.

Source extraction

class PhotUtilsPhotometry(threshold: float = 1.5, minarea: int = 5, deblend_nthresh: int = 32, deblend_cont: float = 0.005, clean: bool = True, clean_param: float = 1.0, **kwargs: Any)

Perform photometry using PhotUtils.

Initializes an aperture photometry based on PhotUtils.

Parameters:
  • threshold – Threshold pixel value for detection.

  • minarea – Minimum number of pixels required for detection.

  • deblend_nthresh – Number of thresholds used for object deblending.

  • deblend_cont – Minimum contrast ratio used for object deblending.

  • clean – Perform cleaning?

  • clean_param – Cleaning parameter (see SExtractor manual).

  • *args

  • **kwargs

class Photometry(**kwargs: Any)

Base class for photometry processors.

Init new image processor.

class SepPhotometry(threshold: float = 1.5, minarea: int = 5, deblend_nthresh: int = 32, deblend_cont: float = 0.005, clean: bool = True, clean_param: float = 1.0, **kwargs: Any)

Perform photometry using SEP.

Initializes a wrapper for SEP. See its documentation for details.

Highly inspired by LCO’s wrapper for SEP, see: https://github.com/LCOGT/banzai/blob/master/banzai/photometry.py

Parameters:
  • threshold – Threshold pixel value for detection.

  • minarea – Minimum number of pixels required for detection.

  • deblend_nthresh – Number of thresholds used for object deblending.

  • deblend_cont – Minimum contrast ratio used for object deblending.

  • clean – Perform cleaning?

  • clean_param – Cleaning parameter (see SExtractor manual).

  • *args

  • **kwargs