#include "HierarchicalSearch.h"
#include "StackSlideFstat.h"
Include dependency graph for HierarchicalSearch.c:

Go to the source code of this file.
Data Structures | |
| struct | UsefulStageVariables |
| Useful stuff for a single stage of the Hierarchical search. More... | |
Defines | |
| #define | TRUE (1==1) |
| #define | FALSE (1==0) |
| #define | HS_CHECKPOINTING 0 |
| #define | GET_CHECKPOINT(toplist, total, count, outputname, cptname) *total=0; |
| #define | INSERT_INTO_HOUGHFSTAT_TOPLIST insert_into_houghFStat_toplist |
| #define | SHOW_PROGRESS(rac, dec, tpl_count, tpl_total, freq, fband) |
| #define | SET_CHECKPOINT |
| #define | MAIN main |
| #define | FOPEN fopen |
| #define | COMPUTEFSTATFREQBAND ComputeFStatFreqBand |
| #define | COMPUTEFSTATHOUGHMAP ComputeFstatHoughMap |
| #define | HSMAX(x, y) ( (x) > (y) ? (x) : (y) ) |
| #define | HSMIN(x, y) ( (x) < (y) ? (x) : (y) ) |
| #define | INIT_MEM(x) memset(&(x), 0, sizeof((x))) |
| #define | BLOCKSIZE_REALLOC 50 |
| #define | EARTHEPHEMERIS "earth05-09.dat" |
| #define | SUNEPHEMERIS "sun05-09.dat" |
| #define | BLOCKSRNGMED 101 |
| Default running median window size. | |
| #define | FSTART 310.0 |
| Default Start search frequency. | |
| #define | FBAND 0.01 |
| Default search band. | |
| #define | FDOT 0.0 |
| Default value of first spindown. | |
| #define | DFDOT 0.0 |
| Default range of first spindown parameter. | |
| #define | SKYREGION "allsky" |
| default sky region to search over -- just a single point | |
| #define | NFDOT 10 |
| Default size of hough cylinder of look up tables. | |
| #define | DTERMS 8 |
| Default number of dirichlet kernel terms for calculating Fstat. | |
| #define | MISMATCH 0.2 |
| Default for metric grid maximal mismatch value. | |
| #define | DALPHA 0.001 |
| Default resolution for isotropic or flat grids. | |
| #define | DDELTA 0.001 |
| Default resolution for isotropic or flat grids. | |
| #define | FSTATTHRESHOLD 2.6 |
| Default threshold on Fstatistic for peak selection. | |
| #define | NCAND1 5 |
| Default number of candidates to be followed up from first stage. | |
| #define | FNAMEOUT "./out/HS.dat" |
| Default output file basename. | |
| #define | PIXELFACTOR 2.0 |
| #define | LAL_INT4_MAX 2147483647 |
Functions | |
| RCSID ("$Id: HierarchicalSearch.c,v 1.199 2008/10/08 10:00:29 bema Exp $") | |
| void | ComputeStackNoiseWeights (LALStatus *status, REAL8Vector **out, MultiNoiseWeightsSequence *in) |
| Calculate noise weight for each stack. | |
| void | ComputeStackNoiseAndAMWeights (LALStatus *status, REAL8Vector *out, MultiNoiseWeightsSequence *inNoise, MultiDetectorStateSeriesSequence *inDetStates, SkyPosition skypos) |
| Calculate noise and AM weight for each stack for a given sky position. | |
| void | GetStackVelPos (LALStatus *status, REAL8VectorSequence **velStack, REAL8VectorSequence **posStack, MultiDetectorStateSeriesSequence *stackMultiDetStates) |
| Calculate average velocity and position of detector network during each stack. | |
| void | SetUpSFTs (LALStatus *status, MultiSFTVectorSequence *stackMultiSFT,MultiNoiseWeightsSequence *stackMultiNoiseWeights,MultiDetectorStateSeriesSequence *stackMultiDetStates,UsefulStageVariables *in) |
| Set up stacks, read SFTs, calculate SFT noise weights and calculate detector-state. | |
| void | PrintFstatVec (LALStatus *status, REAL8FrequencySeries *in, FILE *fp, PulsarDopplerParams *thisPoint, LIGOTimeGPS refTime, INT4 stackIndex) |
| Print Fstat vectors. | |
| void | PrintSemiCohCandidates (LALStatus *status, SemiCohCandidateList *in, FILE *fp, LIGOTimeGPS refTime) |
| Print Hough candidates. | |
| void | PrintHoughHistogram (LALStatus *status, UINT8Vector *hist, CHAR *fnameOut) |
| Print hough histogram to a file. | |
| void | PrintCatalogInfo (LALStatus *status, const SFTCatalog *catalog, FILE *fp) |
| Print some sft catalog info. | |
| void | PrintStackInfo (LALStatus *status, const SFTCatalogSequence *catalogSeq, FILE *fp) |
| Print some stack info from sft catalog sequence. | |
| void | GetSemiCohToplist (LALStatus *status, toplist_t *list, SemiCohCandidateList *in, REAL8 meanN, REAL8 sigmaN) |
| Get SemiCoh candidates toplist. | |
| void | ComputeNumExtraBins (LALStatus *status, SemiCoherentParams *par, REAL8 fdot, REAL8 f0, REAL8 deltaF) |
| Optimized calculation of Fstat overhead. | |
| void | DumpLUT2file (LALStatus *status, HOUGHptfLUT *lut, HOUGHPatchGrid *patch, CHAR *basename, INT4 index) |
| Print single Hough map to a specified output file. | |
| void | GetXiInSingleStack (LALStatus *status, REAL8Vector *out, HOUGHSizePar *size, HOUGHDemodPar *par) |
| int | MAIN (int argc, char *argv[]) |
| void | ComputeFstatHoughMap (LALStatus *status, SemiCohCandidateList *out, HOUGHPeakGramVector *pgV, SemiCoherentParams *params) |
| Function for calculating Hough Maps and candidates. | |
| void | FstatVectToPeakGram (LALStatus *status, HOUGHPeakGramVector *pgV, REAL8FrequencySeriesVector *FstatVect, REAL8 thr) |
| Function for selecting frequency bins from a set of Fstatistic vectors. | |
| void | SetUpStacks (LALStatus *status, SFTCatalogSequence *out, REAL8 tStack, SFTCatalog *in, UINT4 nStacksMax) |
| Breaks up input sft catalog into specified number of stacks. | |
| void | PrintHmap2file (LALStatus *status, HOUGHMapTotal *ht, CHAR *fnameOut, INT4 iHmap) |
| Print single Hough map to a specified output file. | |
| void | GetHoughCandidates_toplist (LALStatus *status, toplist_t *list, HOUGHMapTotal *ht, HOUGHPatchGrid *patch, HOUGHDemodPar *parDem) |
| Get Hough candidates as a toplist. | |
| void | GetHoughCandidates_threshold (LALStatus *status, SemiCohCandidateList *out, HOUGHMapTotal *ht, HOUGHPatchGrid *patch, HOUGHDemodPar *parDem, REAL8 threshold) |
| Get Hough candidates as a toplist using a fixed threshold. | |
| void | GetFstatCandidates_toplist (LALStatus *status, toplist_t *list, REAL8FrequencySeries *in, REAL8 alpha, REAL8 delta, REAL8 fdot) |
| void | GetChkPointIndex (LALStatus *status, INT4 *loopindex, const CHAR *fnameChkPoint) |
| Read checkpointing file This does not (yet) check any consistency of the existing results file. | |
Variables | |
| int | lalDebugLevel |
| DECLARE AND SET GLOBAL DEBUG LEVEL. | |
| BOOLEAN | uvar_printMaps = FALSE |
| global variable for printing Hough maps | |
| BOOLEAN | uvar_printStats = FALSE |
| global variable for calculating Hough map stats | |
| BOOLEAN | uvar_dumpLUT = FALSE |
| global variable for printing Hough look-up-tables for debugging | |
| LALStatus * | global_status |
where
Here
is the sky-point at which the F-statistic is calculated and
is the residual spindown parameter. For details see Phys.Rev.D 70, 082001 (2004). The size of the patch depends on the validity of the above master equation.
Definition in file HierarchicalSearch.c.
| #define TRUE (1==1) |
Definition at line 124 of file HierarchicalSearch.c.
| #define FALSE (1==0) |
Definition at line 125 of file HierarchicalSearch.c.
| #define HS_CHECKPOINTING 0 |
Definition at line 134 of file HierarchicalSearch.c.
Definition at line 135 of file HierarchicalSearch.c.
| #define INSERT_INTO_HOUGHFSTAT_TOPLIST insert_into_houghFStat_toplist |
Definition at line 136 of file HierarchicalSearch.c.
Definition at line 137 of file HierarchicalSearch.c.
| #define SET_CHECKPOINT |
Definition at line 138 of file HierarchicalSearch.c.
| #define MAIN main |
Definition at line 139 of file HierarchicalSearch.c.
| #define FOPEN fopen |
Definition at line 140 of file HierarchicalSearch.c.
| #define COMPUTEFSTATFREQBAND ComputeFStatFreqBand |
Definition at line 141 of file HierarchicalSearch.c.
| #define COMPUTEFSTATHOUGHMAP ComputeFstatHoughMap |
Definition at line 142 of file HierarchicalSearch.c.
Definition at line 151 of file HierarchicalSearch.c.
Definition at line 152 of file HierarchicalSearch.c.
Definition at line 154 of file HierarchicalSearch.c.
| #define BLOCKSIZE_REALLOC 50 |
Definition at line 156 of file HierarchicalSearch.c.
| #define EARTHEPHEMERIS "earth05-09.dat" |
Definition at line 231 of file HierarchicalSearch.c.
| #define SUNEPHEMERIS "sun05-09.dat" |
Definition at line 232 of file HierarchicalSearch.c.
| #define BLOCKSRNGMED 101 |
| #define FSTART 310.0 |
| #define FBAND 0.01 |
| #define FDOT 0.0 |
| #define DFDOT 0.0 |
| #define SKYREGION "allsky" |
default sky region to search over -- just a single point
Definition at line 240 of file HierarchicalSearch.c.
| #define NFDOT 10 |
Default size of hough cylinder of look up tables.
Definition at line 241 of file HierarchicalSearch.c.
| #define DTERMS 8 |
Default number of dirichlet kernel terms for calculating Fstat.
Definition at line 242 of file HierarchicalSearch.c.
| #define MISMATCH 0.2 |
Default for metric grid maximal mismatch value.
Definition at line 243 of file HierarchicalSearch.c.
| #define DALPHA 0.001 |
Default resolution for isotropic or flat grids.
Definition at line 244 of file HierarchicalSearch.c.
| #define DDELTA 0.001 |
Default resolution for isotropic or flat grids.
Definition at line 245 of file HierarchicalSearch.c.
| #define FSTATTHRESHOLD 2.6 |
Default threshold on Fstatistic for peak selection.
Definition at line 246 of file HierarchicalSearch.c.
| #define NCAND1 5 |
Default number of candidates to be followed up from first stage.
Definition at line 247 of file HierarchicalSearch.c.
| #define FNAMEOUT "./out/HS.dat" |
| #define PIXELFACTOR 2.0 |
Definition at line 249 of file HierarchicalSearch.c.
| #define LAL_INT4_MAX 2147483647 |
Definition at line 251 of file HierarchicalSearch.c.
| RCSID | ( | "$Id: HierarchicalSearch. | c, | |
| v 1.199 2008/10/08 10:00:29 bema Exp $" | ||||
| ) |
| void ComputeStackNoiseWeights | ( | LALStatus * | status, | |
| REAL8Vector ** | out, | |||
| MultiNoiseWeightsSequence * | in | |||
| ) |
| void ComputeStackNoiseAndAMWeights | ( | LALStatus * | status, | |
| REAL8Vector * | out, | |||
| MultiNoiseWeightsSequence * | inNoise, | |||
| MultiDetectorStateSeriesSequence * | inDetStates, | |||
| SkyPosition | skypos | |||
| ) |
Calculate noise and AM weight for each stack for a given sky position.
Definition at line 3086 of file HierarchicalSearch.c.
| void GetStackVelPos | ( | LALStatus * | status, | |
| REAL8VectorSequence ** | velStack, | |||
| REAL8VectorSequence ** | posStack, | |||
| MultiDetectorStateSeriesSequence * | stackMultiDetStates | |||
| ) |
Calculate average velocity and position of detector network during each stack.
Definition at line 2932 of file HierarchicalSearch.c.
| void SetUpSFTs | ( | LALStatus * | status, | |
| MultiSFTVectorSequence * | stackMultiSFT, | |||
| MultiNoiseWeightsSequence * | stackMultiNoiseWeights, | |||
| MultiDetectorStateSeriesSequence * | stackMultiDetStates, | |||
| UsefulStageVariables * | in | |||
| ) |
Set up stacks, read SFTs, calculate SFT noise weights and calculate detector-state.
| stackMultiSFT | output multi sft vector for each stack |
| stackMultiNoiseWeights | output multi noise weights for each stack |
| stackMultiDetStates | output multi detector states for each stack |
| in | input params |
Definition at line 1291 of file HierarchicalSearch.c.
| void PrintFstatVec | ( | LALStatus * | status, | |
| REAL8FrequencySeries * | in, | |||
| FILE * | fp, | |||
| PulsarDopplerParams * | thisPoint, | |||
| LIGOTimeGPS | refTime, | |||
| INT4 | stackIndex | |||
| ) |
| void PrintSemiCohCandidates | ( | LALStatus * | status, | |
| SemiCohCandidateList * | in, | |||
| FILE * | fp, | |||
| LIGOTimeGPS | refTime | |||
| ) |
| void PrintHoughHistogram | ( | LALStatus * | status, | |
| UINT8Vector * | hist, | |||
| CHAR * | fnameOut | |||
| ) |
| void PrintCatalogInfo | ( | LALStatus * | status, | |
| const SFTCatalog * | catalog, | |||
| FILE * | fp | |||
| ) |
| void PrintStackInfo | ( | LALStatus * | status, | |
| const SFTCatalogSequence * | catalogSeq, | |||
| FILE * | fp | |||
| ) |
Print some stack info from sft catalog sequence.
Definition at line 2846 of file HierarchicalSearch.c.
| void GetSemiCohToplist | ( | LALStatus * | status, | |
| toplist_t * | list, | |||
| SemiCohCandidateList * | in, | |||
| REAL8 | meanN, | |||
| REAL8 | sigmaN | |||
| ) |
| void ComputeNumExtraBins | ( | LALStatus * | status, | |
| SemiCoherentParams * | par, | |||
| REAL8 | fdot, | |||
| REAL8 | f0, | |||
| REAL8 | deltaF | |||
| ) |
| void DumpLUT2file | ( | LALStatus * | status, | |
| HOUGHptfLUT * | lut, | |||
| HOUGHPatchGrid * | patch, | |||
| CHAR * | basename, | |||
| INT4 | index | |||
| ) |
Print single Hough map to a specified output file.
Definition at line 2312 of file HierarchicalSearch.c.
| void GetXiInSingleStack | ( | LALStatus * | status, | |
| REAL8Vector * | out, | |||
| HOUGHSizePar * | size, | |||
| HOUGHDemodPar * | par | |||
| ) |
Definition at line 3413 of file HierarchicalSearch.c.
| int MAIN | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 266 of file HierarchicalSearch.c.
| void ComputeFstatHoughMap | ( | LALStatus * | status, | |
| SemiCohCandidateList * | out, | |||
| HOUGHPeakGramVector * | pgV, | |||
| SemiCoherentParams * | params | |||
| ) |
Function for calculating Hough Maps and candidates.
| pgV | is a HOUGHPeakGramVector obtained after thresholding Fstatistic vectors | |
| params | is a pointer to HoughParams -- parameters for calculating Hough maps houghCand Candidates from thresholding Hough number counts |
Definition at line 1537 of file HierarchicalSearch.c.
| void FstatVectToPeakGram | ( | LALStatus * | status, | |
| HOUGHPeakGramVector * | pgV, | |||
| REAL8FrequencySeriesVector * | FstatVect, | |||
| REAL8 | thr | |||
| ) |
Function for selecting frequency bins from a set of Fstatistic vectors.
| FstatVect | : sequence of Fstatistic vectors | |
| thr | is a REAL8 threshold for selecting frequency bins |
Definition at line 2077 of file HierarchicalSearch.c.
| void SetUpStacks | ( | LALStatus * | status, | |
| SFTCatalogSequence * | out, | |||
| REAL8 | tStack, | |||
| SFTCatalog * | in, | |||
| UINT4 | nStacksMax | |||
| ) |
Breaks up input sft catalog into specified number of stacks.
Loops over elements of the catalog, assigns a bin index and allocates memory to the output catalog sequence appropriately. If there are long gaps in the data, then some of the catalogs in the output catalog sequence may be of zero length.
| out | Output catalog of sfts -- one for each stack |
| tStack | Output duration of each stack |
| in | Input sft catalog to be broken up into stacks (ordered in increasing time) |
| nStacksMax | User specified number of stacks |
Definition at line 2174 of file HierarchicalSearch.c.
| void PrintHmap2file | ( | LALStatus * | status, | |
| HOUGHMapTotal * | ht, | |||
| CHAR * | fnameOut, | |||
| INT4 | iHmap | |||
| ) |
Print single Hough map to a specified output file.
Definition at line 2271 of file HierarchicalSearch.c.
| void GetHoughCandidates_toplist | ( | LALStatus * | status, | |
| toplist_t * | list, | |||
| HOUGHMapTotal * | ht, | |||
| HOUGHPatchGrid * | patch, | |||
| HOUGHDemodPar * | parDem | |||
| ) |
| void GetHoughCandidates_threshold | ( | LALStatus * | status, | |
| SemiCohCandidateList * | out, | |||
| HOUGHMapTotal * | ht, | |||
| HOUGHPatchGrid * | patch, | |||
| HOUGHDemodPar * | parDem, | |||
| REAL8 | threshold | |||
| ) |
Get Hough candidates as a toplist using a fixed threshold.
Definition at line 2477 of file HierarchicalSearch.c.
| void GetFstatCandidates_toplist | ( | LALStatus * | status, | |
| toplist_t * | list, | |||
| REAL8FrequencySeries * | in, | |||
| REAL8 | alpha, | |||
| REAL8 | delta, | |||
| REAL8 | fdot | |||
| ) |
Definition at line 2744 of file HierarchicalSearch.c.
Read checkpointing file This does not (yet) check any consistency of the existing results file.
Definition at line 2880 of file HierarchicalSearch.c.
| int lalDebugLevel |
DECLARE AND SET GLOBAL DEBUG LEVEL.
see the section (currently 7.4.1) of the LSD on "Status-reporting objects" for a list of predefined debug levels
Definition at line 62 of file BCVSpinTemplates.c.
| BOOLEAN uvar_printMaps = FALSE |
| BOOLEAN uvar_printStats = FALSE |
global variable for calculating Hough map stats
Definition at line 148 of file HierarchicalSearch.c.
| BOOLEAN uvar_dumpLUT = FALSE |
global variable for printing Hough look-up-tables for debugging
Definition at line 149 of file HierarchicalSearch.c.
| global_status | LALStatus Used to initialize LALStatus lalStatus. |
Definition at line 256 of file HierarchicalSearch.c.
1.5.2