IDMap#

class morse.IDMap(spectrum, m, k, nurot_vect, f0_vect, folded=False)#

Class to represent a DFT map.

spectrum#

Frequency data.

Type:

Spectrum

m#

Azimuthal order.

Type:

int

k#

Ordering index (Lee & Saio 97).

Type:

int

nurot_vect#

Rotation frequencies tested (in µHz).

Type:

np.array

f0_vect#

Frequencies at which the DFT is evaluated (in µHz).

Type:

np.array

folded#

If True, it is assumed that the spectrum is folded in the inertial frame.

Type:

bool

eigenvalue#

Eigenvalue of Laplace’s tidal equation corresponding to (m,k).

Type:

Eigenvalue

resolution#
Type:

np.array

dft_map#
Type:

np.array

psd_max#

Maximum of Power Spectral Density (PSD) in dft_map.

Type:

float

nurot#

Rotation frequency corresponding to the maximum of PSD in dft_map (in µHz).

Type:

float

buoy_r#

Buoyancy radius corresponding to the maximum of PSD in dft_map (in s).

Type:

float

psd_threshold#

Detection threshold.

Type:

float

flag_detection#

True if a period spacing pattern has been detected (psd_max > psd_threshold).

Type:

bool

echelle_diagram#

Echelle diagram made using the parameters (nurot, buoy_r) that maximise the PSD.

Type:

EchelleDiagram

tol#

Maximum relative period difference tolerated to associate an observed mode to one of the TAR model.

Type:

float

offset#

Offset.

Type:

float

err_periods_mc#

Mean period difference between a TAR model and observed modes.

Type:

float

results_mc#

Results of the MC simulation. A line contains nurot, buoy_r, psd_max and flag_detection for a draw of the perturbed spectrum.

Type:

np.array

err_nurot#

Standard deviation of the perturbed rotation frequencies (in µHz).

Type:

float

err_buoy_r#

Standard deviation of the perturbed buoyancy radii (in s).

Type:

float

calc_uncertainties(ndraws=500, propagate=False, tol=0.005)#

Estimates the uncertainty on the rotation frequency and buoyancy radius using a Monte-Carlo simulation.

Parameters:
  • ndraws (int) – Number of draws.

  • propagate (bool) – If True, propagates uncertainties on mode periods. Otherwise, the mean period difference between a TAR model and observed modes is used as a “fictive” uncertainty.

  • tol (float) – Only used if propagate is False. Maximum relative period difference tolerated to associate an observed mode to one of the TAR model.

get_echelle_diagram()#

Computes the echelle diagram using the parameters that maximise the PSD in the DFT map.

get_pattern(tol=0.001)#

If flag_detection is True, extracts the detected period spacing pattern.

Parameters:

tol (float) – Maximum relative difference tolerated between modelled and observed periods of the pattern modes.

Returns:

Extracted period spacing pattern.

Return type:

Pattern

plot(cmap='cividis', save=False)#

Plots the computed DFT map.

Parameters:
  • cmap (str) – Colour map to use for the plot.

  • save (bool) – If True, saves the figure to a png file.

save()#

Saves results, log and plots.