def __init__(self, metricName='plasticc_transient', mjdCol='observationStartMJD', m5Col='fiveSigmaDepth', filterCol='filter', color_gap=0.5, pre_slope_range=0.3, days_around_peak=200, r_mag_limit=28, nbins=10, nsamples=5, maps=['DustMap'], apply_dust=True, units='fraction', **kwargs): self.mjdCol = mjdCol self.m5Col = m5Col self.filterCol = filterCol self.color_gap = color_gap self.pre_slope_range = pre_slope_range self.days_around_peak = days_around_peak self.rmag_limit = r_mag_limit self.nbins = nbins self.nsamples = nsamples self.apply_dust = apply_dust super(Plasticc_metric, self).__init__(col=[self.mjdCol, self.m5Col, self.filterCol], metricName=metricName, maps=maps, units=units, **kwargs) dust_properties = Dust_values() self.Ax1 = dust_properties.Ax1
def __init__(self, metricName='KNePopMetric', mjdCol='observationStartMJD', m5Col='fiveSigmaDepth', filterCol='filter', nightCol='night', ptsNeeded=2, file_list=None, mjd0=59853.5, outputLc=False, **kwargs): maps = ['DustMap'] self.mjdCol = mjdCol self.m5Col = m5Col self.filterCol = filterCol self.nightCol = nightCol self.ptsNeeded = ptsNeeded # Boolean variable, if True the light curve will be exported self.outputLc = outputLc self.lightcurves = KN_lc(file_list=file_list) self.mjd0 = mjd0 dust_properties = Dust_values() self.Ax1 = dust_properties.Ax1 cols = [self.mjdCol, self.m5Col, self.filterCol, self.nightCol] super(KNePopMetric, self).__init__(col=cols, units='Detected, 0 or 1', metricName=metricName, maps=maps, **kwargs)
def __init__(self, metricName='TDEsPopMetric', mjdCol='observationStartMJD', m5Col='fiveSigmaDepth', filterCol='filter', nightCol='night', ptsNeeded=2, file_list=None, mjd0=59853.5, **kwargs): maps = ['DustMap'] self.mjdCol = mjdCol self.m5Col = m5Col self.filterCol = filterCol self.nightCol = nightCol self.ptsNeeded = ptsNeeded self.lightcurves = Tde_lc(file_list=file_list) self.mjd0 = mjd0 dust_properties = Dust_values() self.Ax1 = dust_properties.Ax1 cols = [self.mjdCol, self.m5Col, self.filterCol, self.nightCol] super(TdePopMetric, self).__init__(col=cols, units='Detected, 0 or 1', metricName=metricName, maps=maps, **kwargs)
def __init__(self, seeingCol='seeingFwhmGeom', metricName='SizePrecision', fwhm_object=3., mu_0_object={ 'g': 19., 'r': 19., 'i': 19. }, stellar_density_limit=None, filterCol='filter', stellar_ref_peak={ 'g': 5000., 'r': 5000., 'i': 5000. }, m5Col='fiveSigmaDepth', exptimeCol='visitExposureTime', skyCol='skyBrightness', airmassCol='airmass', maps=['StellarDensityMap', 'DustMap'], return_weights=False, dust_properties=None, pixscale=0.2, phot_parameters=None, **kwargs): self.seeingCol = seeingCol self.m5Col = m5Col self.fwhm_object = fwhm_object self.mu_0_object = mu_0_object self.filterCol = filterCol self.exptimeCol = exptimeCol self.return_weights = return_weights self.stellar_ref_peak = stellar_ref_peak self.skyCol = skyCol self.airmassCol = airmassCol self.cols = [ seeingCol, m5Col, filterCol, exptimeCol, skyCol, airmassCol ] self.maps = maps units = 'SNR' self.pixscale = pixscale super().__init__(col=self.cols, maps=self.maps, units=units, metricName=metricName, **kwargs) if dust_properties is None: dust_properties = Dust_values() self.Ax1 = dust_properties.Ax1 else: dust_properties = dust_properties self.Ax1 = dust_properties.Ax1 if phot_parameters is None: self.phot_parameters = SysEngVals()
def __init__(self, m5Col='fiveSigmaDepth', metricName='ExgalM5', units='mag', filterCol='filter', **kwargs): # Set the name for the dust map to use. This is gathered into the MetricBundle. maps = ['DustMap'] self.m5Col = m5Col self.filterCol = filterCol super().__init__(col=[self.m5Col, self.filterCol], maps=maps, metricName=metricName, units=units, **kwargs) # Set the default wavelength limits for the lsst filters. These are approximately correct. dust_properties = Dust_values() self.Ax1 = dust_properties.Ax1 # We will call Coaddm5Metric to calculate the coadded depth. Set it up here. self.Coaddm5Metric = Coaddm5Metric(m5Col=m5Col)
def __init__(self, mjdCol='observationStartMJD', nightCol='night', filterCol='filter', m5Col='fiveSigmaDepth', magCuts=None, metricName='TDC', cadNorm=3., seaNorm=4., campNorm=5., badval=-999, **kwargs): # Save the normalization values. self.cadNorm = cadNorm self.seaNorm = seaNorm self.campNorm = campNorm self.mjdCol = mjdCol self.m5Col = m5Col self.nightCol = nightCol self.filterCol = filterCol if magCuts is None: self.magCuts = { 'u': 22.7, 'g': 24.1, 'r': 23.7, 'i': 23.1, 'z': 22.2, 'y': 21.4 } else: self.magCuts = magCuts if not isinstance(self.magCuts, dict): raise Exception('magCuts should be a dictionary') # Set up dust map requirement maps = ['DustMap'] # Set the default wavelength limits for the lsst filters. These are approximately correct. dust_properties = Dust_values() self.Ax1 = dust_properties.Ax1 super().__init__( col=[self.mjdCol, self.m5Col, self.nightCol, self.filterCol], badval=badval, maps=maps, metricName=metricName, units='%s' % ('%'), **kwargs)
def __init__(self, metricName='SNSLMetric', mjdCol='observationStartMJD', RaCol='fieldRA', DecCol='fieldDec', filterCol='filter', exptimeCol='visitExposureTime', nightCol='night', obsidCol='observationId', nexpCol='numExposures', vistimeCol='visitTime', m5Col='fiveSigmaDepth', season=[-1], night_collapse=False, nfilters_min=4, min_season_obs=5, m5mins={'u': 22.7, 'g': 24.1, 'r': 23.7, 'i': 23.1, 'z': 22.2, 'y': 21.4}, maps=['DustMap'], **kwargs): """ Strongly Lensed SN metric The number of is given by: N (lensed SNe Ia with well measured time delay) = 45.7 * survey_area / (20000 deg^2) * cumulative_season_length / (2.5 years) / (2.15 * exp(0.37 * gap_median_all_filter)) where: survey_area: survey area (in deg2) cumulative_season_length: cumulative season length (in years) gap_median_all_filter: median gap (all filters) Parameters -------------- metricName : str, opt metric name Default : SNCadenceMetric mjdCol : str, opt mjd column name Default : observationStartMJD, RaCol : str,opt Right Ascension column name Default : fieldRa DecCol : str,opt Declinaison column name Default : fieldDec filterCol : str,opt filter column name Default: filter exptimeCol : str,opt exposure time column name Default : visitExposureTime nightCol : str,opt night column name Default : night obsidCol : str,opt observation id column name Default : observationId nexpCol : str,opt number of exposure column name Default : numExposures vistimeCol : str,opt visit time column name Default : visitTime season: int (list) or -1, opt season to process (default: -1: all seasons) nfilters_min : int (5) The number of filters to demand in a season """ self.mjdCol = mjdCol self.filterCol = filterCol self.RaCol = RaCol self.DecCol = DecCol self.exptimeCol = exptimeCol self.nightCol = nightCol self.obsidCol = obsidCol self.nexpCol = nexpCol self.vistimeCol = vistimeCol self.seasonCol = 'season' self.m5Col = m5Col self.maps= maps cols = [self.nightCol, self.filterCol, self.mjdCol, self.obsidCol, self.nexpCol, self.vistimeCol, self.exptimeCol, self.m5Col] super(SNSLMetric, self).__init__( col=cols, metricName=metricName, maps=self.maps, units='N SL', **kwargs) self.badVal = 0 self.season = season self.bands = 'ugrizy' self.night_collapse = night_collapse self.m5mins = m5mins self.min_season_obs = min_season_obs self.nfilters_min = nfilters_min self.phot_properties = Dust_values()