#include <stdio.h>#include <stdlib.h>#include <math.h>#include <unistd.h>#include <sys/stat.h>#include <sys/types.h>#include <string.h>#include <time.h>#include "global.h"#include "rastermagic.h"#include "cmdline.h"#include "hookup.h"#include "grid.h"#include "polarization.h"#include "statistics.h"#include "dataset.h"#include "candidates.h"#include "util.h"#include "jobs.h"Include dependency graph for candidates.c:

Go to the source code of this file.
Data Structures | |
| struct | COMPUTE_SCORES_DATA |
| struct | SCORE_AUX_DATA |
| struct | MATCHED_SNR_UNIT |
| struct | SNR_DATA |
| struct | HINTS |
Defines | |
| #define | __USE_ISOC99 |
| #define | DISTANCE_PRINTF |
| #define | WINDOW 240 |
| #define | SEARCH_WINDOW 10 |
| #define | SNR_FORMULA1 cand->snr=(demod_signal_sum[b_max]-mean_power)/power_sd; |
| #define | SNR_FORMULA2 cand->snr=(demod_signal_sum[b_max]-0.25*fabs(demod_signal_sum[b_max-1]-demod_signal_sum[b_max+1])-mean_power)/power_sd; |
| #define | SNR_FORMULA3 cand->snr=(0.6*demod_signal_sum[b_max]+0.15*(demod_signal_sum[b_max-1]+demod_signal_sum[b_max+1])-mean_power)/power_sd; |
| #define | SNR_FORMULA4 cand->snr=(0.6*demod_signal_sum[b_max]+0.15*(demod_signal_sum[b_max-1]+demod_signal_sum[b_max+1])-mean_power)/power_sd; |
| #define | SNR_FORMULA SNR_FORMULA1 |
| #define | VALID_RESPONSE 1 |
| #define | VALID_SHIFT 2 |
| #define | VALID_DOPPLER 4 |
| #define | VALID_E 8 |
| #define | VALID_DIFF_SHIFT 16 |
| #define | ALL_VALID (VALID_RESPONSE | VALID_SHIFT | VALID_DOPPLER) |
| #define | FREQ_STEPS 1 |
| #define | FREQ_STEPS 32 |
| #define | SNR_TOLERANCE 0.01 |
| #define | BETTER_SNR(c1, c2) (((c1).snr>(c2).snr) || (((c1).snr>=(c2).snr)) && ((c1).strain>(c2).strain)) |
| #define | BETTER_POWER_COR(c1, c2) (((c1).snr>=(c2).snr) && ((c1).power_cor>(c2).power_cor)) |
| #define | BETTER_SNR_PC(c1, c2) (((c1).snr+(c1).power_cor)>((c2).snr+(c2).power_cor)) |
| #define | BETTER_SNR_PC(c1, c2) (((c1).snr>(c2).snr+0.1) || (((c1).snr>=(c2).snr) && ((c1).power_cor>(c2).power_cor))) |
| #define | BETTER_SNR_COH(c1, c2) (((c1).snr>(c2).snr+0.1) || (((c1).snr>=(c2).snr)) && ((c1).coherence_score>(c2).coherence_score)) |
| #define | PLAIN_SNR(c1, c2) ((c1).snr>(c2).snr) |
| #define | CHASE1(opt_cond, opt_var, first_step) |
| #define | CHASE(opt_cond, opt_var, first_step) |
| #define | FIT(opt_expr, opt_var) |
| #define | FIT2(opt_expr, opt_var) |
| #define | SEARCH(opt_expr, opt_var) |
| #define | ZOOMED_SEARCH(opt_expr, opt_var) |
| #define | RECURSIVE_SEARCH(opt_expr, opt_var) |
| #define | ORACLE(opt_char, opt_var, value, force) |
| #define | MAP(i, j) map[(i+N)+(j+N)*(2*N+1)] |
| #define | L(a, b) (MAP(i, j) < MAP(i+a, j+b)) |
Functions | |
| float | candidate_distance (CANDIDATE *cand, float ra, float dec) |
| float | candidate_alignment (CANDIDATE *cand, float iota, float psi) |
| int | max_dx_compare (int *a1, int *a2) |
| int | dec_compare (int *a1, int *a2) |
| int | ra_compare (int *a1, int *a2) |
| void | sweep_points (int index, int mark) |
| void | expand_candidates (void) |
| void | dump_candidate (int i) |
| void | output_candidate_header (FILE *fout) |
| void | output_candidate (FILE *fout, char *suffix, CANDIDATE *cand) |
| void | compute_scores_cruncher (int thread_id, COMPUTE_SCORES_DATA *csd) |
| void | compute_scores (CANDIDATE *cand, int debug) |
| void | single_pass_compute_simple_snr (CANDIDATE *cand) |
| void | single_pass_compute_matched_snr (CANDIDATE *cand) |
| void | compute_alignment_snr (SNR_DATA *sd, CANDIDATE *cand, int debug) |
| void | init_candidates (void) |
| int | find_next_candidate (CANDIDATE *cand) |
| int | find_better_candidate (int index) |
| int | add_candidate (CANDIDATE *cand, int improves) |
| CHASE (PLAIN_SNR, spindown, 0.01/(1800.0 *(max_gps()-min_gps()))) | |
| int | search_monte_carlo_vec (CANDIDATE *cand) |
| int | search_four_vec (CANDIDATE *cand) |
| int | search_gradient_vec (CANDIDATE *cand, int N) |
| int | search_all (CANDIDATE *cand) |
| int | chase_frequency1 (CANDIDATE *cand) |
| int | search_sky (CANDIDATE *cand) |
| int | search_alignment1 (CANDIDATE *cand) |
| int | search_alignment (CANDIDATE *cand) |
| int | search_spindown1 (CANDIDATE *cand, float step, int N) |
| int | search_monte_carlo (CANDIDATE *cand, float sky_r, float spindown_r, int limit) |
| int | search_four1 (CANDIDATE *cand) |
| int | search_four (CANDIDATE *cand) |
| int | search_four3 (CANDIDATE *cand) |
| void | tabulate_neighbourhood (char *filename, CANDIDATE *cand) |
| void | optimize_candidate (CANDIDATE *cand) |
| int | compare_opt_ranks (int *a, int *b) |
| void | assign_opt_ranks (void) |
| void | identify_candidates (void) |
| void | output_candidates (FILE *fout) |
Variables | |
| DATASET * | datasets |
| int | d_free |
| POLARIZATION_RESULTS * | polarization_results |
| int | nlinear_polarizations |
| int | ntotal_polarizations |
| SKY_GRID * | fine_grid |
| SKY_GRID * | patch_grid |
| SKY_SUPERGRID * | super_grid |
| FILE * | LOG |
| double | spindown |
| double | resolution |
| int | subinstance |
| char * | subinstance_name |
| int | nbins |
| int | first_bin |
| int | side_cut |
| int | useful_bins |
| INT64 | spindown_start |
| CANDIDATE * | candidate = NULL |
| int | candidate_free = 0 |
| int | candidate_size = -1 |
| gengetopt_args_info | args_info |
| char | s [20000] |
| SUM_TYPE * | max_dx |
| short * | max_dx_polarization_index |
| int * | max_dx_order = NULL |
| int * | dec_order = NULL |
| int * | inverse_dec_order = NULL |
| int * | ra_order = NULL |
| int * | inverse_ra_order = NULL |
| int * | max_dx_local_map = NULL |
| float | noise_floor |
| int | min_i = 0 |
| int | max_i = 0 |
| VARRAY * | candidate_cache = NULL |
| VARRAY ** | bin_index = NULL |
| double | index_queries_total = 0.0 |
| double | index_snr_total = 0.0 |
| double | index_hits = 0.0 |
| double | improvement_queries_total = 0.0 |
| double | improvements = 0.0 |
| double | improvement_snr_total = 0.0 |
| #define __USE_ISOC99 |
Definition at line 23 of file candidates.c.
| #define DISTANCE_PRINTF |
Definition at line 45 of file candidates.c.
| #define WINDOW 240 |
Definition at line 47 of file candidates.c.
| #define SEARCH_WINDOW 10 |
Definition at line 48 of file candidates.c.
| #define SNR_FORMULA1 cand->snr=(demod_signal_sum[b_max]-mean_power)/power_sd; |
Definition at line 418 of file candidates.c.
| #define SNR_FORMULA2 cand->snr=(demod_signal_sum[b_max]-0.25*fabs(demod_signal_sum[b_max-1]-demod_signal_sum[b_max+1])-mean_power)/power_sd; |
Definition at line 419 of file candidates.c.
| #define SNR_FORMULA3 cand->snr=(0.6*demod_signal_sum[b_max]+0.15*(demod_signal_sum[b_max-1]+demod_signal_sum[b_max+1])-mean_power)/power_sd; |
Definition at line 420 of file candidates.c.
| #define SNR_FORMULA4 cand->snr=(0.6*demod_signal_sum[b_max]+0.15*(demod_signal_sum[b_max-1]+demod_signal_sum[b_max+1])-mean_power)/power_sd; |
Definition at line 421 of file candidates.c.
| #define SNR_FORMULA SNR_FORMULA1 |
Definition at line 423 of file candidates.c.
| #define VALID_RESPONSE 1 |
Definition at line 887 of file candidates.c.
| #define VALID_SHIFT 2 |
Definition at line 888 of file candidates.c.
| #define VALID_DOPPLER 4 |
Definition at line 889 of file candidates.c.
| #define VALID_E 8 |
Definition at line 890 of file candidates.c.
| #define VALID_DIFF_SHIFT 16 |
Definition at line 891 of file candidates.c.
| #define ALL_VALID (VALID_RESPONSE | VALID_SHIFT | VALID_DOPPLER) |
Definition at line 893 of file candidates.c.
| #define FREQ_STEPS 1 |
Definition at line 2306 of file candidates.c.
| #define FREQ_STEPS 32 |
Definition at line 2306 of file candidates.c.
| #define SNR_TOLERANCE 0.01 |
Definition at line 2491 of file candidates.c.
| #define BETTER_SNR | ( | c1, | |||
| c2 | ) | (((c1).snr>(c2).snr) || (((c1).snr>=(c2).snr)) && ((c1).strain>(c2).strain)) |
Definition at line 2493 of file candidates.c.
| #define BETTER_POWER_COR | ( | c1, | |||
| c2 | ) | (((c1).snr>=(c2).snr) && ((c1).power_cor>(c2).power_cor)) |
Definition at line 2494 of file candidates.c.
| #define BETTER_SNR_PC | ( | c1, | |||
| c2 | ) | (((c1).snr+(c1).power_cor)>((c2).snr+(c2).power_cor)) |
Definition at line 2499 of file candidates.c.
| #define BETTER_SNR_PC | ( | c1, | |||
| c2 | ) | (((c1).snr>(c2).snr+0.1) || (((c1).snr>=(c2).snr) && ((c1).power_cor>(c2).power_cor))) |
Definition at line 2499 of file candidates.c.
| #define BETTER_SNR_COH | ( | c1, | |||
| c2 | ) | (((c1).snr>(c2).snr+0.1) || (((c1).snr>=(c2).snr)) && ((c1).coherence_score>(c2).coherence_score)) |
Definition at line 2505 of file candidates.c.
| #define PLAIN_SNR | ( | c1, | |||
| c2 | ) | ((c1).snr>(c2).snr) |
Definition at line 2507 of file candidates.c.
| #define CHASE1 | ( | opt_cond, | |||
| opt_var, | |||||
| first_step | ) |
Definition at line 2509 of file candidates.c.
| #define CHASE | ( | opt_cond, | |||
| opt_var, | |||||
| first_step | ) |
Definition at line 2591 of file candidates.c.
| #define FIT | ( | opt_expr, | |||
| opt_var | ) |
Definition at line 2646 of file candidates.c.
| #define FIT2 | ( | opt_expr, | |||
| opt_var | ) |
Definition at line 2715 of file candidates.c.
| #define SEARCH | ( | opt_expr, | |||
| opt_var | ) |
Definition at line 2756 of file candidates.c.
| #define ZOOMED_SEARCH | ( | opt_expr, | |||
| opt_var | ) |
Value:
int zoomed_search_##opt_var(CANDIDATE *cand, float step0, int N) { while(step0>0) { if(search_##opt_var(cand, step0, N))return 1; step0=step0/4; } return 0; }
Definition at line 2795 of file candidates.c.
| #define RECURSIVE_SEARCH | ( | opt_expr, | |||
| opt_var | ) |
Definition at line 2806 of file candidates.c.
| #define ORACLE | ( | opt_char, | |||
| opt_var, | |||||
| value, | |||||
| force | ) |
Value:
int chase_##opt_var(CANDIDATE *cand) { CANDIDATE c; memcpy(&c, cand, sizeof(*cand)); c.opt_var=(value); compute_scores(&c, 0); if((force) || (c.opt_char>cand->opt_char)) { memcpy(cand, &c, sizeof(CANDIDATE)); return (c.opt_char>cand->opt_char); } else { return 0; } }
Definition at line 2853 of file candidates.c.
| float candidate_distance | ( | CANDIDATE * | cand, | |
| float | ra, | |||
| float | dec | |||
| ) |
Definition at line 92 of file candidates.c.
| float candidate_alignment | ( | CANDIDATE * | cand, | |
| float | iota, | |||
| float | psi | |||
| ) |
Definition at line 97 of file candidates.c.
| int max_dx_compare | ( | int * | a1, | |
| int * | a2 | |||
| ) |
Definition at line 120 of file candidates.c.
| int dec_compare | ( | int * | a1, | |
| int * | a2 | |||
| ) |
Definition at line 127 of file candidates.c.
| int ra_compare | ( | int * | a1, | |
| int * | a2 | |||
| ) |
Definition at line 141 of file candidates.c.
| void sweep_points | ( | int | index, | |
| int | mark | |||
| ) |
Definition at line 269 of file candidates.c.
| void expand_candidates | ( | void | ) |
Definition at line 298 of file candidates.c.
| void dump_candidate | ( | int | i | ) |
Definition at line 308 of file candidates.c.
| void output_candidate_header | ( | FILE * | fout | ) |
Definition at line 378 of file candidates.c.
| void output_candidate | ( | FILE * | fout, | |
| char * | suffix, | |||
| CANDIDATE * | cand | |||
| ) |
Definition at line 383 of file candidates.c.
| void compute_scores_cruncher | ( | int | thread_id, | |
| COMPUTE_SCORES_DATA * | csd | |||
| ) |
Definition at line 461 of file candidates.c.
| void compute_scores | ( | CANDIDATE * | cand, | |
| int | debug | |||
| ) |
Definition at line 637 of file candidates.c.
| void single_pass_compute_simple_snr | ( | CANDIDATE * | cand | ) |
Definition at line 1437 of file candidates.c.
| void single_pass_compute_matched_snr | ( | CANDIDATE * | cand | ) |
Definition at line 1672 of file candidates.c.
Definition at line 2052 of file candidates.c.
| void init_candidates | ( | void | ) |
Definition at line 2399 of file candidates.c.
| int find_next_candidate | ( | CANDIDATE * | cand | ) |
Definition at line 2409 of file candidates.c.
| int find_better_candidate | ( | int | index | ) |
Definition at line 2446 of file candidates.c.
| int add_candidate | ( | CANDIDATE * | cand, | |
| int | improves | |||
| ) |
Definition at line 2472 of file candidates.c.
| CHASE | ( | PLAIN_SNR | , | |
| spindown | , | |||
| 0.01/ | (1800.0 *(max_gps()-min_gps())) | |||
| ) |
Definition at line 2875 of file candidates.c.
| int search_monte_carlo_vec | ( | CANDIDATE * | cand | ) |
Definition at line 2966 of file candidates.c.
| int search_four_vec | ( | CANDIDATE * | cand | ) |
Definition at line 3006 of file candidates.c.
| int search_gradient_vec | ( | CANDIDATE * | cand, | |
| int | N | |||
| ) |
Definition at line 3109 of file candidates.c.
| int search_all | ( | CANDIDATE * | cand | ) |
Definition at line 3264 of file candidates.c.
| int chase_frequency1 | ( | CANDIDATE * | cand | ) |
Definition at line 3427 of file candidates.c.
| int search_sky | ( | CANDIDATE * | cand | ) |
Definition at line 3479 of file candidates.c.
| int search_alignment1 | ( | CANDIDATE * | cand | ) |
Definition at line 3513 of file candidates.c.
| int search_alignment | ( | CANDIDATE * | cand | ) |
Definition at line 3548 of file candidates.c.
| int search_spindown1 | ( | CANDIDATE * | cand, | |
| float | step, | |||
| int | N | |||
| ) |
Definition at line 3626 of file candidates.c.
| int search_monte_carlo | ( | CANDIDATE * | cand, | |
| float | sky_r, | |||
| float | spindown_r, | |||
| int | limit | |||
| ) |
Definition at line 3678 of file candidates.c.
| int search_four1 | ( | CANDIDATE * | cand | ) |
Definition at line 3748 of file candidates.c.
| int search_four | ( | CANDIDATE * | cand | ) |
Definition at line 3805 of file candidates.c.
| int search_four3 | ( | CANDIDATE * | cand | ) |
Definition at line 4021 of file candidates.c.
| void tabulate_neighbourhood | ( | char * | filename, | |
| CANDIDATE * | cand | |||
| ) |
Definition at line 4108 of file candidates.c.
| void optimize_candidate | ( | CANDIDATE * | cand | ) |
Definition at line 4138 of file candidates.c.
| int compare_opt_ranks | ( | int * | a, | |
| int * | b | |||
| ) |
Definition at line 4160 of file candidates.c.
| void assign_opt_ranks | ( | void | ) |
Definition at line 4170 of file candidates.c.
| void identify_candidates | ( | void | ) |
Definition at line 4188 of file candidates.c.
| void output_candidates | ( | FILE * | fout | ) |
Definition at line 4447 of file candidates.c.
Definition at line 41 of file polarization.c.
Definition at line 39 of file polarization.c.
Definition at line 39 of file polarization.c.
Definition at line 87 of file powerflux.c.
Definition at line 89 of file powerflux.c.
Definition at line 88 of file powerflux.c.
| FILE* LOG |
Definition at line 34 of file dat2skymap.c.
| double spindown |
Definition at line 79 of file powerflux.c.
| double resolution |
Definition at line 28 of file dat2skymap.c.
| int subinstance |
Definition at line 72 of file powerflux.c.
| char* subinstance_name |
Definition at line 73 of file powerflux.c.
| int nbins |
Definition at line 61 of file FindCoincidence_v1.c.
| int first_bin |
Definition at line 66 of file powerflux.c.
| int side_cut |
Definition at line 56 of file powerflux.c.
| int useful_bins |
Definition at line 56 of file powerflux.c.
Definition at line 54 of file fine_grid.c.
Definition at line 72 of file candidates.c.
| int candidate_free = 0 |
Definition at line 73 of file candidates.c.
| int candidate_size = -1 |
Definition at line 74 of file candidates.c.
| struct gengetopt_args_info args_info |
Definition at line 40 of file bar_response.c.
| char s[20000] |
Definition at line 78 of file candidates.c.
Definition at line 81 of file fine_grid.c.
| short* max_dx_polarization_index |
Definition at line 82 of file fine_grid.c.
| int* max_dx_order = NULL |
Definition at line 83 of file candidates.c.
| int* dec_order = NULL |
Definition at line 84 of file candidates.c.
| int* inverse_dec_order = NULL |
Definition at line 85 of file candidates.c.
| int* ra_order = NULL |
Definition at line 86 of file candidates.c.
| int* inverse_ra_order = NULL |
Definition at line 87 of file candidates.c.
| int* max_dx_local_map = NULL |
Definition at line 88 of file candidates.c.
| float noise_floor |
Definition at line 90 of file candidates.c.
| int min_i = 0 |
Definition at line 156 of file candidates.c.
| int max_i = 0 |
Definition at line 156 of file candidates.c.
| VARRAY* candidate_cache = NULL |
Definition at line 2390 of file candidates.c.
Definition at line 2391 of file candidates.c.
| double index_queries_total = 0.0 |
Definition at line 2392 of file candidates.c.
| double index_snr_total = 0.0 |
Definition at line 2393 of file candidates.c.
| double index_hits = 0.0 |
Definition at line 2394 of file candidates.c.
| double improvement_queries_total = 0.0 |
Definition at line 2395 of file candidates.c.
| double improvements = 0.0 |
Definition at line 2396 of file candidates.c.