LAL  7.5.0.1-b72065a
Header ReadNoiseSpectrum.h

Detailed Description

Provides function to read in a file containing a possibly unequally sampled noise amplitude spectrum ( \(\textrm{strain}/\sqrt(\textrm{Hz})\)) and return as a frequency series.

Author
Brady, P. R.

Synopsis

#include <lal/ReadNoiseSpectrum.h>

Prototypes

void LALReadNoiseSpectrum (LALStatus *stat, REAL4FrequencySeries *spectrum, CHAR *fname)
 Function to read in noise spectrum from a formatted ascii file and return the amplitude noise spectrum in \(\textrm{strain}/\sqrt{\textrm{Hz}}\). More...
 

Error Codes

#define LALREADNOISESPECTRUMH_ENULL   1
 Null pointer. More...
 
#define LALREADNOISESPECTRUMH_ENNUL   2
 Non-null pointer. More...
 
#define LALREADNOISESPECTRUMH_EALOC   3
 Memory allocation error. More...
 
#define LALREADNOISESPECTRUMH_EOPEN   4
 Error opening file. More...
 
#define LALREADNOISESPECTRUMH_EFCLO   5
 Error closing file. More...
 
#define LALREADNOISESPECTRUMH_EPARS   8
 Error parsing spectrum file. More...
 

Function Documentation

◆ LALReadNoiseSpectrum()

void LALReadNoiseSpectrum ( LALStatus stat,
REAL4FrequencySeries spectrum,
CHAR fname 
)

Function to read in noise spectrum from a formatted ascii file and return the amplitude noise spectrum in \(\textrm{strain}/\sqrt{\textrm{Hz}}\).

Description

LALReadNoiseSpectrum() fills the contents of the REAL4FrequencySeries spectrum from data read from formatted ascii file with name fname. The ascii file should have a header (greater than or equal to one line) which is indicated by a \(\#\) at the start of the line. The first line of the file must contain the number of points at which the spectrum is sampled. If the spectrum is sampled at 500 different points, then the first line would be

# npoints=500

Replace 500 by the number of sample points in your particular data.

The REAL4FrequencySeries spectrum should be allocated before calling the routine which uses the length and metadata information to determine the evenly sampled output that is reqruired. The function does nearest neighbor interpolation to get the points in the outpu frequency series.

Definition at line 88 of file ReadNoiseSpectrum.c.

Macro Definition Documentation

◆ LALREADNOISESPECTRUMH_ENULL

#define LALREADNOISESPECTRUMH_ENULL   1

Null pointer.

Definition at line 60 of file ReadNoiseSpectrum.h.

◆ LALREADNOISESPECTRUMH_ENNUL

#define LALREADNOISESPECTRUMH_ENNUL   2

Non-null pointer.

Definition at line 61 of file ReadNoiseSpectrum.h.

◆ LALREADNOISESPECTRUMH_EALOC

#define LALREADNOISESPECTRUMH_EALOC   3

Memory allocation error.

Definition at line 62 of file ReadNoiseSpectrum.h.

◆ LALREADNOISESPECTRUMH_EOPEN

#define LALREADNOISESPECTRUMH_EOPEN   4

Error opening file.

Definition at line 63 of file ReadNoiseSpectrum.h.

◆ LALREADNOISESPECTRUMH_EFCLO

#define LALREADNOISESPECTRUMH_EFCLO   5

Error closing file.

Definition at line 64 of file ReadNoiseSpectrum.h.

◆ LALREADNOISESPECTRUMH_EPARS

#define LALREADNOISESPECTRUMH_EPARS   8

Error parsing spectrum file.

Definition at line 65 of file ReadNoiseSpectrum.h.