From 78a605bac2c2ab8843eee387a0a8fa5455d71cee Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Thu, 1 May 2025 18:37:15 +1000 Subject: [PATCH 1/7] Adding Matlab plotting and comparison post-processing --- compas_matlab_utils/ComparisonPlots.m | 377 ++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 compas_matlab_utils/ComparisonPlots.m diff --git a/compas_matlab_utils/ComparisonPlots.m b/compas_matlab_utils/ComparisonPlots.m new file mode 100644 index 000000000..a97567f80 --- /dev/null +++ b/compas_matlab_utils/ComparisonPlots.m @@ -0,0 +1,377 @@ +function ComparisonPlots(filename1, name1, filename2, name2) +% Carries out some basic analysis and makes plots comparing two COMPAS runs +% +% USAGE: +% ComparisonPlots(filename1, name1, filename2, name2) +% +% INPUTS: +% filename1: name of population synthesis input file 1 in COMPAS h5 format +% name1: name of data set 1 for plot legends +% filename2: name of population synthesis input file 2 in COMPAS h5 format +% name2: name of data set 2 for plot legends +% +% the last two arguments are optional; as single output can be plotted +% by running ComparisonPlots(filename1, name1) +% +% example: +% ComparisonPlots('~/Work/COMPAS/src/COMPAS_Default/COMPAS_Output.h5', 'Default', ... +% '~/Work/COMPAS/src/COMPAS_2Stage/COMPAS_Output.h5', '2 stage CE') +% +% Warning: --switch-log must be used for all runs to be analysed + + + global Msunkg G AU Rsun + Msunkg=1.98892e30; %Msun in kg + G=6.67428e-11; %G in m^3/kg/s^2 + AU=149597871e3; %m + Rsun = 695500000; %m + + %Plot DCO mass distribution and BNS P-e distribution + figure(1); clf(1); figure(2); clf(2); + [BNS,NSBH,BBH,BNSCE,NSBHCE,BBHCE]=DCOplot(filename1, name1, 1, 2, 'r', 40); + fprintf('\nDCOs:\t\t#Merging DNS\t#Merging NSBH\t#Merging BBH\t%% BNS via CE\t%% NSBH via CE\t%% BBH via CE\n'); + fprintf('%s:\t%d\t\t%d\t\t%d\t\t%.0f\t\t%.0f\t\t%.0f\n', ... + name1, BNS, NSBH, BBH, BNSCE/BNS*100, NSBHCE/NSBH*100, BBHCE/BBH*100); + if(nargin==4), + [BNS,NSBH,BBH,BNSCE,NSBHCE,BBHCE]=DCOplot(filename2, name2, 1, 2, 'b', 20); + fprintf('%s:\t%d\t\t%d\t\t%d\t\t%.0f\t\t%.0f\t\t%.0f\n', ... + name2, BNS, NSBH, BBH, BNSCE/BNS*100, NSBHCE/NSBH*100, BBHCE/BBH*100); + end; + figure(1), hold off; figure(2), hold off; + figure(1), set(gca,'FontSize',20), xlabel('Mass 1 (M$_\odot$)', 'Interpreter', 'latex'), + ylabel('Mass 2 (M$_\odot$)', 'Interpreter', 'latex'), title('Merging DCO masses'); legend; + figure(2), set(gca,'FontSize',20), xlabel('log_{10} (Orbital period/hr)'), ylabel('Eccentricity'), title('DNS at formation'); legend; + + + %Plot BH HMXBs + figure(3); clf(3); + HMXBplot(filename1, name1, 3, 'r', 40); + if(nargin==4), + HMXBplot(filename2, name2, 3, 'b', 20); + end; + figure(3); hold off; set(gca,'FontSize',20), legend; title('HMXB masses'); + xlabel('BH mass (M$_\odot$)', 'Interpreter', 'latex'), ylabel('Companion mass (M$_\odot$)', 'Interpreter', 'latex'); + + + %Plot BeXRBs + figure(4); clf(4); + BeXRBplot(filename1, name1, 4, 'r', 40); + if(nargin==4), + BeXRBplot(filename2, name2, 4, 'b', 20); + end; + figure(4); hold off; set(gca,'FontSize',20), legend; + xlabel('Companion mass (M$_\odot$)', 'Interpreter', 'latex'); + ylabel('Formation time, Myr'), title('BeXRBs just after SN'); + + %Plot LMXBs/IMXBs + figure(5); clf(5); + [LMXBcount, NSLMXBcount]=LMXBplot(filename1, name1, 5, 'r', 40); + fprintf('\nLMXBs:\t\t#LMXB\t#NS LMXB\n'); + fprintf('%s:\t%d\t\t%d\n', name1, LMXBcount, NSLMXBcount); + if(nargin==4), + [LMXBcount, NSLMXBcount]=LMXBplot(filename2, name2, 5, 'b', 20); + fprintf('%s:\t%d\t\t%d\n', name2, LMXBcount, NSLMXBcount); + end; + figure(5), hold off; set(gca,'FontSize', 20); legend; title('LMXB on first MT onto CO'); + xlabel('Compact object mass (M$_\odot$)', 'Interpreter', 'latex'), ylabel('Companion mass (M$_\odot$)', 'Interpreter', 'latex'); + + %Plot DWDs (just as a sanity check) + figure(6); clf(6); + DWDplot(filename1, name1, 6, 'r', 40); + if(nargin==4), + DWDplot(filename2, name2, 6, 'b', 20); + end; + figure(6); hold off; set(gca,'FontSize',20); title('Double White Dwarfs'); legend; + xlabel('$M*a [M_\odot * R_\odot]$ @ ZAMS', 'Interpreter', 'latex'); + ylabel('$M*a [M_\odot * R_\odot]$ @ end', 'Interpreter', 'latex'); + + + [binariescount1, SNcount1, BHcompletecount1, SNbothcount1, SNonecount1, ... + unboundcount1, unbound1count1, unbound2count1, ... + USSNcount1, ECSNcount1, AICcount1, PISNcount1, PPISNcount1, ... + MTSNcount1, strippedSNcount1, strippednonECSNcount1, ... + strippedwindscount1, strippedRLOFcount1, strippedCEcount1, CESNcount1]=SNstats(filename1); + if(nargin==4), + [binariescount2, SNcount2, BHcompletecount2, SNbothcount2, SNonecount2, ... + unboundcount2, unbound1count2, unbound2count2, ... + USSNcount2, ECSNcount2, AICcount2, PISNcount2, PPISNcount2, ... + MTSNcount2, strippedSNcount2, strippednonECSNcount2, ... + strippedwindscount2, strippedRLOFcount2, strippedCEcount2, CESNcount2]=SNstats(filename2); + end; + if(nargin==2), + fprintf('\nSupernova statistics:\t\t\t%s\n\n', name1); + fprintf('Total number of binaries simulated:\t%d\n', binariescount1); + fprintf('Total number of supernovae:\t\t%d\n', SNcount1); + fprintf('Of these, complete collapse to BH:\t%d\n', BHcompletecount1); + fprintf('Number of binaries with two SNe:\t%d\n', SNbothcount1); + fprintf('Number of binaries with one SN:\t\t%d\n', SNonecount1); + fprintf('Number of binaries unbound by SN:\t%d\n', unboundcount1); + fprintf('Unbound by first SN:\t\t\t%d\n', unbound1count1); + fprintf('Unbound by second SN:\t\t\t%d\n\n', unbound2count1); + fprintf('Total number of USSN:\t\t\t%d\n', USSNcount1); + fprintf('Total number of ECSN:\t\t\t%d\n', ECSNcount1); + fprintf('Total number of AIC:\t\t\t%d\n', AICcount1); + fprintf('Total number of PISN:\t\t\t%d\n', PISNcount1); + fprintf('Total number of PPISN:\t\t\t%d\n\n', PPISNcount1); + fprintf('#SNe from mass-transfering progenitors:\t%d\n', MTSNcount1); + fprintf('#Stripped-envelope SNe:\t\t\t%d\n', strippedSNcount1); + fprintf('Of these, not AIC or ECSN:\t\t%d\n', strippednonECSNcount1); + fprintf('Of these, stripped by winds, no RLOF:\t%d\n', strippedwindscount1); + fprintf('Of these, # stripped by RLOF:\t\t%d\n', strippedRLOFcount1); + fprintf('Of these, previous CE:\t\t\t%d\n', strippedCEcount1); + fprintf('Or double-core CE simultaneous with SN:\t%d\n', CESNcount1); + elseif(nargin==4), + fprintf('\nSupernova statistics:\t\t\t%s\t\t%s\n\n', name1, name2); + fprintf('Total number of binaries simulated:\t%d\t\t%d\n', binariescount1, binariescount2); + fprintf('Total number of supernovae:\t\t%d\t\t%d\n', SNcount1, SNcount2); + fprintf('Of these, complete collapse to BH:\t%d\t\t%d\n', BHcompletecount1, BHcompletecount2); + fprintf('Number of binaries with two SNe:\t%d\t\t%d\n', SNbothcount1, SNbothcount2); + fprintf('Number of binaries with one SN:\t\t%d\t\t%d\n', SNonecount1, SNonecount2); + fprintf('Number of binaries unbound by SN:\t%d\t\t%d\n', unboundcount1, unboundcount2); + fprintf('Unbound by first SN:\t\t\t%d\t\t%d\n', unbound1count1, unbound1count2); + fprintf('Unbound by second SN:\t\t\t%d\t\t%d\n\n', unbound2count1, unbound2count2); + fprintf('Total number of USSN:\t\t\t%d\t\t%d\n', USSNcount1, USSNcount2); + fprintf('Total number of ECSN:\t\t\t%d\t\t%d\n', ECSNcount1, ECSNcount2); + fprintf('Total number of AIC:\t\t\t%d\t\t%d\n', AICcount1, AICcount2); + fprintf('Total number of PISN:\t\t\t%d\t\t%d\n', PISNcount1, PISNcount2); + fprintf('Total number of PPISN:\t\t\t%d\t\t%d\n\n', PPISNcount1, PPISNcount2); + fprintf('#SNe from mass-transfering progenitors:\t%d\t\t%d\n', MTSNcount1, MTSNcount2); + fprintf('#Stripped-envelope SNe:\t\t\t%d\t\t%d\n', strippedSNcount1, strippedSNcount2); + fprintf('Of these, not AIC or ECSN:\t\t%d\t\t%d\n', strippednonECSNcount1, strippednonECSNcount2); + fprintf('Of these, stripped by winds, no RLOF:\t%d\t\t%d\n', strippedwindscount1, strippedwindscount2); + fprintf('Of these, # stripped by RLOF:\t\t%d\t\t%d\n', strippedRLOFcount1, strippedRLOFcount2); + fprintf('Of these, previous CE:\t\t\t%d\t\t%d\n', strippedCEcount1, strippedCEcount2); + fprintf('Or double-core CE simultaneous with SN:\t%d\t\t%d\n', CESNcount1, CESNcount2); + end; + +end %end of ComparisonPlots + + +%Plot double compact objects; returns DCO counts +function [BNScount, NSBHcount, BBHcount, BNSCE, NSBHCE, BBHCE] = ... + DCOplot(file, name, fignumberDCO, fignumberDNSPE, colour, point) + global Msunkg G AU + type1=h5read(file,'/BSE_Double_Compact_Objects/Stellar_Type(1)'); + type2=h5read(file,'/BSE_Double_Compact_Objects/Stellar_Type(2)'); + mass1=h5read(file,'/BSE_Double_Compact_Objects/Mass(1)'); + mass2=h5read(file,'/BSE_Double_Compact_Objects/Mass(2)'); + seedDCO=h5read(file,'/BSE_Double_Compact_Objects/SEED'); + merges=h5read(file,'/BSE_Double_Compact_Objects/Merges_Hubble_Time'); + a=h5read(file,'/BSE_Double_Compact_Objects/SemiMajorAxis@DCO'); + e=h5read(file,'/BSE_Double_Compact_Objects/Eccentricity@DCO'); + mergingBBH=(type1==14) & (type2==14) & merges; + BBH=(type1==14) & (type2==14); + mergingBNS=(type1==13) & (type2==13) & merges; + BNS=(type1==13) & (type2==13); + mergingNSBH=(((type1==13) & (type2==14)) | ((type1==14) & (type2==13))) & merges; + NSBH=(((type1==13) & (type2==14)) | ((type1==14) & (type2==13))); + mergingDCO=mergingBNS | mergingNSBH | mergingBBH; + BNScount=sum(mergingBNS); NSBHcount=sum(mergingNSBH); BBHcount=sum(mergingBBH); + masschirp=mass1.^0.6.*mass2.^0.6./(mass1+mass2).^0.2; + seedCE=h5read(file,'/BSE_Common_Envelopes/SEED'); + [isCE,CEIndex]=ismember(seedDCO,seedCE); + optCE=h5read(file,'/BSE_Common_Envelopes/Optimistic_CE'); + RLOFCE=h5read(file,'/BSE_Common_Envelopes/Immediate_RLOF>CE'); + OKCE=zeros(size(mergingDCO)); OKCE(CEIndex==0)=1; OKCE(CEIndex>0)=(~optCE(CEIndex(CEIndex>0))) & (~RLOFCE(CEIndex(CEIndex>0))); + BNSCE=sum(mergingBNS & isCE & OKCE); NSBHCE=sum(mergingNSBH & isCE & OKCE); BBHCE=sum(mergingBBH & isCE & OKCE); + %Merging DCO mass distribution + figure(fignumberDCO), hold on; + scatter(mass1(mergingDCO & isCE & OKCE), mass2(mergingDCO & isCE & OKCE), point, ... + 'filled', colour, 'DisplayName', ['CE, ', name]); + scatter(mass1(mergingDCO & ~isCE), mass2(mergingDCO & ~isCE), point, colour, 'DisplayName', ['Stable, ', name]); + %P-e of Galactic DNS at formation + P=2*pi*(a*AU).^(3/2)./sqrt(G*Msunkg*(mass1+mass2))/3600; %orbital period at DCO, in hours + figure(fignumberDNSPE), hold on; + scatter(log10(P(BNS & isCE & OKCE)), e(BNS & isCE & OKCE), point, 'filled', colour, ... + 'DisplayName', ['CE, ', name]); hold on; + scatter(log10(P(BNS & ~isCE)), e(BNS & ~isCE), point, colour, 'DisplayName', ['Stable, ', name]); +end %end of DCOplot + +%Plot BH HMXBs +%BH HMXBs, according to Hirai & Mandel, consist of a BH and a MS O star +%that is more than 80% Roche lobe filling. +function HMXBplot(file, name, fignumberHMXB, colour, point) + %We can look for binaries that experience Roche lobe overflow from an O + %star onto a BH, since these must have been HMXBs just previously; + isinRLOF1RLOF=h5read(file,'/BSE_RLOF/RLOF(1)>MT'); + isinRLOF2RLOF=h5read(file,'/BSE_RLOF/RLOF(2)>MT'); + wasinRLOF1RLOF=h5read(file,'/BSE_RLOF/RLOF(1)15 & star2RLOF==14); + %if this is zero (no such systems), can ignore this possibility, focus on the other one + if(sum(relevantbinaryFrom1)>0) fprintf('Number of HMXBs with second-born BH is non-zero (%d), please check\n', sum(relevantbinaryFrom1)); end; + relevantbinaryFrom2=(isinRLOF2RLOF & ~wasinRLOF1RLOF & ~wasinRLOF2RLOF & star2RLOF==1 & M2RLOF>15 & star1RLOF==14); + MBH=[M1RLOF(relevantbinaryFrom2); M2RLOF(relevantbinaryFrom1)]; + MO=[M2RLOF(relevantbinaryFrom2); M1RLOF(relevantbinaryFrom1)]; + %this misses binaries in which the companion overflows its RL shortly after + %evolving onto the HG; + %Now check the binaries at the time of the switch onto the HG, are they + %at least 80% RL filling at that point, if so, include them + M1Switch=h5read(file,'/BSE_Switch_Log/Mass(1)'); + M2Switch=h5read(file,'/BSE_Switch_Log/Mass(2)'); + whichSwitch=h5read(file,'/BSE_Switch_Log/Star_Switching'); + star1Switch=h5read(file,'/BSE_Switch_Log/Stellar_Type(1)'); + star2Switch=h5read(file,'/BSE_Switch_Log/Stellar_Type(2)'); + fromSwitch=h5read(file,'/BSE_Switch_Log/Switching_From'); + toSwitch=h5read(file,'/BSE_Switch_Log/Switching_To'); + roche1Switch=h5read(file,'/BSE_Switch_Log/RocheLobe(1)'); + roche2Switch=h5read(file,'/BSE_Switch_Log/RocheLobe(2)'); + radius1Switch=h5read(file,'/BSE_Switch_Log/Radius(1)'); + radius2Switch=h5read(file,'/BSE_Switch_Log/Radius(2)'); + relevantBinaryFrom1 = whichSwitch==1 & fromSwitch==1 & toSwitch==2 & star2Switch==14 & radius1Switch>0.8*roche1Switch & M1Switch>15; + relevantBinaryFrom2 = whichSwitch==2 & fromSwitch==1 & toSwitch==2 & star1Switch==14 & radius2Switch>0.8*roche2Switch & M2Switch>15; + MBH=[MBH; M2Switch(relevantBinaryFrom1); M1Switch(relevantBinaryFrom2)]; + MO=[MO; M1Switch(relevantBinaryFrom2); M2Switch(relevantBinaryFrom1)]; + figure(fignumberHMXB), scatter(MBH, MO, point, 'filled', colour, 'DisplayName', name); hold on; +end %end of HMXBplot + + + +%Plot BeXRBs +%BeXRBs at time of SN consist of an NS and a MS B (or O) star that previously experienced +%mass accretion to spin it up. No other separation threshold is applied. +function BeXRBplot(file, name, fignumberBeXRB, colour, point) + starSNSN=h5read(file,'/BSE_Supernovae/Stellar_Type(SN)'); + starCPSN=h5read(file,'/BSE_Supernovae/Stellar_Type(CP)'); + MCPSN=h5read(file,'/BSE_Supernovae/Mass(CP)'); + unboundSN=h5read(file,'/BSE_Supernovae/Unbound'); + timeSN=h5read(file,'/BSE_Supernovae/Time'); + seedSN=h5read(file,'/BSE_Supernovae/SEED'); + seedRLOF=h5read(file,'/BSE_RLOF/SEED'); + timeRLOF=h5read(file,'/BSE_RLOF/Time>MT'); + seedCE=h5read(file,'/BSE_Common_Envelopes/SEED'); + timeCE=h5read(file,'/BSE_Common_Envelopes/Time'); + [experiencedRLOF,indexRLOF]=ismember(seedSN,seedRLOF); + precededbyRLOF=false(size(indexRLOF)); + for(i=1:length(indexRLOF)), if(experiencedRLOF(i)), precededbyRLOF(i)=(timeRLOF(indexRLOF(i))3 & ~unboundSN & experiencedRLOF & precededbyRLOF; %haven't checked direction of RLOF + figure(fignumberBeXRB), scatter(MCPSN(relevantbinary & isCE), timeSN(relevantbinary & isCE), ... + point, 'filled', colour, 'DisplayName', ['CE, ', name]); hold on; + scatter(MCPSN(relevantbinary & ~isCE), timeSN(relevantbinary & ~isCE), ... + point, colour, 'DisplayName', ['Stable, ', name]); +end %end of BeXRBplot + + + +%Plot LMXBs and IMXBs +%Find all LMXBs/IMXBs at the time of the first mass transfer episode onto the +%compact object. They consist of an NS or a BH and a companion with a mass +%below 5 Msun. +function [LMXBcount, NSLMXBcount] = LMXBplot(file, name, fignumberLMXB, colour, point) + seedRLOF=h5read(file,'/BSE_RLOF/SEED'); + timeRLOF=h5read(file,'/BSE_RLOF/Time>MT'); + M1RLOF=h5read(file,'/BSE_RLOF/Mass(1)MT'); + seedCE=h5read(file,'/BSE_Common_Envelopes/SEED'); + timeCE=h5read(file,'/BSE_Common_Envelopes/Time'); + relevantbinary=(star1RLOF>=13 & star1RLOF<=14 & star2RLOF==1 & M2RLOF<=5 & ~RLOFisCE) ... + | (star2RLOF>=13 & star2RLOF<=14 & star1RLOF==1 & M1RLOF>=5 & ~RLOFisCE); + relevantseedRLOF=cast(seedRLOF, 'int64'); relevantseedRLOF(~relevantbinary)=-1; + uniqueseeds=unique(seedRLOF(relevantbinary)); + [blah,indexlist]=ismember(cast(uniqueseeds,'int64'), relevantseedRLOF); + M1relevant=M1RLOF(indexlist); M2relevant=M2RLOF(indexlist); + MCO=M1relevant; MCO(star2RLOF(indexlist)>=13)=M2relevant(star2RLOF(indexlist)>=13); + Mcomp=M1relevant; Mcomp(star2RLOF(indexlist)==1)=M2relevant(star2RLOF(indexlist)==1); + LMXBcount=length(MCO); NSLMXBcount=sum(MCO<2); %number of LMXBs, NS LXMBs + [isCE,CEIndex]=ismember(uniqueseeds,seedCE); %doesn't check if CE happened before or after + precededbyCE=false(size(indexlist)); + for(i=1:length(indexlist)), if(isCE(i)), precededbyCE(i)=(timeCE(CEIndex(i)) < timeRLOF(indexlist(i))); end; end; + figure(fignumberLMXB), hold on; + scatter(MCO(precededbyCE), Mcomp(precededbyCE), point, 'filled', colour, 'DisplayName', ['CE, ', name]); + scatter(MCO(~precededbyCE), Mcomp(~precededbyCE), point, colour, 'DisplayName', ['Stable, ', name]); +end %end of LMXBplot + + +%Plot a*Mtot for white dwarfs +%Should be constant for non-mass-transferring WDs in the absence of tides +%and GR (and supernovae, which is why we focus on WDs as a sanity check +function DWDplot(file, name, fignumberDWD, colour, point) + global AU Rsun + M1ZAMS=h5read(file, '/BSE_System_Parameters/Mass@ZAMS(1)'); + M2ZAMS=h5read(file, '/BSE_System_Parameters/Mass@ZAMS(2)'); + aZAMS=h5read(file, '/BSE_System_Parameters/SemiMajorAxis@ZAMS'); + SeedZAMS=h5read(file, '/BSE_System_Parameters/SEED'); + Type1=h5read(file, '/BSE_Switch_Log/Stellar_Type(1)'); + Type2=h5read(file, '/BSE_Switch_Log/Stellar_Type(2)'); + M1Switch=h5read(file, '/BSE_Switch_Log/Mass(1)'); + M2Switch=h5read(file, '/BSE_Switch_Log/Mass(2)'); + aSwitch=h5read(file, '/BSE_Switch_Log/SemiMajorAxis'); + SeedSwitch=h5read(file, '/BSE_Switch_Log/SEED'); + WDIndex=find(Type1>=10 & Type1<=12 & Type2>=10 & Type2<=12); + ind=unique(SeedSwitch(WDIndex)); + [~,ZAMSIndex]=ismember(ind,SeedZAMS); + MAZAMS=(M1ZAMS(ZAMSIndex)+M2ZAMS(ZAMSIndex)).*aZAMS(ZAMSIndex); + MAWD=(M1Switch(WDIndex)+M2Switch(WDIndex)).*aSwitch(WDIndex)*Rsun/AU; + SeedRLOF=h5read(file, '/BSE_RLOF/SEED'); + [hadRLOF,RLOFIndex]=ismember(ind,SeedRLOF); + figure(fignumberDWD), hold on; + scatter(MAZAMS(~hadRLOF), MAWD(~hadRLOF), point, 'filled', colour, 'DisplayName', ['DWDs without mass transfer, ', name]); + scatter(MAZAMS(hadRLOF), MAWD(hadRLOF), point, colour, 'DisplayName', ['DWDs after mass transfer, ', name]); +end %end of DWDplot + +%SN varieties -- just count +function [binariescount, SNcount, BHcompletecount, SNbothcount, SNonecount, ... + unboundcount, unbound1count, unbound2count, ... + USSNcount, ECSNcount, AICcount, PISNcount, PPISNcount, ... + MTSNcount, strippedSNcount, strippednonECSNcount, ... + strippedwindscount, strippedRLOFcount, strippedCEcount, CESNcount] = SNstats(file) + starSNSN=h5read(file,'/BSE_Supernovae/Stellar_Type(SN)'); + starCPSN=h5read(file,'/BSE_Supernovae/Stellar_Type(CP)'); + MSNSN=h5read(file,'/BSE_Supernovae/Mass(SN)'); + unboundSN=h5read(file,'/BSE_Supernovae/Unbound'); + MpreSN=h5read(file,'/BSE_Supernovae/Mass_Total@CO(SN)'); + IsStrippedSN=h5read(file,'/BSE_Supernovae/Is_Hydrogen_Poor(SN)'); + HadRLOFSN=h5read(file,'/BSE_Supernovae/Experienced_RLOF(SN)'); + SNtypeSN=h5read(file,'/BSE_Supernovae/SN_Type(SN)'); + timeSN=h5read(file,'/BSE_Supernovae/Time'); + seedSN=h5read(file,'/BSE_Supernovae/SEED'); + prevtypeSN=h5read(file,'/BSE_Supernovae/Stellar_Type_Prev(SN)'); + seedRLOF=h5read(file,'/BSE_RLOF/SEED'); + timeRLOF=h5read(file,'/BSE_RLOF/Time>MT'); + seedCE=h5read(file,'/BSE_Common_Envelopes/SEED'); + timeCE=h5read(file,'/BSE_Common_Envelopes/Time'); + seedAll=h5read(file, '/BSE_System_Parameters/SEED'); + [isCE,indexCE]=ismember(seedSN,seedCE); + simultaneouswithCE = false(size(indexCE)); + for(i=1:length(isCE)), if(isCE(i)), simultaneouswithCE(i) = ~isempty(find(timeCE==timeSN(i) & seedCE==seedSN(i))); end; end; + precedingCE = false(size(indexCE)); + for(i=1:length(isCE)), if(isCE(i)), precedingCE(i) = ~isempty(find(timeCE=7 & prevtypeSN<=9 & SNtypeSN~=2); + strippedCEcount=sum(IsStrippedSN & HadRLOFSN & precedingCE & SNtypeSN~=2 & SNtypeSN~=32); + CESNcount=sum(IsStrippedSN & HadRLOFSN & simultaneouswithCE & SNtypeSN~=2 & SNtypeSN~=32); +end %end of SNstats + + + From 14f5a2f4184abeb2208b53646ffbaeefd6c431a7 Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Thu, 1 May 2025 20:02:04 +1000 Subject: [PATCH 2/7] Change Switch log --- .../Program options/program-options-list-defaults.rst | 4 ++-- src/LogTypedefs.h | 11 ++++++++++- src/changelog.h | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index 0d6bbdcb4..0153dc6ea 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -167,11 +167,11 @@ Continuous extrapolation beyond maximum radius range in Nanjing lambda's as impl Default = FALSE **--common-envelope-lambda-nanjing-interpolate-in-mass** |br| -Interpolate Nanjing lambda parameters across different mass models. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. |br| +Interpolate Nanjing lambda parameters across different mass models. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. Requires ``--common-envelope-lambda-nanjing-enhanced``. |br| Default = FALSE **--common-envelope-lambda-nanjing-interpolate-in-metallicity** |br| -Interpolate Nanjing lambda parameters across population I and population II metallicity models. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. |br| +Interpolate Nanjing lambda parameters across population I and population II metallicity models. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. Requires ``--common-envelope-lambda-nanjing-enhanced``. |br| Default = FALSE **--common-envelope-lambda-nanjing-use-rejuvenated-mass** |br| diff --git a/src/LogTypedefs.h b/src/LogTypedefs.h index 382d46159..c5f94b0aa 100644 --- a/src/LogTypedefs.h +++ b/src/LogTypedefs.h @@ -2146,7 +2146,16 @@ const ANY_PROPERTY_VECTOR BSE_SUPERNOVAE_REC = { // const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS }; diff --git a/src/changelog.h b/src/changelog.h index 5d3ff3dab..f15ddfce0 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1540,7 +1540,10 @@ // 03.18.01 AB - Apr 28, 2025 - Defect repair: // - Updated coefficients from Shikauchi et al. (2024) for main-sequence core mass calculations // - Fixed behaviour of surface helium abundance for HeMS stars and core helium abundance for HeHG stars +// 03.18.02 IM - May 1, 2025 - Enhancement: +// - Added several outputs to the Switch log necessary for inter-run post-processing comparisons +// - Changed the default behaviour to interpolat Nanjing lambdas in mass and metallicity when using them for common envelope calculations -const std::string VERSION_STRING = "03.18.01"; +const std::string VERSION_STRING = "03.18.02"; # endif // __changelog_h__ From 51a6a405b0ddc63ad9a7a261558e478925c9b808 Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Thu, 1 May 2025 20:19:25 +1000 Subject: [PATCH 3/7] Default and documentation changes --- .../preprocessing/compasConfigDefault.yaml | 8 +- ...lt-record-specifications-BSE-switchlog.rst | 183 +++++++++--------- online-docs/pages/whats-new.rst | 4 + src/Options.cpp | 6 +- 4 files changed, 107 insertions(+), 94 deletions(-) diff --git a/compas_python_utils/preprocessing/compasConfigDefault.yaml b/compas_python_utils/preprocessing/compasConfigDefault.yaml index 8f122b410..432939318 100644 --- a/compas_python_utils/preprocessing/compasConfigDefault.yaml +++ b/compas_python_utils/preprocessing/compasConfigDefault.yaml @@ -1,5 +1,5 @@ ##~!!~## COMPAS option values -##~!!~## File Created Mon Apr 14 17:15:32 2025 by COMPAS v03.18.00 +##~!!~## File Created Thu May 1 20:17:56 2025 by COMPAS v03.18.01 ##~!!~## ##~!!~## The default COMPAS YAML file (``compasConfigDefault.yaml``), as distributed, has ##~!!~## all COMPAS option entries commented so that the COMPAS default value for the @@ -48,9 +48,9 @@ booleanChoices: # --common-envelope-allow-immediate-RLOF-post-CE-survive: False # Default: False # --common-envelope-allow-main-sequence-survive: True # Default: True # Allow main sequence stars to survive CE # --common-envelope-allow-radiative-envelope-survive: False # Default: False -# --common-envelope-lambda-nanjing-enhanced: False # Default: False -# --common-envelope-lambda-nanjing-interpolate-in-mass: False # Default: False -# --common-envelope-lambda-nanjing-interpolate-in-metallicity: False # Default: False +# --common-envelope-lambda-nanjing-enhanced: True # Default: True +# --common-envelope-lambda-nanjing-interpolate-in-mass: True # Default: True +# --common-envelope-lambda-nanjing-interpolate-in-metallicity: True # Default: True # --common-envelope-lambda-nanjing-use-rejuvenated-mass: False # Default: False # --revised-energy-formalism-nandez-ivanova: False # Default: False diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-switchlog.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-switchlog.rst index 7e95f38f2..204d20eaf 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-switchlog.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-BSE-switchlog.rst @@ -1,87 +1,96 @@ -BSE switchlog -============= - -Default record definition for the BSE SwitchLog log file:: - - const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { - BINARY_PROPERTY::RANDOM_SEED, - BINARY_PROPERTY::TIME - }; - - -The default record specification can be modified at runtime via a logfile record specifications file (program option ``--logfile-definitions``). -See :doc:`standard-logfiles-record-specification` for details. - -Note that the BSE SwitchLog file has the following columns automatically appended to each record: - - - The constituent star switching stellar type: 1 = Primary, 2 = Secondary. - - The stellar type from which the star is switching. - - The stellar type to which the star is switching. - -|br| -**STAR_SWITCHING** - -.. list-table:: - :widths: 20 80 - :header-rows: 0 - :class: aligned-text - - * - Data type: - - INT - * - COMPAS variable: - - `derived from` ``BaseBinaryStar::m_Star1/m_Star2`` - * - Description: - - The constituent star switching stellar type, where 1 = Primary, and 2 = Secondary. - * - Header String: - - "STAR_SWITCHING" - -**SWITCHING_FROM** - -.. list-table:: - :widths: 20 80 - :header-rows: 0 - :class: aligned-text - - * - Data type: - - INT - * - COMPAS variable: - - `derived from` ``BaseStar::m_StellarType`` - * - Description: - - The stellar type of the constituent star immediately prior to the switch. - * - Header String: - - "SWITCHING_FROM" - -**SWITCHING_TO** - -.. list-table:: - :widths: 20 80 - :header-rows: 0 - :class: aligned-text - - * - Data type: - - INT - * - COMPAS variable: - - Not applicable - * - Description: - - The stellar type to which the constituent star will switch (i.e. the stellar type immediately following the switch). - * - Header String: - - "SWITCHING_TO" - -**IS_MERGER** - -.. list-table:: - :widths: 20 80 - :header-rows: 0 - :class: aligned-text - - * - Data type: - - BOOL - * - COMPAS variable: - - Not applicable - * - Description: - - Flag to indicate if the switchlog record records a merger (rather than a simple switch) - * - Header String: - - "IS_MERGER" - -These columns will always be automatically appended to each BSE Switch Log record: they cannot be removed via the log file record -specifications file. +BSE switchlog +============= + +Default record definition for the BSE SwitchLog log file:: + + const ANY_PROPERTY_VECTOR BSE_SWITCH_LOG_REC = { + BINARY_PROPERTY::RANDOM_SEED, + BINARY_PROPERTY::TIME, + BINARY_PROPERTY::SEMI_MAJOR_AXIS_RSOL, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_1, + BINARY_PROPERTY::ROCHE_LOBE_RADIUS_2, + STAR_1_PROPERTY::MASS, + STAR_2_PROPERTY::MASS, + STAR_1_PROPERTY::STELLAR_TYPE, + STAR_2_PROPERTY::STELLAR_TYPE, + STAR_1_PROPERTY::RADIUS, + STAR_2_PROPERTY::RADIUS + }; + + +The default record specification can be modified at runtime via a logfile record specifications file (program option ``--logfile-definitions``). +See :doc:`standard-logfiles-record-specification` for details. + +Note that the BSE SwitchLog file has the following columns automatically appended to each record: + + - The constituent star switching stellar type: 1 = Primary, 2 = Secondary. + - The stellar type from which the star is switching. + - The stellar type to which the star is switching. + +|br| +**STAR_SWITCHING** + +.. list-table:: + :widths: 20 80 + :header-rows: 0 + :class: aligned-text + + * - Data type: + - INT + * - COMPAS variable: + - `derived from` ``BaseBinaryStar::m_Star1/m_Star2`` + * - Description: + - The constituent star switching stellar type, where 1 = Primary, and 2 = Secondary. + * - Header String: + - "STAR_SWITCHING" + +**SWITCHING_FROM** + +.. list-table:: + :widths: 20 80 + :header-rows: 0 + :class: aligned-text + + * - Data type: + - INT + * - COMPAS variable: + - `derived from` ``BaseStar::m_StellarType`` + * - Description: + - The stellar type of the constituent star immediately prior to the switch. + * - Header String: + - "SWITCHING_FROM" + +**SWITCHING_TO** + +.. list-table:: + :widths: 20 80 + :header-rows: 0 + :class: aligned-text + + * - Data type: + - INT + * - COMPAS variable: + - Not applicable + * - Description: + - The stellar type to which the constituent star will switch (i.e. the stellar type immediately following the switch). + * - Header String: + - "SWITCHING_TO" + +**IS_MERGER** + +.. list-table:: + :widths: 20 80 + :header-rows: 0 + :class: aligned-text + + * - Data type: + - BOOL + * - COMPAS variable: + - Not applicable + * - Description: + - Flag to indicate if the switchlog record records a merger (rather than a simple switch) + * - Header String: + - "IS_MERGER" + +These columns will always be automatically appended to each BSE Switch Log record: they cannot be removed via the log file record +specifications file. diff --git a/online-docs/pages/whats-new.rst b/online-docs/pages/whats-new.rst index 4d3887ed3..dd7d0b244 100644 --- a/online-docs/pages/whats-new.rst +++ b/online-docs/pages/whats-new.rst @@ -3,6 +3,10 @@ What's new Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. +**03.18.02 May 1, 2025** + +* Changed default for Nanjing lambdas to use enhanced lambdas and interpolate in mass and metallicity + **03.18.00 Apr 14, 2025** New command line option: diff --git a/src/Options.cpp b/src/Options.cpp index d09bd859f..e3d570853 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -517,9 +517,9 @@ void Options::OptionValues::Initialise() { m_CommonEnvelopeSlopeKruckow = -5.0 / 6.0; m_CommonEnvelopeAlphaThermal = 1.0; m_CommonEnvelopeLambdaMultiplier = 1.0; - m_CommonEnvelopeLambdaNanjingEnhanced = false; - m_CommonEnvelopeLambdaNanjingInterpolateInMass = false; - m_CommonEnvelopeLambdaNanjingInterpolateInMetallicity = false; + m_CommonEnvelopeLambdaNanjingEnhanced = true; + m_CommonEnvelopeLambdaNanjingInterpolateInMass = true; + m_CommonEnvelopeLambdaNanjingInterpolateInMetallicity = true; m_CommonEnvelopeLambdaNanjingUseRejuvenatedMass = false; m_AllowRadiativeEnvelopeStarToSurviveCommonEnvelope = false; m_AllowMainSequenceStarToSurviveCommonEnvelope = true; From ca09fe660fa8acd1e5f68d5764507209d34344b7 Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Thu, 1 May 2025 20:22:21 +1000 Subject: [PATCH 4/7] Typo fixes --- .../Program options/program-options-list-defaults.rst | 6 +++--- src/changelog.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index 0153dc6ea..7a87dd110 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -164,15 +164,15 @@ Default = 1.0 **--common-envelope-lambda-nanjing-enhanced** |br| Continuous extrapolation beyond maximum radius range in Nanjing lambda's as implemented in StarTrack. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. |br| -Default = FALSE +Default = TRUE **--common-envelope-lambda-nanjing-interpolate-in-mass** |br| Interpolate Nanjing lambda parameters across different mass models. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. Requires ``--common-envelope-lambda-nanjing-enhanced``. |br| -Default = FALSE +Default = TRUE **--common-envelope-lambda-nanjing-interpolate-in-metallicity** |br| Interpolate Nanjing lambda parameters across population I and population II metallicity models. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. Requires ``--common-envelope-lambda-nanjing-enhanced``. |br| -Default = FALSE +Default = TRUE **--common-envelope-lambda-nanjing-use-rejuvenated-mass** |br| Use rejuvenated or effective ZAMS mass instead of true birth mass when computing Nanjing lambda parameters. Only used when ``--common-envelope-lambda-prescription = LAMBDA_NANJING``. |br| diff --git a/src/changelog.h b/src/changelog.h index f15ddfce0..6aba3bd14 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1542,7 +1542,7 @@ // - Fixed behaviour of surface helium abundance for HeMS stars and core helium abundance for HeHG stars // 03.18.02 IM - May 1, 2025 - Enhancement: // - Added several outputs to the Switch log necessary for inter-run post-processing comparisons -// - Changed the default behaviour to interpolat Nanjing lambdas in mass and metallicity when using them for common envelope calculations +// - Changed the default behaviour to use enhanced Nanjing lambdas (for common envelope calculations), interpolating in mass and metallicity const std::string VERSION_STRING = "03.18.02"; From 3dcedebf526f4c56a7628ccf1a82b5df34caeb8b Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Thu, 1 May 2025 20:28:28 +1000 Subject: [PATCH 5/7] Matlab code clean --- compas_matlab_utils/ComparisonPlots.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compas_matlab_utils/ComparisonPlots.m b/compas_matlab_utils/ComparisonPlots.m index a97567f80..d78f90478 100644 --- a/compas_matlab_utils/ComparisonPlots.m +++ b/compas_matlab_utils/ComparisonPlots.m @@ -18,6 +18,8 @@ function ComparisonPlots(filename1, name1, filename2, name2) % '~/Work/COMPAS/src/COMPAS_2Stage/COMPAS_Output.h5', '2 stage CE') % % Warning: --switch-log must be used for all runs to be analysed +% It is recommended, but not required, to use the same random seed for the +% runs being compared in order to compare individual binary evolution global Msunkg G AU Rsun @@ -40,7 +42,8 @@ function ComparisonPlots(filename1, name1, filename2, name2) figure(1), hold off; figure(2), hold off; figure(1), set(gca,'FontSize',20), xlabel('Mass 1 (M$_\odot$)', 'Interpreter', 'latex'), ylabel('Mass 2 (M$_\odot$)', 'Interpreter', 'latex'), title('Merging DCO masses'); legend; - figure(2), set(gca,'FontSize',20), xlabel('log_{10} (Orbital period/hr)'), ylabel('Eccentricity'), title('DNS at formation'); legend; + figure(2), set(gca,'FontSize',20), xlabel('$\log_{10}$ (Orbital period/hr)', 'Interpreter', 'latex'); + ylabel('Eccentricity'), title('DNS at formation'); legend; %Plot BH HMXBs From e619f72f7456879aa78fda85510688618c050e8a Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Fri, 2 May 2025 08:41:48 +1000 Subject: [PATCH 6/7] Adding properties to SSE Switch log --- ...lt-record-specifications-SSE-switchlog.rst | 111 +++++++++--------- src/LogTypedefs.h | 5 +- src/changelog.h | 2 +- 3 files changed, 62 insertions(+), 56 deletions(-) diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-SSE-switchlog.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-SSE-switchlog.rst index 7d9434e8b..9ecd23cc4 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-SSE-switchlog.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-default-record-specifications-SSE-switchlog.rst @@ -1,54 +1,57 @@ -SSE switchlog -============= - -Default record definition for the SSE SwitchLog log file:: - - const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { - STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::TIME - }; - - -The default record specification can be modified at runtime via a logfile record specifications file (program option ``--logfile-definitions``). -See :doc:`standard-logfiles-record-specification` for details. - -Note that the SSE SwitchLog file has the following columns automatically appended to each record: - - - The stellar type from which the star is switching. - - The stellar type to which the star is switching. - -|br| -**SWITCHING_FROM** - -.. list-table:: - :widths: 20 80 - :header-rows: 0 - :class: aligned-text - - * - Data type: - - INT - * - COMPAS variable: - - `derived from` ``BaseStar::m_StellarType`` - * - Description: - - The stellar type of the star immediately prior to the switch. - * - Header String: - - "SWITCHING_FROM" - -**SWITCHING_TO** - -.. list-table:: - :widths: 20 80 - :header-rows: 0 - :class: aligned-text - - * - Data type: - - INT - * - COMPAS variable: - - Not applicable - * - Description: - - The stellar type to which the star will switch (i.e. the stellar type immediately following the switch). - * - Header String: - - "SWITCHING_TO" - -These columns will always be automatically appended to each SSE Switch Log record: they cannot be removed via the log file record -specifications file. +SSE switchlog +============= + +Default record definition for the SSE SwitchLog log file:: + + const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { + STAR_PROPERTY::RANDOM_SEED, + STAR_PROPERTY::TIME, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::RADIUS + }; + + +The default record specification can be modified at runtime via a logfile record specifications file (program option ``--logfile-definitions``). +See :doc:`standard-logfiles-record-specification` for details. + +Note that the SSE SwitchLog file has the following columns automatically appended to each record: + + - The stellar type from which the star is switching. + - The stellar type to which the star is switching. + +|br| +**SWITCHING_FROM** + +.. list-table:: + :widths: 20 80 + :header-rows: 0 + :class: aligned-text + + * - Data type: + - INT + * - COMPAS variable: + - `derived from` ``BaseStar::m_StellarType`` + * - Description: + - The stellar type of the star immediately prior to the switch. + * - Header String: + - "SWITCHING_FROM" + +**SWITCHING_TO** + +.. list-table:: + :widths: 20 80 + :header-rows: 0 + :class: aligned-text + + * - Data type: + - INT + * - COMPAS variable: + - Not applicable + * - Description: + - The stellar type to which the star will switch (i.e. the stellar type immediately following the switch). + * - Header String: + - "SWITCHING_TO" + +These columns will always be automatically appended to each SSE Switch Log record: they cannot be removed via the log file record +specifications file. diff --git a/src/LogTypedefs.h b/src/LogTypedefs.h index c5f94b0aa..0a64d0c5d 100644 --- a/src/LogTypedefs.h +++ b/src/LogTypedefs.h @@ -2274,7 +2274,10 @@ const ANY_PROPERTY_VECTOR SSE_SUPERNOVAE_REC = { // const ANY_PROPERTY_VECTOR SSE_SWITCH_LOG_REC = { STAR_PROPERTY::RANDOM_SEED, - STAR_PROPERTY::TIME + STAR_PROPERTY::TIME, + STAR_PROPERTY::MASS, + STAR_PROPERTY::STELLAR_TYPE, + STAR_PROPERTY::RADIUS }; diff --git a/src/changelog.h b/src/changelog.h index 6aba3bd14..fe0563e79 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1541,7 +1541,7 @@ // - Updated coefficients from Shikauchi et al. (2024) for main-sequence core mass calculations // - Fixed behaviour of surface helium abundance for HeMS stars and core helium abundance for HeHG stars // 03.18.02 IM - May 1, 2025 - Enhancement: -// - Added several outputs to the Switch log necessary for inter-run post-processing comparisons +// - Added several outputs to the BSE and SSE Switch logs necessary for inter-run post-processing comparisons // - Changed the default behaviour to use enhanced Nanjing lambdas (for common envelope calculations), interpolating in mass and metallicity const std::string VERSION_STRING = "03.18.02"; From d2aa69d3300404a7a9dfe53a0d1e1f3d4f1a9fbf Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Fri, 2 May 2025 08:55:02 +1000 Subject: [PATCH 7/7] Fixed 'multicative' typo --- .../Program options/program-options-list-defaults.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index 7a87dd110..b180fb1e8 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -1350,8 +1350,8 @@ This option is primarily intended for debugging/testing of convergence issues ra **--timestep-multipliers** |br| Phase-dependent multiplicative factors for timestep duration. |br| See :doc:`Vector program options <./program-options-vector-options>` for option format. |br| -A multicative factor can be specified for each phase (stellar type), where the ordinal value (zero-based) of the option value -indicates the stellar type (from ``MS_LTE_07`` to ``CHEMICALLY_HOMOGENEOUS``, see stellar type list at +A multiplicative factor can be specified for each phase (stellar type), where the ordinal value (zero-based) of the +option value indicates the stellar type (from ``MS_LTE_07`` to ``CHEMICALLY_HOMOGENEOUS``, see stellar type list at :doc:`../../Developer guide/Headers/typedefs-dot-h`>). |br| |br| This multiplier is applied after the timesteps are chosen using other program options such as ``--radial-change-fraction`` and