Package ivs :: Package spectra :: Module moments
[hide private]
[frames] | no frames]

Module moments

source code

Compute the moments of a line profile.

Functions [hide private]
 
moments(velo, flux, SNR=200., max_mom=3)
Compute the moments from a line profile.
source code
[max_mom x array],[max_mom x array]
moments_fromfiles(filelist, read_func, max_mom=3, **kwargs)
Compute the moments from a list of files containg line profiles.
source code
velo,av_prof,fluxes
profiles_fromfiles(filelist, read_func, max_mom=3, **kwargs)
Compute an average profile from a file list of profiles.
source code
Function Details [hide private]

moments_fromfiles(filelist, read_func, max_mom=3, **kwargs)

source code 

Compute the moments from a list of files containg line profiles.

The read_func should return 2 arrays and a float, representing velocities, normalised fluxes and the SNR of the line profile.

m0: equivalent width m1: radial velocity m2: variance m3: skewness

Parameters:
  • filelist (list of strings) - list of filenames
  • read_func (Python function) - function which reads in a file and returns velocities (array), the line profile (array) and the SNR of the whole profile (float)
  • max_mom (integer) - maximum moment to compute
Returns: [max_mom x array],[max_mom x array]
a list containg the moments and a list containing the errors

profiles_fromfiles(filelist, read_func, max_mom=3, **kwargs)

source code 

Compute an average profile from a file list of profiles.

The read_func should return 2 arrays and a float, representing velocities, normalised fluxes and the SNR of the line profile.

m0: equivalent width m1: radial velocity m2: variance m3: skewness

Parameters:
  • filelist (list of strings) - list of filenames
  • read_func (Python function) - function which reads in a file and returns velocities (array), the line profile (array) and the SNR of the whole profile (float)
  • max_mom (integer) - maximum moment to compute
Returns: velo,av_prof,fluxes
a list containg the moments and a list containing the errors