Package ivs :: Package asteroseismology :: Module solarosc
[hide private]
[frames] | no frames]

Module solarosc

source code

Simulation of a solarlike oscillations

Author: Joris De Ridder

Error messages are written to the logger "solarosc".

Notes:

Suppose Delta is the peak FWHM linewidth (muHz) and eta is the damping rate (muHz), then:

   Delta = eta/pi
Classes [hide private]
  NullHandler
Functions [hide private]
ndarray
solarosc(time, freq, ampl, eta)
Compute time series of stochastically excited damped modes
source code
Variables [hide private]
  logger = logging.getLogger("solarosc")
  nullHandler = NullHandler()
Function Details [hide private]

solarosc(time, freq, ampl, eta)

source code 

Compute time series of stochastically excited damped modes

See also De Ridder et al., 2006, MNRAS 365, pp. 595-605.

Example:

>>> time = np.linspace(0, 40, 100)      # in Ms
>>> freq = np.array([23.0, 23.5])       # in microHz
>>> ampl = np.array([100.0, 110.0])     # in ppm
>>> eta = np.array([1.e-6, 3.e-6])      # in 1/Ms
>>> oscsignal = solarosc(time, freq, ampl, eta)
>>> flux = 1000000.0                      # average flux level
>>> signal = flux * (1.0 + oscsignal)
>>> # The same with a logger
>>> import sys, logging, logging.handlers
>>> myLogger = logging.getLogger("solarosc")
>>> myLogger.addHandler(logging.StreamHandler(sys.stdout))
>>> myLogger.setLevel(logging.INFO)
>>> oscsignal = solarosc(time, freq, ampl, eta, myLogger)
Simulating 2 modes
Oscillation kicktimestep: 3333.333333
300 kicks for warm up for oscillation signal
Simulating stochastic oscillations
Parameters:
  • time (ndarray) - time points [0..Ntime-1] (unit: e.g. Ms)
  • freq (ndarray) - oscillation freqs [0..Nmodes-1] (unit: e.g. microHz)
  • ampl (ndarray) - amplitude of each oscillation mode rms amplitude = ampl / sqrt(2.)
  • eta (ndarray) - damping rates (unit: e.g. (Ms)^{-1})
Returns: ndarray
signal[0..Ntime-1]