astrocook.recipes.registry module#

The recipe registry: the single description of every recipe.

Each recipe module defines its recipes in a *_RECIPES_SCHEMAS dictionary (its brief and details, its parameters with their types, defaults and descriptions, and its flags). The registry reads them once, at import, into frozen RecipeSpec and ParamSpec objects; the GUI (menus, dialogs, requirements, branching), the scripts and the MCP server read the registry, never the dictionaries, so that a recipe is described in one place and nothing changes its description at run time (findings register F12 and F79; ROADMAP.md, phase 6-bis).

Adding a recipe means adding its entry to the dictionary of its module (and its method to the recipe class): tests/test_recipe_registry.py checks that the two agree.

Keys of a recipe entry:

brief

One line, the name of the recipe in the menus and dialogs.

details

A longer description (optional).

url

The page of the user documentation, relative to its root (tutorials/editing_data.html#masking-data); the Help button of the dialog joins it to DOCS_URL.

menu

Where the recipe is in the menus of the GUI, "Menu > Label" with the mnemonic of the label marked by & ("Edit > Set &Properties"): the only place where the label is written. The GUI builds its entry and the title of its dialog from it, and the methods text names the recipe by it. A recipe with no menu has no entry (it is run by the plots, the System Inspector or by scripts) and no menu is named for it.

params

The list of the parameters (keys below).

gui_hidden

The recipe is not in the menus (it is run by the GUI or by scripts).

branching

The recipe opens a new session (or several) instead of giving the next state of the same session.

requires

What the recipe needs from the session before it runs: "z_em", "resolution", "continuum" (astrocook.recipes.prerequisites says what is missing and fills it).

provides

What the recipe gives to the session, among the same names (e.g. estimate_auto the continuum): the recipes named to the user when a prerequisite is missing.

methods

What the recipe did, as a sentence of the methods section of a paper (astrocook.methods_text, phase 6-ter PR 5c): a template with the parameters as fields ({kappa}) and {menu} where the menu of the recipe goes, or a function of the same values that returns the text, when the text depends on them.

references

The keys of the works the text of methods cites, in astrocook.methods_text.REFERENCES.

Keys of a parameter: name, type, default, doc (optional, the name if missing), gui_hidden (not shown in the dialog), and for the conversion of its value (astrocook.recipes.params): optional (None is a value: no value, or automatic), keep (special strings passed as they are, e.g. '_current_'), min and max (bounds of a number, included), gt (a bound excluded: the value must be above it), allow_nan (NaN is a value; infinities never are), choices (the values allowed, for a string: a list in the GUI and for the agents), kind (what a string names: 'session', an open session, 'sessions', several, comma-separated (phase 6-quater, PR 9: the rule of both in astrocook.recipes._sessions), or 'column', a column of the spectrum; phase 6-bis, PR 6c), agents (False: not offered to agents, which get the default: the options of debug and the questions of the GUI, phase 6-bis, PR 6; every recipe is offered, Guido: the basic ones are blocks of new recipes), aliases (the old names of a parameter that was renamed, below).

A renamed parameter keeps its old names as aliases (phase 6-quater, PR 2, agreed with Guido): the logs saved in the archives, the scripts and the calls of the MCP tools that use an old name still run, and give the same result. RecipeSpec.canonical() turns the old names into the new one; it is called where the parameters enter a recipe (the decorator typed_recipe), where the log records them (resolve_params), by the MCP server before it refuses the unknown parameters, and when the log of an archive is read (canonical_params()), so that the methods text, the Log Scripter and the log of the MCP server show the new names only. The dialogs and the schemas of the MCP tools show the new name only. An alias is silent (no warning) and permanent: the archives are not changed once saved, and their logs must replay; an old name given with the new one is an error (InvalidParameter), even with the same value. An alias is not in the signature of the method.

A parameter without a default (required: the method has none, the dialog starts empty, the MCP schema lists it in required) has the default "" (a string) or None without optional (a number, a bool, a list; phase 6-quater, PR 10).

astrocook.recipes.registry.CATEGORIES: Tuple[str, ...] = ('file', 'edit', 'flux', 'continuum', 'absorbers')#

The categories, in the order of the menus

astrocook.recipes.registry.REQUIREMENTS = frozenset({'continuum', 'resolution', 'z_em'})#

What a recipe can require (the key requires)

astrocook.recipes.registry.DOCS_URL = 'https://das-oats.github.io/astrocook/'#

The root of the user documentation (the latest release), which the url of the recipes and the Help > Online Documentation entry start from

astrocook.recipes.registry.MENU_TITLES = ('File', 'Edit', 'Flux', 'Continuum', 'Absorbers')#

The menus of the GUI that can hold a recipe, as menu names them

astrocook.recipes.registry.KINDS = frozenset({'column', 'session', 'sessions'})#

What a string parameter can name (the key kind)

class astrocook.recipes.registry.ParamSpec(name: str, type: type, doc: str, gui_hidden: bool = False, optional: bool = False, keep: Tuple[str, ...] = (), min: float | None = None, max: float | None = None, gt: float | None = None, allow_nan: bool = False, agents: bool = True, choices: Tuple[str, ...] = (), kind: str = '', aliases: Tuple[str, ...] = (), _default: Any = None)[source]#

Bases: object

A parameter of a recipe.

name: str#

Name, as in the signature of the method

type: type#

Python type of the value (str, float, int, bool, list)

doc: str#

Description, shown by the dialogs and the MCP tools

gui_hidden: bool = False#

Not shown in the dialog of the recipe

optional: bool = False#

None is a value (no value, or automatic)

keep: Tuple[str, ...] = ()#

Special strings passed as they are (e.g. '_current_')

min: float | None = None#

min and max included, gt excluded (the value must be above it)

Type:

Bounds of a number (None

Type:

no bound)

max: float | None = None#
gt: float | None = None#
allow_nan: bool = False#

NaN is a value of a number

agents: bool = True#

they get the default)

Type:

Offered to agents (False

choices: Tuple[str, ...] = ()#

The values allowed (a string parameter), in their spelling

kind: str = ''#

'session', 'column', or “” (nothing)

Type:

What the value names

aliases: Tuple[str, ...] = ()#

The old names of the parameter, still accepted (phase 6-quater, PR 2)

property default: Any#

a list default cannot be changed).

Type:

The default value (a copy

__init__(name: str, type: type, doc: str, gui_hidden: bool = False, optional: bool = False, keep: Tuple[str, ...] = (), min: float | None = None, max: float | None = None, gt: float | None = None, allow_nan: bool = False, agents: bool = True, choices: Tuple[str, ...] = (), kind: str = '', aliases: Tuple[str, ...] = (), _default: Any = None) → None#
class astrocook.recipes.registry.RecipeSpec(category: str, name: str, brief: str, details: str = '', url: str | None = None, menu: str = '', params: Tuple[ParamSpec, ...] = (), gui_hidden: bool = False, branching: bool = False, requires: frozenset = frozenset({}), provides: frozenset = frozenset({}), methods: Any = None, references: Tuple[str, ...] = ())[source]#

Bases: object

A recipe: what it is, its parameters and its flags.

category: str#

Menu of the recipe (file, edit, flux, continuum, absorbers)

name: str#

Name of the method of the recipe class

brief: str#

One line, the name of the recipe in the menus and dialogs

details: str = ''#

A longer description

url: str | None = None#

The page of the documentation, relative to DOCS_URL

menu: str = ''#

"Menu > Label" (& before the mnemonic) or “” for a recipe that is in no menu

params: Tuple[ParamSpec, ...] = ()#

The parameters, in the order of the dialog

gui_hidden: bool = False#

Not in the menus

branching: bool = False#

Opens a new session instead of giving the next state of the same one

requires: frozenset = frozenset({})#

What the recipe needs from the session (a subset of REQUIREMENTS)

provides: frozenset = frozenset({})#

What the recipe gives to the session (a subset of REQUIREMENTS)

methods: Any = None#

a template or a function (astrocook.methods_text); None: a generic sentence

Type:

What the recipe did, for the methods text

references: Tuple[str, ...] = ()#

The keys of the works the methods text cites

property menu_title: str#

The menu of the recipe (Edit), “” if it is in none.

property menu_label: str#

The label of its entry with the mnemonic (Set &Properties), “” if it is in no menu.

property menu_path: str#

the menu and the label as the user reads them, “” if the recipe is in no menu.

Type:

Edit > Set Properties

property title: str#

the label of its entry, or the brief without its full stop when it has none.

Type:

What the user calls the recipe

property doc_url: str | None#

The full address of its page of the documentation.

param(name: str) → ParamSpec[source]#

The parameter called name (KeyError if there is none).

defaults() → Dict[str, Any][source]#

The defaults of all the parameters, by name.

renamed() → Dict[str, str][source]#

The old names of the parameters (their aliases), each with its new name.

canonical(params: Mapping[str, Any]) → Dict[str, Any][source]#

params with the old names of the parameters replaced by the new ones, in the same order; the other names as they are. InvalidParameter if a parameter is given by its old and its new name.

__init__(category: str, name: str, brief: str, details: str = '', url: str | None = None, menu: str = '', params: Tuple[ParamSpec, ...] = (), gui_hidden: bool = False, branching: bool = False, requires: frozenset = frozenset({}), provides: frozenset = frozenset({}), methods: Any = None, references: Tuple[str, ...] = ()) → None#
astrocook.recipes.registry.build_spec(category: str, name: str, entry: Mapping[str, Any]) → RecipeSpec[source]#

The RecipeSpec of one entry of a *_RECIPES_SCHEMAS dictionary; ValueError on an unknown key or requirement.

astrocook.recipes.registry.RECIPES: Mapping[str, Mapping[str, RecipeSpec]] = mappingproxy({'file': mappingproxy({'export_ascii': RecipeSpec(category='file', name='export_ascii', brief='Export session data to ASCII.', details="Writes the chosen data as CSV files in a folder: the columns of the spectrum to <prefix>_spec.csv (always with the wavelength), the system list to <prefix>_systems.csv (always with the series and the redshift). Items that are neither a column nor 'spec' or 'systems' are skipped, with a warning.", url='tutorials/getting_started.html#export-to-ascii', menu='File > &Export to ASCII', params=(ParamSpec(name='targets', type=<class 'str'>, doc="Comma-separated items to export: 'spec' (all the columns of the spectrum) or some of its columns (e.g. 'F, dF, cont'; the file names them as in the data: x, y, dy), and 'systems' (the system list) or some of its columns (e.g. 'z, logN').", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='folder', type=<class 'str'>, doc='Folder where the files are written.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=('path',)), ParamSpec(name='prefix', type=<class 'str'>, doc='Beginning of the file names: <prefix>_spec.csv and <prefix>_systems.csv.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='overwrite', type=<class 'bool'>, doc='Replace the files if they exist; if False, the export stops and names them.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The data ({targets}) were exported as CSV files{menu}', references=()), 'import_ascii': RecipeSpec(category='file', name='import_ascii', brief='Import session data from ASCII.', details='Reads columns from an ASCII/CSV table with a header and adds them to the spectrum, replacing those with the same name; the table must have one row per pixel of the spectrum. A column x is not read: the grid of the spectrum is kept.', url='tutorials/getting_started.html#import-from-ascii', menu='File > Import from &ASCII', params=(ParamSpec(name='file_path', type=<class 'str'>, doc='Path of the ASCII/CSV file to read.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_import_ascii>, references=()), 'import_model': RecipeSpec(category='file', name='import_model', brief='Import an external model into the spectrum.', details='Reads a model (a telluric transmission, a continuum, an absorption model) from a file or another session and writes it in the column of its role, on the grid of the spectrum: copied on the same grid, otherwise averaged over the pixels. Beyond its range a telluric model is 1, a continuum NaN, an absorption model the normalization (cont × telluric).', url='tutorials/external_models.html#importing-a-model', menu='File > Import &Model', params=(ParamSpec(name='file_path', type=<class 'str'>, doc='Path of the file of the model: a text table with named columns, the CSV of Export to ASCII, a FITS table. Empty if the model is in another session.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='source_session', type=<class 'str'>, doc='Name of the open session that holds the model (in a script, also the session itself); empty if it is in a file.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='session', aliases=()), ParamSpec(name='role', type=<class 'str'>, doc="Role of the model: 'telluric', a transmission written in the column telluric; 'cont', a continuum in the unit of the flux written in the column cont (cont × telluric is the normalization); 'model', an absorption model in the column model (a fit overwrites it).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('telluric', 'cont', 'model'), kind='', aliases=()), ParamSpec(name='column', type=<class 'str'>, doc='Column of the model in the source; empty: found by name (telluric: telluric, telluric_model, trans_molecfit, mtrans; cont: cont, continuum; model: model).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='renorm_model', type=<class 'bool'>, doc="With role 'cont', rescale the model to the new continuum (asked by the GUI).", gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=()), ParamSpec(name='normalized', type=<class 'bool'>, doc="With role 'model': the model is normalized (0-1) and is multiplied by the normalization of the spectrum (cont × telluric), which needs a continuum.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_import_model>, references=())}), 'edit': mappingproxy({'set_properties': RecipeSpec(category='edit', name='set_properties', brief='Set session properties.', details="Sets the name of the session, the name of the object, the emission redshift, the resolution of the spectrum and the unit of its flux (a flux density per unit wavelength, declared, not converted: y_convert converts) and whether it is already corrected for the tellurics. A field left at '_current_' keeps its value.", url='tutorials/editing_data.html#setting-session-properties', menu='Edit > Set &Properties', params=(ParamSpec(name='name', type=<class 'str'>, doc='Name of the session, as shown in the session list (not empty).', gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='object', type=<class 'str'>, doc='Name of the object (the OBJECT keyword of the header).', gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_em', type=<class 'float'>, doc='Emission redshift of the quasar (z_em); needed to locate the Lyman-alpha forest.', gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='resol', type=<class 'str'>, doc="Resolution of the spectrum: the resolving power R (e.g. '50000'), or the FWHM of the line spread function in pixels (e.g. '3px', with the x axis in wavelength); written in the 'resol' column.", gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='yunit', type=<class 'str'>, doc="Unit of the flux, declared without converting the values, e.g. 'erg/(Angstrom s cm^2)', or 'arb_flux' (arbitrary units).", gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='overwrite_resol_col', type=<class 'bool'>, doc="Replace an existing 'resol' column that varies along the spectrum (asked by the GUI).", gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='telluric_corrected', type=<class 'str'>, doc="Whether the flux is already corrected for the tellurics: 'yes' (normalized by the continuum alone) or 'no' (by the continuum times the 'telluric' column).", gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('_current_', 'yes', 'no'), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset({'resolution', 'z_em'}), methods=<function _methods_set_properties>, references=()), 'x_convert': RecipeSpec(category='edit', name='x_convert', brief='Convert X axis.', details='Converts the x axis to another unit of wavelength (e.g. nm, Angstrom) or to velocity (e.g. km/s); the zero of the velocity is the Lyman-alpha emission at the reference redshift, 121.567 nm * (1 + z_ref).', url='tutorials/editing_data.html#converting-the-axes', menu='', params=(ParamSpec(name='z_ref', type=<class 'float'>, doc="Redshift of the zero of the velocity axis, the Lyman-alpha emission at 121.567 nm * (1 + z_ref) ('_current_': z_em); not used for a unit of wavelength.", gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='xunit', type=<class 'str'>, doc="Unit of the new x axis: a wavelength (e.g. 'nm', 'Angstrom') or a velocity (e.g. 'km/s').", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_x_convert>, references=()), 'y_convert': RecipeSpec(category='edit', name='y_convert', brief='Convert Y axis units.', details='Converts the flux, its error and the columns in the unit of the flux (e.g. cont, model) to another unit of flux density per unit wavelength.', url='tutorials/editing_data.html#converting-the-axes', menu='', params=(ParamSpec(name='yunit', type=<class 'str'>, doc="Unit of flux density per unit wavelength, e.g. 'erg/(nm s cm^2)' or 'erg/(Angstrom s cm^2)'; a unit per frequency (Jy) is not converted.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The flux and its error were converted to {yunit}{menu}', references=()), 'apply_expression': RecipeSpec(category='edit', name='apply_expression', brief='Apply expression to columns.', details="Evaluates an expression of the columns (NumExpr: + - * / **, comparisons, sqrt, exp, log, log10, abs, where, sum, min, max, ...) and writes it in a column, new or existing. The columns are named as in the GUI: λ (or lam), F, dF, cont, model, ...; e.g. 'F / cont', 'F * 2.0', 'log10(F)'. The axis (λ, λmin, λmax) is not written: x_convert converts it.", url='tutorials/editing_data.html#arithmetic-on-columns', menu='Edit > Apply &Expression', params=(ParamSpec(name='target_col', type=<class 'str'>, doc="Column to write, e.g. 'snr': replaced if it exists, created otherwise; a name of letters, digits and _ (not the axis, λ, λmin, λmax).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='expression', type=<class 'str'>, doc="Expression of the columns, e.g. 'F / dF' or 'F / cont'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The column {target_col} was computed as {expression}{menu}', references=()), 'mask_expression': RecipeSpec(category='edit', name='mask_expression', brief='Mask column by expression.', details="Sets a column to NaN where a boolean expression of the columns is true, e.g. '(λ < 300) | (λ > 400)' or 'dF <= 0'. The columns are named as in the GUI (λ or lam, F, dF, cont, ...). The axis (λ, λmin, λmax) is not masked.", url='tutorials/editing_data.html#masking-data', menu='Edit > &Mask by Expression', params=(ParamSpec(name='target_col', type=<class 'str'>, doc="Column to mask, e.g. 'F' (not the axis, λ, λmin, λmax).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='expression', type=<class 'str'>, doc='Boolean expression of the columns: the pixels where it is true are masked.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The column {target_col} was masked where {expression}{menu}', references=()), 'smooth_column': RecipeSpec(category='edit', name='smooth_column', brief='Smooth a single column.', details="Smooths one column of the spectrum (e.g. 'dF' or 'cont') with a Gaussian kernel; the other columns are unchanged.", url='tutorials/editing_data.html#smoothing-single-columns', menu='Edit > Smooth &Column', params=(ParamSpec(name='target_col', type=<class 'str'>, doc="Column to smooth, e.g. 'dF' (not the axis, λ, λmin, λmax).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='sigma_kms', type=<class 'float'>, doc='Standard deviation of the Gaussian kernel (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='renorm_model', type=<class 'bool'>, doc="When smoothing 'cont', rescale the model to the new continuum (asked by the GUI).", gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The column {target_col} was smoothed with a Gaussian kernel of standard deviation {sigma_kms} km/s{menu}', references=()), 'import_systems': RecipeSpec(category='edit', name='import_systems', brief='Import systems from session.', details='Copies the absorption systems (components and constraints) of another open session into this one.', url='tutorials/editing_data.html#importing-systems', menu='File > Import Systems from &Session', params=(ParamSpec(name='source_session', type=<class 'str'>, doc='Name of the open session to copy the systems from (in a script, also the session itself).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='session', aliases=()), ParamSpec(name='append', type=<class 'bool'>, doc='True: add the systems to those of this session; False: replace them.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='refit', type=<class 'bool'>, doc='Refit the systems on the spectrum of this session after copying them.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_import_systems>, references=()), 'import_systems_ascii': RecipeSpec(category='edit', name='import_systems_ascii', brief='Import systems from an ASCII file.', details='Read absorption components from an ASCII/CSV table with a header (columns series, z and optionally logN, b, btur, dz, dlogN, db), e.g. the _systems.csv written by Export ASCII.', url='tutorials/absorption_systems.html#importing-a-line-list', menu='File > Import Systems from &ASCII', params=(ParamSpec(name='file_path', type=<class 'str'>, doc='Path of the ASCII/CSV file to read.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='append', type=<class 'bool'>, doc='True: add the components to those of this session; False: replace them.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='refit', type=<class 'bool'>, doc='Refit the components on the spectrum after reading them.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_import_systems_ascii>, references=()), 'delete': RecipeSpec(category='edit', name='delete', brief='Delete elements.', details="Removes columns from the spectrum, or all the components of the system list ('systems'). The columns of every spectrum (λ, λmin, λmax, F, dF) are not removed.", url='tutorials/editing_data.html#deleting-elements', menu='Edit > &Delete Elements', params=(ParamSpec(name='targets', type=<class 'str'>, doc="Comma-separated items to delete: names of columns of the spectrum (e.g. 'cont, model') and/or 'systems' for the whole system list.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_delete>, references=()), 'split': RecipeSpec(category='edit', name='split', brief='Split spectrum by expression.', details="Copies the pixels where a boolean expression of the columns is true into a new session, e.g. '(λ > 400) & (λ < 500)'.", url='tutorials/editing_data.html#manual-split', menu='Edit > S&plit Out Region', params=(ParamSpec(name='expression', type=<class 'str'>, doc="Boolean expression of the columns, e.g. '(λ > 400) & (λ < 500)': the pixels where it is true go to the new session.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=True, requires=frozenset(), provides=frozenset(), methods='The pixels where {expression} were copied into a new session{menu}', references=()), 'extract_preset': RecipeSpec(category='edit', name='extract_preset', brief='Extract region by preset.', details="Copies a standard region into a new session, from the emission redshift: 'lya_forest' (between Ly-beta and Ly-alpha), 'all_ly_forest' (between the Lyman limit and Ly-alpha), 'red_side' (redward of Ly-alpha). Several regions, separated by commas, give one session each.", url='tutorials/editing_data.html#quick-extraction-presets', menu='Edit > Extract &Preset Region', params=(ParamSpec(name='region', type=<class 'str'>, doc="Region(s) to extract, comma-separated: 'lya_forest', 'all_ly_forest', 'red_side'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=True, requires=frozenset({'z_em'}), provides=frozenset(), methods=<function _methods_extract_preset>, references=()), 'trim_common': RecipeSpec(category='edit', name='trim_common', brief='Trim to common velocity coverage.', details='Trims this session to the velocity range around a redshift that all the given sessions cover, each with its own transition (e.g. the arms of an instrument, or the lines of a doublet).', url='tutorials/editing_data.html#combining-sessions-stitch-co-add', menu='', params=(ParamSpec(name='other_sessions', type=<class 'str'>, doc='Comma-separated names of the other sessions (in a script, also a list of the sessions themselves).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='sessions', aliases=('others_names',)), ParamSpec(name='z_target', type=<class 'float'>, doc="Redshift at the centre of the range ('_current_': z_em).", gui_hidden=False, optional=False, keep=('_current_',), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='trans_self', type=<class 'str'>, doc="Transition of this session that sets its velocity zero, as named in the atomic data, e.g. 'Ly_a', 'CIV_1548'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='trans_others', type=<class 'str'>, doc='Comma-separated transitions of the other sessions, one per session, in their order.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='window_kms', type=<class 'float'>, doc='Half-width of the velocity range kept (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_trim_common>, references=()), 'stitch': RecipeSpec(category='edit', name='stitch', brief='Merge multiple sessions.', details='Joins this session and other sessions into one spectrum, without equalizing their flux (see Equalize and stitch arms); the step that Equalize and stitch arms ends with.', url='tutorials/editing_data.html#stitching', menu='', params=(ParamSpec(name='other_sessions', type=<class 'str'>, doc='Comma-separated names of the other sessions (in a script, also a list of the sessions themselves). Their flux and axis are converted to the units of this session; a flux that cannot be converted (arbitrary, or normalized, against a physical one) is refused.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='sessions', aliases=()), ParamSpec(name='sort', type=<class 'bool'>, doc='Sort the joined spectrum by wavelength.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=True, requires=frozenset(), provides=frozenset(), methods='This session and {other_sessions} were joined into one spectrum, without equalizing their flux{menu}', references=()), 'equalize_and_stitch': RecipeSpec(category='edit', name='equalize_and_stitch', brief='Equalize and stitch arms.', details='Scales the flux of the sessions (the arms of an instrument) to match in their overlaps, then joins them into one spectrum, cutting at the given wavelengths. The arms are taken from blue to red, in any order given; their flux and axis are converted to the units of the bluest, and an arm in arbitrary units of flux takes those of the bluest once scaled.', url='tutorials/editing_data.html#equalize-and-stitch-arms', menu='', params=(ParamSpec(name='other_sessions', type=<class 'str'>, doc='Comma-separated names of the other sessions (in a script, also a list of the sessions themselves).', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='sessions', aliases=()), ParamSpec(name='stitch_wavelengths', type=<class 'str'>, doc='Comma-separated wavelengths (nm), increasing, where each arm ends and the next begins: one fewer than the sessions.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='equalize_ranges', type=<class 'str'>, doc="Comma-separated wavelength ranges (nm) where the flux of adjacent arms is matched (e.g. '545-555, 795-805'), or 'auto' for their overlaps.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='manual_factors', type=<class 'str'>, doc="Comma-separated positive factors that multiply the flux of each arm but the bluest instead of the equalization, or 'auto'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=True, requires=frozenset(), provides=frozenset(), methods=<function _methods_equalize_and_stitch>, references=()), 'coadd': RecipeSpec(category='edit', name='coadd', brief='Co-add multiple sessions.', details='Combines several sessions on one new grid with a constant step, weighting each pixel with its inverse variance, in one pass. The first session is the reference: the others are converted to its units and scaled to its flux; an arbitrary flux is co-added with a physical one only when scaled.', url='tutorials/editing_data.html#co-adding-spectra', menu='Edit > Co-&add Spectra', params=(ParamSpec(name='session_names', type=<class 'str'>, doc='Comma-separated names of the sessions to co-add, this one among them (in a script, also a list of the sessions themselves); the first is the reference.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='sessions', aliases=()), ParamSpec(name='xstart', type=<class 'float'>, doc='Start of the new grid (nm); None: the start of the data.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='xend', type=<class 'float'>, doc='End of the new grid (nm), above xstart; None: the end of the data.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='dx', type=<class 'float'>, doc='Step of the new grid, in the unit of xunit.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='xunit', type=<class 'str'>, doc='Unit of the step: a velocity (km/s, a grid uniform in log wavelength) or a wavelength (nm).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='kappa', type=<class 'float'>, doc='Threshold (in sigma) of the clipping of outliers; None: no clipping.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='equalize_order', type=<class 'int'>, doc='Order of the polynomial (0 to 5) that scales each session to the first before co-adding: 0 a constant factor; None no scaling (-1, of the old logs, is the same).', gui_hidden=False, optional=True, keep=(), min=-1, max=5, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=True, requires=frozenset(), provides=frozenset(), methods=<function _methods_coadd>, references=())}), 'flux': mappingproxy({'calculate_running_std': RecipeSpec(category='flux', name='calculate_running_std', brief='Calculate running standard deviation.', details='Computes the standard deviation of a column in a running window, e.g. to estimate the local noise of the flux; written in a new column.', url='tutorials/flux_operations.html#calculating-running-statistics', menu='Flux > Calculate Running &StdDev', params=(ParamSpec(name='input_col', type=<class 'str'>, doc="Column of which the standard deviation is computed, e.g. 'F' (the flux).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='output_col', type=<class 'str'>, doc='Name of the column to write (a new one, or one to replace; not λ, λmin, λmax, F, dF).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='window_pix', type=<class 'int'>, doc='Width of the window (pixels): an odd number; an even one is increased by 1, and one below 3 is 3.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_running_std>, references=()), 'smooth': RecipeSpec(category='flux', name='smooth', brief='Smooth spectrum.', details='Apply a Gaussian filter to the flux, its error and the columns like the flux (continuum, model, telluric transmission).', url='tutorials/flux_operations.html#smoothing', menu='Flux > &Smooth Spectrum', params=(ParamSpec(name='sigma_kms', type=<class 'float'>, doc='Standard deviation of the Gaussian kernel (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The flux, its error and the columns like the flux were smoothed with a Gaussian kernel of standard deviation {sigma_kms} km/s{menu}', references=()), 'rebin': RecipeSpec(category='flux', name='rebin', brief='Rebin spectrum.', details='Rebins the spectrum onto a new grid with a constant step, in velocity (uniform in log wavelength) or in wavelength; the flux of each new pixel is the inverse-variance weighted mean of the old ones.', url='tutorials/flux_operations.html#rebinning', menu='Flux > &Rebin Spectrum', params=(ParamSpec(name='xstart', type=<class 'float'>, doc='Start of the new grid (nm); None: the start of the data.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='xend', type=<class 'float'>, doc='End of the new grid (nm), above xstart; None: the end of the data.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='dx', type=<class 'float'>, doc='Step of the new grid, in the unit of xunit.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='xunit', type=<class 'str'>, doc='Unit of the step: a velocity (km/s, a grid uniform in log wavelength) or a wavelength (nm).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='kappa', type=<class 'float'>, doc='Threshold (in sigma) of the clipping of outliers; None: no clipping.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='filling', type=<class 'float'>, doc='Value of the new pixels without data (NaN by default).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=True, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_rebin>, references=()), 'equalize': RecipeSpec(category='flux', name='equalize', brief='Equalize flux to reference.', details='Scales the flux of this session to match that of another session where they overlap, compared in the units of this session; a flux in arbitrary units takes the unit of the reference once scaled, a normalized flux is not scaled to one that is not.', url='tutorials/flux_operations.html#equalizing', menu='Flux > &Equalize to Reference', params=(ParamSpec(name='reference_session', type=<class 'str'>, doc='Name of the open session whose flux is matched.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='session', aliases=()), ParamSpec(name='order', type=<class 'int'>, doc='Model of the scaling: 0 a constant factor, n > 0 a polynomial of order n, -1 a spline.', gui_hidden=False, optional=False, keep=(), min=-1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_equalize>, references=()), 'resample': RecipeSpec(category='flux', name='resample', brief='Resample on another grid.', details='Interpolates this spectrum onto the wavelength grid of another open session, into a new session; the first step to combine two sessions pixel by pixel.', url='tutorials/flux_operations.html#resampling', menu='Flux > Re&sample on Grid', params=(ParamSpec(name='target_session', type=<class 'str'>, doc='Name of the open session whose grid is used.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='session', aliases=()),), gui_hidden=False, branching=True, requires=frozenset(), provides=frozenset(), methods='The spectrum was interpolated onto the wavelength grid of the session {target_session}, into a new session{menu}', references=()), 'calibrate_from_magnitudes': RecipeSpec(category='flux', name='calibrate_from_magnitudes', brief='Flux calibrate (multi-band).', details='Scales the flux, smoothly with wavelength, to match the magnitudes of the object in one or more photometric filters.', url='tutorials/flux_operations.html#flux-calibration', menu='Flux > Flux &Calibrate', params=(ParamSpec(name='magnitudes', type=<class 'str'>, doc="Comma-separated 'filter=magnitude' pairs (AB magnitudes), e.g. 'SDSS_g=17.5, SDSS_r=17.0'. Filters: Johnson_U, Johnson_B, Johnson_V, Johnson_R, Johnson_I, SDSS_u, SDSS_g, SDSS_r, SDSS_i, SDSS_z.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()),), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The flux was scaled, smoothly with wavelength, to match the magnitudes {magnitudes}{menu}', references=())}), 'continuum': mappingproxy({'estimate_auto': RecipeSpec(category='continuum', name='estimate_auto', brief='Auto-estimate continuum (single-click).', details="Finds the absorbed pixels (as Find absorbed regions) and fits the continuum to the others (as Fit continuum to mask), in one step; writes 'abs_mask' and 'cont'.", url='tutorials/continuum_fitting.html#automatic-estimation', menu='Continuum > &Auto-estimate Continuum', params=(ParamSpec(name='smooth_len_lya', type=<class 'float'>, doc='Smoothing length in the Lyman-alpha forest (km/s): long, as most pixels there are absorbed.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='smooth_len_out', type=<class 'float'>, doc='Smoothing length outside the forest (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='kappa', type=<class 'float'>, doc='Threshold (in sigma) below which a pixel is taken as absorbed.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='fudge', type=<class 'str'>, doc="Factor that multiplies the continuum: 'auto' to centre it on the unabsorbed pixels, or a number (e.g. '1.0').", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='smooth_fwhm', type=<class 'float'>, doc='FWHM of the Gaussian smoothing of the final continuum (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='template', type=<class 'bool'>, doc='Trace the Lyman-alpha emission with a quasar template (needs z_em).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='renorm_model', type=<class 'bool'>, doc='Rescale the model to the new continuum (asked by the GUI).', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'z_em'}), provides=frozenset({'continuum'}), methods=<function _methods_estimate_auto>, references=('C26',)), 'find_absorbed': RecipeSpec(category='continuum', name='find_absorbed', brief='Find absorbed regions (V1 logic).', details="Finds the absorbed pixels with an iterative kappa-sigma clipping of the smoothed flux (the V1 'clip_flux' algorithm), with a longer smoothing in the Lyman-alpha forest; writes the 'abs_mask' column (True for the absorbed pixels).", url='tutorials/continuum_fitting.html#step-by-step-method', menu='Continuum > &Find Absorbed Regions', params=(ParamSpec(name='smooth_len_lya', type=<class 'float'>, doc='Smoothing length in the Lyman-alpha forest (km/s): long, as most pixels there are absorbed.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='smooth_len_out', type=<class 'float'>, doc='Smoothing length outside the forest (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='kappa', type=<class 'float'>, doc='Threshold (in sigma) below which a pixel is taken as absorbed.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='template', type=<class 'bool'>, doc='Not implemented: ignored.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'z_em'}), provides=frozenset(), methods=<function _methods_find_absorbed>, references=('C26',)), 'fit_continuum': RecipeSpec(category='continuum', name='fit_continuum', brief='Fit continuum to mask (V1 logic).', details="Fits the continuum to the pixels that a mask marks as unabsorbed: interpolates them, smooths the result and optionally centres it; writes 'cont'.", url='tutorials/continuum_fitting.html#step-by-step-method', menu='Continuum > Fit &Continuum to Mask', params=(ParamSpec(name='fudge', type=<class 'str'>, doc="Factor that multiplies the continuum: 'auto' to centre it on the unabsorbed pixels, or a number (e.g. '1.0').", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='smooth_fwhm', type=<class 'float'>, doc='FWHM of the Gaussian smoothing of the continuum (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='mask_col', type=<class 'str'>, doc="Column of the mask (True for the absorbed pixels), e.g. 'abs_mask' of Find absorbed regions.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='renorm_model', type=<class 'bool'>, doc='Rescale the model to the new continuum (asked by the GUI).', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset({'continuum'}), methods=<function _methods_fit_continuum>, references=('C26',)), 'fit_powerlaw': RecipeSpec(category='continuum', name='fit_powerlaw', brief='Fit power-law continuum.', details="Fits a power law (a line in log flux vs log wavelength) to rest-frame regions free of emission and absorption, with clipping of outliers; writes 'cont_pl' (copy it to 'cont' with Apply expression to use it).", url='tutorials/continuum_fitting.html#power-law-fitting', menu='Continuum > Fit &Power-Law', params=(ParamSpec(name='regions', type=<class 'str'>, doc="Comma-separated rest-frame wavelength ranges (nm), e.g. '128.0-129.0, 131.5-132.5'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='kappa', type=<class 'float'>, doc='Threshold (in sigma) of the clipping of outliers in the regions.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'z_em'}), provides=frozenset(), methods='A power law was fitted to the rest-frame regions {regions} nm, with a {kappa}-sigma clipping of outliers, and written in the column cont_pl{menu}', references=()), 'update_from_knots': RecipeSpec(category='continuum', name='update_from_knots', brief='Update continuum from manual knots.', details='Interpolates a spline through knots placed on the plot and writes it as the continuum.', url='tutorials/continuum_fitting.html#interactive-manual-editing', menu='', params=(ParamSpec(name='knots_x', type=<class 'list'>, doc='Wavelengths of the knots.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='knots_y', type=<class 'list'>, doc='Flux of the continuum at the knots.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='renorm_model', type=<class 'bool'>, doc='Rescale the model to the new continuum (asked by the GUI).', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset({'continuum'}), methods=<function _methods_update_from_knots>, references=())}), 'absorbers': mappingproxy({'components_auto': RecipeSpec(category='absorbers', name='components_auto', brief='Auto-detect and fit components.', details='Finds the absorbed regions, identifies the candidate systems of the given multiplets (Identify lines), adds them as components and fits them all (Refit all); the pipeline behind the other automatic recipes.', url='tutorials/absorption_systems.html#general-detection', menu='', params=(ParamSpec(name='multiplets', type=<class 'str'>, doc="Comma-separated multiplets to search for, e.g. 'CIV,SiIV,MgII,Ly_ab'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='score_threshold', type=<class 'float'>, doc='Minimum score (0-1, the R^2 of the match of the lines of a multiplet) to accept a candidate.', gui_hidden=False, optional=False, keep=(), min=0, max=1, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='merge_dv', type=<class 'float'>, doc='Absorbed regions closer than this (km/s) are merged.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='min_pix_region', type=<class 'int'>, doc='Minimum width of an absorbed region (pixels).', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='mask_col', type=<class 'str'>, doc='Column of the mask of the absorbed pixels.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift of a component can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Upper bound on b in the fits (km/s); components at the bound may be broader and can be refitted.', gui_hidden=False, optional=False, keep=(), min=None, max=300, gt=1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_logN', type=<class 'float'>, doc='Upper bound on logN in the fits; damped systems (logN > 19) are to be fitted by hand.', gui_hidden=False, optional=False, keep=(), min=None, max=23, gt=10, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='region_limit', type=<class 'str'>, doc="Search and fit only in a region: 'red_side', 'lya_forest', 'all_ly_forest', or 'None' for the whole spectrum.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('None', 'lya_forest', 'all_ly_forest', 'red_side'), kind='', aliases=()), ParamSpec(name='mask', type=<class 'str'>, doc="Mask of the absorbed pixels used to find the regions: 'new' (made again with the defaults of Find absorbed regions) or 'session' (the 'abs_mask' already in the session, e.g. from Auto-estimate continuum with other parameters).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('new', 'session'), kind='', aliases=()), ParamSpec(name='z_em_margin_kms', type=<class 'float'>, doc='How far beyond z_em a candidate system can lie (km/s): the associated absorbers and the uncertainty of z_em.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'z_em', 'continuum'}), provides=frozenset(), methods=<function _methods_components_auto>, references=('C26', 'SciPy')), 'doublets_auto': RecipeSpec(category='absorbers', name='doublets_auto', brief='Auto-fit metal doublets (Red Side).', details='Finds and fits metal doublets (CIV, SiIV, MgII by default) on the red side of the Lyman-alpha emission, where the forest does not confuse them; candidates are kept up to z_em_margin_kms beyond z_em.', url='tutorials/absorption_systems.html#metal-doublets', menu='Absorbers > Auto-detect &Doublets', params=(ParamSpec(name='multiplets', type=<class 'str'>, doc='Comma-separated doublets to search for.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='score_threshold', type=<class 'float'>, doc='Minimum score (0-1, the R^2 of the match of the two lines) to accept a candidate.', gui_hidden=False, optional=False, keep=(), min=0, max=1, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift of a component can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Upper bound on b in the fits (km/s); components at the bound may be broader and can be refitted.', gui_hidden=False, optional=False, keep=(), min=None, max=300, gt=1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_logN', type=<class 'float'>, doc='Upper bound on logN in the fits; damped systems (logN > 19) are to be fitted by hand.', gui_hidden=False, optional=False, keep=(), min=None, max=23, gt=10, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='mask', type=<class 'str'>, doc="Mask of the absorbed pixels used to find the regions: 'new' (made again with the defaults of Find absorbed regions) or 'session' (the 'abs_mask' already in the session, e.g. from Auto-estimate continuum with other parameters).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('new', 'session'), kind='', aliases=()), ParamSpec(name='z_em_margin_kms', type=<class 'float'>, doc='How far beyond z_em a candidate system can lie (km/s): the associated absorbers and the uncertainty of z_em.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'z_em', 'continuum'}), provides=frozenset(), methods=<function _methods_doublets_auto>, references=('C26', 'SciPy')), 'lya_auto': RecipeSpec(category='absorbers', name='lya_auto', brief='Auto-fit Ly-alpha forest.', details='Finds and fits single Lyman-alpha lines in the forest (between Ly-beta and Ly-alpha); lines narrower than min_b (metal lines or noise) are removed and the rest refitted.', url='tutorials/absorption_systems.html#ly-alpha-forest', menu='Absorbers > Auto-fit &Ly-alpha Forest', params=(ParamSpec(name='score_threshold', type=<class 'float'>, doc='Minimum score (0-1) to accept a line; low, as single lines have no partner to match.', gui_hidden=False, optional=False, keep=(), min=0, max=1, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='min_b', type=<class 'float'>, doc='Lines narrower than this (km/s) are removed as interlopers.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift of a component can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Upper bound on b in the fits (km/s); components at the bound may be broader and can be refitted.', gui_hidden=False, optional=False, keep=(), min=None, max=300, gt=1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_logN', type=<class 'float'>, doc='Upper bound on logN in the fits; damped systems (logN > 19) are to be fitted by hand.', gui_hidden=False, optional=False, keep=(), min=None, max=23, gt=10, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='mask', type=<class 'str'>, doc="Mask of the absorbed pixels used to find the regions: 'new' (made again with the defaults of Find absorbed regions) or 'session' (the 'abs_mask' already in the session, e.g. from Auto-estimate continuum with other parameters).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('new', 'session'), kind='', aliases=()), ParamSpec(name='z_em_margin_kms', type=<class 'float'>, doc='How far beyond z_em a candidate system can lie (km/s): the associated absorbers and the uncertainty of z_em.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'z_em', 'continuum'}), provides=frozenset(), methods=<function _methods_lya_auto>, references=('C26', 'SciPy')), 'forest_auto': RecipeSpec(category='absorbers', name='forest_auto', brief='Auto-fit full Lyman series.', details='Finds Lyman-alpha lines and fits each as a Lyman series (Ly-alpha to the Lyman limit), so that the higher-order lines constrain the column density; systems narrower than min_b are removed.', url='tutorials/absorption_systems.html#automated-detection-pipelines', menu='', params=(ParamSpec(name='score_threshold', type=<class 'float'>, doc='Minimum score (0-1) to accept a line.', gui_hidden=False, optional=False, keep=(), min=0, max=1, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='min_b', type=<class 'float'>, doc='Lyman systems narrower than this (km/s) are removed.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift of a component can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Upper bound on b in the fits (km/s); components at the bound may be broader and can be refitted.', gui_hidden=False, optional=False, keep=(), min=None, max=300, gt=1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_logN', type=<class 'float'>, doc='Upper bound on logN in the fits; damped systems (logN > 19) are to be fitted by hand.', gui_hidden=False, optional=False, keep=(), min=None, max=23, gt=10, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_em_margin_kms', type=<class 'float'>, doc='How far beyond z_em a candidate system can lie (km/s): the associated absorbers and the uncertainty of z_em.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'z_em', 'continuum'}), provides=frozenset(), methods=<function _methods_forest_auto>, references=('C26', 'SciPy')), 'metals_auto': RecipeSpec(category='absorbers', name='metals_auto', brief='Check for associated metals.', details='For each system already in the list, tries to add other metal ions at its redshift and keeps each whose fit gives logN >= 12 and 2 <= b <= 50 km/s, not at the bounds of the fit, and decreases the AIC by the AIC penalty; skips the ions whose lines fall outside the spectrum; then refits all.', url='tutorials/absorption_systems.html#automated-detection-pipelines', menu='', params=(ParamSpec(name='ions', type=<class 'str'>, doc="Comma-separated ions to try, e.g. 'CIV,SiIV,NV,OVI,CII,MgII'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='aic_penalty', type=<class 'float'>, doc='Decrease of the AIC needed to keep a new ion (against the same model without it, on the pixels of its fit).', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift of a component can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Upper bound on b in the fits (km/s); components at the bound may be broader and can be refitted.', gui_hidden=False, optional=False, keep=(), min=None, max=300, gt=1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_logN', type=<class 'float'>, doc='Upper bound on logN in the fits; damped systems (logN > 19) are to be fitted by hand.', gui_hidden=False, optional=False, keep=(), min=None, max=23, gt=10, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'z_em', 'continuum'}), provides=frozenset(), methods=<function _methods_metals_auto>, references=('C26', 'SciPy')), 'identify_lines': RecipeSpec(category='absorbers', name='identify_lines', brief='Identify likely absorption systems.', details='Finds the absorbed regions from the mask, scores how well each multiplet matches them (the R^2 of the correlation of its lines) and keeps the best candidate systems; writes them in a new session, with the region and the score of each.', url='tutorials/absorption_systems.html#general-detection', menu='Absorbers > &Identify Absorption Lines', params=(ParamSpec(name='multiplets', type=<class 'str'>, doc="Comma-separated multiplets to search for, e.g. 'CIV,SiIV,MgII,Ly_ab'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='mask_col', type=<class 'str'>, doc="Column of the mask (True for the absorbed pixels), e.g. 'abs_mask' of Find absorbed regions.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='min_pix_region', type=<class 'int'>, doc='Minimum width of an absorbed region (pixels).', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='merge_dv', type=<class 'float'>, doc='Absorbed regions closer than this (km/s) are merged.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='score_threshold', type=<class 'float'>, doc='Minimum score (0-1, the R^2 of the match of the lines) to accept a candidate.', gui_hidden=False, optional=False, keep=(), min=0, max=1, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='bypass_scoring', type=<class 'bool'>, doc='Accept every candidate found by the positions of its lines, without the score (for debugging).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=()), ParamSpec(name='debug_rating', type=<class 'bool'>, doc='Show the plots of the scores (for debugging).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=False, choices=(), kind='', aliases=()), ParamSpec(name='z_em_margin_kms', type=<class 'float'>, doc='How far beyond z_em a candidate system can lie (km/s): the associated absorbers and the uncertainty of z_em.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=True, requires=frozenset({'resolution', 'z_em', 'continuum'}), provides=frozenset(), methods=<function _methods_identify_lines>, references=('C26',)), 'populate_from_identification': RecipeSpec(category='absorbers', name='populate_from_identification', brief='Populate components from identification.', details="Populates the system list using the regions and candidates found by 'identify_lines'.", url='tutorials/absorption_systems.html#general-detection', menu='', params=(ParamSpec(name='region_id_col', type=<class 'str'>, doc='Column of the region of each pixel, written by Identify lines.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='column', aliases=()), ParamSpec(name='series_map_json', type=<class 'str'>, doc='JSON object: region -> series of its candidate.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_map_json', type=<class 'str'>, doc='JSON object: region -> redshift of its candidate.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset({'continuum'}), provides=frozenset(), methods='Components were added at the candidate systems of the identification{menu}', references=()), 'add_component': RecipeSpec(category='absorbers', name='add_component', brief='Add a single component.', details='Adds a Voigt component of a transition or multiplet at a redshift and fits it with its neighbours.', url='tutorials/absorption_systems.html#adding-components', menu='', params=(ParamSpec(name='series', type=<class 'str'>, doc="Transition or multiplet, e.g. 'Ly_a', 'CIV', or a multiplet of its own written as its transitions, e.g. 'FeII_2586,FeII_2600' (several series at the same redshift: add_linked_system).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z', type=<class 'float'>, doc='Redshift.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='logN', type=<class 'float'>, doc='Starting column density (log cm^-2).', gui_hidden=False, optional=False, keep=(), min=10, max=23, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='b', type=<class 'float'>, doc='Starting Doppler parameter (km/s).', gui_hidden=False, optional=False, keep=(), min=1, max=300, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='btur', type=<class 'float'>, doc='Turbulent broadening (km/s); frozen in the fits unless freed.', gui_hidden=False, optional=False, keep=(), min=0, max=100, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'continuum'}), provides=frozenset(), methods=<function _methods_add_component>, references=('SciPy',)), 'update_component': RecipeSpec(category='absorbers', name='update_component', brief='Update component.', details='Changes the parameters of a component; a parameter left at None keeps its value (at least one must be given).', url='tutorials/absorption_systems.html#interactive-fitting-editing', menu='', params=(ParamSpec(name='uuid', type=<class 'str'>, doc='Identifier of the component.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z', type=<class 'float'>, doc='Redshift.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='logN', type=<class 'float'>, doc='Column density (log cm^-2).', gui_hidden=False, optional=True, keep=(), min=10, max=23, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='b', type=<class 'float'>, doc='Doppler parameter (km/s).', gui_hidden=False, optional=True, keep=(), min=1, max=300, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='btur', type=<class 'float'>, doc='Turbulent broadening (km/s).', gui_hidden=False, optional=True, keep=(), min=0, max=100, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='series', type=<class 'str'>, doc="Transition or multiplet, e.g. 'CIV'.", gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='resol', type=<class 'float'>, doc='Resolving power R of this component, instead of that of the spectrum; 0 removes it (the component follows the spectrum).', gui_hidden=False, optional=True, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_update_component>, references=()), 'update_components': RecipeSpec(category='absorbers', name='update_components', brief='Batch update components.', details='Sets the same parameters on several components; a parameter left at None keeps its value (at least one must be given).', url='tutorials/absorption_systems.html#interactive-fitting-editing', menu='', params=(ParamSpec(name='uuids', type=<class 'list'>, doc='Identifiers of the components.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z', type=<class 'float'>, doc='Redshift.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='logN', type=<class 'float'>, doc='Column density (log cm^-2).', gui_hidden=False, optional=True, keep=(), min=10, max=23, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='b', type=<class 'float'>, doc='Doppler parameter (km/s).', gui_hidden=False, optional=True, keep=(), min=1, max=300, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='btur', type=<class 'float'>, doc='Turbulent broadening (km/s).', gui_hidden=False, optional=True, keep=(), min=0, max=100, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='series', type=<class 'str'>, doc="Transition or multiplet, e.g. 'CIV'.", gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='resol', type=<class 'float'>, doc='Resolving power R of these components, instead of that of the spectrum; 0 removes it (the components follow the spectrum).', gui_hidden=False, optional=True, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_update_components>, references=()), 'delete_component': RecipeSpec(category='absorbers', name='delete_component', brief='Delete component(s).', details='Deletes one or more components (uuid, uuids, or both) and recomputes the model.', url='tutorials/absorption_systems.html#interactive-fitting-editing', menu='', params=(ParamSpec(name='uuid', type=<class 'str'>, doc='Identifier of the component to delete.', gui_hidden=True, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='uuids', type=<class 'list'>, doc='Identifiers of the components to delete.', gui_hidden=True, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_delete_component>, references=()), 'detect_anchor': RecipeSpec(category='absorbers', name='detect_anchor', brief='Detect doublet anchor redshift.', details='Finds the redshift at which a transition of this session and one of a sibling session (e.g. the two lines of a doublet, in two sessions) overlap best, on the flux normalized by the continuum.', url='tutorials/absorption_systems.html#doublet-anchor-across-two-sessions', menu='', params=(ParamSpec(name='sibling_name', type=<class 'str'>, doc='Name of the sibling session.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='session', aliases=()), ParamSpec(name='trans_self', type=<class 'str'>, doc="Transition in this session, e.g. 'OVI_1031'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='trans_sibling', type=<class 'str'>, doc="Transition in the sibling session, e.g. 'OVI_1037'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods='The redshift at which {trans_self} in this session and {trans_sibling} in the session {sibling_name} overlap best was found{menu}', references=()), 'fit_component': RecipeSpec(category='absorbers', name='fit_component', brief='Fit component.', details='Fits a component with its neighbours (the components blended with it) using the Voigt fitter.', url='tutorials/absorption_systems.html#interactive-fitting-editing', menu='', params=(ParamSpec(name='uuid', type=<class 'str'>, doc='Identifier of the component.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_nfev', type=<class 'int'>, doc='Maximum number of evaluations of the model.', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='group_depth', type=<class 'int'>, doc='How far the group extends: 0 the component alone, 1 the components blended with it, 2 also those blended with them.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset({'resolution', 'continuum'}), provides=frozenset(), methods=<function _methods_fit_component>, references=('SciPy',)), 'update_constraint': RecipeSpec(category='absorbers', name='update_constraint', brief='Update constraint.', details='Freezes or frees a parameter of a component, or links it to a parameter of another component with an expression (a linked parameter is frozen; freeing it removes the link).', url='tutorials/absorption_systems.html#constraints-fix-free', menu='', params=(ParamSpec(name='uuid', type=<class 'str'>, doc='Identifier of the component.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='param', type=<class 'str'>, doc="Parameter: 'z', 'logN', 'b' or 'btur'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('z', 'logN', 'b', 'btur'), kind='', aliases=()), ParamSpec(name='is_free', type=<class 'bool'>, doc='True: free to vary in the fits (and not linked); False: frozen; None: as it is (frozen if an expression is given).', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='expression', type=<class 'str'>, doc='Expression that links the parameter to another component, e.g. "p[\'<uuid of the other component>\'].z" (None: no link); one that cannot be evaluated, or that names the component itself, is refused.', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='target_uuid', type=<class 'str'>, doc='Identifier of the component it is linked to, which the fits include in its group: one named by the expression (None: the first it names).', gui_hidden=False, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_update_constraint>, references=()), 'update_constraints_column': RecipeSpec(category='absorbers', name='update_constraints_column', brief='Bulk update constraints.', details='Freezes or frees a parameter of all the components.', url='tutorials/absorption_systems.html#constraints-fix-free', menu='', params=(ParamSpec(name='param', type=<class 'str'>, doc="Parameter: 'z', 'logN', 'b' or 'btur'.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('z', 'logN', 'b', 'btur'), kind='', aliases=()), ParamSpec(name='is_free', type=<class 'bool'>, doc='True: free to vary in the fits (the links removed); False: frozen.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_update_constraints_column>, references=()), 'add_linked_system': RecipeSpec(category='absorbers', name='add_linked_system', brief='Add linked system.', details='Adds components of several series at the same redshift, with the redshifts linked, and fits them.', url='tutorials/absorption_systems.html#parameter-linking', menu='', params=(ParamSpec(name='series_list', type=<class 'str'>, doc="Comma-separated series, each a transition or a multiplet, e.g. 'CIV,SiIV'; the redshifts are linked to that of the first.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z', type=<class 'float'>, doc='Redshift.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=-1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='logN', type=<class 'float'>, doc='Starting column density (log cm^-2).', gui_hidden=False, optional=False, keep=(), min=10, max=23, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='b', type=<class 'float'>, doc='Starting Doppler parameter (km/s).', gui_hidden=False, optional=False, keep=(), min=1, max=300, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset({'resolution', 'continuum'}), provides=frozenset(), methods=<function _methods_add_linked_system>, references=('SciPy',)), 'optimize_system': RecipeSpec(category='absorbers', name='optimize_system', brief='Optimize system (Iterative Fit).', details='Adds components to a system one at a time where the residuals are significant, keeping each only if it improves the fit by the AIC penalty.', url='tutorials/absorption_systems.html#refitting', menu='', params=(ParamSpec(name='uuid', type=<class 'str'>, doc='Identifier of a component of the system.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_components', type=<class 'int'>, doc='Maximum number of candidate components tried (each counts, also one rejected or too close to another).', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='threshold_sigma', type=<class 'float'>, doc='Residual (in sigma) above which a new component is tried.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='aic_penalty', type=<class 'float'>, doc='Decrease of the AIC needed to keep a new component.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the velocity window around the first line of the system (km/s): where the residuals are searched and the AIC is computed, and how far the redshifts can move in the fits.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='min_dv', type=<class 'float'>, doc='Minimum separation of a new component from the others (km/s); lower to resolve blends.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='group_depth', type=<class 'int'>, doc='How far the group extends: 0 the component alone, 1 the components blended with it, 2 also those blended with them.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='patience', type=<class 'int'>, doc='Number of tries without an improvement before stopping.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_nfev', type=<class 'int'>, doc='Maximum number of evaluations of the model in each fit; a fit that reaches it counts as failed (its candidate is rejected).', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'continuum'}), provides=frozenset(), methods=<function _methods_optimize_system>, references=('C26', 'SciPy')), 'fit_bayesian': RecipeSpec(category='absorbers', name='fit_bayesian', brief='Fit Bayesian.', details='Samples the posterior of the parameters of a group of components, with MCMC (emcee) or nested sampling (dynesty), and gives the components its medians, with its standard deviations as errors; the prior is flat, z within +-20 km/s of its current value, logN and b within the bounds of the fit. Needs the [bayes] extra.', url='tutorials/absorption_systems.html#bayesian-fitting-experimental', menu='', params=(ParamSpec(name='uuids', type=<class 'list'>, doc='Identifiers of the components of the group.', gui_hidden=True, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='engine', type=<class 'str'>, doc="Sampler: 'mcmc' (emcee) or 'nested' (dynesty).", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('mcmc', 'nested'), kind='', aliases=()), ParamSpec(name='nsteps', type=<class 'int'>, doc='Number of steps of each walker (MCMC; 32 walkers, or twice the free parameters if more than 16; the first min(200, nsteps/2) steps are discarded).', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='nlive', type=<class 'int'>, doc='Number of live points (nested sampling): at least 10 per free parameter.', gui_hidden=False, optional=False, keep=(), min=10, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='group_depth', type=<class 'int'>, doc='How far the group extends: 0 the components alone, 1 the components blended with them, 2 also those blended with these.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='seed', type=<class 'int'>, doc='Seed of the random numbers, for a sampling that can be repeated (None: not repeatable).', gui_hidden=False, optional=True, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=True, branching=False, requires=frozenset({'resolution', 'continuum'}), provides=frozenset(), methods=<function _methods_fit_bayesian>, references=('emcee', 'dynesty')), 'refit_all': RecipeSpec(category='absorbers', name='refit_all', brief='Refit all systems.', details='Fits all the components, group by group (the components blended with each other), each group on its own.', url='tutorials/absorption_systems.html#refitting', menu='Absorbers > &Refit All Systems', params=(ParamSpec(name='max_nfev', type=<class 'int'>, doc='Maximum number of evaluations of the model, per group.', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='z_window_kms', type=<class 'float'>, doc='Half-width of the window in which the redshift of a component can move in the fit (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='group_depth', type=<class 'int'>, doc='How far a group extends: 0 each component alone, 1 the components blended with it, 2 also those blended with them.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_group_size', type=<class 'int'>, doc='Maximum number of components fitted together: larger groups are split.', gui_hidden=False, optional=False, keep=(), min=1, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Upper bound on b in the fits (km/s).', gui_hidden=False, optional=False, keep=(), min=None, max=300, gt=1, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_logN', type=<class 'float'>, doc='Upper bound on logN in the fits (log cm^-2).', gui_hidden=False, optional=False, keep=(), min=None, max=23, gt=10, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='region_limit', type=<class 'str'>, doc="Fit only the components in a region: 'red_side', 'lya_forest', 'all_ly_forest', or 'None' for all.", gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=('None', 'lya_forest', 'all_ly_forest', 'red_side'), kind='', aliases=()), ParamSpec(name='selected_uuids', type=<class 'list'>, doc='Fit only these components, with their groups (None: all).', gui_hidden=True, optional=True, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset({'resolution', 'continuum'}), provides=frozenset(), methods=<function _methods_refit_all>, references=('SciPy',)), 'clean_negligible': RecipeSpec(category='absorbers', name='clean_negligible', brief='Remove unphysical/negligible components.', details='Removes the components that are too weak, too narrow, or too broad (and weak) to be real absorbers.', url='tutorials/absorption_systems.html#cleaning-results', menu='Absorbers > &Clean Negligible Components', params=(ParamSpec(name='min_logN', type=<class 'float'>, doc='Components with a lower column density (log cm^-2) are removed.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='max_b', type=<class 'float'>, doc='Components broader than this (km/s) are removed (see combined_check).', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=0, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='min_b', type=<class 'float'>, doc='Components narrower than this (km/s) are removed.', gui_hidden=False, optional=False, keep=(), min=0, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=()), ParamSpec(name='combined_check', type=<class 'bool'>, doc='True: remove a component broader than max_b only if it is also weak (logN < 13); False: remove all of them.', gui_hidden=False, optional=False, keep=(), min=None, max=None, gt=None, allow_nan=False, agents=True, choices=(), kind='', aliases=())), gui_hidden=False, branching=False, requires=frozenset(), provides=frozenset(), methods=<function _methods_clean_negligible>, references=())})})#

category -> recipe name -> RecipeSpec (read only)

Type:

The registry

astrocook.recipes.registry.get_recipe(category: str, name: str) → RecipeSpec[source]#

The RecipeSpec of a recipe (KeyError if there is none).

astrocook.recipes.registry.find_recipe(name: str) → RecipeSpec | None[source]#

The RecipeSpec of a recipe by its name alone (names are unique across the categories), or None.

astrocook.recipes.registry.all_recipes() → Iterator[RecipeSpec][source]#

All the recipes, by category in the order of the menus.

astrocook.recipes.registry.canonical_params(name: str, params: Mapping[str, Any]) → Dict[str, Any][source]#

The parameters of a log entry of the recipe name, with the old names replaced by the new ones (RecipeSpec.canonical()): for the log of an archive, when it is read. A recipe that is not in the registry, or an entry that gives a parameter by both its names (a log written by hand), is kept as it is: the replay says what is wrong.