lsst_inaf_agile.egg

Impelement wrapper for calling egg.

Attributes

logger

formatter

handler

Classes

Egg

EGG class.

Functions

find_egg()

Module Contents

logger[source]
formatter[source]
handler[source]
find_egg()[source]
class Egg(egg_kwargs)[source]

EGG class.

Provie a wrapper for the EGG command-line software.

Examples

>>> # Create an EGG object with 1deg2 area and logM > 9.5 (Chabrier)
>>> # follow-it by calling egg.run() ...
>>> egg = Egg({'area': 1, 'mmin': 9.5})
egg_kwargs[source]
get_argument_line(exclude=None)[source]

Get the EGG argument line for calling it from the terminal.

get_filename()[source]

Return an example filename constructed from the kwargs.

get_area()[source]

Return EGG catalog area.

run(overwrite=False)[source]

Run EGG using the kwargs supplied.

get_sed(i, component=None, overwrite=False)[source]

Return an EGG SED.

Parameters:
  • i (int) – ID of the galaxy.

  • component (str or None) – One of “bulge”, “disk” or None (= bulge + disk).

  • overwrite (bool) – Run egg-getsed regardless of existing filename.

Raises:

ValueError – If component is invalid.

static read(filename)[source]

Read an EGG catalog from the filename.

Note that usually and for small files, loading EGG through astropy/fitsio works fine. For large files (n_bands * n_galaxies >= 2 ** 28) these routines fail due to the dtype not fitting into a C integer.

The workaround is to write these columns as binary files using a separate routine, which can then be read using numpy and shaped to the correct shape.

This is a dirty hack, but the alternative is to change completely how EGG writes the FITS files.

static get_smf(z, key, filename)[source]

Read an EGG-like stellar mass function from a file.

Parameters:
  • z (float) – Redshift of the stellar mass function.

  • key (str) – One of “ACTIVE” or “PASSIVE”.

  • filename (str) – Filename containing the stellar mass function in EGG format.

static run_config(filename)[source]

Run EGG for the given configuration file.

Parameters:

filename (str) – Path to configuration file.

Return type:

The EGG catalog using Egg.read.

static get_example_egg_kwargs(filename)[source]

Return and example set of EGG kwargs for testing purposes.