def runcommand(cosmology='WMAP5'): """pass""" Mi = [100000000.0, 1000000000.0, 10000000000.0] zi = 0 print('Concentrations for haloes of mass %s at z=%s' % (Mi, zi)) output = commah.run(cosmology=cosmology, zi=zi, Mi=Mi) print(output['c'].flatten()) Mi = [100000000.0, 1000000000.0, 10000000000.0] zi = 0 print('Concentrations for haloes of mass %s at z=%s' % (Mi, zi)) output, cosmo = commah.run(cosmology=cosmology, zi=zi, Mi=Mi, retcosmo=True) print(output['c'].flatten()) print(cosmo) Mi = 2000000000000.0 z = [0, 0.5, 1, 1.5, 2, 2.5] output = commah.run(cosmology=cosmology, zi=0, Mi=Mi, z=z) for zval in z: print('M(z=0)=%s has c(z=%s)=%s' % (Mi, zval, output[output['z'] == zval]['c'].flatten())) Mi = 2000000000000.0 zi = [0, 0.5, 1, 1.5, 2, 2.5] output = commah.run(cosmology=cosmology, zi=zi, Mi=Mi) for zval in zi: print('M(z=%s)=%s has concentration %s' % (zval, Mi, output[(output['zi'] == zval) & (output['z'] == zval)]['c'].flatten())) Mi = 200000000000000.0 zi = 6 output = commah.run(cosmology=cosmology, zi=zi, Mi=Mi) print('Concentrations for haloes of mass %s at z=%s' % (Mi, zi)) print(output['c'].flatten()) print('Mass variance sigma of haloes of mass %s at z=%s' % (Mi, zi)) print(output['sig'].flatten()) print('Fluctuation for haloes of mass %s at z=%s' % (Mi, zi)) print(output['nu'].flatten()) Mi = [100000000.0, 1000000000.0, 10000000000.0] zi = [0] z = [0, 0.5, 1, 1.5, 2, 2.5] output = commah.run(cosmology=cosmology, zi=zi, Mi=Mi, z=z) for Mval in Mi: print('dM/dt for halo of mass %s at z=%s across redshift %s is: ' % (Mval, zi, z)) print(output[output['Mi'] == Mval]['dMdt'].flatten()) M = [100000000.0] z = [0, 0.5, 1, 1.5, 2, 2.5] print('Halo Mass History for z=0 mass of %s across z=%s' % (M, z)) output = commah.run(cosmology=cosmology, zi=0, Mi=M, z=z) print(output['Mz'].flatten()) M = [100000000.0, 1000000000.0, 10000000000.0] z = [0] print('Formation Redshifts for haloes of mass %s at z=%s' % (M, z)) output = commah.run(cosmology=cosmology, zi=0, Mi=M, z=z) for Mval in M: print(output[output['Mi'] == Mval]['zf'].flatten()) return 'Done'