Module: image

class Image(image_array, rotation_center_x=None, rotation_center_y=None, copy_original=True, multichannel=False, as_gray=True, masked=None, fill_value=0, set_min_flux_zero=True)[source]

Bases: object

The Image class is used to represent an image object. Images are converted to floats, and pixel values shifted to have the min==0. Negative values are used to mask. This is used in rotated images, where pixels that are outside boundaries are masked

Attributes:
_original_image (ndarray): the ndarray of the original image. This array will not be touched by any transformation. _shape_x (float): the x shape of the image _shape_y (float): the y image of the image

Attributes

array numpy array of the image
original_array Returns:
rotation_center
shape method to get the image shape
valid_flatten flattened numpy array of the image, getting rid

Methods

build_masked_array([trim])
filter(image_filter[, inplace]) This method is used to apply the :class:.image_processing.ImageFilter to apply a filter to the image
from_array(data)
from_file(data)
from_fits_file(file[, ext, slice])
geom_transformation(transformation[, inplace])
get_lowest_flux_array_from_sub_stamp([...]) Only sub stamps with min_frac_size_valid_entries are used
show()
array

numpy array of the image

Args:
channel:

Returns:

build_masked_array(trim=False)[source]
filter(image_filter, inplace=True, **kwg)[source]

This method is used to apply the :class:.image_processing.ImageFilter to apply a filter to the image

classmethod from_array(data)[source]
classmethod from_file(data)[source]
classmethod from_fits_file(file, ext=0, slice=None)[source]
geom_transformation(transformation, inplace=False, **kwg)[source]
get_lowest_flux_array_from_sub_stamp(sub_block_frac_size=0.1, stack_average_max_id=1, min_frac_size_valid_entries=0.5)[source]

Only sub stamps with min_frac_size_valid_entries are used

Parameters:

sub_block_frac_size

stack_average_max_id

original_array
Returns:
the ndarray of the original image
rotation_center
shape

method to get the image shape Returns:

tuple: shape of the image
show()[source]
valid_flatten

flattened numpy array of the image, getting rid of masked entries

Args:
channel:

Returns:

test()[source]