scopesim.effects.electronic.dmps.DetectorModePropertiesSetter#

class scopesim.effects.electronic.dmps.DetectorModePropertiesSetter(**kwargs)#

Bases: Effect

Set mode specific curr_sys properties for different detector readout modes.

A little class (DetectorModePropertiesSetter) that allows different "!DET" properties to be set on the fly.

Parameters:

mode_properties (dict) – A dictionary containing the DET parameters to be changed for each mode. See below for an example yaml entry.

Examples

Add the values for the different detector readout modes to all the relevant detector yaml files. In this case the METIS HAWAII (L, M band) and GeoSnap (N band) detectors: METIS_DET_IMG_LM.yaml , METIS_DET_IMG_N.yaml

- name: lm_detector_readout_parameters
  class: DetectorModePropertiesSetter
  kwargs:
    mode_properties:
      fast:
        mindit: 0.04
        full_well: !!float 1e5
        ron: 70
      slow:
        mindit: 1.3
        full_well: !!float 1e5
        ron: 14

Add the OBS dict entry !OBS.detector_readout_mode to the properties section of the mode_yamls descriptions in the default.yaml files.

mode_yamls:
  - object: observation
    alias: OBS
    name: lss_l
    yamls:
      ...
    properties:
      ...
      detector_readout_mode: slow
__init__(**kwargs)#

Methods

__init__(**kwargs)

apply_to(obj, **kwargs)

Apply the effect to the corresponding object.

get_from_meta(item)

info()

Print basic information on the effect, notably the description.

list_modes()

Return list of available detector modes.

report([filename, output, rst_title_chars])

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

select_mode(obj, **kwargs)

Automatically select detector mode based on image plane peak value.

Attributes

data

display_name

include

meta_string

required_keys

table

z_order

apply_to(obj, **kwargs)#

Apply the effect to the corresponding object.

info() None#

Print basic information on the effect, notably the description.

list_modes()#

Return list of available detector modes.

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
select_mode(obj, **kwargs)#

Automatically select detector mode based on image plane peak value.

Select the mode with lowest readnoise that does not saturate the detector. When all modes saturate, select the mode with the lowest saturation level (peak to full_well).