posydon.binary_evol.MESA
posydon.binary_evol.MESA.step_mesa
This class evolves a binary object according to a MESA grid.
- class posydon.binary_evol.MESA.step_mesa.CO_HMS_RLO_step(metallicity=1., grid_name=None, *args, **kwargs)[source]
Bases:
MesaGridStep
Class for performing the MESA step for a CO-HMS_RLO binary.
Initialize a CO_HMS_RLO_step instance.
- class posydon.binary_evol.MESA.step_mesa.CO_HeMS_RLO_step(metallicity=1., grid_name=None, *args, **kwargs)[source]
Bases:
MesaGridStep
Class for performing the MESA step for a CO-HeMS_RLO binary.
Initialize a CO_HeMS_RLO_step instance.
- class posydon.binary_evol.MESA.step_mesa.CO_HeMS_step(metallicity=1., grid_name=None, *args, **kwargs)[source]
Bases:
MesaGridStep
Class for performing the MESA step for a CO-HeMS binary.
Initialize a CO_HeMS_step instance.
- class posydon.binary_evol.MESA.step_mesa.HMS_HMS_RLO_step(metallicity=1., grid_name=None, *args, **kwargs)[source]
Bases:
MesaGridStep
Class for performing the MESA step for a HMS-HMS RLO binary. For binaries with an initial eccentricity at ZAMS, we evolve them first with step detached and map to the HMS-HMS RLO grid using initial_eccentricity_flow_chart.
Initialize a HMS_HMS_RLO_step instance.
- class posydon.binary_evol.MESA.step_mesa.MS_MS_step(metallicity=1., grid_name=None, *args, **kwargs)[source]
Bases:
MesaGridStep
Class for performing the MESA step for a MS-MS binary.
Initialize a MS_MS_step instance.
- class posydon.binary_evol.MESA.step_mesa.MesaGridStep(metallicity, grid_name, path=PATH_TO_POSYDON_DATA, interpolation_path=None, interpolation_filename=None, interpolation_method='linear3c_kNN', save_initial_conditions=True, track_interpolation=False, stop_method='stop_at_max_time', stop_star='star_1', stop_var_name=None, stop_value=None, stop_interpolate=True, verbose=False)[source]
Bases:
object
Superclass for steps using the POSYDON grids.
Evolve a binary object given a MESA grid or interpolation object.
- Parameters:
interpolation_method ('nearest_neighbour', 'linear_knn_interpolation') –
‘linear_NN_interpolation’ - nearest_neighbour requires a psygrid in the h5 format - linear_knn_interpolation requires a pkl file trained with
interpolation class linear inteprolation, knn classification
- linear_NN_interpolation requires a pkl file trained with
interpolation class linear inteprolation, neural network classification
track_interpolation (bool) –
True requires nearest_neighbour and will append the entire MESA history of properties.
stop_method (stop_at_end or stop_at_max_time) –
stop_at_end will stop the binary at the end of the MESA track
stop_at_max_time binary will stop in the middle of a MESA track if doing so would exceed the binary’s max_time
stop_at_condition will stop the binary when a five condition is met (see next parameters)
stop_var_name (keys in STARPROPERTIES and) – BINARYPROPERTIES - key is one of the STARPROPERTIES and BINARYPROPERTIES
stop_star (star_1 or star_2) –
if you choose stop_var_name from STARPROPERTIES you need to indicate which star you are referring too
stop_value (float) –
when value is reached in the next MESA history model, the binary will stop the evolution
stop_interpolate (True or False) –
True can only be chosen if stop_var_name=’time’, it means that the binary properties will be linearly interpolated between two timestamp to determine their values at the arbitrary time stop_value
- get_final_MESA_step_time()[source]
Infer the maximum MESA step time.
Use the specified interpolation method to determine the maximum MESA simulation time about to be added to the binary. If this step exceeds the maximum age of the binary, a step(NN) is done.
- initial_final_interpolation(star_1_CO=False, star_2_CO=False)[source]
Update the binary through initial-final interpolation.
- interpolate_at_t(t, t_before, t_after, v_before, v_after)[source]
Linear interpolation in time between two points.
- Parameters:
- Returns:
Description of returned object.
- Return type:
- stop_at_condition(binary, property='time', value=None, star='star_1', interpolate=False, star_1_CO=False, star_2_CO=False)[source]
- stop_at_end(binary, property=None, value=None, star=None, interpolate=None, star_1_CO=False, star_2_CO=False)[source]
Update the binary event if max time has been exceeded.