lisaanalysistools 1.0.2__tar.gz → 1.0.4__tar.gz
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.
Potentially problematic release.
This version of lisaanalysistools might be problematic. Click here for more details.
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4/LISAanalysistools.egg-info}/PKG-INFO +22 -7
- {lisaanalysistools-1.0.2/LISAanalysistools.egg-info → lisaanalysistools-1.0.4}/PKG-INFO +22 -7
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/README.md +21 -6
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/_version.py +1 -1
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/analysiscontainer.py +18 -14
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/datacontainer.py +1 -2
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/detector.py +89 -17
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/diagnostic.py +4 -5
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/prior.py +224 -86
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sensitivity.py +17 -14
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/stochastic.py +2 -3
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/utils/utility.py +9 -3
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/pyproject.toml +1 -1
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/src/pycppdetector.cpp +193 -163
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/CHANGELOG +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/LICENSE +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/LISAanalysistools.egg-info/SOURCES.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/LISAanalysistools.egg-info/dependency_links.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/LISAanalysistools.egg-info/not-zip-safe +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/LISAanalysistools.egg-info/top_level.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/MANIFEST.in +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/Makefile +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/include/Detector.hpp +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/__init__.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/glitch.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/__init__.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/likelihood.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/__init__.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/gbgroupstretch.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/gbmultipletryrj.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/gbspecialgroupstretch.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/gbspecialstretch.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/mbhspecialmove.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/placeholder.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/skymodehop.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/moves/specialforegroundmove.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/stopping.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sampling/utility.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sources/__init__.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sources/emri/__init__.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/sources/emri/tdiwaveform.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/utils/__init__.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/utils/constants.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/utils/multigpudataholder.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/lisatools/utils/pointeradjust.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/requirements-data.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/requirements-demo.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/requirements-dev.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/requirements-release.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/requirements.txt +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/scripts/data_download.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/scripts/generate-changelog.bash +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/scripts/install-hooks.bash +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/scripts/post-commit.bash +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/scripts/run-tests.bash +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/scripts/to_conda.bash +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/setup.cfg +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/setup.py +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/src/Detector.cpp +0 -0
- {lisaanalysistools-1.0.2 → lisaanalysistools-1.0.4}/src/pycppdetector.pyx +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lisaanalysistools
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Home-page: https://github.com/mikekatz04/lisa-on-gpu
|
|
5
5
|
Author: Michael Katz
|
|
6
6
|
Author-email: mikekatz04@gmail.com
|
|
@@ -18,8 +18,9 @@ License-File: LICENSE
|
|
|
18
18
|
# LISA Analysis Tools
|
|
19
19
|
|
|
20
20
|
[](https://mikekatz04.github.io/LISAanalysistools)
|
|
21
|
+
[](https://doi.org/10.5281/zenodo.10930980)
|
|
21
22
|
|
|
22
|
-
LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.
|
|
23
|
+
LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.
|
|
23
24
|
|
|
24
25
|
## 1 - Getting Started
|
|
25
26
|
|
|
@@ -59,16 +60,15 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
|
|
59
60
|
|
|
60
61
|
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags).
|
|
61
62
|
|
|
62
|
-
Current Version: 1.0.
|
|
63
|
+
Current Version: 1.0.4
|
|
63
64
|
|
|
64
65
|
## Authors/Developers
|
|
65
66
|
|
|
66
67
|
* **Michael Katz**
|
|
67
|
-
|
|
68
|
-
### Contibutors
|
|
69
|
-
|
|
70
68
|
* Lorenzo Speri
|
|
71
69
|
* Christian Chapman-Bird
|
|
70
|
+
* Natalia Korsakova
|
|
71
|
+
* Nikos Karnesis
|
|
72
72
|
|
|
73
73
|
## License
|
|
74
74
|
|
|
@@ -76,5 +76,20 @@ This project is licensed under the Apache License - see the [LICENSE.md](LICENSE
|
|
|
76
76
|
|
|
77
77
|
## Citation
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
```
|
|
80
|
+
@software{michael_katz_2024_10930980,
|
|
81
|
+
author = {Michael Katz and
|
|
82
|
+
CChapmanbird and
|
|
83
|
+
Lorenzo Speri and
|
|
84
|
+
Nikolaos Karnesis and
|
|
85
|
+
Korsakova, Natalia},
|
|
86
|
+
title = {mikekatz04/LISAanalysistools: First main release.},
|
|
87
|
+
month = apr,
|
|
88
|
+
year = 2024,
|
|
89
|
+
publisher = {Zenodo},
|
|
90
|
+
version = {v1.0.3},
|
|
91
|
+
doi = {10.5281/zenodo.10930980},
|
|
92
|
+
url = {https://doi.org/10.5281/zenodo.10930980}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
80
95
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lisaanalysistools
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Home-page: https://github.com/mikekatz04/lisa-on-gpu
|
|
5
5
|
Author: Michael Katz
|
|
6
6
|
Author-email: mikekatz04@gmail.com
|
|
@@ -18,8 +18,9 @@ License-File: LICENSE
|
|
|
18
18
|
# LISA Analysis Tools
|
|
19
19
|
|
|
20
20
|
[](https://mikekatz04.github.io/LISAanalysistools)
|
|
21
|
+
[](https://doi.org/10.5281/zenodo.10930980)
|
|
21
22
|
|
|
22
|
-
LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.
|
|
23
|
+
LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.
|
|
23
24
|
|
|
24
25
|
## 1 - Getting Started
|
|
25
26
|
|
|
@@ -59,16 +60,15 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
|
|
59
60
|
|
|
60
61
|
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags).
|
|
61
62
|
|
|
62
|
-
Current Version: 1.0.
|
|
63
|
+
Current Version: 1.0.4
|
|
63
64
|
|
|
64
65
|
## Authors/Developers
|
|
65
66
|
|
|
66
67
|
* **Michael Katz**
|
|
67
|
-
|
|
68
|
-
### Contibutors
|
|
69
|
-
|
|
70
68
|
* Lorenzo Speri
|
|
71
69
|
* Christian Chapman-Bird
|
|
70
|
+
* Natalia Korsakova
|
|
71
|
+
* Nikos Karnesis
|
|
72
72
|
|
|
73
73
|
## License
|
|
74
74
|
|
|
@@ -76,5 +76,20 @@ This project is licensed under the Apache License - see the [LICENSE.md](LICENSE
|
|
|
76
76
|
|
|
77
77
|
## Citation
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
```
|
|
80
|
+
@software{michael_katz_2024_10930980,
|
|
81
|
+
author = {Michael Katz and
|
|
82
|
+
CChapmanbird and
|
|
83
|
+
Lorenzo Speri and
|
|
84
|
+
Nikolaos Karnesis and
|
|
85
|
+
Korsakova, Natalia},
|
|
86
|
+
title = {mikekatz04/LISAanalysistools: First main release.},
|
|
87
|
+
month = apr,
|
|
88
|
+
year = 2024,
|
|
89
|
+
publisher = {Zenodo},
|
|
90
|
+
version = {v1.0.3},
|
|
91
|
+
doi = {10.5281/zenodo.10930980},
|
|
92
|
+
url = {https://doi.org/10.5281/zenodo.10930980}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
80
95
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# LISA Analysis Tools
|
|
2
2
|
|
|
3
3
|
[](https://mikekatz04.github.io/LISAanalysistools)
|
|
4
|
+
[](https://doi.org/10.5281/zenodo.10930980)
|
|
4
5
|
|
|
5
|
-
LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.
|
|
6
|
+
LISA Analysis Tools is a package for performing LISA Data Analysis tasks, including building the LISA Global Fit.
|
|
6
7
|
|
|
7
8
|
## 1 - Getting Started
|
|
8
9
|
|
|
@@ -42,16 +43,15 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
|
|
|
42
43
|
|
|
43
44
|
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms/tags).
|
|
44
45
|
|
|
45
|
-
Current Version: 1.0.
|
|
46
|
+
Current Version: 1.0.4
|
|
46
47
|
|
|
47
48
|
## Authors/Developers
|
|
48
49
|
|
|
49
50
|
* **Michael Katz**
|
|
50
|
-
|
|
51
|
-
### Contibutors
|
|
52
|
-
|
|
53
51
|
* Lorenzo Speri
|
|
54
52
|
* Christian Chapman-Bird
|
|
53
|
+
* Natalia Korsakova
|
|
54
|
+
* Nikos Karnesis
|
|
55
55
|
|
|
56
56
|
## License
|
|
57
57
|
|
|
@@ -59,5 +59,20 @@ This project is licensed under the Apache License - see the [LICENSE.md](LICENSE
|
|
|
59
59
|
|
|
60
60
|
## Citation
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
```
|
|
63
|
+
@software{michael_katz_2024_10930980,
|
|
64
|
+
author = {Michael Katz and
|
|
65
|
+
CChapmanbird and
|
|
66
|
+
Lorenzo Speri and
|
|
67
|
+
Nikolaos Karnesis and
|
|
68
|
+
Korsakova, Natalia},
|
|
69
|
+
title = {mikekatz04/LISAanalysistools: First main release.},
|
|
70
|
+
month = apr,
|
|
71
|
+
year = 2024,
|
|
72
|
+
publisher = {Zenodo},
|
|
73
|
+
version = {v1.0.3},
|
|
74
|
+
doi = {10.5281/zenodo.10930980},
|
|
75
|
+
url = {https://doi.org/10.5281/zenodo.10930980}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
63
78
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
import warnings
|
|
2
5
|
from abc import ABC
|
|
3
6
|
from typing import Any, Tuple, Optional, List
|
|
4
7
|
|
|
5
8
|
import math
|
|
6
9
|
import numpy as np
|
|
7
|
-
|
|
10
|
+
|
|
8
11
|
from scipy import interpolate
|
|
9
12
|
import matplotlib.pyplot as plt
|
|
10
13
|
|
|
14
|
+
|
|
11
15
|
try:
|
|
12
16
|
import cupy as cp
|
|
13
17
|
|
|
@@ -209,7 +213,7 @@ class AnalysisContainer:
|
|
|
209
213
|
template: DataResidualArray,
|
|
210
214
|
include_psd_info: bool = False,
|
|
211
215
|
phase_maximize: bool = False,
|
|
212
|
-
**kwargs: dict
|
|
216
|
+
**kwargs: dict,
|
|
213
217
|
) -> float:
|
|
214
218
|
"""Calculate the Likelihood of a template against the data.
|
|
215
219
|
|
|
@@ -268,7 +272,7 @@ class AnalysisContainer:
|
|
|
268
272
|
return noise_likelihood_term(self.sens_mat)
|
|
269
273
|
elif source_only:
|
|
270
274
|
return residual_source_likelihood_term(
|
|
271
|
-
self.data_res_arr, self.sens_mat, **kwargs
|
|
275
|
+
self.data_res_arr, psd=self.sens_mat, **kwargs
|
|
272
276
|
)
|
|
273
277
|
else:
|
|
274
278
|
return residual_full_source_and_noise_likelihood(
|
|
@@ -278,11 +282,11 @@ class AnalysisContainer:
|
|
|
278
282
|
def _calculate_signal_operation(
|
|
279
283
|
self,
|
|
280
284
|
calc: str,
|
|
281
|
-
*args:
|
|
285
|
+
*args: Any,
|
|
282
286
|
source_only: bool = False,
|
|
283
287
|
waveform_kwargs: Optional[dict] = {},
|
|
284
288
|
data_res_arr_kwargs: Optional[dict] = {},
|
|
285
|
-
**kwargs: dict
|
|
289
|
+
**kwargs: dict,
|
|
286
290
|
) -> float | complex:
|
|
287
291
|
"""Return the likelihood of a generated signal with the data.
|
|
288
292
|
|
|
@@ -328,11 +332,11 @@ class AnalysisContainer:
|
|
|
328
332
|
|
|
329
333
|
def calculate_signal_likelihood(
|
|
330
334
|
self,
|
|
331
|
-
*args:
|
|
335
|
+
*args: Any,
|
|
332
336
|
source_only: bool = False,
|
|
333
337
|
waveform_kwargs: Optional[dict] = {},
|
|
334
338
|
data_res_arr_kwargs: Optional[dict] = {},
|
|
335
|
-
**kwargs: dict
|
|
339
|
+
**kwargs: dict,
|
|
336
340
|
) -> float | complex:
|
|
337
341
|
"""Return the likelihood of a generated signal with the data.
|
|
338
342
|
|
|
@@ -355,16 +359,16 @@ class AnalysisContainer:
|
|
|
355
359
|
source_only=source_only,
|
|
356
360
|
waveform_kwargs=waveform_kwargs,
|
|
357
361
|
data_res_arr_kwargs=data_res_arr_kwargs,
|
|
358
|
-
**kwargs
|
|
362
|
+
**kwargs,
|
|
359
363
|
)
|
|
360
364
|
|
|
361
365
|
def calculate_signal_inner_product(
|
|
362
366
|
self,
|
|
363
|
-
*args:
|
|
367
|
+
*args: Any,
|
|
364
368
|
source_only: bool = False,
|
|
365
369
|
waveform_kwargs: Optional[dict] = {},
|
|
366
370
|
data_res_arr_kwargs: Optional[dict] = {},
|
|
367
|
-
**kwargs: dict
|
|
371
|
+
**kwargs: dict,
|
|
368
372
|
) -> float | complex:
|
|
369
373
|
"""Return the inner product of a generated signal with the data.
|
|
370
374
|
|
|
@@ -387,16 +391,16 @@ class AnalysisContainer:
|
|
|
387
391
|
source_only=source_only,
|
|
388
392
|
waveform_kwargs=waveform_kwargs,
|
|
389
393
|
data_res_arr_kwargs=data_res_arr_kwargs,
|
|
390
|
-
**kwargs
|
|
394
|
+
**kwargs,
|
|
391
395
|
)
|
|
392
396
|
|
|
393
397
|
def calculate_signal_snr(
|
|
394
398
|
self,
|
|
395
|
-
*args:
|
|
399
|
+
*args: Any,
|
|
396
400
|
source_only: bool = False,
|
|
397
401
|
waveform_kwargs: Optional[dict] = {},
|
|
398
402
|
data_res_arr_kwargs: Optional[dict] = {},
|
|
399
|
-
**kwargs: dict
|
|
403
|
+
**kwargs: dict,
|
|
400
404
|
) -> Tuple[float, float]:
|
|
401
405
|
"""Return the SNR of a generated signal with the data.
|
|
402
406
|
|
|
@@ -419,7 +423,7 @@ class AnalysisContainer:
|
|
|
419
423
|
source_only=source_only,
|
|
420
424
|
waveform_kwargs=waveform_kwargs,
|
|
421
425
|
data_res_arr_kwargs=data_res_arr_kwargs,
|
|
422
|
-
**kwargs
|
|
426
|
+
**kwargs,
|
|
423
427
|
)
|
|
424
428
|
|
|
425
429
|
def eryn_likelihood_function(self, x, *args, **kwargs):
|
|
@@ -4,7 +4,6 @@ from typing import Any, Tuple, Optional, List
|
|
|
4
4
|
|
|
5
5
|
import math
|
|
6
6
|
import numpy as np
|
|
7
|
-
from numpy.typing import ArrayLike
|
|
8
7
|
from scipy import interpolate
|
|
9
8
|
import matplotlib.pyplot as plt
|
|
10
9
|
|
|
@@ -36,7 +35,7 @@ class DataResidualArray:
|
|
|
36
35
|
sens_mat: Input sensitivity list. The shape of the nested lists should represent the shape of the
|
|
37
36
|
desired matrix. Each entry in the list must be an array, :class:`Sensitivity`-derived object,
|
|
38
37
|
or a string corresponding to the :class:`Sensitivity` object.
|
|
39
|
-
**sens_kwargs: Keyword arguments to pass to :
|
|
38
|
+
**sens_kwargs: Keyword arguments to pass to :func:`Sensitivity.get_Sn`.
|
|
40
39
|
|
|
41
40
|
"""
|
|
42
41
|
|
|
@@ -22,7 +22,6 @@ class Orbits(ABC):
|
|
|
22
22
|
Args:
|
|
23
23
|
filename: File name. File should be in the style of LISAOrbits
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
"""
|
|
27
26
|
|
|
28
27
|
def __init__(self, filename: str) -> None:
|
|
@@ -51,6 +50,7 @@ class Orbits(ABC):
|
|
|
51
50
|
return [int(str(link_i)[1]) for link_i in self.LINKS]
|
|
52
51
|
|
|
53
52
|
def _setup(self) -> None:
|
|
53
|
+
"""Read in orbital data from file and store."""
|
|
54
54
|
with self.open() as f:
|
|
55
55
|
for key in f.attrs.keys():
|
|
56
56
|
setattr(self, key + "_base", f.attrs[key])
|
|
@@ -63,22 +63,33 @@ class Orbits(ABC):
|
|
|
63
63
|
@filename.setter
|
|
64
64
|
def filename(self, filename: str) -> None:
|
|
65
65
|
"""Set file name."""
|
|
66
|
+
|
|
66
67
|
assert isinstance(filename, str)
|
|
68
|
+
|
|
69
|
+
# get path
|
|
67
70
|
path_to_this_file = __file__.split("detector.py")[0]
|
|
71
|
+
|
|
72
|
+
# make sure orbit_files directory exists in the right place
|
|
68
73
|
if not os.path.exists(path_to_this_file + "orbit_files/"):
|
|
69
74
|
os.mkdir(path_to_this_file + "orbit_files/")
|
|
70
75
|
path_to_this_file = path_to_this_file + "orbit_files/"
|
|
76
|
+
|
|
71
77
|
if not os.path.exists(path_to_this_file + filename):
|
|
78
|
+
# download files from github if they are not there
|
|
72
79
|
github_file = f"https://github.com/mikekatz04/LISAanalysistools/raw/main/lisatools/orbit_files/{filename}"
|
|
73
80
|
r = requests.get(github_file)
|
|
81
|
+
|
|
82
|
+
# if not success
|
|
74
83
|
if r.status_code != 200:
|
|
75
84
|
raise ValueError(
|
|
76
85
|
f"Cannot find {filename} within default files located at github.com/mikekatz04/LISAanalysistools/lisatools/orbit_files/."
|
|
77
86
|
)
|
|
78
87
|
|
|
88
|
+
# write the contents to a local file
|
|
79
89
|
with open(path_to_this_file + filename, "wb") as f:
|
|
80
90
|
f.write(r.content)
|
|
81
91
|
|
|
92
|
+
# store
|
|
82
93
|
self._filename = path_to_this_file + filename
|
|
83
94
|
|
|
84
95
|
def open(self) -> h5py.File:
|
|
@@ -96,7 +107,7 @@ class Orbits(ABC):
|
|
|
96
107
|
|
|
97
108
|
@property
|
|
98
109
|
def t_base(self) -> np.ndarray:
|
|
99
|
-
"""
|
|
110
|
+
"""Time array from file."""
|
|
100
111
|
with self.open() as f:
|
|
101
112
|
t_base = np.arange(self.size_base) * self.dt_base
|
|
102
113
|
return t_base
|
|
@@ -117,14 +128,14 @@ class Orbits(ABC):
|
|
|
117
128
|
|
|
118
129
|
@property
|
|
119
130
|
def x_base(self) -> np.ndarray:
|
|
120
|
-
"""
|
|
131
|
+
"""Spacecraft position from file."""
|
|
121
132
|
with self.open() as f:
|
|
122
133
|
x = f["tcb"]["x"][:]
|
|
123
134
|
return x
|
|
124
135
|
|
|
125
136
|
@property
|
|
126
137
|
def v_base(self) -> np.ndarray:
|
|
127
|
-
"""
|
|
138
|
+
"""Spacecraft velocities from file."""
|
|
128
139
|
with self.open() as f:
|
|
129
140
|
v = f["tcb"]["v"][:]
|
|
130
141
|
return v
|
|
@@ -154,35 +165,35 @@ class Orbits(ABC):
|
|
|
154
165
|
|
|
155
166
|
@property
|
|
156
167
|
def n(self) -> np.ndarray:
|
|
157
|
-
"""
|
|
168
|
+
"""Normal vectors along links."""
|
|
158
169
|
self._check_configured()
|
|
159
170
|
return self._n
|
|
160
171
|
|
|
161
172
|
@n.setter
|
|
162
173
|
def n(self, n: np.ndarray) -> np.ndarray:
|
|
163
|
-
"""Set
|
|
174
|
+
"""Set Normal vectors along links."""
|
|
164
175
|
return self._n
|
|
165
176
|
|
|
166
177
|
@property
|
|
167
178
|
def x(self) -> np.ndarray:
|
|
168
|
-
"""
|
|
179
|
+
"""Spacecraft positions."""
|
|
169
180
|
self._check_configured()
|
|
170
181
|
return self._x
|
|
171
182
|
|
|
172
183
|
@x.setter
|
|
173
184
|
def x(self, x: np.ndarray) -> np.ndarray:
|
|
174
|
-
"""Set
|
|
185
|
+
"""Set Spacecraft positions."""
|
|
175
186
|
return self._x
|
|
176
187
|
|
|
177
188
|
@property
|
|
178
189
|
def v(self) -> np.ndarray:
|
|
179
|
-
"""
|
|
190
|
+
"""Spacecraft velocities."""
|
|
180
191
|
self._check_configured()
|
|
181
192
|
return self._v
|
|
182
193
|
|
|
183
194
|
@v.setter
|
|
184
195
|
def v(self, v: np.ndarray) -> np.ndarray:
|
|
185
|
-
"""Set
|
|
196
|
+
"""Set Spacecraft velocities."""
|
|
186
197
|
return self._v
|
|
187
198
|
|
|
188
199
|
def configure(
|
|
@@ -290,6 +301,7 @@ class Orbits(ABC):
|
|
|
290
301
|
|
|
291
302
|
@property
|
|
292
303
|
def pycppdetector_args(self) -> tuple:
|
|
304
|
+
"""args for the c++ class."""
|
|
293
305
|
return self._pycppdetector_args
|
|
294
306
|
|
|
295
307
|
@pycppdetector_args.setter
|
|
@@ -311,30 +323,81 @@ class Orbits(ABC):
|
|
|
311
323
|
def get_light_travel_times(
|
|
312
324
|
self, t: float | np.ndarray, link: int
|
|
313
325
|
) -> float | np.ndarray:
|
|
326
|
+
"""Compute light travel time as a function of time.
|
|
327
|
+
|
|
328
|
+
Computes with the c++ backend.
|
|
329
|
+
|
|
330
|
+
Args:
|
|
331
|
+
t: Time array in seconds.
|
|
332
|
+
link: which link. Must be ``in self.LINKS``.
|
|
333
|
+
|
|
334
|
+
Returns:
|
|
335
|
+
Light travel times.
|
|
336
|
+
|
|
337
|
+
"""
|
|
314
338
|
return self.pycppdetector.get_light_travel_time(t, link)
|
|
315
339
|
|
|
316
340
|
def get_normal_unit_vec(self, t: float | np.ndarray, link: int) -> np.ndarray:
|
|
341
|
+
"""Compute link normal vector as a function of time.
|
|
342
|
+
|
|
343
|
+
Computes with the c++ backend.
|
|
344
|
+
|
|
345
|
+
Args:
|
|
346
|
+
t: Time array in seconds.
|
|
347
|
+
link: which link. Must be ``in self.LINKS``.
|
|
348
|
+
|
|
349
|
+
Returns:
|
|
350
|
+
Link normal vectors.
|
|
351
|
+
|
|
352
|
+
"""
|
|
317
353
|
return self.pycppdetector.get_normal_unit_vec(t, link)
|
|
318
354
|
|
|
319
355
|
def get_pos(self, t: float | np.ndarray, sc: int) -> np.ndarray:
|
|
356
|
+
"""Compute spacecraft position as a function of time.
|
|
357
|
+
|
|
358
|
+
Computes with the c++ backend.
|
|
359
|
+
|
|
360
|
+
Args:
|
|
361
|
+
t: Time array in seconds.
|
|
362
|
+
sc: which spacecraft. Must be ``in self.SC``.
|
|
363
|
+
|
|
364
|
+
Returns:
|
|
365
|
+
Spacecraft positions.
|
|
366
|
+
|
|
367
|
+
"""
|
|
320
368
|
return self.pycppdetector.get_pos(t, sc)
|
|
321
369
|
|
|
322
370
|
@property
|
|
323
371
|
def ptr(self) -> int:
|
|
324
|
-
"""pointer to c
|
|
372
|
+
"""pointer to c++ class"""
|
|
325
373
|
return self.pycppdetector.ptr
|
|
326
374
|
|
|
327
375
|
|
|
328
376
|
class EqualArmlengthOrbits(Orbits):
|
|
329
|
-
"""Equal Armlength Orbits
|
|
377
|
+
"""Equal Armlength Orbits
|
|
378
|
+
|
|
379
|
+
Orbit file: equalarmlength-orbits.h5
|
|
380
|
+
|
|
381
|
+
"""
|
|
330
382
|
|
|
331
383
|
def __init__(self):
|
|
332
|
-
# TODO: fix this up
|
|
333
384
|
super().__init__("equalarmlength-orbits.h5")
|
|
334
385
|
|
|
335
386
|
|
|
387
|
+
class ESAOrbits(Orbits):
|
|
388
|
+
"""ESA Orbits
|
|
389
|
+
|
|
390
|
+
Orbit file: esa-trailing-orbits.h5
|
|
391
|
+
|
|
392
|
+
"""
|
|
393
|
+
|
|
394
|
+
def __init__(self):
|
|
395
|
+
# TODO: fix this up
|
|
396
|
+
super().__init__("esa-trailing-orbits.h5")
|
|
397
|
+
|
|
398
|
+
|
|
336
399
|
class DefaultOrbits(EqualArmlengthOrbits):
|
|
337
|
-
"""Set default orbit class to Equal
|
|
400
|
+
"""Set default orbit class to Equal Armlength orbits for now."""
|
|
338
401
|
|
|
339
402
|
pass
|
|
340
403
|
|
|
@@ -343,11 +406,10 @@ class DefaultOrbits(EqualArmlengthOrbits):
|
|
|
343
406
|
class LISAModelSettings:
|
|
344
407
|
"""Required LISA model settings:
|
|
345
408
|
|
|
346
|
-
TODO: rename these
|
|
347
|
-
|
|
348
409
|
Args:
|
|
349
410
|
Soms_d: OMS displacement noise.
|
|
350
411
|
Sa_a: Acceleration noise.
|
|
412
|
+
orbits: Orbital information.
|
|
351
413
|
name: Name of model.
|
|
352
414
|
|
|
353
415
|
"""
|
|
@@ -359,7 +421,16 @@ class LISAModelSettings:
|
|
|
359
421
|
|
|
360
422
|
|
|
361
423
|
class LISAModel(LISAModelSettings, ABC):
|
|
362
|
-
"""Model for the LISA Constellation
|
|
424
|
+
"""Model for the LISA Constellation
|
|
425
|
+
|
|
426
|
+
This includes sensitivity information computed in
|
|
427
|
+
:module:`lisatools.sensitivity` and orbital information
|
|
428
|
+
contained in an :class:`Orbits` class object.
|
|
429
|
+
|
|
430
|
+
This class is used to house high-level methods useful
|
|
431
|
+
to various needed computations.
|
|
432
|
+
|
|
433
|
+
"""
|
|
363
434
|
|
|
364
435
|
def __str__(self) -> str:
|
|
365
436
|
out = "LISA Constellation Configurations Settings:\n"
|
|
@@ -368,6 +439,7 @@ class LISAModel(LISAModelSettings, ABC):
|
|
|
368
439
|
return out
|
|
369
440
|
|
|
370
441
|
|
|
442
|
+
# defaults
|
|
371
443
|
scirdv1 = LISAModel((15.0e-12) ** 2, (3.0e-15) ** 2, DefaultOrbits(), "scirdv1")
|
|
372
444
|
proposal = LISAModel((10.0e-12) ** 2, (3.0e-15) ** 2, DefaultOrbits(), "proposal")
|
|
373
445
|
mrdv1 = LISAModel((10.0e-12) ** 2, (2.4e-15) ** 2, DefaultOrbits(), "mrdv1")
|
|
@@ -2,7 +2,6 @@ import warnings
|
|
|
2
2
|
from types import ModuleType, NoneType
|
|
3
3
|
from typing import Optional, Any, Tuple, List
|
|
4
4
|
|
|
5
|
-
from numpy.typing import ArrayLike
|
|
6
5
|
import matplotlib.pyplot as plt
|
|
7
6
|
|
|
8
7
|
from eryn.utils import TransformContainer
|
|
@@ -387,7 +386,7 @@ def snr(
|
|
|
387
386
|
def h_var_p_eps(
|
|
388
387
|
step: float,
|
|
389
388
|
waveform_model: callable,
|
|
390
|
-
params:
|
|
389
|
+
params: np.ndarray | list,
|
|
391
390
|
index: int,
|
|
392
391
|
parameter_transforms: Optional[TransformContainer] = None,
|
|
393
392
|
waveform_args: Optional[tuple] = (),
|
|
@@ -499,8 +498,8 @@ def dh_dlambda(
|
|
|
499
498
|
def info_matrix(
|
|
500
499
|
eps: float | np.ndarray,
|
|
501
500
|
waveform_model: callable,
|
|
502
|
-
params:
|
|
503
|
-
deriv_inds: Optional[
|
|
501
|
+
params: np.ndarray | list,
|
|
502
|
+
deriv_inds: Optional[np.ndarray | list] = None,
|
|
504
503
|
inner_product_kwargs: Optional[dict] = {},
|
|
505
504
|
return_derivs: Optional[bool] = False,
|
|
506
505
|
**kwargs: dict,
|
|
@@ -793,7 +792,7 @@ def cutler_vallisneri_bias(
|
|
|
793
792
|
eps: float | np.ndarray,
|
|
794
793
|
input_diagnostics: Optional[dict] = None,
|
|
795
794
|
info_mat: Optional[np.ndarray] = None,
|
|
796
|
-
deriv_inds: Optional[
|
|
795
|
+
deriv_inds: Optional[np.ndarray | list] = None,
|
|
797
796
|
return_derivs: Optional[bool] = False,
|
|
798
797
|
return_cov: Optional[bool] = False,
|
|
799
798
|
parameter_transforms: Optional[TransformContainer] = None,
|