scopesim.effects.psfs.discrete.FieldVaryingPSF#

class scopesim.effects.psfs.discrete.FieldVaryingPSF(**kwargs)#

Bases: DiscretePSF

TBA.

Parameters:
  • sub_pixel_flag (bool, optional)

  • flux_accuracy (float, optional) – Default 1e-3. Level of flux conservation during rescaling of kernel

__init__(**kwargs)#

Methods

__init__(**kwargs)

apply_to(fov, **kwargs)

See parent docstring.

get_from_meta(item)

get_kernel(fov)

info()

Print basic information on the effect, notably the description.

plot()

report([filename, output, rst_title_chars])

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

update([pupil_mask, filename])

Update the PSF.

Attributes

data

display_name

include

meta_string

report_plot_include

report_table_include

required_keys

strehl_imagehdu

The HDU containing the positional info for kernel layers.

table

z_order

apply_to(fov, **kwargs)#

See parent docstring.

get_kernel(fov)#
  1. get file extension

  2. pull out strehl map for fov header

  3. get number of unique psfs

  4. pull out those psfs

  5. if more than one, make masks for the fov on the fov pixel scale

  6. make list of tuples with kernel and mask

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
property strehl_imagehdu#

The HDU containing the positional info for kernel layers.

update(pupil_mask=None, filename=None)#

Update the PSF.

Parameters:
  • pupil_mask (str) – Name of the pupil mask. The filename is constructed from this and the existing self.meta[“filename_format”].

  • filename (str) – Full name of the file with the new PSF. Ignored if pupil_mask is not None.

  • versionadded: (..) – 0.11.2: