Gaussian Gradient Filter¶
Construct Gaussian Gradient Filtered images of Chandra data (this is important because we use the fact that each pixel is 0.492”)
Please fill out input file and run python GGF_main.py data.i
This will create GGF images (and fits) for the given sigma values.
Documentation:¶
Construct gaussian gradient filtered images of Chandra data
-
GGF.GGF_main.combine_ggf(img_dir, infiles, radius_bins, weight_bins, fits_file)¶ Combine GGF plots. For each radial region, we choose a weight for the image.
Create mask for each image based of weight_bins and radius_bins
Add weighted images together for each bin
Reconstruct complete weighted image by recombining weighted, binned image
The image files all need to be the same size and of the same region!
- Parameters
img_dir (str) – Full path to image files
infiles (str) – List of input files – GGF
radius_bins (str) – List of radii used for binning
weight_bins (str) – List of bin weights corresponding to each GGF image
fits_file (str) – Input Fits Image File for header info
- Returns
Reconstructed weighted-GGF image and fits file
-
GGF.GGF_main.ggf1(infile, outfile, sigma)¶ Creates a log-scaled, smoothed, gaussian gradient filtered image (in that order) from a fits file
- Parameters
infile (str) – fits image file to read in
outfile (str) – fits file to create
sigma (int) – sigma value for gaussian used in filtering
- Returns
Both fits file and png image
-
GGF.GGF_main.make_radial_mask(img_array, radii, center_pixel)¶ Create mask for image based off weight bins, center pixel, and radial values
- Parameters
img_array (array) – numpy array from reading in image
radii (float,float) – (R_in,R_out) tuple of inner and outer radius WITHIN mask
center_pixel (float,float) – (X,Y) tuple of central pixel from which the radial bins expand
- Returns
radial mask for image as np array of booleans