rail.plotting.utility_functions module
- rail.plotting.utility_functions.adjacent_band_colors(mags)[source]
Return a set of colors using magnitudes in adjacent bands
I.e., u-g, g-r, r-i, i-z, z-y
Note that there will be one less color than bands
- Return type:
ndarray- Parameters:
mags (ndarray) – Input data
- Return type:
Output colors
- rail.plotting.utility_functions.build_template_dict(seds, filters)[source]
Extract AB templates
- Return type:
dict[str,tuple[ndarray,ndarray,ndarray,int]]- Parameters:
seds (list[str]) – Names of the seds to use
filters (list[str]) – Name of the filters to use
- Returns:
Dict mapping sed name to a tuple with
redshifts (N), mags (N, N_filter), colors (N, N_filter-1), sed_index
- rail.plotting.utility_functions.extract_data_to_2d_array(data, column_names)[source]
Extract a set of columns from a table to a 2D array
- Return type:
ndarray- Parameters:
data (Any) – Input data
column_names (list[str]) – Names of the columns to extract
- Return type:
Output 2D-Array
- rail.plotting.utility_functions.get_band_values(input_data, band_name_template, bands)[source]
Extract a set of columns from a table to a 2D array
- Return type:
ndarray- Parameters:
input_data (ndarray) – Input data
template – Template to make the names
bands (list[str]) – List of the bands to apply to the template
band_name_template (str)
- Return type:
Output 2D-Array
- rail.plotting.utility_functions.make_band_names(template, bands)[source]
Make a set of band names from template and a list of bands
- Return type:
list[str]- Parameters:
template (str) – Template to make the names
bands (list[str]) – List of the bands to apply to the template
- Return type:
Names of the bands