signal_builder
Module for building PTA signals.
Functions¶
unique_sampling_groups ¶
Fix the hypermodel group structure.
PARAMETER | DESCRIPTION |
---|---|
super_model |
The configured hypermodel from enterprise_extensions
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
unique_groups
|
Nested list of lists with unique indices for parameters. |
Source code in src/ptarcade/signal_builder.py
powerlaw2 ¶
Modified powerlaw function.
Defines a modified powerlaw function that takes as input an array containing the values of the amplitude and spectral index.
PARAMETER | DESCRIPTION |
---|---|
f |
Frequency array.
TYPE:
|
log10_Agamma |
Two component NDArray of [Log10(amplitude), spectral index].
TYPE:
|
components |
Number of components for each frequency.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
NDArray
|
The modified powerlaw. |
Source code in src/ptarcade/signal_builder.py
powerlaw ¶
Modified powerlaw function.
Powerlaw function modified to work with ceffyl.
PARAMETER | DESCRIPTION |
---|---|
f |
Frequency array.
TYPE:
|
Tspan |
Observation time.
|
log10_A |
Log10(amplitude)
TYPE:
|
gamma |
Spectral index
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
NDArray
|
The modified powerlaw. |
Source code in src/ptarcade/signal_builder.py
powerlaw2_ceffyl ¶
Modified powerlaw function.
Defines a modified powerlaw function that takes as input an array containing the values of the amplitude and spectral index. This version is compatible with ceffyl.
PARAMETER | DESCRIPTION |
---|---|
f |
Frequency array.
TYPE:
|
Tspan |
Observation time.
TYPE:
|
gw_bhb |
Two component NDArray of [Log10(amplitude), spectral index].
TYPE:
|
components |
Count by this number in
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
NDArray
|
The modified powerlaw. |
Source code in src/ptarcade/signal_builder.py
tnequad_conv ¶
Check equad defintion.
Checks if the TempoNest definition of equad is used in the white noise dictionary.
PARAMETER | DESCRIPTION |
---|---|
noisedict |
Dictionary containing noise terms.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tnequad
|
Whether TempoNest equad is used.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
SystemExit
|
If the equad convention is not consistent. |
Source code in src/ptarcade/signal_builder.py
ent_builder ¶
ent_builder(
psrs: list[Pulsar],
model: ModuleType | None = None,
noisedict: dict | None = None,
pta_dataset: str | None = None,
bhb_th_prior: bool = False,
gamma_bhb: float | None = None,
A_bhb_logmin: float | None = None,
A_bhb_logmax: float | None = None,
corr: bool = False,
red_components: int = 30,
gwb_components: int = 14,
) -> signal_base.PTA
Reads in list of enterprise Pulsar instances and returns a PTA object instantiated with user-supplied options.
PARAMETER | DESCRIPTION |
---|---|
psrs |
List of enterprise Pulsar instances.
TYPE:
|
model |
Object containing the parameters of the exotic signal. Defaults to None.
TYPE:
|
noisedict |
Dictionary of pulsar noise properties. Defaults to None]
TYPE:
|
pta_dataset |
PTADataset object containing the data for the PTA. Defaults to None.
TYPE:
|
bhb_th_prior |
If set to True the prior for the bhb signal will be derived by fitting a 2D Gaussian to the distribution of A and gamma in the holodeck library astro-02-gw. Defaults to False.
TYPE:
|
gamma_bhb |
Fixed common bhb process spectral index value. If set to None we vary the spectral index over the range [0, 7]. Defaults to None.
TYPE:
|
A_bhb_logmin |
specifies lower prior on the log amplitude of the bhb common process. If set to None, -18 is used. Defaults to Non
TYPE:
|
A_bhb_logmax |
specifies upper prior on the log amplitude of the bhb common process. If set to None, -14 is used if gamma_bhb = 13/3, -11 is used otherwise. Defaults to None.
TYPE:
|
corr |
if set to True HD correlations are assumed for GWBs. Defaults to False.
TYPE:
|
red_components |
number of frequency components for the intrinsic red noise. Defaults to 30.
TYPE:
|
gwb_components |
number of frequency components for the common processes. Defaults to 14
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
PTA
|
PTA object instantiated with user-supplied options. |
Source code in src/ptarcade/signal_builder.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
|