sherlockpipe.bayesian_fit.allesfitter_data_extractor.AllesfitterDataExtractor

class sherlockpipe.bayesian_fit.allesfitter_data_extractor.AllesfitterDataExtractor

Bases: object

Utility to extract fitted transit parameters from allesfitter/alesfitter nested sampling results.

Provides static methods to read period, epoch, duration, depth, radius, semi-major axis, and planet name from the nested sampling output tables.

__init__()

Initializes the data extractor. No setup required.

Methods

__init__()

Initializes the data extractor.

extract_depth(candidate_number, ...)

Extracts the transit depth (in ppt) for a candidate from the derived parameters table.

extract_duration(candidate_number, ...)

Extracts the total transit duration for a candidate from the derived parameters table.

extract_epoch(candidate_number, ...[, ...])

Extracts the transit epoch (T0) for a candidate from the nested sampling results.

extract_period(candidate_number, ...[, ...])

Extracts the orbital period for a candidate from the nested sampling results.

extract_planet_name(object_id, ...)

Constructs a planet name from the object ID and fitted parameter name.

extract_radius(candidate_number, ...)

Extracts the planet radius in Earth units for a candidate from the derived parameters table.

extract_semimajor_axis(candidate_number, ...)

Extracts the semi-major axis in AU for a candidate from the derived parameters table.

static extract_depth(candidate_number: int, ns_derived_table_results_df: DataFrame)

Extracts the transit depth (in ppt) for a candidate from the derived parameters table.

Parameters

candidate_numberint

The zero-based index of the candidate.

ns_derived_table_results_dfpandas.DataFrame

The nested sampling derived parameters table.

Returns

tuple of (float, float, float)

The median depth in parts-per-thousand, lower error, and upper error.

static extract_duration(candidate_number: int, ns_derived_table_results_df: DataFrame)

Extracts the total transit duration for a candidate from the derived parameters table.

Parameters

candidate_numberint

The zero-based index of the candidate.

ns_derived_table_results_dfpandas.DataFrame

The nested sampling derived parameters table.

Returns

tuple of (float, float, float)

The median duration (hours), lower error, and upper error.

static extract_epoch(candidate_number: int, ns_table_results_df: DataFrame, allesclass, percentile=68)

Extracts the transit epoch (T0) for a candidate from the nested sampling results.

Parameters

candidate_numberint

The zero-based index of the candidate.

ns_table_results_dfpandas.DataFrame

The nested sampling table of fitted parameters.

allesclassalexfitter.allesclass

The allesfitter analysis object containing posterior distributions.

percentilefloat

The credible interval percentile.

Returns

tuple of (float, float, float)

The median epoch, lower error, and upper error.

static extract_period(candidate_number: int, ns_table_results_df: DataFrame, allesclass, percentile=68)

Extracts the orbital period for a candidate from the nested sampling results.

Parameters

candidate_numberint

The zero-based index of the candidate.

ns_table_results_dfpandas.DataFrame

The nested sampling table of fitted parameters.

allesclassalexfitter.allesclass

The allesfitter analysis object containing posterior distributions.

percentilefloat

The credible interval percentile (e.g. 68 for 1-sigma).

Returns

tuple of (float, float, float)

The median period, lower error, and upper error.

static extract_planet_name(object_id: str, candidate_number: int, ns_table_results_df: DataFrame)

Constructs a planet name from the object ID and fitted parameter name.

Parameters

object_idstr

The target object identifier.

candidate_numberint

The zero-based index of the candidate.

ns_table_results_dfpandas.DataFrame

The nested sampling table of fitted parameters.

Returns

str

The constructed planet name (e.g. TIC123456_b).

static extract_radius(candidate_number: int, ns_derived_table_results_df: DataFrame)

Extracts the planet radius in Earth units for a candidate from the derived parameters table.

Parameters

candidate_numberint

The zero-based index of the candidate.

ns_derived_table_results_dfpandas.DataFrame

The nested sampling derived parameters table.

Returns

tuple of (float, float, float)

The median radius in Earth radii, lower error, and upper error.

static extract_semimajor_axis(candidate_number: int, ns_derived_table_results_df: DataFrame)

Extracts the semi-major axis in AU for a candidate from the derived parameters table.

Parameters

candidate_numberint

The zero-based index of the candidate.

ns_derived_table_results_dfpandas.DataFrame

The nested sampling derived parameters table.

Returns

tuple of (float, float, float)

The median semi-major axis in AU, lower error, and upper error.