LALPulsar  6.1.0.1-fe68b98
DopplerScan.h File Reference

Header file defining the API for DopplerScan. More...

Prototypes

void XLALDestroyDopplerSkyScan (DopplerSkyScanState *skyScan)
 Destroy the DopplerSkyScanState structure. More...
 
int XLALInitDopplerSkyScan (DopplerSkyScanState *skyScan, const DopplerSkyScanInit *init)
 Initialize the Doppler sky-scanner. More...
 
int XLALNextDopplerSkyPos (PulsarDopplerParams *pos, DopplerSkyScanState *skyScan)
 NextDopplerSkyPos(): step through sky-grid return 0 = OK, -1 = ERROR. More...
 
void writeSkyGridFile (LALStatus *, const DopplerSkyGrid *grid, const CHAR *fname)
 Write the given sky-grid to a file. More...
 
CHARXLALSkySquare2String (REAL8 Alpha, REAL8 Delta, REAL8 AlphaBand, REAL8 DeltaBand)
 parse a 'classical' sky-square (Alpha, Delta, AlphaBand, DeltaBand) into a "SkyRegion"-string of the form '(a1,d1), (a2,d2),...' More...
 
int XLALParseSkyRegionString (SkyRegion *region, const CHAR *input)
 parse a skyRegion-string into a SkyRegion structure: the expected string-format is " (longitude1, latitude1), (longitude2, latitude2), (longitude3, latitude3), ... " More...
 
void getMetricEllipse (LALStatus *, MetricEllipse *ellipse, REAL8 mismatch, const REAL8Vector *metric, UINT4 dim0)
 get "metric-ellipse" for given metric. More...
 
int fprintfDopplerParams (FILE *fp, const PulsarDopplerParams *params)
 Debug-output of PulsarDopplerParams struct. More...
 
DopplerSkyGridXLALEquiPartitionSkygrid (const DopplerSkyGrid *skygrid, UINT4 jPart, UINT4 numPartitions)
 Equi-partition (approximately) a given skygrid into numPartitions, and return partition 0<= partitionIndex < numPartitions. More...
 
void FreeDopplerSkyScan (LALStatus *, DopplerSkyScanState *skyScan)
 
void InitDopplerSkyScan (LALStatus *, DopplerSkyScanState *skyScan, const DopplerSkyScanInit *init)
 

Detailed Description

Header file defining the API for DopplerScan.

Author
Reinhard Prix, Karl Wette
Date
2004, 2005, 2006, 2007, 2008

Definition in file DopplerScan.h.

Go to the source code of this file.

Data Structures

struct  SkyRegion
 structure describing a polygon-region in the sky More...
 
struct  DopplerRegion
 
struct  DopplerSkyGrid
 sky grid More...
 
struct  DopplerSkyScanInit
 initialization-structure passed to InitDopplerSkyScan() More...
 
struct  DopplerSkyScanState
 this structure reflects the current state of a DopplerSkyScan More...
 
struct  MetricEllipse
 a "sky-ellipse", described by the two major axes and it's angle wrt x-axis More...
 

Macros

#define DOPPLERSCANH_ENULL   1
 
#define DOPPLERSCANH_ENOTREADY   2
 
#define DOPPLERSCANH_ESYS   3
 
#define DOPPLERSCANH_E2DSKY   4
 
#define DOPPLERSCANH_E2DSTEP   5
 
#define DOPPLERSCANH_EGRIDCRPT   6
 
#define DOPPLERSCANH_ESKYPARAM   7
 
#define DOPPLERSCANH_EMETRICTYPE   8
 
#define DOPPLERSCANH_ENONULL   9
 
#define DOPPLERSCANH_EMEM   10
 
#define DOPPLERSCANH_ESKYREGION   11
 
#define DOPPLERSCANH_EINPUT   12
 
#define DOPPLERSCANH_ENEGMETRIC   13
 
#define DOPPLERSCANH_EXLAL   14
 
#define DOPPLERSCANH_MSGENULL   "Arguments contained an unexpected null pointer"
 
#define DOPPLERSCANH_MSGENOTREADY   "Doppler scan is uninitialized or has finished"
 
#define DOPPLERSCANH_MSGESYS   "System call failed (probably file IO)"
 
#define DOPPLERSCANH_MSGE2DSKY   "Either need one sky-point or a polygon. (2 sky-points where given)"
 
#define DOPPLERSCANH_MSGE2DSTEP   "If not using the metric, you need to specify _both_ dDelta and dAlpha"
 
#define DOPPLERSCANH_MSGEGRIDCRPT   "Unexpected NULL in grid-list. This points to a bug in the code... "
 
#define DOPPLERSCANH_MSGESKYPARAM   "Invalid sky region! We need 0<= alpha < 2Pi and -Pi/2 <= delta <= PI/2"
 
#define DOPPLERSCANH_MSGEMETRICTYPE   "Unknown type of metric specified."
 
#define DOPPLERSCANH_MSGENONULL   "Output pointer is not NULL"
 
#define DOPPLERSCANH_MSGEMEM   "Out of memory"
 
#define DOPPLERSCANH_MSGESKYREGION   "Could not parse sky-region correctly"
 
#define DOPPLERSCANH_MSGEINPUT   "Invald input parameter"
 
#define DOPPLERSCANH_MSGENEGMETRIC   "Negative metric encountered"
 
#define DOPPLERSCANH_MSGEXLAL   "XLAL call failed"
 

Enumerations

enum  scan_state_t { STATE_IDLE = 0 , STATE_READY , STATE_FINISHED , STATE_LAST }
 Different 'states' a Doppler-scan can be in. More...
 
enum  DopplerGridType {
  GRID_FLAT = 0 , GRID_ISOTROPIC = 1 , GRID_METRIC = 2 , GRID_FILE_SKYGRID = 3 ,
  GRID_METRIC_SKYFILE = 4 , GRID_SKY_LAST , GRID_FILE_FULLGRID = 6 , GRID_SPINDOWN_SQUARE = 8 ,
  GRID_SPINDOWN_AGEBRK = 9 , GRID_LAST
}
 different types of grids: More...
 

Macro Definition Documentation

◆ DOPPLERSCANH_ENULL

#define DOPPLERSCANH_ENULL   1

Definition at line 47 of file DopplerScan.h.

◆ DOPPLERSCANH_ENOTREADY

#define DOPPLERSCANH_ENOTREADY   2

Definition at line 48 of file DopplerScan.h.

◆ DOPPLERSCANH_ESYS

#define DOPPLERSCANH_ESYS   3

Definition at line 49 of file DopplerScan.h.

◆ DOPPLERSCANH_E2DSKY

#define DOPPLERSCANH_E2DSKY   4

Definition at line 50 of file DopplerScan.h.

◆ DOPPLERSCANH_E2DSTEP

#define DOPPLERSCANH_E2DSTEP   5

Definition at line 51 of file DopplerScan.h.

◆ DOPPLERSCANH_EGRIDCRPT

#define DOPPLERSCANH_EGRIDCRPT   6

Definition at line 52 of file DopplerScan.h.

◆ DOPPLERSCANH_ESKYPARAM

#define DOPPLERSCANH_ESKYPARAM   7

Definition at line 53 of file DopplerScan.h.

◆ DOPPLERSCANH_EMETRICTYPE

#define DOPPLERSCANH_EMETRICTYPE   8

Definition at line 54 of file DopplerScan.h.

◆ DOPPLERSCANH_ENONULL

#define DOPPLERSCANH_ENONULL   9

Definition at line 55 of file DopplerScan.h.

◆ DOPPLERSCANH_EMEM

#define DOPPLERSCANH_EMEM   10

Definition at line 56 of file DopplerScan.h.

◆ DOPPLERSCANH_ESKYREGION

#define DOPPLERSCANH_ESKYREGION   11

Definition at line 57 of file DopplerScan.h.

◆ DOPPLERSCANH_EINPUT

#define DOPPLERSCANH_EINPUT   12

Definition at line 58 of file DopplerScan.h.

◆ DOPPLERSCANH_ENEGMETRIC

#define DOPPLERSCANH_ENEGMETRIC   13

Definition at line 59 of file DopplerScan.h.

◆ DOPPLERSCANH_EXLAL

#define DOPPLERSCANH_EXLAL   14

Definition at line 60 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGENULL

#define DOPPLERSCANH_MSGENULL   "Arguments contained an unexpected null pointer"

Definition at line 63 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGENOTREADY

#define DOPPLERSCANH_MSGENOTREADY   "Doppler scan is uninitialized or has finished"

Definition at line 64 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGESYS

#define DOPPLERSCANH_MSGESYS   "System call failed (probably file IO)"

Definition at line 65 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGE2DSKY

#define DOPPLERSCANH_MSGE2DSKY   "Either need one sky-point or a polygon. (2 sky-points where given)"

Definition at line 66 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGE2DSTEP

#define DOPPLERSCANH_MSGE2DSTEP   "If not using the metric, you need to specify _both_ dDelta and dAlpha"

Definition at line 67 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGEGRIDCRPT

#define DOPPLERSCANH_MSGEGRIDCRPT   "Unexpected NULL in grid-list. This points to a bug in the code... "

Definition at line 68 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGESKYPARAM

#define DOPPLERSCANH_MSGESKYPARAM   "Invalid sky region! We need 0<= alpha < 2Pi and -Pi/2 <= delta <= PI/2"

Definition at line 69 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGEMETRICTYPE

#define DOPPLERSCANH_MSGEMETRICTYPE   "Unknown type of metric specified."

Definition at line 70 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGENONULL

#define DOPPLERSCANH_MSGENONULL   "Output pointer is not NULL"

Definition at line 71 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGEMEM

#define DOPPLERSCANH_MSGEMEM   "Out of memory"

Definition at line 72 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGESKYREGION

#define DOPPLERSCANH_MSGESKYREGION   "Could not parse sky-region correctly"

Definition at line 73 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGEINPUT

#define DOPPLERSCANH_MSGEINPUT   "Invald input parameter"

Definition at line 74 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGENEGMETRIC

#define DOPPLERSCANH_MSGENEGMETRIC   "Negative metric encountered"

Definition at line 75 of file DopplerScan.h.

◆ DOPPLERSCANH_MSGEXLAL

#define DOPPLERSCANH_MSGEXLAL   "XLAL call failed"

Definition at line 76 of file DopplerScan.h.

Enumeration Type Documentation

◆ scan_state_t

Different 'states' a Doppler-scan can be in.

Enumerator
STATE_IDLE 

not initialized yet

STATE_READY 

initialized and ready

STATE_FINISHED 

all templates have been read

STATE_LAST 

Definition at line 81 of file DopplerScan.h.

◆ DopplerGridType

different types of grids:

Enumerator
GRID_FLAT 

"flat" sky-grid: fixed step-size (dAlpha,dDelta)

GRID_ISOTROPIC 

approximately isotropic sky-grid

GRID_METRIC 

generate grid using a 2D sky-metric

GRID_FILE_SKYGRID 

read skygrid from a file

GRID_METRIC_SKYFILE 

'hybrid' grid-construction: use skygrid from file, metric for others

GRID_SKY_LAST 

end-marker for factored grid types

GRID_FILE_FULLGRID 

load the full D-dim grid from a file

GRID_SPINDOWN_SQUARE 

spindown tiling for a single sky position and square parameter space

GRID_SPINDOWN_AGEBRK 

spindown tiling for a single sky position and non-square parameter space defined by spindown age and braking indices

GRID_LAST 

Definition at line 89 of file DopplerScan.h.

Function Documentation

◆ XLALDestroyDopplerSkyScan()

void XLALDestroyDopplerSkyScan ( DopplerSkyScanState skyScan)

Destroy the DopplerSkyScanState structure.

Definition at line 294 of file DopplerScan.c.

◆ XLALInitDopplerSkyScan()

int XLALInitDopplerSkyScan ( DopplerSkyScanState skyScan,
const DopplerSkyScanInit init 
)

Initialize the Doppler sky-scanner.

Parameters
[out]skyScanthe initialized scan-structure
[in]initinit-params

Definition at line 170 of file DopplerScan.c.

◆ XLALNextDopplerSkyPos()

int XLALNextDopplerSkyPos ( PulsarDopplerParams pos,
DopplerSkyScanState skyScan 
)

NextDopplerSkyPos(): step through sky-grid return 0 = OK, -1 = ERROR.

Definition at line 127 of file DopplerScan.c.

◆ writeSkyGridFile()

void writeSkyGridFile ( LALStatus status,
const DopplerSkyGrid skyGrid,
const CHAR fname 
)

Write the given sky-grid to a file.

Possibly including some comments containing the parameters of the grid (?).

Definition at line 1023 of file DopplerScan.c.

◆ XLALSkySquare2String()

CHAR* XLALSkySquare2String ( REAL8  Alpha,
REAL8  Delta,
REAL8  AlphaBand,
REAL8  DeltaBand 
)

parse a 'classical' sky-square (Alpha, Delta, AlphaBand, DeltaBand) into a "SkyRegion"-string of the form '(a1,d1), (a2,d2),...'

Parameters
[in]Alphalongitude of first point
[in]Deltalatitude of first point
[in]AlphaBandlongitude-interval
[in]DeltaBandlatitude-interval

Definition at line 1295 of file DopplerScan.c.

◆ XLALParseSkyRegionString()

int XLALParseSkyRegionString ( SkyRegion region,
const CHAR input 
)

parse a skyRegion-string into a SkyRegion structure: the expected string-format is " (longitude1, latitude1), (longitude2, latitude2), (longitude3, latitude3), ... "

If input == NULL or input == "allsky":==> sky-region covering the whole sky.

Definition at line 1203 of file DopplerScan.c.

◆ getMetricEllipse()

void getMetricEllipse ( LALStatus status,
MetricEllipse ellipse,
REAL8  mismatch,
const REAL8Vector metric,
UINT4  dim0 
)

get "metric-ellipse" for given metric.

Note
This function uses only 2 dimensions starting from dim0 of the given metric!

Definition at line 1434 of file DopplerScan.c.

◆ fprintfDopplerParams()

int fprintfDopplerParams ( FILE *  fp,
const PulsarDopplerParams params 
)

Debug-output of PulsarDopplerParams struct.

Definition at line 1484 of file DopplerScan.c.

◆ XLALEquiPartitionSkygrid()

DopplerSkyGrid* XLALEquiPartitionSkygrid ( const DopplerSkyGrid skygrid,
UINT4  jPart,
UINT4  numPartitions 
)

Equi-partition (approximately) a given skygrid into numPartitions, and return partition 0<= partitionIndex < numPartitions.

Definition at line 1508 of file DopplerScan.c.

◆ FreeDopplerSkyScan()

void FreeDopplerSkyScan ( LALStatus status,
DopplerSkyScanState skyScan 
)
Deprecated:
Use XLALDestroyDopplerSkyScan() instead.

Definition at line 324 of file DopplerScan.c.

◆ InitDopplerSkyScan()

void InitDopplerSkyScan ( LALStatus status,
DopplerSkyScanState skyScan,
const DopplerSkyScanInit init 
)
Deprecated:
Use XLALInitDopplerSkyScan() instead.
Parameters
statuspointer to LALStatus structure
[out]skyScanthe initialized scan-structure
[in]initinit-params

Definition at line 273 of file DopplerScan.c.