Skip to content

Image Related Classes

Image Class

azcam.image.Image

Bases: object

Class to create and manipulate the standard azcam image object.

filename = '' instance-attribute

image filename

filetype = 0 instance-attribute

image file type

is_written = 0 instance-attribute

True when image has been written to disk

make_lockfile = 0 instance-attribute

True to make a lock file when image is written

overwrite = 0 instance-attribute

True to allow overwritting image file

test_image = 0 instance-attribute

True when the image is a test image (overwrite is automatic)

title = '' instance-attribute

title string

toggle = 0 instance-attribute

True when image is first ready

valid = 0 instance-attribute

True when image is valid

assemble(trim=-1)

Assemble .data into .buffer.

read_file(filename)

Read FITS image file (standard or MEF).

set_scaling(gains=None, offsets=None)

Set gains and offsets for image assembly.

Parameters:

Name Type Description Default
gains list[float] | None

gains values for each image section in [e/DN]

None
offsets list[float] | None

offsets or bias values for each image section

None

write_file(filename, filetype=-1)

Write image to disk file. filetype is 0 for FITS, 1 for MEF, 2 for BIN, 6 for assembled.

Focalplane Class

azcam.image_focalplane.FocalPlane

Bases: ObjectHeaderMethods

The FocalPlane class describes a focalplane layout.

__init__()

Create an instance of FocalPlane class.

get_focalplane()

Returns the focal plane configuration.

get_format()

Return a list of current detector format parameters

get_roi(roi_num=0)

Returns a list of the ROI parameters for the roi_num specified. Currently only one ROI (0) is supported. Returned list format is (first_col,last_col,first_row,last_row,col_bin,row_bin).

roi_reset()

Resets detector ROI values to full frame, current binning.

set_amp_positions()

Calculates amplifiers positions including gaps between amplifiers and CCDs New: Zareba 23Mar2012

set_default_values()

Sets default values for focalplane variables

set_extension_position(xy)

Set the extension position of each amplifier. xy is [[X,Y]] in index numbers, starting at [1,1].

set_focalplane(numdet_x=-1, numdet_y=-1, numamps_x=-1, numamps_y=-1, amp_cfg=[0])

Sets focal plane configuration. Use after set_format() and before set_roi(). This command replaces SetConfiguration. Default focalplane values are set here. numdet_x defines number of detectors in Column direction. numdet_y defines number of detectors in Row direction. numamps_x defines number of amplifiers in Column direction. numamps_y defines number of amplifiers in Row direction. amp_cfg defines each amplifier's orientation (ex: [0,1,2,3]). 0 - normal 1 - flip x 2 - flip y 3 - flip x and y

set_format(ns_total=-1, ns_predark=-1, ns_underscan=-1, ns_overscan=-1, np_total=-1, np_predark=-1, np_underscan=-1, np_overscan=-1, np_frametransfer=-1)

Set the detector format. Args: ns_total: number of visible columns ns_predark: number of physical dark underscan columns ns_underscan: desired number of desired dark underscan columns ns_overscan: number of dark overscan columns np_total: number of visible rows np_predark: number of physical dark underscan rows np_underscan: number of desired dark underscan rows np_overscan: number of desired dark overscan rows np_frametransfer: rows to frame transfer shift

set_jpg_order(indices)

Set JPG image positions.

set_ref_pixel(xy)

Set the reference pixel. xy is [X,Y] in pixels.

set_roi(first_col=-1, last_col=-1, first_row=-1, last_row=-1, col_bin=-1, row_bin=-1, roi_num=0)

Sets the ROI values for a specified ROI. Currently only one ROI (0) is supported. These values are for the entire focal plane, not just one detector.

update_ext_keywords()

Update focal plane keywords for single extension

update_header()

Update headers, reading current data.

update_header_keywords()

Update focal plane keywords in header

WCS Class

azcam.image_focalplane.WCS

Bases: object

get_ra_dec()

Get RA and DEC from telescope header. They should have been copied from telescope header to this image header.