ysoisochrone.isochrone

Module Contents

Classes

Isochrone

Isochrone class for setting up log_age, masses, and logtlogl attributes now it works for Baraffe and Feiden tracks.

API

class ysoisochrone.isochrone.Isochrone(data_dir=None)

Isochrone class for setting up log_age, masses, and logtlogl attributes now it works for Baraffe and Feiden tracks.

Args:

data_dir: [str, optional]

Directory where the isochrone data files are stored. Default is a folder called ‘isochrone_data’ under where you are running the code.

Attributes:

log_age: [array]

Array of log(age) values.

masses: [array]

Array of mass values.

logtlogl: [array]

Array of log(T) and log(L) values for the evolutionary tracks.

Initialization

Initialize Isochrone object.

Args:
data_dir: [str or None]
  • None → use the built-in isochrone matrices packaged

    inside ysoisochrone/data.

  • path → load isochrone matrices from this directory

    (user-supplied custom matrices).

_parsec_v2p0_release_notice_shown = False
grid_source_phrase()

Human-readable description of where the active grid was loaded from.

prepare_baraffe_tracks()

Prepares the Baraffe BHAC15 tracks file by downloading it if necessary, reading the data, interpolating it into a meshgrid, and saving it as a .mat file.

The method: 1. Checks if the BHAC15 tracks file exists in the data directory. 2. Downloads the file if it doesn’t exist. 3. Reads the file, creates a meshgrid for log_age and masses, and interpolates logtlogl data. 4. Saves the resulting grid data to a .mat file.

Args:

None.

Output:

Saves the .mat file to the data directory.

prepare_feiden_tracks()

Prepares the Feiden 2016 tracks file by downloading it if necessary, reading the data, interpolating it into a meshgrid, and saving it as a .mat file.

The method: 1. Checks if the Feiden2016_trk tracks file exists in the data directory. 2. Downloads the file if it doesn’t exist. 3. Reads the file, creates a meshgrid for log_age and masses, and interpolates logtlogl data. 4. Saves the resulting grid data to a .mat file.

Args:

None.

Output:

Saves the .mat file to the data directory.

prepare_parsecv1p2_tracks()

Prepares the PARSEC v1.2 tracks file by downloading it if necessary, reading the data, interpolating it into a meshgrid, and saving it as a .mat file.

The method: 1. Checks if the PARSEC v1.2 tracks file exists in the data directory. 2. Downloads the file if it doesn’t exist. 3. Reads the file, creates a meshgrid for log_age and masses, and interpolates logtlogl data. 4. Saves the resulting grid data to a .mat file.

Args:

None.

Output:

Saves the .mat file to the data directory.

prepare_parsecv2p0_tracks()

Prepares the PARSEC v2.0 (2025 release) tracks file by downloading it if necessary, reading the data, interpolating it into a meshgrid, and saving it as a .mat file.

The method: 1. Checks if the PARSEC v2.0 tracks file exists in the data directory. 2. Downloads the file if it doesn’t exist. 3. Reads the file, creates a meshgrid for log_age and masses, and interpolates logtlogl data. 4. Saves the resulting grid data to a .mat file.

Args:

None.

Output:

Saves the .mat file to the data directory.

prepare_mistv1p2_tracks()

Prepares the MIST v1.2 tracks file by downloading it if necessary, reading the data, interpolating it into a meshgrid, and saving it as a .mat file.

The method: 1. Checks if the MIST v1.2 tracks file exists in the data directory. 2. Downloads the file if it doesn’t exist. 3. Reads the file, creates a meshgrid for log_age and masses, and interpolates logtlogl data. 4. Saves the resulting grid data to a .mat file.

Args:

None.

Output:

Saves the .mat file to the data directory.

load_baraffe2015_tracks()

Load Baraffe isochrone tracks from .sav file and set log_age, masses, and logtlogl. Uses packaged built-in matrix by default, unless user provides a custom data_dir.

Output:

Sets:

log_age: [array]

Log age values from the Baraffe tracks.

masses: [array]

Mass values from the Baraffe tracks.

logtlogl: [array]

Log T and Log L values from the Baraffe tracks.

load_feiden2016_tracks()

Load Feiden isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Output:

Sets:

log_age: [array]

Log age values from the Feiden tracks.

masses: [array]

Mass values from the Feiden tracks.

logtlogl: [array]

Log T and Log L values from the Feiden tracks.

load_feiden2016_magnetic_tracks()

Load Feiden isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported. The original Feiden magnetic grids contain known issues at ages < 10 Myr, and a corrected version is provided in the ysoisochrone built-in matrices.

Output:

Sets:

log_age: [array]

Log age values from the Feiden tracks.

masses: [array]

Mass values from the Feiden tracks.

logtlogl: [array]

Log T and Log L values from the Feiden tracks.

load_parsecv1p2_tracks()

Load PARSEC v1.2 isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Output:

Sets:

log_age: [array]

Log age values from the PARSEC v1.2 tracks.

masses: [array]

Mass values from the PARSEC v1.2 tracks.

logtlogl: [array]

Log T and Log L values from the PARSEC v1.2 tracks.

load_parsecv2p0_tracks()

Load PARSEC v2.0 isochrone tracks and set log_age, masses, and logtlogl.

Since ysoisochrone v1.2.0 the built-in PARSEC v2.0 grid is built from the PARSEC v2.0 2025 release (non-rotating, solar metallicity Z=0.014). The grid built from the older 2022 archive is still available via set_tracks('parsec_v2p0_2022').

Output:

Sets:

log_age: [array]

Log age values from the PARSEC v2.0 tracks.

masses: [array]

Mass values from the PARSEC v2.0 tracks.

logtlogl: [array]

Log T and Log L values from the PARSEC v2.0 tracks.

load_parsecv2p0_2022_tracks()

Load the frozen PARSEC v2.0 grid built from the 2022 archive.

The 2022 PARSEC v2.0 track archive is no longer distributed by the PARSEC team, so this grid is built-in only (it cannot be regenerated from a user directory). It is kept for reproducibility of results obtained with ysoisochrone < 1.2.0. For new work, use set_tracks('parsec') (the 2025 release).

Sets:

log_age, masses, logtlogl: [array]

Grid values from the frozen PARSEC v2.0 (2022) build.

load_mistv1p2_tracks()

Load MIST v1.2 isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Output:

Sets:

log_age: [array]

Log age values from the MIST v1.2 tracks.

masses: [array]

Mass values from the MIST v1.2 tracks.

logtlogl: [array]

Log T and Log L values from the MIST v1.2 tracks.

load_siess2000_tracks()

Load Siess2000 isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the Siess2000 tracks.

masses: [array]

Mass values from the Siess2000 tracks.

logtlogl: [array]

Log T and Log L values from the Siess2000 tracks.

load_spots0000_tracks()

Load SPOTS isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the SPOTS tracks.

masses: [array]

Mass values from the SPOTS tracks.

logtlogl: [array]

Log T and Log L values from the SPOTS tracks.

load_spots0169_tracks()

Load SPOTS isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the SPOTS tracks.

masses: [array]

Mass values from the SPOTS tracks.

logtlogl: [array]

Log T and Log L values from the SPOTS tracks.

load_spots0339_tracks()

Load SPOTS isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the SPOTS tracks.

masses: [array]

Mass values from the SPOTS tracks.

logtlogl: [array]

Log T and Log L values from the SPOTS tracks.

load_spots0508_tracks()

Load SPOTS isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the SPOTS tracks.

masses: [array]

Mass values from the SPOTS tracks.

logtlogl: [array]

Log T and Log L values from the SPOTS tracks.

load_spots0847_tracks()

Load SPOTS isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the SPOTS tracks.

masses: [array]

Mass values from the SPOTS tracks.

logtlogl: [array]

Log T and Log L values from the SPOTS tracks.

load_pisa_tracks()

Load Pisa isochrone tracks from .sav file and set log_age, masses, and logtlogl.

Only the built-in corrected matrix is supported.

Output:

Sets:

log_age: [array]

Log age values from the Pisa tracks.

masses: [array]

Mass values from the Pisa tracks.

logtlogl: [array]

Log T and Log L values from the Pisa tracks.

load_tracks_from_customize_matrix(load_file)

Load the isochromes from any customized matrix

Args:

load_file: [str]

the .mat file that contains mass grid, log_age grid, and logt_logl grid

Sets:

log_age: [array]

Log age values from the Feiden tracks.

masses: [array]

Mass values from the Feiden tracks.

logtlogl: [array]

Log T and Log L values from the Feiden tracks.

set_tracks_legacy(track_type, load_file='')

Set the isochrone tracks based on track_type.

Args:

track_type: [str]

Type of the tracks to use (‘baraffe2015’ or ‘feiden2016’ or ‘customize’).

load_file: [str]

the .mat file that contains mass grid, log_age grid, and logt_logl grid Default is ‘’, so if you want to read in the customized datafile, remember to set up this parameter

Output:

Loads the corresponding track (Baraffe or Feiden) and sets the appropriate attributes.

set_tracks(track_type, load_file='', verbose=False)

Set the isochrone tracks based on track_type.

Args:

track_type: [str]

Type of the tracks to use (‘baraffe2015’ or ‘feiden2016’ or ‘customize’).

load_file: [str]

the .mat file that contains mass grid, log_age grid, and logt_logl grid Default is ‘’, so if you want to read in the customized datafile, remember to set up this parameter

verbose: [bool]

If True, print additional information during track loading. Default is False.

Output:

Loads the corresponding track (Baraffe or Feiden) and sets the appropriate attributes.

get_tracks()

Get the current isochrone tracks (log_age, masses, logtlogl).

Output:

Returns:

log_age: [array]

Array of log(age) values.

masses: [array]

Array of mass values.

logtlogl: [array]

Array of log(T) and log(L) values.