scopesim.effects.electronic.electrons.InterPixelCapacitance#

class scopesim.effects.electronic.electrons.InterPixelCapacitance(**kwargs)#

Bases: Effect

Inter-pixel capacitance effect.

The effect models cross-talk due to inter-pixel capacitance with a convolution kernel following [1].

Added in version 0.11.1.

Example

The effect is usually instantiated in a yaml file.

The first example uses the three-parameter model in Eq. (9) of [1]. The three parameters are alpha_edge (corresponding to \(\alpha\)) for the effect of neighbouring pixels sharing an edge with the pixel under consideration, alpha_corner (corresponding to \(\alpha^\prime\)) for pixels sharing a corner, and alpha_aniso (corresponding to \(\alpha_{+}\)) to allow for different capacitive coupling along rows and columns. The simpler one- and two-parameters models are recovered by setting alpha_aniso and/or alpha_corner to zero.

- name: ipc
  description: Apply inter-pixel capacitance
  class: InterPixelCapacitance
  kwargs:
     alpha_edge: 0.02
     alpha_corner: 0.002
     alpha_aniso: 0

Alternatively, a convolution kernel can be provided explicitely:

- name: ipc
  description: Apply inter-pixel capacitance
  class: InterPixelCapacitance
  kwargs:
     kernel: [
        [0.0011, 0.0127, 0.0011],
        [0.0163, 0.9360, 0.0164],
        [0.0011, 0.0127, 0.0011],
      ]
__init__(**kwargs)#

Methods

__init__(**kwargs)

apply_to(det, **kwargs)

Apply the effect to the corresponding object.

get_from_meta(item)

info()

Print basic information on the effect, notably the description.

report([filename, output, rst_title_chars])

For Effect objects, generates a report based on the data and meta-data.

update(**kwargs)

Update the IPC kernel.

Attributes

data

display_name

include

meta_string

required_keys

table

z_order

apply_to(det, **kwargs)#

Apply the effect to the corresponding object.

info() None#

Print basic information on the effect, notably the description.

report(filename=None, output='rst', rst_title_chars='*+', **kwargs)#

For Effect objects, generates a report based on the data and meta-data.

This is to aid in the automation of the documentation process of the instrument packages in the IRDB.

Note

If the Effect can generate a plot, this will be saved to disc

Parameters:
  • filename (str, optional) – Where to save the RST file

  • output (str, optional) – [“rst”, “latex”] Output file format

  • rst_title_chars (2-str, optional) – Two unique characters used to denote rst subsection headings. Options: = - ` : ‘ “ ~ ^ _ * + # < >

  • parameters (Additional)

  • ---------------------

  • **kwargs (Either from the self.meta["report"] dictionary or via)

  • "report_table_include" (False)

  • "report_table_caption"

  • "report_plot_caption"

  • "report_plot_include" (False)

  • "report_plot_file_formats" (["png"]) – Multiple formats can be saved. The last entry is used for the RST.

  • "report_plot_filename" (None) – If None, uses self.meta[“name”] as the filename

  • "file_description" (str) – Taken from the header of a file, if available

  • "class_description" (str) – Taken from the docstring of the subclass

  • "changes_str" (list of str) – Take from the header of a file, if available

Returns:

rst_str – The full reStructureText string

Return type:

str

Notes

The format of the RST output is as follows:

<ClassType>: <effect name>
**************************
File Description: <description for file meta data>
Class Description: <description from class docstring>
Changes: <list of changes from file meta data>

Data
++++
.. figure:: <Figure_name>.png
    If the <Effect> object contains a ``.plot()`` function, add
    plot and write it to disc
Figure caption

Table caption
Table
    If the <Effect> object contains a ``.table()`` function, add
    a pprint version of the table

Meta-data
+++++++++
::
    A code block print out of the ``.meta`` dictionary
update(**kwargs)#

Update the IPC kernel.

An instance ipc of InterPixelCapacitance can be updated by specifying either a new kernel: ipc.update(kernel=[[0., 0.02, 0], [0, 0.92, 0], [0, 0.02, 0]]) or by specifying one or more of the alpha parameters: ipc.update(alpha_edge=0.02, alpha_corner=0.002)

Notes

Unspecified alpha parameters (here alpha_aniso) default to zero.