|
1 | | -file='~/Work/COMPAS/src/COMPAS_Output/Detailed_Output/BSE_Detailed_Output_0.h5'; |
| 1 | +function BSEDetailedOutput(file) |
| 2 | +% Carries out some basic analysis and makes plots for a single BSE run |
| 3 | +% |
| 4 | +% USAGE: |
| 5 | +% BSEDetailedOutput(file) |
| 6 | +% |
| 7 | +% INPUTS: |
| 8 | +% file: name of detailed output file in COMPAS h5 format |
| 9 | +% |
| 10 | +% examples: |
| 11 | +% BSEDetailedOutput('~/Work/COMPAS/src/COMPAS_Output/Detailed_Output/BSE_Detailed_Output_0.h5') |
| 12 | +% |
2 | 13 |
|
3 | | -tic |
4 | 14 | time=h5read(file,'/Time'); |
5 | 15 | MThistory=h5read(file,'/MT_History'); |
6 | 16 | Z=h5read(file,'/Metallicity@ZAMS(1)'); |
|
29 | 39 | omegab1=h5read(file, '/Omega_Break(1)'); |
30 | 40 | omegab2=h5read(file, '/Omega_Break(2)'); |
31 | 41 | MTtimescale=h5read(file, '/MassTransferTimescale'); |
32 | | -inf=h5info(file); |
33 | | -%inf.Datasets.Name |
34 | 42 |
|
35 | 43 |
|
36 | 44 | disp('Time (Myr), Event, M1 (M_o), type1, M2 (M_o), type2, a (R_o), e'); |
|
65 | 73 | disp([num2str(time(i)+Tdelay), ' GW merger in ', num2str(Tdelay,'%.0f'), ' Myr ', num2str(mass1(i)), ' ', num2str(type1(i)),... |
66 | 74 | ' ', num2str(mass2(i)), ' ', num2str(type2(i))]); |
67 | 75 | end; |
68 | | -toc |
69 | 76 |
|
70 | | -figure(81), plot(time, mass1, 'LineWidth', 3), set(gca,'FontSize',20), xlabel('Time, Myr'), ylabel('Total mass 1, M_o') |
71 | | -%figure(81), scatter(time, radius1, 30, type1, 'filled'), set(gca,'FontSize',20), xlabel('Time, Myr'), ylabel('Radius 1, R_o') |
72 | | -figure(82), plot(time, radius2, 'b', time, RL2, 'r'); set(gca,'FontSize',20), xlabel('Time, Myr'), ylabel('Radius, R_o'), legend('R_2', 'RL_2') |
| 77 | +figure(1), plot(time, mass1, 'LineWidth', 3), set(gca,'FontSize',20), xlabel('Time, Myr'), ylabel('Total mass 1, M_o') |
| 78 | +%figure(2), scatter(time, radius1, 30, type1, 'filled'), set(gca,'FontSize',20), xlabel('Time, Myr'), ylabel('Radius 1, R_o') |
| 79 | +figure(2), plot(time, radius2, 'b', time, RL2, 'r'); set(gca,'FontSize',20), xlabel('Time, Myr'), ylabel('Radius, R_o'), legend('R_2', 'RL_2') |
0 commit comments