scopesim.effects.shifts.AtmosphericDispersion#

class scopesim.effects.shifts.AtmosphericDispersion(**kwargs)#

Bases: Shift3D

Used to generate the wavelength bins based on shifts due to the atmosphere.

Doesn’t contain an apply_to function, but provides information through the fov_grid function.

Required Parameters#

airmassfloat

Recommended to use “!OBS.airmass” in the OBS properties

temperaturefloat

[degC] Recommended to use “!ATMO.temperature” in the ATMO properties

humidityfloat

[0..1] Recommended to use “!ATMO.humidity” in the ATMO properties

pressurefloat

[bar] Recommended to use “!ATMO.pressure” in the ATMO properties

latitudefloat

[deg] Recommended to use “!ATMO.latitude” in the ATMO properties

altitude

[m] Recommended to use “!ATMO.altitude” in the ATMO properties

pixel_scale

[arcsec] Recommended to use “!INST.pixel_scale” in the INST properties

Optional Parameters#

wave_minfloat

[um] Defaults to “!SIM.spectral.wave_min”

wave_midfloat

[um] Defaults to “!SIM.spectral.wave_mid”

wave_maxfloat

[um] Defaults to “!SIM.spectral.wave_max”

sub_pixel_fractionfloat

[0..1] Defaults to “!SIM.sub_pixel.fraction”

num_stepsint

Default: 1000. Number of wavelength steps to use when interpolating the atmospheric dispersion curve

__init__(**kwargs)#

Methods

__init__(**kwargs)

apply_to(obj, **kwargs)

See parent docstring.

fov_grid([which])

See parent docstring.

get_from_meta(item)

get_table(**kwargs)

Called by the fov_grid method of Shift3D.

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.

Attributes

data

display_name

include

meta_string

report_plot_include

report_table_include

required_keys

table

z_order

apply_to(obj, **kwargs)#

See parent docstring.

fov_grid(which='shifts', **kwargs)#

See parent docstring.

get_table(**kwargs)#

Called by the fov_grid method of Shift3D.

Returns:

tbl – A table with the columns - waves : [um] - dx, dy : [arcsec]

Return type:

astropy.Table

Notes

Success! Returns the same values as: http://gtc-phase2.gtc.iac.es/science/astroweb/atmosRefraction.php

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