nullpol 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. nullpol/.gitignore +1 -0
  2. nullpol/__init__.py +43 -0
  3. nullpol/asimov/__init__.py +0 -0
  4. nullpol/asimov/analysis_defaults.yaml +56 -0
  5. nullpol/asimov/asimov.py +195 -0
  6. nullpol/asimov/nullpol.ini +246 -0
  7. nullpol/asimov/nullpol_analysis.yaml +4 -0
  8. nullpol/asimov/pesummary.py +191 -0
  9. nullpol/asimov/tgrflow.py +566 -0
  10. nullpol/asimov/utility.py +281 -0
  11. nullpol/calibration/__init__.py +3 -0
  12. nullpol/calibration/antenna_pattern.py +32 -0
  13. nullpol/clustering/__init__.py +7 -0
  14. nullpol/clustering/clustering.py +60 -0
  15. nullpol/clustering/plot.ipynb +120 -0
  16. nullpol/clustering/plot.py +43 -0
  17. nullpol/clustering/single.py +77 -0
  18. nullpol/clustering/sky_maximized_spectrogram.py +70 -0
  19. nullpol/clustering/test.png +0 -0
  20. nullpol/clustering/threshold_filter.py +29 -0
  21. nullpol/detector/__init__.py +4 -0
  22. nullpol/detector/networks.py +103 -0
  23. nullpol/detector/whiten.py +51 -0
  24. nullpol/injection/__init__.py +3 -0
  25. nullpol/injection/injection.py +68 -0
  26. nullpol/job_creation/__init__.py +5 -0
  27. nullpol/job_creation/analysis_node.py +136 -0
  28. nullpol/job_creation/generation_node.py +17 -0
  29. nullpol/job_creation/nullpol_pipe_dag_creator.py +121 -0
  30. nullpol/likelihood/__init__.py +6 -0
  31. nullpol/likelihood/chi2_time_frequency_likelihood.py +80 -0
  32. nullpol/likelihood/fractional_projection_time_frequency_likelihood.py +78 -0
  33. nullpol/likelihood/gaussian_time_frequency_likelihood.py +72 -0
  34. nullpol/likelihood/time_frequency_likelihood.py +516 -0
  35. nullpol/null_stream/__init__.py +7 -0
  36. nullpol/null_stream/antenna_pattern.py +130 -0
  37. nullpol/null_stream/encoding.py +23 -0
  38. nullpol/null_stream/null_stream.py +94 -0
  39. nullpol/null_stream/projector.py +61 -0
  40. nullpol/null_stream/signal_estimator.py +37 -0
  41. nullpol/null_stream/time_shift.py +52 -0
  42. nullpol/prior/__init__.py +3 -0
  43. nullpol/prior/default.py +24 -0
  44. nullpol/prior/prior_files/polarization.prior +3 -0
  45. nullpol/result/__init__.py +3 -0
  46. nullpol/result/result.py +257 -0
  47. nullpol/source/__init__.py +3 -0
  48. nullpol/source/simple_map.py +30 -0
  49. nullpol/time_frequency_transform/__init__.py +5 -0
  50. nullpol/time_frequency_transform/helper.py +34 -0
  51. nullpol/time_frequency_transform/inverse_wavelet_freq_funcs.py +136 -0
  52. nullpol/time_frequency_transform/inverse_wavelet_time_funcs.py +231 -0
  53. nullpol/time_frequency_transform/stft.py +21 -0
  54. nullpol/time_frequency_transform/transform_freq_funcs.py +268 -0
  55. nullpol/time_frequency_transform/transform_time_funcs.py +168 -0
  56. nullpol/time_frequency_transform/wavelet_transforms.py +206 -0
  57. nullpol/tools/__init__.py +0 -0
  58. nullpol/tools/config.ini +363 -0
  59. nullpol/tools/create_injection.py +180 -0
  60. nullpol/tools/create_time_frequency_filter_from_sample.py +187 -0
  61. nullpol/tools/data_analysis.py +283 -0
  62. nullpol/tools/data_generation.py +443 -0
  63. nullpol/tools/default_config_create_injection.ini +13 -0
  64. nullpol/tools/default_config_create_time_frequency_filter_from_sample.ini +14 -0
  65. nullpol/tools/example_signal_parameters_create_injection.json +17 -0
  66. nullpol/tools/get_asimov_yaml.py +42 -0
  67. nullpol/tools/input.py +218 -0
  68. nullpol/tools/main.py +228 -0
  69. nullpol/tools/parser.py +238 -0
  70. nullpol/utils/__init__.py +9 -0
  71. nullpol/utils/config.py +22 -0
  72. nullpol/utils/convert_type.py +45 -0
  73. nullpol/utils/error.py +11 -0
  74. nullpol/utils/filesystem.py +39 -0
  75. nullpol/utils/log.py +58 -0
  76. nullpol-0.1.1.dist-info/METADATA +72 -0
  77. nullpol-0.1.1.dist-info/RECORD +80 -0
  78. nullpol-0.1.1.dist-info/WHEEL +4 -0
  79. nullpol-0.1.1.dist-info/entry_points.txt +18 -0
  80. nullpol-0.1.1.dist-info/licenses/LICENSE +21 -0
nullpol/.gitignore ADDED
@@ -0,0 +1 @@
1
+ _version.py
nullpol/__init__.py ADDED
@@ -0,0 +1,43 @@
1
+ from __future__ import annotations
2
+
3
+ from . import (asimov, calibration, clustering, detector, injection,
4
+ job_creation, likelihood, null_stream, prior, result, source,
5
+ time_frequency_transform, utils)
6
+ from .utils import logger
7
+
8
+ __version__ = '0.1.1'
9
+
10
+
11
+ def get_version_information() -> str:
12
+ """Get version information.
13
+
14
+ Returns:
15
+ str: Version information.
16
+ """
17
+ return __version__
18
+
19
+
20
+ def log_version_information():
21
+ """Log version information.
22
+ """
23
+ logger.info(f"Running nullpol: {__version__}")
24
+
25
+
26
+ __all__ = [
27
+ 'asimov',
28
+ 'calibration',
29
+ 'clustering',
30
+ 'detector',
31
+ 'injection',
32
+ 'job_creation',
33
+ 'likelihood',
34
+ 'null_stream',
35
+ 'prior',
36
+ 'result',
37
+ 'source',
38
+ 'time_frequency_transform',
39
+ 'utils',
40
+ '__version__',
41
+ 'get_version_information',
42
+ 'log_version_information',
43
+ ]
File without changes
@@ -0,0 +1,56 @@
1
+ kind: configuration
2
+ hooks:
3
+ postmonitor:
4
+ tgrflow:
5
+ library location:
6
+ applicator:
7
+ tgrflow:
8
+ library location:
9
+ data:
10
+ channels:
11
+ H1: H1:GDS-CALIB_STRAIN_CLEAN
12
+ L1: L1:GDS-CALIB_STRAIN_CLEAN
13
+ V1: V1:Hrec_hoft_16384Hz
14
+ frame types:
15
+ H1: H1_HOFT_C00
16
+ L1: L1_HOFT_C00
17
+ V1: V1Online
18
+ pipelines:
19
+ gwdata:
20
+ scheduler:
21
+ accounting group: ligo.prod.o4.cbc.testgr.tiger
22
+ request cpus: 1
23
+ peconfigurator:
24
+ scheduler:
25
+ accounting group: ligo.prod.o4.cbc.testgr.tiger
26
+ request cpus: 1
27
+ nullpol:
28
+ tgr schema section: PolAnalyses
29
+ quality:
30
+ state vector:
31
+ L1: L1:GDS-CALIB_STRAIN_CLEAN
32
+ H1: H1:GDS-CALIB_STRAIN_CLEAN
33
+ V1: V1:Hrec_hoft_16384Hz
34
+ sampler:
35
+ sampler: dynesty
36
+ parallel jobs: 4
37
+ scheduler:
38
+ accounting group: ligo.prod.o4.cbc.testgr.tiger
39
+ request cpus: 4
40
+ request disk: 8
41
+ request memory: 12
42
+ scitoken issuer: igwn
43
+ quality:
44
+ minimum frequency:
45
+ H1: 20
46
+ L1: 20
47
+ V1: 20
48
+ G1: 20
49
+ K1: 20
50
+ priors:
51
+ dec:
52
+ type: Cosine
53
+ psi:
54
+ type: Uniform
55
+ ra:
56
+ type: Uniform
@@ -0,0 +1,195 @@
1
+ """Nullpol Pipeline specification."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import glob
6
+ import os
7
+ import subprocess
8
+ import time
9
+
10
+ import pkg_resources
11
+ from asimov import config
12
+ from asimov.pipeline import Pipeline, PipelineException, PipelineLogger
13
+ from asimov.pipelines.bilby import Bilby
14
+
15
+ from .pesummary import PESummaryPipeline
16
+
17
+
18
+ class Nullpol(Bilby):
19
+ """
20
+ The nullpol pipeline.
21
+
22
+ Parameters
23
+ ----------
24
+ production : :class:`asimov.Production`
25
+ The production object.
26
+ category : str, optional
27
+ The category of the job.
28
+ Defaults to "C01_offline".
29
+ """
30
+
31
+ name = "nullpol"
32
+ STATUS = {"wait", "stuck", "stopped", "running", "finished"}
33
+
34
+ @property
35
+ def config_template(self):
36
+ return pkg_resources.resource_filename('nullpol.asimov', 'nullpol.ini')
37
+
38
+ def __init__(self, production, category=None):
39
+ Pipeline.__init__(self, production=production, category=category)
40
+ self.logger.info("Using the nullpol pipeline")
41
+
42
+ if not production.pipeline.lower() == "nullpol":
43
+ raise PipelineException(f'Pipeline {production.pipeline.lower()} '
44
+ 'is not recognized.')
45
+
46
+ def detect_completion(self):
47
+ """
48
+ Check for the production of the posterior file to signal that the job has completed.
49
+ """
50
+ self.logger.info("Checking if the nullpol job has completed")
51
+ results_dir = glob.glob(f"{self.production.rundir}/result")
52
+ config = self.read_ini(self.config_file_path)
53
+ expected_number_of_result_files = len(self.production.meta['likelihood']['polarization modes'])
54
+ if len(results_dir) > 0: # dynesty_merge_result.json
55
+ results_files = glob.glob(
56
+ os.path.join(results_dir[0], "*merge*_result.hdf5")
57
+ )
58
+ results_files += glob.glob(
59
+ os.path.join(results_dir[0], "*merge*_result.json")
60
+ )
61
+ self.logger.debug(f"results files {results_files}")
62
+ if len(results_files) == expected_number_of_result_files:
63
+ self.logger.info(f"{len(results_files)} result files found, the job is finished.")
64
+ return True
65
+ elif len(results_files) > 0:
66
+ self.logger.info(f"{len(results_files)} < {expected_number_of_result_files} result files found, the job is not finished.")
67
+ else:
68
+ self.logger.info("No results files found.")
69
+ return False
70
+ else:
71
+ self.logger.info("No results directory found")
72
+ return False
73
+
74
+ def subrun_samples(self, subrun_label, absolute=False):
75
+ """
76
+ Collect the combined samples file for PESummary.
77
+ """
78
+
79
+ if absolute:
80
+ rundir = os.path.abspath(self.production.rundir)
81
+ else:
82
+ rundir = self.production.rundir
83
+ self.logger.info(f"Rundir for samples: {rundir}")
84
+ return glob.glob(
85
+ os.path.join(rundir, "result", f"*_{subrun_label}_merge*_result.hdf5")
86
+ ) + glob.glob(os.path.join(rundir, "result", f"*_{subrun_label}_merge*_result.json"))
87
+
88
+ def after_completion(self):
89
+ post_pipeline = PESummaryPipeline(production=self.production)
90
+ self.logger.info("Job has completed. Running PE Summary.")
91
+ cluster = post_pipeline.submit_dag()
92
+ self.production.meta["job id"] = int(cluster)
93
+ self.production.status = "processing"
94
+ self.production.event.update_data()
95
+
96
+ @property
97
+ def config_file_path(self):
98
+ """Path of the configuration file.
99
+
100
+ Returns:
101
+ str: Path of the configuration file.
102
+ """
103
+ cwd = os.getcwd()
104
+ if self.production.event.repository:
105
+ ini = self.production.event.repository.find_prods(
106
+ self.production.name, self.category
107
+ )[0]
108
+ ini = os.path.join(cwd, ini)
109
+ else:
110
+ ini = f"{self.production.name}.ini"
111
+ return ini
112
+
113
+ def build_dag(self, psds=None, user=None, clobber_psd=False, dryrun=False):
114
+ """
115
+ Construct a DAG file in order to submit a production to the
116
+ condor scheduler using nullpol_pipe.
117
+
118
+ Args:
119
+ production (str): The production name.
120
+ psds (dict, optional): The PSDs which should be used for this DAG. If no PSDs are
121
+ provided the PSD files specified in the ini file will be used
122
+ instead.
123
+ user (str): The user accounting tag which should be used to run the job.
124
+ dryrun (bool): If set to true the commands will not be run, but will be printed to
125
+ standard output. Defaults to False.
126
+
127
+ Raises:
128
+ PipelineException: Raised if the construction of the DAG fails.
129
+ """
130
+
131
+ cwd = os.getcwd()
132
+
133
+ self.logger.info(f"Working in {cwd}")
134
+
135
+ if self.production.rundir:
136
+ rundir = self.production.rundir
137
+ else:
138
+ rundir = os.path.join(
139
+ os.path.expanduser("~"),
140
+ self.production.event.name,
141
+ self.production.name,
142
+ )
143
+ self.production.rundir = rundir
144
+
145
+ if "job label" in self.production.meta:
146
+ job_label = self.production.meta["job label"]
147
+ else:
148
+ job_label = self.production.name
149
+
150
+ command = [
151
+ os.path.join(config.get("pipelines", "environment"),
152
+ "bin",
153
+ "nullpol_pipe"),
154
+ self.config_file_path,
155
+ "--label",
156
+ job_label,
157
+ "--outdir",
158
+ f"{os.path.abspath(self.production.rundir)}",
159
+ ]
160
+
161
+ if "accounting group" in self.production.meta:
162
+ command += [
163
+ "--accounting",
164
+ f"{self.production.meta['scheduler']['accounting group']}",
165
+ ]
166
+ else:
167
+ self.logger.warning(
168
+ "This nullpol Job does not supply any accounting"
169
+ " information, which may prevent it running"
170
+ " on some clusters."
171
+ )
172
+
173
+ if dryrun:
174
+ print(" ".join(command))
175
+ else:
176
+ self.logger.info(" ".join(command))
177
+ pipe = subprocess.Popen(
178
+ command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
179
+ )
180
+ out, err = pipe.communicate()
181
+ self.logger.info(out)
182
+
183
+ expected_out = 'DAG generation complete, to submit jobs'
184
+ if err or expected_out not in str(out):
185
+ self.production.status = "stuck"
186
+ self.logger.error(err)
187
+ raise PipelineException(
188
+ (f'DAG file could not be created.\n'
189
+ f'{command}\n{out}\n\n{err}'),
190
+ production=self.production.name,
191
+ )
192
+ else:
193
+ time.sleep(10)
194
+ return PipelineLogger(message=out,
195
+ production=self.production.name)
@@ -0,0 +1,246 @@
1
+ {%- if production.event.repository -%}
2
+ {%- assign repo_dir = production.event.repository.directory -%}
3
+ {%- else -%}
4
+ {%- assign repo_dir = '.' -%}
5
+ {%- endif -%}
6
+ {%- if production.meta['likelihood'] contains 'calibration' -%}
7
+ {%- assign calibration_on = production.meta['likelihood']['calibration']['sample'] -%}
8
+ {%- else -%}
9
+ {%- assign calibration_on = True %}
10
+ {%- endif -%}
11
+ {%- assign meta = production.meta -%}
12
+ {%- assign sampler = production.meta['sampler'] -%}
13
+ {%- assign scheduler = production.meta['scheduler'] -%}
14
+ {%- assign likelihood = production.meta['likelihood'] -%}
15
+ {%- assign priors = production.meta['priors'] -%}
16
+ {%- assign data = production.meta['data'] -%}
17
+ {%- assign quality = production.meta['quality'] -%}
18
+ {%- assign ifos = production.meta['interferometers'] -%}
19
+ {%- assign gr_pe_info = production.meta['gr pe info'] -%}
20
+
21
+ {%- if data contains 'calibration' %}
22
+ {%- if calibration_on %}
23
+ {%- if data['calibration'] contains ifos[0] %}
24
+ ################################################################################
25
+ ## Calibration arguments
26
+ ################################################################################
27
+ calibration-model=CubicSpline
28
+ spline-calibration-envelope-dict={ {% for ifo in ifos %}{{ifo}}:{{data['calibration'][ifo]}},{% endfor %} }
29
+ spline-calibration-nodes=10
30
+ spline-calibration-amplitude-uncertainty-dict=None
31
+ spline-calibration-phase-uncertainty-dict=None
32
+ calibration-correction-type=data
33
+ {%- if priors contains 'calibration' %}
34
+ calibration-prior-boundary={{ priors['calibration']['boundary'] | default: reflective }}
35
+ {%- endif %}
36
+ {%- endif %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+
40
+ ################################################################################
41
+ ## Data generation arguments
42
+ ################################################################################
43
+
44
+ ignore-gwpy-data-quality-check=True
45
+ gps-tuple=None
46
+ gps-file=None
47
+ timeslide-file=None
48
+ timeslide-dict=None
49
+ trigger-time={{ production.meta['event time'] }}
50
+ gaussian-noise=False
51
+ n-simulation=0
52
+ {%- if data['data files'].size > 0 %}
53
+ data-dict={ {% for ifo in ifos %}{{ifo}}:{{data['data files'][ifo]}},{% endfor %} }
54
+ {%- else %}
55
+ data-dict=None
56
+ {%- endif %}
57
+ data-format={{ data['format'] | default: 'gwf' }}
58
+ channel-dict={ {% for ifo in ifos %}{{ifo}}:{{data['channels'][ifo]}},{% endfor %} }
59
+ {%- if data contains 'frame types' %}
60
+ frame-type-dict={ {% for ifo in ifos %}{{ifo}}:{{data['frame types'][ifo]}},{% endfor %} }
61
+ {%- endif %}
62
+
63
+ ################################################################################
64
+ ## Detector arguments
65
+ ################################################################################
66
+
67
+ detectors={{ ifos }}
68
+ duration={{ data['segment length'] }}
69
+ generation-seed=42
70
+ psd-dict={ {% for ifo in ifos %}{{ifo}}:{{production.psds[ifo]}},{% endfor %} }
71
+ psd-fractional-overlap=0.5
72
+ post-trigger-duration={{ likelihood['post trigger time'] | default: 2.0 }}
73
+ sampling-frequency={{ likelihood['sample rate'] | round }}
74
+ psd-length={{ likelihood['psd length'] | round }}
75
+ psd-maximum-duration=1024
76
+ psd-method=median
77
+ psd-start-time=None
78
+ minimum-frequency={ {% for ifo in ifos %}{{ifo}}:{{quality['minimum frequency'][ifo]}},{% endfor %}{% if likelihood contains 'start frequency'%} waveform: {{ likelihood['start frequency'] }} {% endif %} }
79
+ maximum-frequency={ {% for ifo in ifos %}{{ifo}}:{{quality['maximum frequency'][ifo]}},{% endfor %} }
80
+ zero-noise=False
81
+ tukey-roll-off={{ likelihood['roll off time'] | default: 0.4 }}
82
+ resampling-method=lal
83
+
84
+ ################################################################################
85
+ ## Injection arguments
86
+ ################################################################################
87
+
88
+ injection=False
89
+ injection-dict=None
90
+ injection-file=None
91
+ injection-numbers=None
92
+ injection-waveform-approximant=None
93
+ injection-frequency-domain-source-model=None
94
+ injection-waveform-arguments=None
95
+
96
+ ################################################################################
97
+ ## Job submission arguments
98
+ ################################################################################
99
+
100
+ {%- if scheduler contains 'accounting group' %}
101
+ accounting={{ scheduler['accounting group'] }}
102
+ accounting-user = {{ scheduler['accounting user'] }}
103
+ {%- else %}
104
+ accounting=not.required.here
105
+ accounting-user = {{ config['condor']['user'] }}
106
+ {%- endif %}
107
+ label={{ production.name }}
108
+ local=False
109
+ local-generation={{ scheduler['local generation'] | default: False }}
110
+ local-plot=False
111
+ outdir={{ production.rundir }}
112
+ periodic-restart-time={{ scheduler['periodic restart time'] | default: 28800 }}
113
+ request-memory={{ scheduler['request memory'] | default: 4.0}}
114
+ request-memory-generation={{ scheduler['request generation memory'] | default: None }}
115
+ request-cpus={{ scheduler['request cpus'] | default: 1 }}
116
+ request-disk={{ scheduler['request disk'] | default: 1 }}
117
+ scheduler={{ scheduler['type'] | default: 'condor' }}
118
+ scheduler-args=None
119
+ scheduler-module=None
120
+ scheduler-env=None
121
+ transfer-files={% if scheduler['osg'] %}True{% else %}{{ scheduler['transfer files'] | default: True }}{% endif %}
122
+ log-directory=None
123
+ getenv=[GWDATAFIND_SERVER]
124
+ online-pe=False
125
+ osg={{ scheduler['osg'] | default: False }}
126
+ desired-sites={{ scheduler['desired sites'] | default: None }}
127
+ analysis-executable={{ config['pipelines']['environment'] }}/bin/nullpol_pipe_analysis
128
+ environment-variables={{ scheduler['environment variables'] | default: "{'HDF5_USE_FILE_LOCKING': False, 'OMP_NUM_THREADS'=1, 'OMP_PROC_BIND'=False}" }}
129
+
130
+ ################################################################################
131
+ ## Likelihood arguments
132
+ ################################################################################
133
+
134
+ reference-frame=sky
135
+ time-reference=geocent
136
+ number-of-response-curves=1000
137
+ extra-likelihood-kwargs={{ likelihood['kwargs'] | default: 'None' }}
138
+ likelihood-type={{ likelihood['type'] | default: 'FractionalProjectionTimeFrequencyLikelihood' }}
139
+ polarization-modes={{ likelihood['polarization modes'] | default: '[pc, b, xy, pcb, pcxy, xyb, pcbxy, pc, xy, pcb, pcxy, xyb, pcbxy]' }}
140
+ polarization-basis={{ likelihood['polarization basis'] | default: '[p, b, x, p, p, x, p, pc, xy, pb, px, xb, pb]' }}
141
+ wavelet-frequency-resolution={{ likelihood['wavelet frequency resolution'] | default: 16.0 }}
142
+ wavelet-nx={{ likelihood['wavelet nx'] | default: 4.0 }}
143
+
144
+ ################################################################################
145
+ ## Output arguments
146
+ ################################################################################
147
+
148
+ plot-trace=False
149
+ plot-data=False
150
+ plot-injection=False
151
+ plot-spectrogram=False
152
+ plot-calibration=False
153
+ plot-corner=False
154
+ plot-marginal=False
155
+ plot-skymap=True
156
+ plot-waveform=False
157
+ plot-format=png
158
+ create-summary=False
159
+ email=None
160
+ notification=Error
161
+ queue=None
162
+ existing-dir=None
163
+ webdir={{ config['general']['webroot'] }}/{{ production.event.name }}/{{ production.name }}
164
+ summarypages-arguments=None
165
+ result-format=hdf5
166
+ final-result=True
167
+ final-result-nsamples=20000
168
+
169
+ ################################################################################
170
+ ## Prior arguments
171
+ ################################################################################
172
+
173
+ deltaT=0.2
174
+ prior-file=None
175
+ {%- if production.meta contains 'priors' %}
176
+ prior-dict={
177
+ {%- assign priors_keys = priors.keys() -%}
178
+ {%- if priors_keys contains 'ra' or priors_keys contains 'dec' or priors_keys contains 'amplitude_' or priors_keys contains 'phase_' -%}
179
+ {%- assign mode_list = "p,c,b,l,x,y" | split: "," -%}
180
+ {%- assign prior_parameter_list = "amplitude_,phase_" | split: "," -%}
181
+ {%- assign found_prior = false -%}
182
+ {%- if priors_keys contains 'ra' and priors['ra'].keys() contains 'type' -%}
183
+ {%- if priors['ra']['type'] contains 'DeltaFunction' and priors['ra'].keys() contains 'peak' %}
184
+ ra={{priors['ra']['peak']}},
185
+ {%- elsif priors['ra']['type'] contains 'Uniform' and priors['ra'].keys() contains 'minimum' and priors['ra'].keys() contains 'maximum' %}
186
+ ra=Uniform(minimum={{priors['ra']['minimum']}}, maximum={{priors['ra']['maximum']}}, name='ra'),
187
+ {%- endif -%}
188
+ {%- endif -%}
189
+ {%- if priors_keys contains 'dec' and priors['dec'].keys() contains 'type' %}
190
+ {%- if priors['dec']['type'] contains 'DeltaFunction' and priors['dec'].keys() contains 'peak' %}
191
+ dec={{priors['dec']['peak']}},
192
+ {%- elsif priors['dec']['type'] contains 'Uniform' and priors['dec'].keys() contains 'minimum' and priors['dec'].keys() contains 'maximum' %}
193
+ dec=Uniform(minimum={{priors['dec']['minimum']}}, maximum={{priors['dec']['maximum']}}, name='dec'),
194
+ {%- endif -%}
195
+ {%- endif -%}
196
+ {%- for i in mode_list -%}
197
+ {%- for j in mode_list -%}
198
+ {%- for prior_parameter in prior_parameter_list -%}
199
+ {%- assign parameter_name = prior_parameter | append: i | append: j -%}
200
+ {%- if priors_keys contains parameter_name -%}
201
+ {%- if priors[parameter_name] contains 'type' -%}
202
+ {%- if priors[parameter_name]['type'] contains 'Uniform' and priors[parameter_name] contains 'minimum' and priors[parameter_name] contains 'maximum' %}
203
+ {{parameter_name}}=Uniform(minimum={{priors[parameter_name]['minimum']}}, maximum={{priors[parameter_name]['maximum']}}, name='{{parameter_name}}'),
204
+ {%- endif -%}
205
+ {%- endif -%}
206
+ {%- endif -%}
207
+ {%- endfor -%}
208
+ {%- endfor -%}
209
+ {%- endfor -%}
210
+ {%- endif %}
211
+ }
212
+ {%- endif %}
213
+ enforce-signal-duration={{ production.meta['waveform']['enforce signal duration'] | default: False }}
214
+ default-prior=PolarizationPriorDict
215
+
216
+
217
+ ################################################################################
218
+ ## Post processing arguments
219
+ ################################################################################
220
+
221
+ postprocessing-executable=None
222
+ postprocessing-arguments=None
223
+ single-postprocessing-executable=None
224
+ single-postprocessing-arguments=None
225
+
226
+ ################################################################################
227
+ ## Sampler arguments
228
+ ################################################################################
229
+
230
+ sampler={{sampler['sampler'] | default: 'dynesty' }}
231
+ sampling-seed={{sampler['seed'] | default: 1 }}
232
+ n-parallel={{ sampler['parallel jobs'] | default: 2 }}
233
+ sampler-kwargs={{ sampler['sampler kwargs'] | default: "{'nlive': 1000, 'naccept': 60, 'check_point_plot': True, 'check_point_delta_t': 1800, 'print_method': 'interval-60', 'sample': 'acceptance-walk'}" }}
234
+
235
+ ################################################################################
236
+ ## Time-frequency clustering
237
+ ################################################################################
238
+
239
+ time-frequency-clustering-method={{ likelihood['time frequency clustering method'] | default: 'maxL' }}
240
+ time-frequency-clustering-injection-parameters-filename={{ likelihood['time frequency clustering injection parameters filename'] | default: None}}
241
+ time-frequency-clustering-pe-samples-filename={{ likelihood['time frequency clustering pe samples filename'] | default: gr_pe_info['result file path']}}
242
+ time-frequency-clustering-threshold={{ likelihood['time frequency clustering threshold'] | default: 1.0 }}
243
+ time-frequency-clustering-threshold-type={{ likelihood['time frequency clustering threshold type'] | default: 'variance' }}
244
+ time-frequency-clustering-time-padding={{ likelihood['time frequency clustering time padding'] | default: 0.1 }}
245
+ time-frequency-clustering-frequency-padding={{ likelihood['time frequency clustering frequency padding'] | default: 1.0 }}
246
+ time-frequency-clustering-skypoints={{ likelihood['time frequency clustering skypoints'] | default: 100 }}
@@ -0,0 +1,4 @@
1
+ kind: analysis
2
+ name: Prod0
3
+ pipeline: nullpol
4
+ comment: nullpol analysis with the default settings