Previous topic

Association File Interpretation

Next topic

Data Analysis Routines

This Page

Image Access Modules

These modules all provide the capability to access sections of a FITS image using a scrolling buffer.

License: http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE

License: http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE

pytools.nimageiter.FileIter(filelist, bufsize=1024000, overlap=0)

Return image section for each image listed on input, with the object performing the file I/O upon each call to the iterator.

The inputs can either be a single image or a list of them, with the return value matching the input type. All images in a list MUST have the same shape, though, in order for the iterator to scroll through them properly.

The size of section gets defined by ‘bufsize’. The ‘overlap’ parameter provides a way of scrolling through the image with this many rows of overlap, with the default being no overlap at all.

pytools.nimageiter.ImageIter(imglist, bufsize=1024000, overlap=0, copy=0, updateSection=None)

Return image section for each image listed on input. The inputs can either be a single image or a list of them, with the return value matching the input type. All images in a list MUST have the same shape, though, in order for the iterator to scroll through them properly.

The size of section gets defined by ‘bufsize’, while ‘copy’ specifies whether to return an explicit copy of each input section or simply return views. The ‘overlap’ parameter provides a way of scrolling through the image with this many rows of overlap, with the default being no overlap at all.

pytools.nimageiter.computeBuffRows(imgarr, bufsize=1024000)

Function to compute the number of rows from the input array that fits in the allocated memory given by the bufsize.

pytools.nimageiter.computeNumberBuff(numrows, buffrows, overlap)

Function to compute the number of buffer sections that will be used to read the input image given the specified overlap.

License: http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE

class pytools.iterfile.IterFitsFile(name)

This class defines an object which can be used to access the data from a FITS file without leaving the file-handle open between reads.

close()

Closes file handle for this FITS object.

open()

Opens the file for subsequent access.

type()

Returns the shape of the data array associated with this file.

pytools.iterfile.parseFilename(filename)

Parse out filename from any specified extensions. Returns rootname and string version of extension name.

Modified from ‘pydrizzle.fileutil’ to allow this module to be independent of PyDrizzle/MultiDrizzle.