LALPulsar 7.1.1.1-eeff03c
DriveHoughMulti.c File Reference

Driver code for performing Hough transform search on non-demodulated data using SFTs from possible multiple IFOs. More...

Prototypes

void SplitSFTs (LALStatus *status, REAL8Vector *weightsV, HoughParamsTest *chi2Params)
 
void ComputeFoft_NM (LALStatus *status, REAL8Vector *foft, HoughTemplate *pulsarTemplate, REAL8Vector *timeDiffV, REAL8Cart3CoorVector *velV)
 
void ComputeandPrintChi2 (LALStatus *status, toplist_t *tl, REAL8Vector *timeDiffV, REAL8Cart3CoorVector *velV, INT4 skyCounter, INT4 nSkyPatches, INT4 p, REAL8 alphaPeak, MultiDetectorStateSeries *mdetStates, REAL8Vector *weightsNoise, UCHARPeakGramVector *upgV)
 
void GetPeakGramFromMultSFTVector_NondestroyPg1 (LALStatus *status, HOUGHPeakGramVector *out, UCHARPeakGramVector *upgV, MultiSFTVector *in, REAL8 thr)
 Loop over SFTs and set a threshold to get peakgrams. More...
 
void PrintLogFile (LALStatus *status, CHAR *dir, CHAR *basename, CHAR *skyfile, LALStringVector *linefiles, CHAR *executable)
 
int CreateSkypatchDirs (CHAR *filestats, CHAR *base, INT4 ind)
 
int PrintHistogram (UINT8Vector *hist, CHAR *fnameOut, REAL8 minSignificance, REAL8 maxSignificance)
 
int PrintHmap2m_file (HOUGHMapTotal *ht, CHAR *fnameOut, INT4 iHmap)
 
int PrintHmap2file (HOUGHMapTotal *ht, CHAR *fnameOut, INT4 iHmap)
 
int OpenExtraInfoFiles (CHAR *fileMaps, FILE **fp1_ptr, CHAR *filehisto, CHAR *dirname, CHAR *basename, INT4 ind)
 
int PrintExtraInfo (CHAR *fileMaps, FILE **fp1_ptr, INT4 iHmap, HOUGHMapTotal *ht, REAL8UnitPolarCoor *sourceLocation, HoughStats *stats, INT8 fBinSearch, REAL8 deltaF)
 Print some extra information: HoughMaps, HoughStatistics, sigma. More...
 
void ReadTimeStampsFile (LALStatus *status, LIGOTimeGPSVector *ts, CHAR *filename)
 
void LALHoughHistogramSignificance (LALStatus *status, UINT8Vector *out, HOUGHMapTotal *in, REAL8 mean, REAL8 sigma, REAL8 minSignificance, REAL8 maxSignificance)
 given a total hough map, this function produces a histogram of the number count significance More...
 
void GetSFTVelTime (LALStatus *status, REAL8Cart3CoorVector *velV, LIGOTimeGPSVector *timeV, MultiDetectorStateSeries *in)
 
void GetSFTNoiseWeights (LALStatus *status, REAL8Vector *out, MultiNoiseWeights *in)
 
void GetPeakGramFromMultSFTVector (LALStatus *status, HOUGHPeakGramVector *out, MultiSFTVector *in, REAL8 thr)
 Loop over SFTs and set a threshold to get peakgrams. More...
 
void SetUpSkyPatches (LALStatus *status, HoughSkyPatchesInfo *out, CHAR *skyFileName, CHAR *skyRegion, REAL8 dAlpha, REAL8 dDelta, INT4 numSkyPartitions, INT4 partitionIndex)
 Set up location of skypatch centers and sizes If user specified skyRegion then use DopplerScan function to construct an isotropic grid. More...
 
void GetAMWeights (LALStatus *status, REAL8Vector *out, MultiDetectorStateSeries *mdetStates, REAL8 alpha, REAL8 delta)
 
void SelectBestStuff (LALStatus *status, BestVariables *out, BestVariables *in, UINT4 mObsCohBest)
 
void DuplicateBestStuff (LALStatus *status, BestVariables *out, BestVariables *in)
 
void GetToplistFromHoughmap (LALStatus *status, toplist_t *list, HOUGHMapTotal *ht, HOUGHPatchGrid *patch, HOUGHDemodPar *parDem, REAL8 mean, REAL8 sigma)
 Get Hough candidates as a toplist. More...
 
void LALHOUGHCreateLUTVector (LALStatus *status, HOUGHptfLUTVector *lutV, UINT4 length)
 helper function for creating LUT vector More...
 
void LALHOUGHCreateLUTs (LALStatus *status, HOUGHptfLUTVector *lutV, UINT2 maxNBins, UINT2 maxNBorders, UINT2 ySide)
 
void LALHOUGHCreatePHMDVS (LALStatus *status, PHMDVectorSequence *phmdVS, UINT4 length, UINT4 nfSize)
 
void LALHOUGHCreatePHMDs (LALStatus *status, PHMDVectorSequence *phmdVS, UINT2 maxNBins, UINT2 maxNBorders, UINT2 ySide)
 
void LALHOUGHDestroyPHMDs (LALStatus *status, PHMDVectorSequence *phmdVS)
 
void LALHOUGHCreateHT (LALStatus *status, HOUGHMapTotal *ht, UINT2 xSide, UINT2 ySide)
 
void LALHOUGHCreateFreqIndVector (LALStatus *status, UINT8FrequencyIndexVector *freqInd, UINT4 length, REAL8 deltaF)
 
void LALHOUGHDestroyLUTs (LALStatus *status, HOUGHptfLUTVector *lut)
 
int main (int argc, char *argv[])
 

Detailed Description

Driver code for performing Hough transform search on non-demodulated data using SFTs from possible multiple IFOs.

Author
Badri Krishnan, Alicia Sintes, Llucia Sancho

History: Created by Sintes and Krishnan July 04, 2003 Modifications for S4 January 2006 Modifications for S5 November 2007

Description

This is the main driver for the Hough transform routines. It takes as input a set of SFTs from possibly more than one IFO and outputs the number counts using the Hough transform. For a single IFO, this should be essentially equivalent to DriveHough_v3. validatehoughmultichi2

This code just does spin-downs values.

User input

The user inputs the following parameters:

  • Search frequency range
  • A file containing list of skypatches to search over. For each skypatch, the information is:
  • RA and dec of skypatch center.
  • Size in RA and dec.
  • Location of Directory containing the SFTs (must be v2 SFTs).
  • Interferometer (optional)
  • List of linefiles containing information about known spectral disturbanclves
  • Location of output directory and basename of output files.
  • Block size of running median for estimating psd.
  • The parameter nfSizeCylinder which determines the range of spindown parameters to be searched over.
  • Boolean variable for deciding if the SFTs should be inverse noise weighed.
  • Boolean variable for deciding whether amplitude modulation weights should be used.
  • Boolean variables for deciding whether the Hough maps, the statistics, list of events above a threshold, and logfile should be written

/par Output

The output is written in several sub-directories of the specified output directory. The first two items are default while the rest are written according to the user input:

  • A directory called logfiles records the user input, contents of the skypatch file and cvs tags contained in the executable (if the user has required logging)
  • A directory called nstarfiles containing the loudest event for each search frequency bin maximised over all sky-locations and spindown parameters. An event is said to be the loudest if it has the maximum significance defined as: (number count - mean)/sigma.
  • A directory for each skypatch containing the number count statistics, the histogram, the list of events, and the Hough maps

Definition in file DriveHoughMulti.c.

Go to the source code of this file.

Data Structures

struct  HoughParamsTest
 
struct  UCHARPeakGramVector
 

Macros

#define EARTHEPHEMERIS   "/home/badkri/lscsoft/share/lal/earth05-09.dat"
 
#define SUNEPHEMERIS   "/home/badkri/lscsoft/share/lal/sun05-09.dat"
 
#define HOUGHMAXFILENAMELENGTH   512 /* maximum # of characters of a filename */
 
#define DIROUT   "./outMulti" /* output directory */
 
#define BASENAMEOUT   "HM" /* prefix file output */
 
#define THRESHOLD
 
#define SKYFILE   "./skypatchfile"
 
#define F0   310.0 /* frequency to build the LUT and start search */
 
#define FBAND   0.05 /* search frequency band */
 
#define NFSIZE   21 /* n-freq. span of the cylinder, to account for spin-down search */
 
#define NSPINUP   0 /* n-bins for spin-up search */
 
#define BLOCKSRNGMED   101 /* Running median window size */
 
#define SKYREGION   "allsky"
 default sky region to search over – just a single point More...
 
#define TRUE   (1==1)
 
#define FALSE   (1==0)
 
#define NBLOCKSTEST   8 /* number of data blocks to do Chi2 test */
 
#define SPINDOWNJUMP   1 /* "Jump" to the next spin-down being analyzed (to avoid doing them all) */
 

Variables

BOOLEAN uvar_EnableExtraInfo
 
BOOLEAN uvar_EnableChi2
 
BOOLEAN uvar_EnableToplistPatch
 

Macro Definition Documentation

◆ EARTHEPHEMERIS

#define EARTHEPHEMERIS   "/home/badkri/lscsoft/share/lal/earth05-09.dat"

Definition at line 107 of file DriveHoughMulti.c.

◆ SUNEPHEMERIS

#define SUNEPHEMERIS   "/home/badkri/lscsoft/share/lal/sun05-09.dat"

Definition at line 108 of file DriveHoughMulti.c.

◆ HOUGHMAXFILENAMELENGTH

#define HOUGHMAXFILENAMELENGTH   512 /* maximum # of characters of a filename */

Definition at line 110 of file DriveHoughMulti.c.

◆ DIROUT

#define DIROUT   "./outMulti" /* output directory */

Definition at line 112 of file DriveHoughMulti.c.

◆ BASENAMEOUT

#define BASENAMEOUT   "HM" /* prefix file output */

Definition at line 113 of file DriveHoughMulti.c.

◆ THRESHOLD

#define THRESHOLD
Value:
1.6 /* thresold for peak selection, with respect to the
the averaged power in the search band */

Definition at line 115 of file DriveHoughMulti.c.

◆ SKYFILE

#define SKYFILE   "./skypatchfile"

Definition at line 116 of file DriveHoughMulti.c.

◆ F0

#define F0   310.0 /* frequency to build the LUT and start search */

Definition at line 117 of file DriveHoughMulti.c.

◆ FBAND

#define FBAND   0.05 /* search frequency band */

Definition at line 118 of file DriveHoughMulti.c.

◆ NFSIZE

#define NFSIZE   21 /* n-freq. span of the cylinder, to account for spin-down search */

Definition at line 119 of file DriveHoughMulti.c.

◆ NSPINUP

#define NSPINUP   0 /* n-bins for spin-up search */

Definition at line 120 of file DriveHoughMulti.c.

◆ BLOCKSRNGMED

#define BLOCKSRNGMED   101 /* Running median window size */

Definition at line 121 of file DriveHoughMulti.c.

◆ SKYREGION

#define SKYREGION   "allsky"

default sky region to search over – just a single point

Definition at line 123 of file DriveHoughMulti.c.

◆ TRUE

#define TRUE   (1==1)

Definition at line 125 of file DriveHoughMulti.c.

◆ FALSE

#define FALSE   (1==0)

Definition at line 126 of file DriveHoughMulti.c.

◆ NBLOCKSTEST

#define NBLOCKSTEST   8 /* number of data blocks to do Chi2 test */

Definition at line 128 of file DriveHoughMulti.c.

◆ SPINDOWNJUMP

#define SPINDOWNJUMP   1 /* "Jump" to the next spin-down being analyzed (to avoid doing them all) */

Definition at line 130 of file DriveHoughMulti.c.

Function Documentation

◆ SplitSFTs()

void SplitSFTs ( LALStatus status,
REAL8Vector weightsV,
HoughParamsTest chi2Params 
)

Definition at line 2597 of file DriveHoughMulti.c.

◆ ComputeFoft_NM()

void ComputeFoft_NM ( LALStatus status,
REAL8Vector foft,
HoughTemplate pulsarTemplate,
REAL8Vector timeDiffV,
REAL8Cart3CoorVector velV 
)

Definition at line 2530 of file DriveHoughMulti.c.

◆ ComputeandPrintChi2()

void ComputeandPrintChi2 ( LALStatus status,
toplist_t tl,
REAL8Vector timeDiffV,
REAL8Cart3CoorVector velV,
INT4  skyCounter,
INT4  nSkyPatches,
INT4  p,
REAL8  alphaPeak,
MultiDetectorStateSeries mdetStates,
REAL8Vector weightsNoise,
UCHARPeakGramVector upgV 
)

Definition at line 2666 of file DriveHoughMulti.c.

◆ GetPeakGramFromMultSFTVector_NondestroyPg1()

void GetPeakGramFromMultSFTVector_NondestroyPg1 ( LALStatus status,
HOUGHPeakGramVector out,
UCHARPeakGramVector upgV,
MultiSFTVector in,
REAL8  thr 
)

Loop over SFTs and set a threshold to get peakgrams.

SFTs must be normalized.
This function will create a vector with the uncompressed PeakGrams in it
(this is necesary if we want to compute the chi2 later )

Parameters
statuspointer to LALStatus structure
outOutput compressed peakgrams
upgVOutput uncompressed peakgrams
inInput SFTs
thrThreshold on SFT power

Definition at line 2875 of file DriveHoughMulti.c.

◆ PrintLogFile()

void PrintLogFile ( LALStatus status,
CHAR dir,
CHAR basename,
CHAR skyfile,
LALStringVector linefiles,
CHAR executable 
)

Definition at line 1349 of file DriveHoughMulti.c.

◆ CreateSkypatchDirs()

int CreateSkypatchDirs ( CHAR filestats,
CHAR base,
INT4  ind 
)

Definition at line 1197 of file DriveHoughMulti.c.

◆ PrintHistogram()

int PrintHistogram ( UINT8Vector hist,
CHAR fnameOut,
REAL8  minSignificance,
REAL8  maxSignificance 
)

Definition at line 1227 of file DriveHoughMulti.c.

◆ PrintHmap2m_file()

int PrintHmap2m_file ( HOUGHMapTotal ht,
CHAR fnameOut,
INT4  iHmap 
)

Definition at line 1300 of file DriveHoughMulti.c.

◆ PrintHmap2file()

int PrintHmap2file ( HOUGHMapTotal ht,
CHAR fnameOut,
INT4  iHmap 
)

Definition at line 1262 of file DriveHoughMulti.c.

◆ OpenExtraInfoFiles()

int OpenExtraInfoFiles ( CHAR fileMaps,
FILE **  fp1_ptr,
CHAR filehisto,
CHAR dirname,
CHAR basename,
INT4  ind 
)

Definition at line 2455 of file DriveHoughMulti.c.

◆ PrintExtraInfo()

int PrintExtraInfo ( CHAR fileMaps,
FILE **  fp1_ptr,
INT4  iHmap,
HOUGHMapTotal ht,
REAL8UnitPolarCoor sourceLocation,
HoughStats stats,
INT8  fBinSearch,
REAL8  deltaF 
)

Print some extra information: HoughMaps, HoughStatistics, sigma.

Definition at line 2495 of file DriveHoughMulti.c.

◆ ReadTimeStampsFile()

void ReadTimeStampsFile ( LALStatus status,
LIGOTimeGPSVector ts,
CHAR filename 
)

Definition at line 1456 of file DriveHoughMulti.c.

◆ LALHoughHistogramSignificance()

void LALHoughHistogramSignificance ( LALStatus status,
UINT8Vector out,
HOUGHMapTotal in,
REAL8  mean,
REAL8  sigma,
REAL8  minSignificance,
REAL8  maxSignificance 
)

given a total hough map, this function produces a histogram of the number count significance

Definition at line 1516 of file DriveHoughMulti.c.

◆ GetSFTVelTime()

void GetSFTVelTime ( LALStatus status,
REAL8Cart3CoorVector velV,
LIGOTimeGPSVector timeV,
MultiDetectorStateSeries in 
)

Definition at line 1582 of file DriveHoughMulti.c.

◆ GetSFTNoiseWeights()

void GetSFTNoiseWeights ( LALStatus status,
REAL8Vector out,
MultiNoiseWeights in 
)

Definition at line 1638 of file DriveHoughMulti.c.

◆ GetPeakGramFromMultSFTVector()

void GetPeakGramFromMultSFTVector ( LALStatus status,
HOUGHPeakGramVector out,
MultiSFTVector in,
REAL8  thr 
)

Loop over SFTs and set a threshold to get peakgrams.

SFTs must be normalized.

Parameters
statuspointer to LALStatus structure
outOutput peakgrams
inInput SFTs
thrThreshold on SFT power

Definition at line 1683 of file DriveHoughMulti.c.

◆ SetUpSkyPatches()

void SetUpSkyPatches ( LALStatus status,
HoughSkyPatchesInfo out,
CHAR skyFileName,
CHAR skyRegion,
REAL8  dAlpha,
REAL8  dDelta,
INT4  numSkyPartitions,
INT4  partitionIndex 
)

Set up location of skypatch centers and sizes If user specified skyRegion then use DopplerScan function to construct an isotropic grid.

Otherwise use skypatch file.

Parameters
statuspointer to LALStatus structure
outoutput skypatches info
skyFileNamename of skypatch file
skyRegionskyregion (if isotropic grid is to be constructed)
dAlphaalpha resolution (if isotropic grid is to be constructed)
dDeltadelta resolution (if isotropic grid is to be constructed)
numSkyPartitionsNumber of (equi-)partitions to split skygrid into
partitionIndexIndex [0,numSkyPartitions-1] of sky-partition to generate

Definition at line 1743 of file DriveHoughMulti.c.

◆ GetAMWeights()

void GetAMWeights ( LALStatus status,
REAL8Vector out,
MultiDetectorStateSeries mdetStates,
REAL8  alpha,
REAL8  delta 
)

Definition at line 1872 of file DriveHoughMulti.c.

◆ SelectBestStuff()

void SelectBestStuff ( LALStatus status,
BestVariables out,
BestVariables in,
UINT4  mObsCohBest 
)

Definition at line 1925 of file DriveHoughMulti.c.

◆ DuplicateBestStuff()

void DuplicateBestStuff ( LALStatus status,
BestVariables out,
BestVariables in 
)

Definition at line 2016 of file DriveHoughMulti.c.

◆ GetToplistFromHoughmap()

void GetToplistFromHoughmap ( LALStatus status,
toplist_t list,
HOUGHMapTotal ht,
HOUGHPatchGrid patch,
HOUGHDemodPar parDem,
REAL8  mean,
REAL8  sigma 
)

Get Hough candidates as a toplist.

Definition at line 2403 of file DriveHoughMulti.c.

◆ LALHOUGHCreateLUTVector()

void LALHOUGHCreateLUTVector ( LALStatus status,
HOUGHptfLUTVector lutV,
UINT4  length 
)

helper function for creating LUT vector

Definition at line 2088 of file DriveHoughMulti.c.

◆ LALHOUGHCreateLUTs()

void LALHOUGHCreateLUTs ( LALStatus status,
HOUGHptfLUTVector lutV,
UINT2  maxNBins,
UINT2  maxNBorders,
UINT2  ySide 
)

Definition at line 2121 of file DriveHoughMulti.c.

◆ LALHOUGHCreatePHMDVS()

void LALHOUGHCreatePHMDVS ( LALStatus status,
PHMDVectorSequence phmdVS,
UINT4  length,
UINT4  nfSize 
)

Definition at line 2211 of file DriveHoughMulti.c.

◆ LALHOUGHCreatePHMDs()

void LALHOUGHCreatePHMDs ( LALStatus status,
PHMDVectorSequence phmdVS,
UINT2  maxNBins,
UINT2  maxNBorders,
UINT2  ySide 
)

Definition at line 2252 of file DriveHoughMulti.c.

◆ LALHOUGHDestroyPHMDs()

void LALHOUGHDestroyPHMDs ( LALStatus status,
PHMDVectorSequence phmdVS 
)

Definition at line 2303 of file DriveHoughMulti.c.

◆ LALHOUGHCreateHT()

void LALHOUGHCreateHT ( LALStatus status,
HOUGHMapTotal ht,
UINT2  xSide,
UINT2  ySide 
)

Definition at line 2325 of file DriveHoughMulti.c.

◆ LALHOUGHCreateFreqIndVector()

void LALHOUGHCreateFreqIndVector ( LALStatus status,
UINT8FrequencyIndexVector freqInd,
UINT4  length,
REAL8  deltaF 
)

Definition at line 2366 of file DriveHoughMulti.c.

◆ LALHOUGHDestroyLUTs()

void LALHOUGHDestroyLUTs ( LALStatus status,
HOUGHptfLUTVector lut 
)

Definition at line 2177 of file DriveHoughMulti.c.

◆ main()

int main ( int  argc,
char argv[] 
)

some memory allocations

Definition at line 237 of file DriveHoughMulti.c.

Variable Documentation

◆ uvar_EnableExtraInfo

BOOLEAN uvar_EnableExtraInfo

Definition at line 102 of file DriveHoughMulti.c.

◆ uvar_EnableChi2

BOOLEAN uvar_EnableChi2

Definition at line 102 of file DriveHoughMulti.c.

◆ uvar_EnableToplistPatch

BOOLEAN uvar_EnableToplistPatch

Definition at line 102 of file DriveHoughMulti.c.