rail.core.common_params module

Parameters that are shared between stages

class rail.core.common_params.SharedParams

Bases: object

Parameters:
  • hdf5_groupname ([str] default=photometry) – name of hdf5 group for data, if None, then set to ‘’

  • chunk_size ([int] default=10000) – Number of objects per chunk for parallel processing or to evalute per loop in single node processing

  • zmin ([float] default=0.0) – The minimum redshift of the z grid or sample

  • zmax ([float] default=3.0) – The maximum redshift of the z grid or sample

  • nzbins ([int] default=301) – The number of gridpoints in the z grid

  • dz ([float] default=0.01) – delta z in grid

  • nondetect_val ([float] default=99.0) – value to be replaced with magnitude limit for non detects

  • nonobserved_val ([float] default=-99.0) – guard value for non-observations

  • bands ([list] default=['mag_u_lsst', 'mag_g_lsst', 'mag_r_lsst', 'mag_i_lsst', 'mag_z_lsst', 'mag_y_lsst']) – Names of columns for magnitude by filter band

  • err_bands ([list] default=['mag_err_u_lsst', 'mag_err_g_lsst', 'mag_err_r_lsst', 'mag_err_i_lsst', 'mag_err_z_lsst', 'mag_err_y_lsst']) – Names of columns for magnitude errors by filter band

  • err_dict ([dict] default={'mag_u_lsst': 'mag_err_u_lsst', 'mag_g_lsst': 'mag_err_g_lsst', 'mag_r_lsst': 'mag_err_r_lsst', 'mag_i_lsst': 'mag_err_i_lsst', 'mag_z_lsst': 'mag_err_z_lsst', 'mag_y_lsst': 'mag_err_y_lsst', 'redshift': None}) – dictionary that contains the columns that will be used topredict as the keys and the errors associated with that column as the values.If a column does not havea an associated error its value shoule be None

  • mag_limits ([dict] default={'mag_u_lsst': 27.79, 'mag_g_lsst': 29.04, 'mag_r_lsst': 29.06, 'mag_i_lsst': 28.62, 'mag_z_lsst': 27.98, 'mag_y_lsst': 27.05}) – Limiting magnitudes by filter

  • band_a_env ([dict] default={'mag_u_lsst': 4.81, 'mag_g_lsst': 3.64, 'mag_r_lsst': 2.7, 'mag_i_lsst': 2.06, 'mag_z_lsst': 1.58, 'mag_y_lsst': 1.31}) – Reddening parameters

  • ref_band ([str] default=mag_i_lsst) – band to use in addition to colors

  • redshift_col ([str] default=redshift) – name of redshift column

  • id_col ([str] default=object_id) – name of the object ID column

  • object_id_col ([str] default=objectId) – name of object id column

  • zp_errors ([list] default=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]) – BPZ adds these values in quadrature to the photometric errors

  • calc_summary_stats ([bool] default=False) – Compute summary statistics

  • calculated_point_estimates ([list] default=[]) – List of strings defining which point estimates to automatically calculate using qp.Ensemble.Options include, ‘mean’, ‘mode’, ‘median’.

  • recompute_point_estimates ([bool] default=False) – Force recomputation of point estimates

  • replace_error_vals ([list] default=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]) – list of values to replace negative and nan mag err values

  • filter_list ([list] default=['DC2LSST_u', 'DC2LSST_g', 'DC2LSST_r', 'DC2LSST_i', 'DC2LSST_z', 'DC2LSST_y']) – list of filter files names (with no ‘.sed’ suffix). Filters must bein FILTER dir. MUST BE IN SAME ORDER as ‘bands’

  • leaf_size ([int] default=15) – The leaf size for tree algorithms.

  • max_wavelength ([float] default=12000) – The maximum rest-frame wavelength

  • min_wavelength ([float] default=250) – The minimum rest-frame wavelength.

  • redshift_key ([str] default=redshifts) – The keyword of the redshift group in the hdf5 dataset.

static copy_param(param_name)

Return a copy of one of the shared parameters

Parameters:

param_name (str) – Name of the parameter to copy

Returns:

Copied parameter

Return type:

Param

static set_param_default(param_name, default_value)

Change the default value of one of the shared parameters

Parameters:
  • param_name (str) – Name of the parameter to copy

  • default_value (Any) – New default value

Return type:

None

static set_param_defaults(**kwargs)

Change the default value of several of the shared parameters

Parameters:

**kwargs (Any) – Key, value pairs of parameter names and default values

Return type:

None

rail.core.common_params.copy_param(param_name)

Return a copy of one of the shared parameters

Parameters:

param_name (str) – Name of the parameter to copy

Returns:

Copied parameter

Return type:

Param

rail.core.common_params.set_param_default(param_name, default_value)

Change the default value of one of the shared parameters

Parameters:
  • param_name (str) – Name of the parameter to copy

  • default_value (Any) – New default value

Return type:

None

rail.core.common_params.set_param_defaults(**kwargs)

Change the default value of several of the shared parameters

Parameters:

**kwargs (Any) – Key, value pairs of parameter names and default values

Return type:

None