autoprofutils package
Submodules
autoprofutils.Diagnostic_Plots module
- autoprof.autoprofutils.Diagnostic_Plots.Plot_Axial_Profiles(dat, R, sb, sbE, pa, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_Background(values, bkgrnd, noise, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_EllipseModel(IMG, Model, R, modeltype, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_I_Profile(dat, R, I, I_e, parameters, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_Isophote_Fit(dat, sample_radii, parameters, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_Isophote_Init_Ellipse(dat, circ_ellipse_radii, ellip, phase, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_Isophote_Init_Optimize(circ_ellipse_radii, allphase, phase, pa_err, test_ellip, test_f2, ellip, ellip_err, results, options)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_PSF_Stars(IMG, stars_x, stars_y, stars_fwhm, psf, results, options, flagstars=None)[source]
- autoprof.autoprofutils.Diagnostic_Plots.Plot_Phase_Profile(R, parameters, results, options)[source]
autoprofutils.ImageTransform module
- autoprof.autoprofutils.ImageTransform.Crop(IMG, results, options)[source]
Crop the edges of an image about a center point.
If a ‘Center’ method has been applied before in the pipeline we use that to define the galaxy center, otherwise we define the center as half the image.
ap_cropto states the new size of the image after cropping. We default to 512*512.
- autoprof.autoprofutils.ImageTransform.Resolution(IMG, results, options)[source]
Change the resolution of an image
Can be used to resample an image at a new pixel scale. The new image can have finer sampling (smaller pixels) or coarser sampling (larger pixels) and this can be accomplished with a variety of methods. First, there are pooling methods which can only reduce the resolution, these methods take a certain block as defined by ap_resolution_shape and perform a mean, median, or max operation on those pixels. That value then becomes the pixel value for a downsampled image. Alternatively, one can use either bicubic or Lanczos interpolation, which can upsample or downsample the image. The parameter ap_resolution_shape is then the desired new shape of the image, which will be fit to represent the same area on the sky. To match the same area on the sky, each pixel is assumed to have a width of 1, thus representing a 1x1 square on the sky.
- Parameters:
ap_resolution_method (string, default 'lanczos') – Method which is used to perform resolution resampling. Options are: ‘max pool’, ‘mean pool’, ‘median pool’, ‘bicubic’, and ‘lanczos’. Lanczos is very slow, but represents the best interpolation method according to information theory.
ap_resolution_shape (tuple, default None) – Shape used for resampling. For pooling methods, this represents the size of the pool/box in which a calcualtion is done. For other methods this is the size of the final desired image. This parameter is required.
ap_resolution_dtype (object, default None) – Optional parameter to set a new dtype for the image after resampling. This can be used to reduce precision if it is unnecessary, limiting the size of the final image if it is very finely resampled.
ap_iso_interpolate_window (int, default 5) – Only used by Lanczos interpolation, this will set the area of pixels used to calculate the Lanczos interpolated values. Larger values are more accurate, but require quadratically more computation time.
Note
The inputted pixel scale will be incorrect after this operation if it is set for the original image.
- Returns:
IMG (ndarray) – Resampled galaxy image according to user specified sampling method.
results (dict) –
{}