Viewer

class eazy.hdf5.Viewer(h5file, verbose=True)[source]

Bases: object

Tool to replicate functionality of PhotoZ.show_fit but with data read from a stored HDF5 file rather than a “live” object

Attributes Summary

ARRAY_DTYPE

Array data type from ARRAY_NBITS parameter

MW_EBV

Galactic extinction E(B-V)

lc

Filter pivot wavelengths (deprecated, use pivot)

to_flam

Conversion factor to \(10^{-19} erg/s/cm^2/Å\)

to_uJy

Conversion of observed fluxes to microJansky

Methods Summary

get_catalog()

Create a full catalog table from the photometry data in the HDF5 file

get_dataset(name[, sl, verbose])

Get a single column of data from the HDF5 file

get_lnp(ix)

Compute ln P(z) directly from chi2.

get_object_data(ix)

Pull out data for a given array index (not id!) corresponding to a particular object

get_table(names[, sl, verbose, strip_slash, ...])

Build a table from multiple dataset names

info()

Print file contents

set_attrs_for_dash()

Set additional attributes needed for the Dash/Plotly tool.

set_attrs_from_hdf5()

Set fixed attributes needed for show_fit

set_tempfilt()

Generate the eazy.photoz.TemlpateGrid object needed for plotting SEDs and refitting at other redshifts.

set_template_error()

Set the Template Error Function from fit/tef_x and fit/tef_y data in the HDF5 file

show_fit(id, **kwargs)

Wrapper around eazy.photoz.PhotoZ.show_fit

show_fit_plotly(id, **kwargs)

Wrapper around eazy.photoz.PhotoZ.show_fit_plotly

Attributes Documentation

ARRAY_DTYPE

Array data type from ARRAY_NBITS parameter

MW_EBV

Galactic extinction E(B-V)

lc

Filter pivot wavelengths (deprecated, use pivot)

to_flam

Conversion factor to \(10^{-19} erg/s/cm^2/Å\)

to_uJy

Conversion of observed fluxes to microJansky

Methods Documentation

get_catalog()[source]

Create a full catalog table from the photometry data in the HDF5 file

get_dataset(name, sl=None, verbose=True)[source]

Get a single column of data from the HDF5 file

If name is in the self.flux_columns or self.err_columns lists, then compute the appropriate index of the fit/fnu or fit/efnu_orig datasets, respectively.

Parameters:
namestr

Dataset name in h5file

slslice-like

Array slice

verbosebool

Print some status info

Returns:
dataarray-like

Sliced dataset data

get_lnp(ix)[source]

Compute ln P(z) directly from chi2.

N.B. No prior implemented yet!

get_object_data(ix)[source]

Pull out data for a given array index (not id!) corresponding to a particular object

Returns:
z_i, fnu_i, efnu_i, ra_i, dec_i, chi2_i, zspec_i, ok_i
get_table(names, sl=None, verbose=True, strip_slash=True, as_table=True)[source]

Build a table from multiple dataset names

Parameters:
namesstr

Dataset names in h5file

slslice-like

Array slice

verbosebool

Print some status info

Returns:
dataarray-like

Sliced dataset data

info()[source]

Print file contents

set_attrs_for_dash()[source]

Set additional attributes needed for the Dash/Plotly tool. They’re not set in set_attrs_from_hdf5 as they may be memory-intensive for very large catalogs and aren’t explicitly necessary for just show_fit showing SEDs.

set_attrs_from_hdf5()[source]

Set fixed attributes needed for show_fit

set_tempfilt()[source]

Generate the eazy.photoz.TemlpateGrid object needed for plotting SEDs and refitting at other redshifts.

set_template_error()[source]

Set the Template Error Function from fit/tef_x and fit/tef_y data in the HDF5 file

Returns:
Sets TEF attributes
show_fit(id, **kwargs)[source]

Wrapper around eazy.photoz.PhotoZ.show_fit

show_fit_plotly(id, **kwargs)[source]

Wrapper around eazy.photoz.PhotoZ.show_fit_plotly