ler 0.2.3__py3-none-any.whl → 0.2.6__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.
ler/source_population.py CHANGED
@@ -907,20 +907,11 @@ class CompactBinaryPopulation(SourceGalaxyPopulationModel):
907
907
  for key, value in self.src_model_params.items():
908
908
  if key in keys_:
909
909
  param[key] = value
910
-
911
- mass_1_source = []
912
- mass_2_source = []
913
- while len(mass_1_source) < size:
914
- # draw from normal distribution
915
- m2 = np.random.normal(muL, sigmaL, size=size)
916
- m1 = np.random.normal(muR, sigmaR, size=size)
917
- # check if m1>m2
918
- idx = m1>m2
919
- mass_1_source+=list(m1[idx])
920
- mass_2_source+=list(m2[idx])
921
-
922
- mass_1_source = np.array(mass_1_source)[:size]
923
- mass_2_source = np.array(mass_2_source)[:size]
910
+
911
+ model = p.mass_prior("BNS", None)
912
+ mass_1_source, mass_2_source = model.sample(Nsample=size)
913
+ while np.any(mass_2_source > mass_1_source):
914
+ mass_1_source, mass_2_source = model.sample(Nsample=size)
924
915
 
925
916
  return (mass_1_source, mass_2_source)
926
917
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Phurailatpam Hemantakumar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ler
3
- Version: 0.2.3
3
+ Version: 0.2.6
4
4
  Summary: Gravitational waves Lensing Rates
5
5
  Home-page: https://github.com/hemantaph/ler
6
6
  Author: Hemantakumar
@@ -8,20 +8,21 @@ Author-email: hemantaphurailatpam@gmail.com
8
8
  License: MIT
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown
11
- Requires-Dist: setuptools >=67.8.0
12
- Requires-Dist: numpy >=1.18
13
- Requires-Dist: numba >=0.57.1
14
- Requires-Dist: bilby >=1.0.2
15
- Requires-Dist: gwsnr >=0.1
16
- Requires-Dist: scipy >=1.9.0
17
- Requires-Dist: lenstronomy >=1.10.4
18
- Requires-Dist: astropy >=5.1
19
- Requires-Dist: tqdm >=4.64.1
20
- Requires-Dist: pointpats >=2.3
21
- Requires-Dist: shapely >=2.0.1
11
+ License-File: LICENSE
12
+ Requires-Dist: setuptools (>=67.8.0)
13
+ Requires-Dist: numpy (>=1.18)
14
+ Requires-Dist: numba (>=0.57.1)
15
+ Requires-Dist: bilby (>=1.0.2)
16
+ Requires-Dist: gwsnr (>=0.1)
17
+ Requires-Dist: scipy (>=1.9.0)
18
+ Requires-Dist: lenstronomy (>=1.10.4)
19
+ Requires-Dist: astropy (>=5.1)
20
+ Requires-Dist: tqdm (>=4.64.1)
21
+ Requires-Dist: pointpats (>=2.3)
22
+ Requires-Dist: shapely (>=2.0.1)
22
23
 
23
24
  # LeR
24
- [![DOI](https://zenodo.org/badge/626733473.svg)](https://zenodo.org/badge/latestdoi/626733473)
25
+ [![DOI](https://zenodo.org/badge/626733473.svg)](https://zenodo.org/badge/latestdoi/626733473) [![PyPI version](https://badge.fury.io/py/ler.svg)](https://badge.fury.io/py/ler) [![DOCS](https://readthedocs.org/projects/ler/badge/?version=latest)](https://ler.readthedocs.io/en/latest/)
25
26
 
26
27
  `LeR` is a statistical-based python package whose core function is to calculate detectable rates of both lensing and unlensed GW events. This calculation is very much dependent on the other functionality of the package, which can be subdivided into three parts; 1. Sampling of compact-binary source properties, 2. Sampling of lens galaxy characteristics and 3. Solving the lens equation to get image properties of the source. The package as a whole relies on `numpy` array operation and linear algebra, `scipy` interpolation and `multiprocessing` functionality of python to increase speed and functionality without compromising on the ease of use. The API of `LeR` is structured such that each functionality mentioned stands in its own right for scientific research but also can be used together as needed. Key features of `LeR` and its dependencies can be summarized as follows,
27
28
 
@@ -0,0 +1,11 @@
1
+ ler/__init__.py,sha256=nUMMeFqWc6NR79ztnqptdyAVviJwuGUuWtXYmSSJ58I,313
2
+ ler/helperroutines.py,sha256=oWl0mnuKxyfVoQ-ovGnJueZPtOfrUyzuj2Fe5KxxBrk,6411
3
+ ler/lens_galaxy_population.py,sha256=bj0RR4EqWF5z6hcAjAKBfmZuz43aI-FxstJGBIC3lWo,44403
4
+ ler/ler.py,sha256=-QYE6jD72F_yjnqQPe-JbqX5jvMrh_-6Eqa8rOsVQ-M,69959
5
+ ler/multiprocessing_routine.py,sha256=xazcM5V0w_ACiqo6DuBqP1DkX4-B-rCuTKSXRexxNxA,16064
6
+ ler/source_population.py,sha256=MjjkJB_CgxLw7Dk4PR9zhZGy43ItwPaN84vnZrnedTU,37786
7
+ ler-0.2.6.dist-info/LICENSE,sha256=9LeXXC3WaHBpiUGhLVgOVnz0F12olPma1RX5zgpfp8Q,1081
8
+ ler-0.2.6.dist-info/METADATA,sha256=iurZDFAtkL9EL2AC9Wl8tYwsVGlfyqDSKR-hlSuoik0,4799
9
+ ler-0.2.6.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
10
+ ler-0.2.6.dist-info/top_level.txt,sha256=VWeWLF_gNMjzquGmqrLXqp2J5WegY86apTUimMTh68I,4
11
+ ler-0.2.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.1)
2
+ Generator: bdist_wheel (0.40.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- ler/__init__.py,sha256=nUMMeFqWc6NR79ztnqptdyAVviJwuGUuWtXYmSSJ58I,313
2
- ler/helperroutines.py,sha256=oWl0mnuKxyfVoQ-ovGnJueZPtOfrUyzuj2Fe5KxxBrk,6411
3
- ler/lens_galaxy_population.py,sha256=bj0RR4EqWF5z6hcAjAKBfmZuz43aI-FxstJGBIC3lWo,44403
4
- ler/ler.py,sha256=-QYE6jD72F_yjnqQPe-JbqX5jvMrh_-6Eqa8rOsVQ-M,69959
5
- ler/multiprocessing_routine.py,sha256=xazcM5V0w_ACiqo6DuBqP1DkX4-B-rCuTKSXRexxNxA,16064
6
- ler/source_population.py,sha256=ACTipyPZAKBEfY61mnqkIXhzACQlK1tqCHH5pa5RMx8,38054
7
- ler-0.2.3.dist-info/METADATA,sha256=bYJUlvaPA3OyXwY-qp4J9lU3-wjYyWUdFbJZo4W7M1g,4564
8
- ler-0.2.3.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
9
- ler-0.2.3.dist-info/top_level.txt,sha256=VWeWLF_gNMjzquGmqrLXqp2J5WegY86apTUimMTh68I,4
10
- ler-0.2.3.dist-info/RECORD,,