fastlisaresponse 1.0.5__cp312-cp312-macosx_10_9_x86_64.whl → 1.0.7__cp312-cp312-macosx_10_9_x86_64.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.

Potentially problematic release.


This version of fastlisaresponse might be problematic. Click here for more details.

@@ -1 +1 @@
1
- __version__ = '1.0.4'
1
+ __version__ = "1.0.7"
@@ -8,18 +8,18 @@ from copy import deepcopy
8
8
 
9
9
  try:
10
10
  import cupy as cp
11
- from pyresponse import get_response_wrap as get_response_wrap_gpu
12
- from pyresponse import get_tdi_delays_wrap as get_tdi_delays_wrap_gpu
11
+ from .pyresponse_gpu import get_response_wrap as get_response_wrap_gpu
12
+ from .pyresponse_gpu import get_tdi_delays_wrap as get_tdi_delays_wrap_gpu
13
13
 
14
14
  gpu = True
15
15
 
16
16
  except (ImportError, ModuleNotFoundError) as e:
17
- import numpy as xp
17
+ pass
18
18
 
19
19
  gpu = False
20
20
 
21
- from pyresponse_cpu import get_response_wrap as get_response_wrap_cpu
22
- from pyresponse_cpu import get_tdi_delays_wrap as get_tdi_delays_wrap_cpu
21
+ from .pyresponse_cpu import get_response_wrap as get_response_wrap_cpu
22
+ from .pyresponse_cpu import get_tdi_delays_wrap as get_tdi_delays_wrap_cpu
23
23
  import time
24
24
  import h5py
25
25
 
@@ -113,7 +113,6 @@ class pyResponseTDI(object):
113
113
  num_channels (int): 3.
114
114
  num_pts (int): Number of points to produce for the final output template.
115
115
  order (int): Order of Lagrangian interpolation technique.
116
- response_gen (func): Projection generator function.
117
116
  sampling_frequency (double): The sampling rate in Hz.
118
117
  tdi (str or list): TDI setup.
119
118
  tdi_buffer (int): The buffer necessary for all information needed at early times
@@ -153,13 +152,6 @@ class pyResponseTDI(object):
153
152
 
154
153
  # setup functions for GPU or CPU
155
154
  self.use_gpu = use_gpu
156
- if use_gpu:
157
- self.response_gen = get_response_wrap_gpu
158
- self.tdi_gen = get_tdi_delays_wrap_gpu
159
-
160
- else:
161
- self.response_gen = get_response_wrap_cpu
162
- self.tdi_gen = get_tdi_delays_wrap_cpu
163
155
 
164
156
  # prepare the interpolation of A and E in the Lagrangian interpolation
165
157
  self._fill_A_E()
@@ -183,6 +175,16 @@ class pyResponseTDI(object):
183
175
  # setup TDI info
184
176
  self._init_TDI_delays()
185
177
 
178
+ @property
179
+ def response_gen(self) -> callable:
180
+ """CPU/GPU function for generating the projections."""
181
+ return get_response_wrap_cpu if not self.use_gpu else get_response_wrap_gpu
182
+
183
+ @property
184
+ def tdi_gen(self) -> callable:
185
+ """CPU/GPU function for generating tdi."""
186
+ return get_tdi_delays_wrap_cpu if not self.use_gpu else get_tdi_delays_wrap_gpu
187
+
186
188
  @property
187
189
  def xp(self) -> object:
188
190
  return np if not self.use_gpu else cp
@@ -219,6 +221,7 @@ class pyResponseTDI(object):
219
221
  orbits = EqualArmlengthOrbits()
220
222
 
221
223
  assert isinstance(orbits, Orbits)
224
+ assert orbits.use_gpu == self.use_gpu
222
225
 
223
226
  self._tdi_orbits = deepcopy(orbits)
224
227
 
@@ -644,6 +647,9 @@ class ResponseWrapper:
644
647
  the number of points, ``n``, from ``int(T/dt)`` to the ``n_overide``. This is used
645
648
  if there is an issue matching points between the waveform generator and the response
646
649
  model.
650
+ orbits (:class:`Orbits`, optional): Orbits class from LISA Analysis Tools. Works with LISA Orbits
651
+ outputs: `lisa-simulation.pages.in2p3.fr/orbits/ <https://lisa-simulation.pages.in2p3.fr/orbits/latest/>`_.
652
+ (default: :class:`EqualArmlengthOrbits`)
647
653
  **kwargs (dict, optional): Keyword arguments passed to :class:`pyResponseTDI`.
648
654
 
649
655
  """
@@ -71,9 +71,10 @@ def get_overlap(sig1, sig2, phase_maximize=False, use_gpu=False):
71
71
  np.dot(np.fft.rfft(sig1_i).conj(), np.fft.rfft(sig1_i))
72
72
  * np.dot(np.fft.rfft(sig2_i).conj(), np.fft.rfft(sig2_i))
73
73
  )
74
-
75
74
  overlap += overlap_i
76
75
 
76
+ overlap /= len(sig1)
77
+
77
78
  if phase_maximize:
78
79
  return np.abs(overlap)
79
80
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastlisaresponse
3
- Version: 1.0.5
3
+ Version: 1.0.7
4
4
  Home-page: https://github.com/mikekatz04/lisa-on-gpu
5
5
  Author: Michael Katz
6
6
  Author-email: mikekatz04@gmail.com
@@ -18,41 +18,18 @@ Description-Content-Type: text/markdown
18
18
 
19
19
  This code base provides a GPU-accelerated version of the generic time-domain LISA response function. The GPU-acceleration allows this code to be used directly in Parameter Estimation.
20
20
 
21
- Please see the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) for further information on these modules. The code can be found on Github [here](https://github.com/mikekatz04/lisa-on-gpu). It can be found on # TODO fix [Zenodo](https://zenodo.org/record/3981654#.XzS_KRNKjlw).
21
+ Please see the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) for further information on these modules. The code can be found on Github [here](https://github.com/mikekatz04/lisa-on-gpu). It can be found on [Zenodo](https://zenodo.org/record/3981654#.XzS_KRNKjlw).
22
22
 
23
23
  If you use all or any parts of this code, please cite [arXiv:2204.06633](https://arxiv.org/abs/2204.06633). See the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) to properly cite specific modules.
24
24
 
25
- **Warning**: newest version (1.0.5) of code with `lisatools` orbits needs detailed testing before deployed for a paper.
26
25
 
27
26
  ## Getting Started
28
27
 
29
- Below is a quick set of instructions to get you started with `fastlisaresponse`.
30
-
31
- 0) [Install Anaconda](https://docs.anaconda.com/anaconda/install/) if you do not have it.
32
-
33
- 1) Create a virtual environment. **Note**: There is no available `conda` compiler for Windows. If you want to install for Windows, you will probably need to add libraries and include paths to the `setup.py` file.
34
-
35
- ```
36
- conda create -n lisa_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.9
37
- conda activate lisa_env
38
- ```
39
-
40
- If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
41
-
42
- 2) Clone the repository.
43
-
44
- ```
45
- git clone https://github.com/mikekatz04/lisa-on-gpu.git
46
- cd lisa-on-gpu
28
+ Install with pip (CPU only for now):
47
29
  ```
48
-
49
- 3) Run install.
50
-
30
+ pip install fastlisaresponse
51
31
  ```
52
- python setup.py install
53
- ```
54
-
55
- 4) To import fastlisaresponse:
32
+ To import fastlisaresponse:
56
33
 
57
34
  ```
58
35
  from fastlisaresponse import ResponseWrapper
@@ -63,6 +40,8 @@ See [examples notebook](https://github.com/mikekatz04/lisa-on-gpu/blob/master/ex
63
40
 
64
41
  ### Prerequisites
65
42
 
43
+ Now (version 1.0.7) `fastlisaresponse` requires the newest version of [LISA Analysis Tools](github.com/mikekatz04/LISAanalysistools). You can run `pip install lisaanalysistools`.
44
+
66
45
  To install this software for CPU usage, you need Python >3.4 and NumPy. To run the examples, you will also need jupyter and matplotlib. We generally recommend installing everything, including gcc and g++ compilers, in the conda environment as is shown in the examples here. This generally helps avoid compilation and linking issues. If you use your own chosen compiler, you will need to make sure all necessary information is passed to the setup command (see below). You also may need to add information to the `setup.py` file.
67
46
 
68
47
  To install this software for use with NVIDIA GPUs (compute capability >2.0), you need the [CUDA toolkit](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) and [CuPy](https://cupy.chainer.org/). The CUDA toolkit must have cuda version >8.0. Be sure to properly install CuPy within the correct CUDA toolkit version. Make sure the nvcc binary is on `$PATH` or set it as the `CUDAHOME` environment variable.
@@ -71,13 +50,20 @@ To install this software for use with NVIDIA GPUs (compute capability >2.0), you
71
50
  ### Installing
72
51
 
73
52
 
53
+ Install with pip (CPU only for now):
54
+ ```
55
+ pip install fastlisaresponse
56
+ ```
57
+
58
+ To install from source:
59
+
74
60
  0) [Install Anaconda](https://docs.anaconda.com/anaconda/install/) if you do not have it.
75
61
 
76
62
  1) Create a virtual environment.
77
63
 
78
64
  ```
79
- conda create -n lisa_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.9
80
- conda activate few_env
65
+ conda create -n lisa_resp_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.12
66
+ conda activate lisa_resp_env
81
67
  ```
82
68
 
83
69
  If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
@@ -87,26 +73,29 @@ conda activate few_env
87
73
  2) Clone the repository.
88
74
 
89
75
  ```
90
- git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git
91
- cd FastEMRIWaveforms
76
+ git clone https://github.com/mikekatz04/lisa-on-gpu.git
77
+ cd lisa-on-gpu
92
78
  ```
93
79
 
94
- 3) If using GPUs, use pip to [install cupy](https://docs-cupy.chainer.org/en/stable/install.html). If you have cuda version 9.2, for example:
80
+ 3) If using GPUs, use pip to [install cupy](https://docs-cupy.chainer.org/en/stable/install.html).
95
81
 
96
82
  ```
97
- pip install cupy-cuda92
83
+ pip install cupy-12x
98
84
  ```
99
85
 
100
86
  4) Run install. Make sure CUDA is on your PATH.
101
87
 
102
88
  ```
103
- python setup.py install
89
+ python scripts/prebuild.py
90
+ pip install .
104
91
  ```
105
92
 
106
93
  ## Running the Tests
107
94
 
108
- Since the code package in minimal in size, the example notebook should be run to verify it is running correctly.
109
-
95
+ Run the example notebook or the tests using `unittest` from the main directory of the code:
96
+ ```
97
+ python -m unittest discover
98
+ ```
110
99
 
111
100
  ## Contributing
112
101
 
@@ -116,7 +105,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
116
105
 
117
106
  We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/mikekatz04/lisa-on-gpu/tags).
118
107
 
119
- Current Version: 1.0.5
108
+ Current Version: 1.0.7
120
109
 
121
110
  ## Authors
122
111
 
@@ -0,0 +1,11 @@
1
+ fastlisaresponse/__init__.py,sha256=wwmiIBy9IuFwoc4jQyJVkJBhjB8B1XZjerTe_E8FkI8,53
2
+ fastlisaresponse/_version.py,sha256=BW7SWRpHoxuOQZ67pS20yog2LWYl-nK7-BEFBNrHGgA,22
3
+ fastlisaresponse/pointer_adjust.py,sha256=TjcSehyffLxwgJnrAmcFlPvxXb3XPElMoHXLBOQN-PI,736
4
+ fastlisaresponse/pyresponse_cpu.cpython-312-darwin.so,sha256=bUwp5cB9a44LFf40o2h94K_Wi7P-y3B6YwZV3tg7-8Y,97208
5
+ fastlisaresponse/response.py,sha256=eMHrMnEFcm_ltJ3836FKsoYzleazS1UBwMsUm6C0qZc,28637
6
+ fastlisaresponse/utils/__init__.py,sha256=pf2NmWKs_uQNzlyA5iNO1gTRDISKNmIIsvOcKqQ3hgw,33
7
+ fastlisaresponse/utils/utility.py,sha256=NrJdBmEnLkLPk6Ile1TZg8jNLw6xERiSp58iGVlz01s,2709
8
+ fastlisaresponse-1.0.7.dist-info/METADATA,sha256=e3gGNVueMESVcRhxs6bACjUYZTszgbtkZa2sy5q0Lz4,4728
9
+ fastlisaresponse-1.0.7.dist-info/WHEEL,sha256=EahQufTUtBnyvrECh1gpiswxGRRuu1fCWmVm0K3Ige4,110
10
+ fastlisaresponse-1.0.7.dist-info/top_level.txt,sha256=J4M7Xx_52RqYZrLf99ryAbQjq8GbVjgZdhxekkYw8lg,17
11
+ fastlisaresponse-1.0.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (72.2.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-macosx_10_9_x86_64
5
5
 
@@ -1,2 +1 @@
1
1
  fastlisaresponse
2
- pyresponse_cpu
@@ -1,12 +0,0 @@
1
- pyresponse_cpu.cpython-312-darwin.so,sha256=90lYlLn-PhIXPVyNirAfcBhTkX2empvF4zHQLHiaKxk,91584
2
- fastlisaresponse/__init__.py,sha256=wwmiIBy9IuFwoc4jQyJVkJBhjB8B1XZjerTe_E8FkI8,53
3
- fastlisaresponse/_version.py,sha256=Oi2b5pm3sFbESQW0xgj8kqwDPX_Hxmx4gNILYpLzYqI,21
4
- fastlisaresponse/pointer_adjust.py,sha256=TjcSehyffLxwgJnrAmcFlPvxXb3XPElMoHXLBOQN-PI,736
5
- fastlisaresponse/response.py,sha256=3t_orbg4XIo5pgQ1YSyXacx3HIzV-Zd_5jbaYgG3qRw,28228
6
- fastlisaresponse/cutils/detector.cpython-312-darwin.so,sha256=Gygx3sd2pD62NQLk86UT3KyNvV2KYw_rkTvMAvpBD9Y,121952
7
- fastlisaresponse/utils/__init__.py,sha256=pf2NmWKs_uQNzlyA5iNO1gTRDISKNmIIsvOcKqQ3hgw,33
8
- fastlisaresponse/utils/utility.py,sha256=uhu827ZNwMHfccD9aLRNG_yIwcfK5a3aaAJ7RSRAun4,2684
9
- fastlisaresponse-1.0.5.dist-info/METADATA,sha256=izJg16MyFrtwkWnVt0EqbPzD_MNnguG1GI8d7ugFFMc,5350
10
- fastlisaresponse-1.0.5.dist-info/WHEEL,sha256=KYtn_mzb_QwZSHwPlosUO3fDl70znfUFngLlrLVHeBY,111
11
- fastlisaresponse-1.0.5.dist-info/top_level.txt,sha256=xbAh3KhbfqEkGUbhVISA5j-Qx62Bwy7szKCZGg5WZWA,32
12
- fastlisaresponse-1.0.5.dist-info/RECORD,,
Binary file