Module azcam.tools.image_focalplane

Contains the FocalPlane and WCS classes.

Classes

class FocalPlane

The FocalPlane class describes a focalplane layout. Used by the image tool.

Create an instance of FocalPlane class.

Ancestors

Instance variables

var amp_cfg

amplifier readout orientation (new)

var amp_config

amplifier readout orientation (old)

var header

focalplane header object

var numdet_x

number of detectors along X axis

var numdet_y

number of detectors along Y axis

var wcs

World Coordinate System object

Methods

def define_keywords(self)

Inherited from: ObjectHeaderMethods.define_keywords

Defines and resets keywords.

def delete_keyword(self, keyword: str)

Inherited from: ObjectHeaderMethods.delete_keyword

Delete a keyword.

Args

keyword
keyword
def get_focalplane(self)

Returns the focal plane configuration.

def get_format(self)

Return a list of current detector format parameters

def get_keyword(self, keyword: str) ‑> list

Inherited from: ObjectHeaderMethods.get_keyword

Return a keyword value, its comment string, and type. Comment always returned in double quotes, even if empty.

Args

keyword
name of keyword

def get_keywords(self) ‑> list

Inherited from: ObjectHeaderMethods.get_keywords

Return a list of all keyword names.

Returns

keywords
list of all keywords
def get_roi(self, 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).

def read_header(self) ‑> list

Inherited from: ObjectHeaderMethods.read_header

Reads and returns current header data.

Returns

list of header lines
[Header[]]: Each element Header[i] contains the sublist (keyword, value, …
def roi_reset(self)

Resets detector ROI values to full frame, current binning.

def set_amp_positions(self)

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

def set_default_values(self)

Sets default values for focalplane variables

def set_extension_extnum(self, ext_number)
def set_extension_name(self, ext_name)
def set_extension_position(self, xy)

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

def set_focalplane(self, numdet_x=-1, numdet_y=-1, numamps_x=-1, numamps_y=-1, amp_config='')

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_config defines each amplifier's orientation (ex: '1223'). 0 - normal 1 - flip x 2 - flip y 3 - flip x and y

def set_format(self, ns_total: int = -1, ns_predark: int = -1, ns_underscan: int = -1, ns_overscan: int = -1, np_total: int = -1, np_predark: int = -1, np_underscan: int = -1, np_overscan: int = -1, np_frametransfer: int = -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
def set_jpg_order(self, indices)

Set JPG image positions.

def set_keyword(self, keyword: str, value: Any, comment: str = 'none', typestring: str = 'none')

Inherited from: ObjectHeaderMethods.set_keyword

Set a keyword value, comment, and type.

Args

keyword
keyword
value
value of keyword
comment
comment string
typestring
one of …
def set_ref_pixel(self, xy)

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

def set_roi(self, 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.

def update_ext_keywords(self)

Update focal plane keywords for single extension

def update_header(self)

Update headers, reading current data.

def update_header_keywords(self)

Update focal plane keywords in header

class WCS (FPobject)

Methods

def get_ra_dec(self)

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

def initialize(self)