gstlal-inspiral  0.4.2
 All Classes Namespaces Files Functions Variables Pages
de_calc_likelihood.sql
1 -- Copyright (C) 2014 Kipp Cannon
2 --
3 -- This program is free software; you can redistribute it and/or modify it
4 -- under the terms of the GNU General Public License as published by the
5 -- Free Software Foundation; either version 2 of the License, or (at your
6 -- option) any later version.
7 --
8 -- This program is distributed in the hope that it will be useful, but
9 -- WITHOUT ANY WARRANTY; without even the implied warranty of
10 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 -- Public License for more details.
12 --
13 -- You should have received a copy of the GNU General Public License along
14 -- with this program; if not, write to the Free Software Foundation, Inc.,
15 -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 
17 
18 -- gstlal_inspiral_calc_likelihood, by default, will not re-process a file it
19 -- has already processed. This behaviour allows a sort of "check-pointing"
20 -- feature where by if a job is evicted from the cluster and started up again,
21 -- it will skip through files it has already processed and continue with the
22 -- ones that it hadn't yet gotten to. The --force command line option can be
23 -- used to force it to reprocess files, but this disables the check-pointing
24 -- effect and is not suitable when doing a bulk re-analysis of
25 -- previously-processed files. In that case, use this script to erase the
26 -- record of gstlal_inspiral_calc_likelihood from the file's metadata,
27 -- tricking it into believing the file has not been processed yet. For
28 -- safety, this script also deletes the likleihood ratios from the
29 -- coinc_event table.
30 
31 
32 DELETE FROM
33  process_params
34 WHERE
35  process_id IN (
36  SELECT
37  process_id
38  FROM
39  process
40  WHERE
41  program == "gstlal_inspiral_calc_likelihood"
42  );
43 
44 DELETE FROM
45  search_summary
46 WHERE
47  process_id IN (
48  SELECT
49  process_id
50  FROM
51  process
52  WHERE
53  program == "gstlal_inspiral_calc_likelihood"
54  );
55 
56 DELETE FROM
57  process
58 WHERE
59  program == "gstlal_inspiral_calc_likelihood";
60 
61 UPDATE
62  coinc_event
63 SET
64  likelihood = NULL;