@@ -509,14 +509,16 @@ def append_rates(path, filename, detection_rate, formation_rate, merger_rate, re
509509 """
510510 print ('shape redshifts' , np .shape (redshifts ))
511511 print ('shape COMPAS.sw_weights' , np .shape (COMPAS .sw_weights ) )
512- print ('shape COMPAS COMPAS.DCO_masks["BHBH"]]' , np .shape (COMPAS .sw_weights [COMPAS .DCO_masks [dco_type ]]) )
512+ print ('COMPAS.DCOmask' , COMPAS .DCOmask , ' was set for dco_type' , dco_type )
513+ print ('shape COMPAS COMPAS.DCOmask' , np .shape (COMPAS .DCOmask ) )
514+ print ('path' , path )
513515
514516 #################################################
515517 #Open hdf5 file that we will write on
516518 print ('filename' , filename )
517519 with h5 .File (path + '/' + filename , 'r+' ) as h_new :
518- # The rate info is shaped as DoubleCompactObjects [COMPAS.DCO_masks["BHBH"] ] , len(redshifts)
519- DCO = h_new ['DoubleCompactObjects ' ]#
520+ # The rate info is shaped as BSE_Double_Compact_Objects [COMPAS.DCOmask ] , len(redshifts)
521+ DCO = h_new ['BSE_Double_Compact_Objects ' ]#
520522 print ('shape DCO[SEED]' , np .shape (DCO ['SEED' ][()]) )
521523
522524 #################################################
@@ -588,9 +590,9 @@ def append_rates(path, filename, detection_rate, formation_rate, merger_rate, re
588590 #################################################
589591 # Write the rates as a seperate dataset
590592 # re-arrange your list of rate parameters
591- DCO_to_rate_mask = COMPAS .DCO_masks [ dco_type ] #save this bool for easy conversion between DoubleCompactObjects , and CI weights
593+ DCO_to_rate_mask = COMPAS .DCOmask #save this bool for easy conversion between BSE_Double_Compact_Objects , and CI weights
592594 rate_data_list = [DCO ['SEED' ][DCO_to_rate_mask ], DCO_to_rate_mask , save_redshifts , save_merger_rate , merger_rate [:,0 ], save_detection_rate ]
593- rate_list_names = ['SEED' , 'DCO_mask ' , 'redshifts' , 'merger_rate' ,'merger_rate_z0' , 'detection_rate' + sensitivity ]
595+ rate_list_names = ['SEED' , 'DCOmask ' , 'redshifts' , 'merger_rate' ,'merger_rate_z0' , 'detection_rate' + sensitivity ]
594596 for i , data in enumerate (rate_data_list ):
595597 print ('Adding rate info of shape' , np .shape (data ))
596598 # Check if dataset exists, if so, just delete it
0 commit comments