1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
#include <iostream>
// This script runs the program "ComputeFStatistic_v2". You have to substitute the parameters,
// and it will analyze the desired SFTs
using namespace std;
int main()
{
double ALPHA = 2.0;
double DELTA = 1.0;
double F0 = 200.0;
double FREQ = 199.0;
double FBAND = 2.0;
int START_TIME = 1066055716; // 17/10/13, 14:35:00 UTC
int INTEGRATION_TIME = 259200; // 3 days
int NINETYDAYS = 7776000; // 90 days
double VOVERC = 0.000106; // v/c
int TSFT = 1800; // Time of 1 sft
int NSFTS = 144; // Number of sfts
double DPHI_MIN = 1/(VOVERC*F0*TSFT*NSFTS);
double PATCH = 10*DPHI_MIN;
int PATCH_SIZE = 11;
double TEMP_PATCH = PATCH/PATCH_SIZE;
int MIN_TIME = 1066055716;
int MAX_TIME = MIN_TIME + INTEGRATION_TIME;
int CAND = 1;
const char* SFTS = "'/home/david/demodulation/sfts/oneyear_signalonly_nospindowns/SFTS/*.sft'";
const char* EPHEMERIDES = "'/home/david/ephem'";
int N = 1;
for (int i = 0; i <= PATCH_SIZE - 1; i = i + 1)
{
for (int j = 0; j <= PATCH_SIZE - 1; j = j + 1)
{
double ALPHA_0= ALPHA - PATCH/2 + i*TEMP_PATCH;
double DELTA_0= DELTA - PATCH/2 + j*TEMP_PATCH;
if ( N < 10 )
{
const char* OUTPUT_FILE="/home/david/demodulation/sfts/oneyear_signalonly_nospindowns/FStatistic/demodulating_skyposition/secondtest/skypos-00$N-day0-$ALPHA_0-$DELTA_0-thirdtest.txt";
const char* command
sprintf(command, "lalapps_ComputeFStatistic_v2 --Alpha %d --Delta %d --Freq %d --FreqBand %d --refTime %i --outputFstat %s --DataFiles %s --ephemDir %s --minStartTime %i --maxEndTime %i --NumCandidatesToKeep %i", ALPHA_0, DELTA_0, FREQ, FBAND, START_TIME, OUTPUT_FILE, SFTS, EPHEMERIDES, MIN_TIME, MAX_TIME, CAND);
system(command);
}
else if ( N >= 10 && N < 100 )
{
const char* OUTPUT_FILE="/home/david/demodulation/sfts/oneyear_signalonly_nospindowns/FStatistic/demodulating_skyposition/secondtest/skypos-0$N-day0-$ALPHA_0-$DELTA_0-thirdtest.txt";
const char* command
sprintf(command, "lalapps_ComputeFStatistic_v2 --Alpha %d --Delta %d --Freq %d --FreqBand %d --refTime %i --outputFstat %s --DataFiles %s --ephemDir %s --minStartTime %i --maxEndTime %i --NumCandidatesToKeep %i", ALPHA_0, DELTA_0, FREQ, FBAND, START_TIME, OUTPUT_FILE, SFTS, EPHEMERIDES, MIN_TIME, MAX_TIME, CAND);
system(command);
}
else if ( N >= 100 )
{
const char* OUTPUT_FILE="/home/david/demodulation/sfts/oneyear_signalonly_nospindowns/FStatistic/demodulating_skyposition/secondtest/skypos-$N-day0-$ALPHA_0-$DELTA_0-thirdtest.txt";
const char* command
sprintf(command, "lalapps_ComputeFStatistic_v2 --Alpha %d --Delta %d --Freq %d --FreqBand %d --refTime %i --outputFstat %s --DataFiles %s --ephemDir %s --minStartTime %i --maxEndTime %i --NumCandidatesToKeep %i", ALPHA_0, DELTA_0, FREQ, FBAND, START_TIME, OUTPUT_FILE, SFTS, EPHEMERIDES, MIN_TIME, MAX_TIME, CAND);
system(command);
}
N = N + 1;
sprintf("%i,%i", i,j);
}
}
return 0;
}
|