orca.transform.image_sub ======================== .. py:module:: orca.transform.image_sub .. autoapi-nested-parse:: Image subtraction utilities for FITS images. Provides functions for subtracting pairs or lists of FITS images and computing image statistics within specified regions. Originally written by Marin Anderson. Functions --------- .. autoapisummary:: orca.transform.image_sub.rot_ellipse orca.transform.image_sub.image_sub orca.transform.image_sub.getimrms Module Contents --------------- .. py:function:: rot_ellipse(x: numpy.ndarray, y: numpy.ndarray, x0: float, y0: float, sigmax: float, sigmay: float, theta: float) -> numpy.ndarray Compute the ellipse equation value for a rotated ellipse. Points where the return value <= 1 are inside the ellipse. :param x: X coordinates. :param y: Y coordinates. :param x0: Ellipse center X coordinate. :param y0: Ellipse center Y coordinate. :param sigmax: Semi-major axis in X direction. :param sigmay: Semi-minor axis in Y direction. :param theta: Rotation angle in radians. :returns: Array of ellipse equation values at each (x, y) point. .. py:function:: image_sub(file1: Union[str, List[str]], file2: Union[str, List[str]], out_dir, out_prefix='diff_', ref_index: int = 0) -> str Image subtraction for single image for lists of images. When the input is a list, it co-adds first before subtracting. Subtraction is file2 - file1. Output file is based on the basename of file1 with a prefix. :param file1: Previous image or list of images to be co-added :param file2: Next image or list of images to be co-added. :param out_dir: Output directory :param out_prefix: Output file prefix. :param ref_index: If the input is a list, the index for the reference fits file from which the header for the output is extracted. :returns: Output file path. .. py:function:: getimrms(filepath: List[str], radius: int = 0) Compute RMS, median, and frequency for a list of FITS images. Calculates image statistics either from a central 1000x1000 pixel box or from a circular aperture of specified radius centered on the image. :param filepath: List of paths to FITS image files. :param radius: Aperture radius in pixels. If 0, uses central 1000x1000 box. :returns: Tuple of (rms_array, median_array, frequency_array, dateobs_array).