DOI: 10.5281/zenodo.13219564
title: BPASS pair-instability supernova tagging

description: These data contain the tagging of individual models from the BPASS population for different pair-instability supernova prescriptions. The data is stored as a pandas DataFrame with the identifier: `rates`.

df = pd.read_hdf(f'22_3_2024_{MET}.h5', 'rates')

The following data columns are available:



filenames: the BPASS model name. Note: some merger models in the v2.2 release failed before reaching/avoiding the PISN regime. These have been rerun and often do not lead to a PISN.

model_imf: the weight of the model; directly from BPASS

types: the type of model (merger, primary, secondary, single, effectively single)

mixed_imf: the weight of the model for secondaries; directly from BPASS

mixed_age: the start age of a secondary model due to rejuvenation; directly from BPASS

total_mass: the total mass of the PISN progenitor model at the end of the model

helium_mass: the total helium core mass of the PISN progenitor model at the end of the model

co_mass: the total carbon-oxygen core mass of the PISN progenitor model at the end of the model


The remaining columns are "booleans" for the different PISN prescriptions:



standard: The fiducial model used in Briel et al. (2023)

old_bpass: The original BPASS tagging used in Briel et al. (2022)

CO_only: Tagging with only the CO core >= 60 Msun as a limit

merchant: PISN limits from Marchant et al. (2019)

noH: standard tagging but no hydrogen present.

 ['0', '1', '2', '3', '4', '5']: different formation channels, shifted one up from the BPASS model identification

['R150', 'R175', 'R200', 'R225', 'R250', 'He70', 'He80', 'He90', 'He100', 'He110', 'He120', 'He130']: tagging based on each light curve.


This can be used to get the metallicity bias functions (number of events per Msun over metallicity) or to create new taggings.

For example, below we use both the existing tagging with `model_imf` weights to get the rate of PISN at each metallicity and we create a new tagging `shifted_up`, which is a tagging where the PISN limit is shifted upwards.

 

import pandas as pd
import numpy as np
from hoki.constants import BPASS_METALLICITIES

# from Kaasen et al. 2008 paper
envelopes =    np.array([70.9, 79.4, 84.4, 96.8,  112.3,  0,  0,  0,   0,   0,   0,   0])
helium_cores = np.array([72.0, 84.4, 96.7, 103.5, 124.0, 70, 80, 90, 100, 110, 120, 130])
curve_models = [ 'R150', 'R175', 'R200', 'R225', 'R250', 'He70', 'He80', 'He90', 'He100', 'He110', 'He120', 'He130']

bias_functions = pd.DataFrame({'standard':np.zeros(13),
                               'standard_old':np.zeros(13),
                               'CO_only':np.zeros(13),
                               'marchant':np.zeros(13),
                                'shift_up':np.zeros(13),
                                'old_BPASS':np.zeros(13),
                                'He_only':np.zeros(13),
                                'primary':np.zeros(13),
                                'secondary':np.zeros(13),
                                'QHE':np.zeros(13),
                                'merger':np.zeros(13),
                                'single':np.zeros(13),
                   'R150':np.zeros(13),
                   'R175':np.zeros(13),
                   'R200':np.zeros(13),
                   'R225':np.zeros(13),
                   'R250':np.zeros(13),
                   'He70':np.zeros(13),
                   'He80':np.zeros(13),
                   'He90':np.zeros(13),
                   'He100':np.zeros(13),
                   'He110':np.zeros(13),
                   'He120':np.zeros(13),
                   'He130':np.zeros(13)})

bias_functions.index = BPASS_METALLICITIES

for MET in BPASS_METALLICITIES[:-4]:
    print(MET)
    df = pd.read_hdf(f'PISN_data_{MET}.h5', 'rates')
    for i in curve_models:
        mask =  (df['co_mass'] >=60) & (df['helium_mass'] < 133) & (df[i] == 1)
        
        bias_functions.loc[MET, i] = np.sum(df[mask]['model_imf'])/1e6
      
    mask =  (df['co_mass'] >=60) & (df['helium_mass'] < 133)
    bias_functions.loc[MET, 'standard'] = np.sum(df[mask]['model_imf'])/1e6
    bias_functions.loc[MET, 'standard_old'] = np.sum(df[df['standard'] == 1]['model_imf'])/1e6
    
    mask = (df['helium_mass'] >=64) & (df['helium_mass'] < 133)
    bias_functions.loc[MET, 'old_BPASS'] = np.sum(df[mask]['model_imf'][mask])/1e6
    
    mask = (df['co_mass'] >= 60)
    bias_functions.loc[MET, 'CO_only'] = np.sum(df[df['CO_only'] == 1]['model_imf'][mask])/1e6
    
    mask =  (df['helium_mass'] >=60.8) & (df['helium_mass'] < 124) 
    bias_functions.loc[MET, 'marchant'] = np.sum(df[df['marchant'] == 1]['model_imf'][mask])/1e6
    bias_functions.loc[MET, 'noH'] = np.sum(df[df['noH'] == 1]['model_imf'])/1e6
    
    mask = (df['helium_mass'] >=90) & (df['helium_mass'] < 180)
    bias_functions.loc[MET, 'shift_up'] = np.sum(df[mask]['model_imf'])/1e6
    
    mask = np.isclose(df['total_mass'] - df['helium_mass'], 0, atol=0.1) & (df['helium_mass'] < 133) & (df['co_mass'] >=60)
    bias_functions.loc[MET, 'He_only'] = np.sum(df[mask]['model_imf'])/1e6
    
    mask =  (df['co_mass'] >=60) & (df['helium_mass'] < 133)
    bias_functions.loc[MET, 'merger'] = np.sum(df[(df['types'] == 0) & mask]['model_imf'])/1e6
    bias_functions.loc[MET, 'single'] = np.sum(df[((df['types'] == -1) | (df['types'] == 3)) & mask]['model_imf'])/1e6
    bias_functions.loc[MET, 'primary'] = np.sum(df[(df['types'] == 1) & mask]['model_imf'])/1e6
    bias_functions.loc[MET, 'secondary'] = np.sum(df[(df['types'] == 2) & mask]['model_imf'])/1e6
    bias_functions.loc[MET, 'QHE'] = np.sum(df[(df['types'] == 4) & mask]['model_imf'])/1e6