ethraid 2.4.3__tar.gz → 2.5.0__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.
- ethraid-2.5.0/LICENSE +21 -0
- ethraid-2.5.0/PKG-INFO +10 -0
- ethraid-2.5.0/README.md +120 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/__init__.py +1 -1
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/_kepler.cpython-37m-darwin.so +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/ethraid/helper_functions_astro.c +462 -468
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/ethraid/helper_functions_general.c +954 -917
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/ethraid/helper_functions_imaging.c +801 -698
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/ethraid/helper_functions_rv.c +217 -244
- ethraid-2.5.0/ethraid/compiled/helper_functions_astro.cpython-37m-darwin.so +0 -0
- ethraid-2.5.0/ethraid/compiled/helper_functions_general.cpython-37m-darwin.so +0 -0
- ethraid-2.5.0/ethraid/compiled/helper_functions_imaging.cpython-37m-darwin.so +0 -0
- ethraid-2.5.0/ethraid/compiled/helper_functions_rv.cpython-37m-darwin.so +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/data/.DS_Store +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/driver.py +7 -6
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/helper_functions_astro.pyx +10 -9
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/helper_functions_general.pyx +20 -86
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/helper_functions_imaging.pyx +14 -13
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/helper_functions_rv.pyx +12 -11
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/plotter.py +17 -22
- ethraid-2.5.0/ethraid.egg-info/PKG-INFO +10 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid.egg-info/SOURCES.txt +2 -3
- {ethraid-2.4.3 → ethraid-2.5.0}/setup.py +2 -1
- ethraid-2.4.3/PKG-INFO +0 -45
- ethraid-2.4.3/README.md +0 -37
- ethraid-2.4.3/ethraid/compiled/helper_functions_astro.cpython-37m-darwin.so +0 -0
- ethraid-2.4.3/ethraid/compiled/helper_functions_general.cpython-37m-darwin.so +0 -0
- ethraid-2.4.3/ethraid/compiled/helper_functions_imaging.cpython-37m-darwin.so +0 -0
- ethraid-2.4.3/ethraid/compiled/helper_functions_rv.cpython-37m-darwin.so +0 -0
- ethraid-2.4.3/ethraid/example_config_files/.DS_Store +0 -0
- ethraid-2.4.3/ethraid/example_config_files/config_191939.py +0 -87
- ethraid-2.4.3/ethraid.egg-info/PKG-INFO +0 -45
- {ethraid-2.4.3 → ethraid-2.5.0}/MANIFEST.in +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/c_kepler/__init__.py +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/c_kepler/_kepler.c +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/c_kepler/_kepler.pyx +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/c_kepler/kepler.c +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/c_kepler/radvel_requirements.txt +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/c_kepler/radvel_setup.py +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/cli.py +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/ethraid/c_kepler/_kepler.c +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/compiled/ethraid/c_kepler/kepler.c +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/data/TOI1694_832.csv +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/data/bands.csv +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/data/baraffe_table_4.csv +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/data/mamajek.csv +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/data/test_K_band.csv +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/helper_functions_plotting.py +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/kern_profiler_dummy.py +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid/load_save.py +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid.egg-info/dependency_links.txt +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid.egg-info/entry_points.txt +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid.egg-info/requires.txt +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/ethraid.egg-info/top_level.txt +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/requirements.txt +0 -0
- {ethraid-2.4.3 → ethraid-2.5.0}/setup.cfg +0 -0
ethraid-2.5.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Judah Van Zandt, Erik Petigura
|
|
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.
|
ethraid-2.5.0/PKG-INFO
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ethraid
|
|
3
|
+
Version: 2.5.0
|
|
4
|
+
Summary: Characterize long-period companions using RV trends, astrometric accelerations, and direct imaging
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Judah Van Zandt
|
|
7
|
+
Author-email: judahvz@astro.ucla.edu
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
|
|
10
|
+
Characterize long-period companions using RV trends, astrometric accelerations, and direct imaging
|
ethraid-2.5.0/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Ethraid
|
|
2
|
+
|
|
3
|
+
Characterize long-period companions with partial orbits.
|
|
4
|
+
|
|
5
|
+
Please cite Van Zandt \& Petigura (2024, Accepted) and the following DOI if you make use of this software in your research.
|
|
6
|
+
[](https://zenodo.org/doi/10.5281/zenodo.10841606)
|
|
7
|
+
|
|
8
|
+
## Environment
|
|
9
|
+
### Create new environment with python 3.7
|
|
10
|
+
- *\$ conda create --name ethraid_env python=3.7*
|
|
11
|
+
- *\$ conda activate ethraid_env*
|
|
12
|
+
|
|
13
|
+
## Download using pip
|
|
14
|
+
- *\$ pip install ethraid*
|
|
15
|
+
- If the installation fails, try upgrading pip: *\$ curl https://bootstrap.pypa.io/get-pip.py | python*
|
|
16
|
+
|
|
17
|
+
## Download repo from Github
|
|
18
|
+
### Install dependencies using requirements.txt
|
|
19
|
+
- *\$ pip install -r requirements.txt*
|
|
20
|
+
|
|
21
|
+
### Build code from top level of repo
|
|
22
|
+
- *\$ cd trends/*
|
|
23
|
+
- *\$ python setup.py build_ext --inplace*
|
|
24
|
+
|
|
25
|
+
### Run 3 simple test configuration files to ensure all API and CLI functions are working correctly
|
|
26
|
+
- *\$ python test.py*
|
|
27
|
+
- This should only take a few minutes. Desired outcome:
|
|
28
|
+
```
|
|
29
|
+
Test complete:
|
|
30
|
+
0 errors encountered running API array calculation
|
|
31
|
+
0 errors encountered running API array loading
|
|
32
|
+
0 errors encountered running CLI array calculation
|
|
33
|
+
0 errors encountered running CLI array loading
|
|
34
|
+
0 errors encountered running CLI 'all' function
|
|
35
|
+
```
|
|
36
|
+
- These are only meant to test basic functionality. The output plots and bounds will be meaningless because of the small number of models sampled.
|
|
37
|
+
|
|
38
|
+
## Create a configuration file from the template provided and provide the required parameters and desired data
|
|
39
|
+
- *\$ cp template_config.py my_config.py*
|
|
40
|
+
- NOTE: ethraid uses AU for all distances and M_Jup for all masses. Access helpful conversion factors using e.g.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
from ethraid import Ms2Mj, pc_in_au
|
|
44
|
+
```
|
|
45
|
+
which respectively convert solar masses to Jupiter masses and parsecs to AU in your config file.
|
|
46
|
+
|
|
47
|
+
## Example usage
|
|
48
|
+
### CLI: Run orbit fits, plot results, and print 95\% confidence intervals all at once from the command line. Ethraid's installation includes a configuration file, ```example/config_191939.py```, which may be used to validate its functionality on the system HD 191939.
|
|
49
|
+
- *\$ ethraid all -cf path/to/ethraid/example/config_191939.py* -rfp results/191939/191939_processed.h5 -t 1d 2d
|
|
50
|
+
- Note that the *-rfp* (read file path) flag requires the path to the output directory where the fit results are stored. On a first run, this path *does not exist yet,* but it will be created after the fit and before plotting.
|
|
51
|
+
|
|
52
|
+
### Alternative: run each command separately
|
|
53
|
+
|
|
54
|
+
#### Run orbit fits using parameters in configuration file
|
|
55
|
+
- *\$ ethraid run -cf path/to/ethraid/example/config_191939.py*
|
|
56
|
+
#### Load and plot saved results
|
|
57
|
+
- *\$ ethraid plot -cf path/to/ethraid/example/config_191939.py -rfp results/191939/191939_processed.h5 -t 1d 2d*
|
|
58
|
+
#### Print 95\% mass and semi-major axis confidence intervals based on derived posterior
|
|
59
|
+
- *\$ ethraid lims -cf path/to/ethraid/example/config_191939.py -rfp results/191939/191939_processed.h5*
|
|
60
|
+
|
|
61
|
+
### Another alternative: use the api_run.py module to interface easily with the API
|
|
62
|
+
|
|
63
|
+
- Add the following code to the end of the module to run a fit, plot the results, and print a summary to the command line.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
if __name__ == "__main__":
|
|
67
|
+
|
|
68
|
+
config_path = 'path/to/ethraid/example/config_191939.py'
|
|
69
|
+
read_file_path = 'results/191939/191939_processed.h5'
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
plot=True
|
|
73
|
+
verbose = True
|
|
74
|
+
|
|
75
|
+
run(config_path, read_file_path,
|
|
76
|
+
plot=plot, verbose=verbose)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Results
|
|
80
|
+
#### Running ethraid from scratch will generate a directory called *results/\{star_name\}/* containing the raw (large, reshapeable) posterior arrays and/or their processed (small, non-reshapeable) counterparts. After plotting, the directory will contain up to three plots: a joint 2D posterior in mass-separation space, as well as the marginalized 1D PDFs and CDFs. Samples of these plots are below.
|
|
81
|
+
|
|
82
|
+
- 2D joint posterior
|
|
83
|
+
<img src="ethraid/example/191939/191939_2d.png" width="450" height="450">
|
|
84
|
+
|
|
85
|
+
- 1D PDFs
|
|
86
|
+
<img src="ethraid/example/191939/191939_pdf_1d.png" width="600" height="400">
|
|
87
|
+
|
|
88
|
+
- 1D CDFs
|
|
89
|
+
<img src="ethraid/example/191939/191939_cdf_1d.png" width="550" height="350">
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
### Why are my posteriors splotchy?
|
|
95
|
+
- Try increasing the *num_points* argument. This will increase the number of sampled orbit models with a corresponding rise in run time.
|
|
96
|
+
- Try decreasing the *grid_num* argument. This will lower the resolution of the grid and help smooth over stochastic variation with no increase in run time.
|
|
97
|
+
|
|
98
|
+
### Why does my RV/astrometry posterior extend down to the low-mass/high-separation regime (the bottom-right corner)? It's not helping to rule out any models!
|
|
99
|
+
- Check your input data values. They may be consistent with 0, meaning that companions producing negligible signals are good fits to the data.
|
|
100
|
+
|
|
101
|
+
### Why does the astrometry posterior have large overlap with the RVs? It's not helping to rule out any models!
|
|
102
|
+
- Check the range of orbital separations you're probing. Beyond ~25 years (~8.5 AU for a Sun-like star), the RV and astrometry posteriors have the same m-a relation, and thus have the same information content.
|
|
103
|
+
|
|
104
|
+
### How do I check the Δμ value of my desired target in the *Hipparcos-Gaia* Catalog of Accelerations?
|
|
105
|
+
|
|
106
|
+
- Use the built-in API function:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
from ethraid.compiled import helper_functions_astro as help_astro
|
|
110
|
+
|
|
111
|
+
help_astro.HGCA_retrieval(hip_id="99175")
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Output:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
(0.12684636376342961, 0.03385628059095324)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This target has Δμ = 0.127 +/- 0.034 mas/yr, a 3.7 σ measurement.
|
|
Binary file
|