module for simple .fits image tasks (rotation, clipping out sections,
making .pngs etc.)
Some routines in this module will fail if, e.g., asked to clip a
section from a .fits image at a position not found within the image (as
determined using the WCS). Where this occurs, the function will return
None. An error message will be printed to the console when this happens
if astImages.REPORT_ERRORS=True (the default). Testing if an astImages
function returns None can be used to handle errors in scripts.
dictionary
|
clipImageSectionWCS(imageData,
imageWCS,
RADeg,
decDeg,
clipSizeDeg,
returnWCS=True)
Clips a square or rectangular section from an image array at the
given celestial coordinates. |
source code
|
|
numpy array
|
clipImageSectionPix(imageData,
XCoord,
YCoord,
clipSizePix)
Clips a square or rectangular section from an image array at the
given pixel coordinates. |
source code
|
|
dictionary
|
clipRotatedImageSectionWCS(imageData,
imageWCS,
RADeg,
decDeg,
clipSizeDeg,
returnWCS=True)
Clips a square or rectangular section from an image array at the
given celestial coordinates. |
source code
|
|
dictionary
|
clipUsingRADecCoords(imageData,
imageWCS,
RAMin,
RAMax,
decMin,
decMax,
returnWCS=True)
Clips a section from an image array at the pixel coordinates
corresponding to the given celestial coordinates. |
source code
|
|
dictionary
|
scaleImage(imageData,
imageWCS,
scaleFactor)
Scales image array and WCS by the given scale factor. |
source code
|
|
dictionary
|
intensityCutImage(imageData,
cutLevels)
Creates a matplotlib.pylab plot of an image array with the specified
cuts in intensity applied. |
source code
|
|
dictionary
|
|
|
resampleToWCS(im1Data,
im1WCS,
im2Data,
im2WCS,
highAccuracy=False,
onlyOverlapping=True)
Resamples data corresponding to second image (with data im2Data, WCS
im2WCS) onto the WCS of the first image (im1Data, im1WCS). |
source code
|
|
|
generateContourOverlay(backgroundImageData,
backgroundImageWCS,
contourImageData,
contourImageWCS,
contourLevels,
contourSmoothFactor=0,
highAccuracy=False)
Rescales an image array to be used as a contour overlay to have the
same dimensions as the background image, and generates a set of
contour levels. |
source code
|
|
|
saveBitmap(outputFileName,
imageData,
cutLevels,
size,
colorMapName)
Makes a bitmap image from an image array; the image format is
specified by the filename extension. |
source code
|
|
|
saveContourOverlayBitmap(outputFileName,
backgroundImageData,
backgroundImageWCS,
cutLevels,
size,
colorMapName,
contourImageData,
contourImageWCS,
contourSmoothFactor,
contourLevels,
contourColor,
contourWidth)
Makes a bitmap image from an image array, with a set of contours
generated from a second image array overlaid. |
source code
|
|
|
saveFITS(outputFileName,
imageData,
imageWCS=None)
Writes an image array to a new .fits file. |
source code
|
|
numpy array
|
histEq(inputArray,
numBins)
Performs histogram equalisation of the input numpy array. |
source code
|
|
numpy array
|
normalise(inputArray,
clipMinMax)
Clips the inputArray in intensity and normalises the array such that
minimum and maximum values are 0, 1. |
source code
|
|