arvi 0.1.18__py3-none-any.whl → 0.1.20__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.
Potentially problematic release.
This version of arvi might be problematic. Click here for more details.
- arvi/__init__.py +9 -0
- arvi/ariadne_wrapper.py +3 -0
- arvi/berv.py +1 -2
- arvi/config.py +32 -10
- arvi/dace_wrapper.py +8 -8
- arvi/gaia_wrapper.py +4 -1
- arvi/instrument_specific.py +10 -9
- arvi/kima_wrapper.py +74 -0
- arvi/reports.py +23 -0
- arvi/simbad_wrapper.py +6 -4
- arvi/timeseries.py +414 -121
- arvi/translations.py +14 -6
- arvi/utils.py +17 -3
- {arvi-0.1.18.dist-info → arvi-0.1.20.dist-info}/METADATA +34 -1
- {arvi-0.1.18.dist-info → arvi-0.1.20.dist-info}/RECORD +18 -17
- {arvi-0.1.18.dist-info → arvi-0.1.20.dist-info}/WHEEL +1 -1
- {arvi-0.1.18.dist-info → arvi-0.1.20.dist-info}/LICENSE +0 -0
- {arvi-0.1.18.dist-info → arvi-0.1.20.dist-info}/top_level.txt +0 -0
arvi/translations.py
CHANGED
|
@@ -5,19 +5,27 @@ STARS = {
|
|
|
5
5
|
'Barnard': 'GJ699',
|
|
6
6
|
"Barnard's": 'GJ699',
|
|
7
7
|
'Ross128': 'Ross 128',
|
|
8
|
+
'Ross 128': 'Ross 128',
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
def translate(star):
|
|
12
|
+
def translate(star, ngc=False, ic=False):
|
|
12
13
|
# known translations
|
|
13
14
|
if star in STARS:
|
|
14
15
|
return STARS[star]
|
|
15
16
|
|
|
16
17
|
# regex translations
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
if ngc:
|
|
19
|
+
NGC_match = re.match(r'NGC([\s\d]+)No([\s\d]+)', star)
|
|
20
|
+
if NGC_match:
|
|
21
|
+
cluster = NGC_match.group(1).replace(' ', '')
|
|
22
|
+
target = NGC_match.group(2).replace(' ', '')
|
|
23
|
+
return f'Cl* NGC {cluster} MMU {target}'
|
|
24
|
+
if ic:
|
|
25
|
+
IC_match = re.match(r'IC([\s\d]+)No([\s\d]+)', star)
|
|
26
|
+
if IC_match:
|
|
27
|
+
cluster = IC_match.group(1).replace(' ', '')
|
|
28
|
+
target = IC_match.group(2).replace(' ', '')
|
|
29
|
+
return f'Cl* IC {cluster} MMU {target}'
|
|
22
30
|
|
|
23
31
|
return star
|
arvi/utils.py
CHANGED
|
@@ -22,7 +22,7 @@ except ImportError:
|
|
|
22
22
|
trange = lambda *args, **kwargs: range(*args, **kwargs)
|
|
23
23
|
|
|
24
24
|
from .setup_logger import logger
|
|
25
|
-
from . import config
|
|
25
|
+
from .config import config
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def create_directory(directory):
|
|
@@ -68,13 +68,17 @@ def all_logging_disabled():
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
@contextmanager
|
|
71
|
-
def timer():
|
|
71
|
+
def timer(name=None):
|
|
72
72
|
""" A simple context manager to time a block of code """
|
|
73
73
|
if not config.debug:
|
|
74
74
|
yield
|
|
75
75
|
return
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
if name is None:
|
|
78
|
+
logger.debug('starting timer')
|
|
79
|
+
else:
|
|
80
|
+
logger.debug(f'starting timer: {name}')
|
|
81
|
+
|
|
78
82
|
start = time.time()
|
|
79
83
|
try:
|
|
80
84
|
yield
|
|
@@ -83,6 +87,11 @@ def timer():
|
|
|
83
87
|
logger.debug(f'elapsed time: {end - start:.2f} seconds')
|
|
84
88
|
|
|
85
89
|
|
|
90
|
+
def sanitize_path(path):
|
|
91
|
+
if os.name == 'nt': # on Windows, be careful with ':' in filename
|
|
92
|
+
path = path.replace(':', '_')
|
|
93
|
+
return path
|
|
94
|
+
|
|
86
95
|
def pretty_print_table(rows, line_between_rows=True, logger=None):
|
|
87
96
|
"""
|
|
88
97
|
Example Output
|
|
@@ -140,6 +149,11 @@ def there_is_internet(timeout=1):
|
|
|
140
149
|
pass
|
|
141
150
|
return False
|
|
142
151
|
|
|
152
|
+
def get_data_path():
|
|
153
|
+
here = os.path.dirname(os.path.abspath(__file__))
|
|
154
|
+
data_path = os.path.join(here, 'data')
|
|
155
|
+
return data_path
|
|
156
|
+
|
|
143
157
|
def find_data_file(file):
|
|
144
158
|
here = os.path.dirname(os.path.abspath(__file__))
|
|
145
159
|
data_file = os.path.join(here, '..', 'data', file)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: arvi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.20
|
|
4
4
|
Summary: The Automated RV Inspector
|
|
5
5
|
Author-email: João Faria <joao.faria@unige.ch>
|
|
6
6
|
License: MIT
|
|
@@ -25,8 +25,41 @@ Requires-Dist: mock; python_version < "3.3"
|
|
|
25
25
|
<img width = "140" src="https://github.com/j-faria/arvi/blob/main/docs/logo/logo.png?raw=true"/>
|
|
26
26
|
</p>
|
|
27
27
|
|
|
28
|
+
This package sits alongside [DACE](https://dace.unige.ch/) to help with the
|
|
29
|
+
analysis of radial velocity datasets.
|
|
30
|
+
It has been used within the ESPRESSO GTO program, and may be useful for other
|
|
31
|
+
surveys and instruments.
|
|
28
32
|
|
|
29
33
|
|
|
34
|
+
## Getting started
|
|
35
|
+
|
|
36
|
+
Install `arvi` using pip
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pip install arvi
|
|
40
|
+
|
|
41
|
+
# or
|
|
42
|
+
pip install arvi -U # to update
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Then either directly import a given target
|
|
47
|
+
|
|
48
|
+
```py
|
|
49
|
+
from arvi import HD1234
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
or create an instance of the `RV` class
|
|
53
|
+
|
|
54
|
+
```py
|
|
55
|
+
from arvi import RV
|
|
56
|
+
s = RV('HD1234', instrument='ESPRESSO')
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### Current version
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
30
63
|
#### Actions
|
|
31
64
|
|
|
32
65
|
[](https://github.com/j-faria/arvi/actions/workflows/docs-gh-pages.yml)
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
arvi/HZ.py,sha256=u7rguhlILRBW-LOczlY3dkIB4LM8p8W7Xfg4FnNaYG0,2850
|
|
2
|
-
arvi/__init__.py,sha256=
|
|
3
|
-
arvi/ariadne_wrapper.py,sha256=
|
|
4
|
-
arvi/berv.py,sha256=
|
|
2
|
+
arvi/__init__.py,sha256=r3oaMVwQCjNTd6odg-ga9IRncn54i7tawZrIrvSRQOo,1012
|
|
3
|
+
arvi/ariadne_wrapper.py,sha256=YvilopJa9T4NwPcj3Nah_U8smSeSAU5-HYZMb_GJ-BQ,2232
|
|
4
|
+
arvi/berv.py,sha256=eKnpuPC1w45UrUEyFRbs9F9j3bXz3kxYzNXbnRgvFQM,17596
|
|
5
5
|
arvi/binning.py,sha256=jbemJ-bM3aqoOsqMo_OhWt_co-JAQ0nhdG_GpTsrRsw,15403
|
|
6
|
-
arvi/config.py,sha256=
|
|
7
|
-
arvi/dace_wrapper.py,sha256=
|
|
6
|
+
arvi/config.py,sha256=ftqR38bV-zohTynPguiKSp4kSHPjiqJwEi-u6dFrFwk,1047
|
|
7
|
+
arvi/dace_wrapper.py,sha256=ml0xC_KR-oXwEo6ysODzfpx-eP7VNbxURZSns31WbK4,18196
|
|
8
8
|
arvi/extra_data.py,sha256=WEEaYeLh52Zdv0uyHO72Ys5MWS3naTAP4wJV2BJ1mbk,2551
|
|
9
|
-
arvi/gaia_wrapper.py,sha256=
|
|
9
|
+
arvi/gaia_wrapper.py,sha256=icm3LJjG9pjP47_bM30NFyocUQO3X3SHS5yQ-Dwcr5w,4653
|
|
10
10
|
arvi/headers.py,sha256=uvdJebw1M5YkGjE3vJJwYBOnLikib75uuZE9FXB5JJM,1673
|
|
11
|
-
arvi/instrument_specific.py,sha256
|
|
11
|
+
arvi/instrument_specific.py,sha256=-pbm2Vk3iK_1K7nDa1avlJOKHBcXllwILI4lQn-Ze-A,7761
|
|
12
|
+
arvi/kima_wrapper.py,sha256=y_Z0Hl2ECbs2-B6ZR9retrjId7-QxcRylG7b5aDsiFk,2306
|
|
12
13
|
arvi/lbl_wrapper.py,sha256=_ViGVkpakvuBR_xhu9XJRV5EKHpj5Go6jBZGJZMIS2Y,11850
|
|
13
14
|
arvi/nasaexo_wrapper.py,sha256=mWt7eHgSZe4MBKCmUvMPTyUPGuiwGTqKugNBvmjOg9s,7306
|
|
14
15
|
arvi/plots.py,sha256=WUm-sqN0aZTNXvE1kYpvmHTW9QPWqSCpKhNjwaqxjEk,29628
|
|
15
16
|
arvi/programs.py,sha256=C0Fbldjf-QEZYYJp5wBKP3h7zraD0O2mJC7Su967STg,4607
|
|
16
|
-
arvi/reports.py,sha256=
|
|
17
|
+
arvi/reports.py,sha256=ayPdZ4HZO9iCDdnADQ18gQPJh79o-1UYG7TYkvm9Lrc,4051
|
|
17
18
|
arvi/setup_logger.py,sha256=pBzaRTn0hntozjbaRVx0JIbWGuENkvYUApa6uB-FsRo,279
|
|
18
|
-
arvi/simbad_wrapper.py,sha256=
|
|
19
|
+
arvi/simbad_wrapper.py,sha256=f6QYrMN0KzBH9KhdrUR5w6ZK00EoRIYr3Z9jS4CzP_s,5791
|
|
19
20
|
arvi/spectra.py,sha256=pTAWSW4vk96DWRQ-6l5mNJHUhiAyaPR-QDjZdOT6Ak0,7489
|
|
20
21
|
arvi/stats.py,sha256=ilzzGL9ew-SyVa9eEdrYCpD3DliOAwhoNUg9LIlHjzU,2583
|
|
21
22
|
arvi/stellar.py,sha256=veuL_y9kJvvApU_jqYQqP3EkcRnQffTc8Us6iT5UrFI,3790
|
|
22
|
-
arvi/timeseries.py,sha256=
|
|
23
|
-
arvi/translations.py,sha256=
|
|
24
|
-
arvi/utils.py,sha256=
|
|
23
|
+
arvi/timeseries.py,sha256=OVxzJSopPNmE47HRn7hQO_2SQdEpVU1OvR1VV8C1DM0,71307
|
|
24
|
+
arvi/translations.py,sha256=FBF_2OrpMQBG4GtV4_UOspiaxetiGCY7TQFcwZMMVuQ,838
|
|
25
|
+
arvi/utils.py,sha256=ihQcYvk_ix52CW8fVP16CKTVEamGU5gPNRneVcgDrWc,6534
|
|
25
26
|
arvi/data/info.svg,sha256=0IMI6W-eFoTD8acnury79WJJakpBwLa4qKS4JWpsXiI,489
|
|
26
27
|
arvi/data/obs_affected_ADC_issues.dat,sha256=tn93uOL0eCTYhireqp1wG-_c3CbxPA7C-Rf-pejVY8M,10853
|
|
27
28
|
arvi/data/obs_affected_blue_cryostat_issues.dat,sha256=z4AK17xfz8tGTDv1FjRvQFnio4XA6PNNfDXuicewHk4,1771
|
|
28
29
|
arvi/data/extra/HD86226_PFS1.rdb,sha256=vfAozbrKHM_j8dYkCBJsuHyD01KEM1asghe2KInwVao,3475
|
|
29
30
|
arvi/data/extra/HD86226_PFS2.rdb,sha256=F2P7dB6gVyzCglUjNheB0hIHVClC5RmARrGwbrY1cfo,4114
|
|
30
31
|
arvi/data/extra/metadata.json,sha256=C69hIw6CohyES6BI9vDWjxwSz7N4VOYX0PCgjXtYFmU,178
|
|
31
|
-
arvi-0.1.
|
|
32
|
-
arvi-0.1.
|
|
33
|
-
arvi-0.1.
|
|
34
|
-
arvi-0.1.
|
|
35
|
-
arvi-0.1.
|
|
32
|
+
arvi-0.1.20.dist-info/LICENSE,sha256=6JfQgl7SpM55t0EHMFNMnNh-AdkpGW25MwMiTnhdWQg,1068
|
|
33
|
+
arvi-0.1.20.dist-info/METADATA,sha256=wScAhfEK59QQD1OdPPhv-NHAdYjQznKOPebHA5XVmRQ,1852
|
|
34
|
+
arvi-0.1.20.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
35
|
+
arvi-0.1.20.dist-info/top_level.txt,sha256=4EeiKDVLD45ztuflTGfQ3TU8GVjJg5Y95xS5XjI-utU,5
|
|
36
|
+
arvi-0.1.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|