arvi 0.2.7__py3-none-any.whl → 0.2.8__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.
- arvi/dace_wrapper.py +7 -3
- arvi/instrument_specific.py +19 -18
- arvi/kima_wrapper.py +42 -7
- arvi/programs.py +8 -4
- arvi/simbad_wrapper.py +20 -0
- arvi/timeseries.py +57 -14
- {arvi-0.2.7.dist-info → arvi-0.2.8.dist-info}/METADATA +1 -1
- {arvi-0.2.7.dist-info → arvi-0.2.8.dist-info}/RECORD +11 -11
- {arvi-0.2.7.dist-info → arvi-0.2.8.dist-info}/WHEEL +0 -0
- {arvi-0.2.7.dist-info → arvi-0.2.8.dist-info}/licenses/LICENSE +0 -0
- {arvi-0.2.7.dist-info → arvi-0.2.8.dist-info}/top_level.txt +0 -0
arvi/dace_wrapper.py
CHANGED
|
@@ -95,7 +95,7 @@ def get_arrays(result, latest_pipeline=True, ESPRESSO_mode='HR11', NIRPS_mode='H
|
|
|
95
95
|
npipe = len(pipelines)
|
|
96
96
|
if 'NIRPS' in inst and any(['LBL' in p for p in pipelines]):
|
|
97
97
|
# TODO: correctly load both CCF and LBL
|
|
98
|
-
pipelines = [pipelines[
|
|
98
|
+
pipelines = [pipelines[0]]
|
|
99
99
|
if 'HARPS' in inst and npipe > 1 and pipelines[1] == pipelines[0] + '-EGGS':
|
|
100
100
|
pipelines = pipelines[:2]
|
|
101
101
|
else:
|
|
@@ -544,6 +544,7 @@ def do_download_filetype(type, raw_files, output_directory, clobber=False, user=
|
|
|
544
544
|
""" Download CCFs / S1Ds / S2Ds from DACE """
|
|
545
545
|
logger = setup_logger()
|
|
546
546
|
raw_files = np.atleast_1d(raw_files)
|
|
547
|
+
raw_files_original = raw_files.copy()
|
|
547
548
|
|
|
548
549
|
create_directory(output_directory)
|
|
549
550
|
|
|
@@ -557,7 +558,7 @@ def do_download_filetype(type, raw_files, output_directory, clobber=False, user=
|
|
|
557
558
|
if n == 0:
|
|
558
559
|
if verbose:
|
|
559
560
|
logger.info('no files to download')
|
|
560
|
-
return
|
|
561
|
+
return list(map(os.path.basename, raw_files_original))
|
|
561
562
|
|
|
562
563
|
# avoid an empty chunk
|
|
563
564
|
if chunk_size > n:
|
|
@@ -575,7 +576,9 @@ def do_download_filetype(type, raw_files, output_directory, clobber=False, user=
|
|
|
575
576
|
|
|
576
577
|
if n < parallel_limit:
|
|
577
578
|
iterator = [raw_files[i:i + chunk_size] for i in range(0, n, chunk_size)]
|
|
578
|
-
|
|
579
|
+
if len(iterator) > 1:
|
|
580
|
+
iterator = tqdm(iterator, total=len(iterator))
|
|
581
|
+
for files in iterator:
|
|
579
582
|
download(files, type, output_directory, quiet=False, user=user)
|
|
580
583
|
extract_fits(output_directory)
|
|
581
584
|
|
|
@@ -604,6 +607,7 @@ def do_download_filetype(type, raw_files, output_directory, clobber=False, user=
|
|
|
604
607
|
|
|
605
608
|
sys.stdout.flush()
|
|
606
609
|
logger.info('extracted .fits files')
|
|
610
|
+
return list(map(os.path.basename, raw_files_original))
|
|
607
611
|
|
|
608
612
|
|
|
609
613
|
# def do_download_s1d(raw_files, output_directory, clobber=False, verbose=True):
|
arvi/instrument_specific.py
CHANGED
|
@@ -127,9 +127,9 @@ def HARPS_commissioning(self, mask=True, plot=True):
|
|
|
127
127
|
total_affected = affected.sum()
|
|
128
128
|
|
|
129
129
|
if self.verbose:
|
|
130
|
-
n = total_affected
|
|
131
|
-
logger.info(f"there {'are'
|
|
132
|
-
|
|
130
|
+
n, i = total_affected, int(total_affected != 1)
|
|
131
|
+
logger.info(f"there {['is', 'are'][i]} {n} frame{['', 's'][i]} "
|
|
132
|
+
"during HARPS commissioning")
|
|
133
133
|
|
|
134
134
|
if mask:
|
|
135
135
|
self.mask[affected] = False
|
|
@@ -159,9 +159,9 @@ def HARPS_fiber_commissioning(self, mask=True, plot=True):
|
|
|
159
159
|
total_affected = affected.sum()
|
|
160
160
|
|
|
161
161
|
if self.verbose:
|
|
162
|
-
n = total_affected
|
|
163
|
-
logger.info(f"there {'are'
|
|
164
|
-
|
|
162
|
+
n, i = total_affected, int(total_affected != 1)
|
|
163
|
+
logger.info(f"there {['is', 'are'][i]} {n} frame{['', 's'][i]} "
|
|
164
|
+
"during the HARPS fiber commissioning period")
|
|
165
165
|
|
|
166
166
|
if mask:
|
|
167
167
|
self.mask[affected] = False
|
|
@@ -191,15 +191,15 @@ def ESPRESSO_commissioning(self, mask=True, plot=True):
|
|
|
191
191
|
total_affected = affected.sum()
|
|
192
192
|
|
|
193
193
|
if self.verbose:
|
|
194
|
-
n = total_affected
|
|
195
|
-
logger.info(f"there {'are'
|
|
196
|
-
|
|
194
|
+
n, i = total_affected, int(total_affected != 1)
|
|
195
|
+
logger.info(f"there {['is', 'are'][i]} {n} frame{['', 's'][i]} "
|
|
196
|
+
"during ESPRESSO commissioning")
|
|
197
197
|
|
|
198
198
|
if mask:
|
|
199
199
|
self.mask[affected] = False
|
|
200
200
|
self._propagate_mask_changes()
|
|
201
201
|
|
|
202
|
-
if plot:
|
|
202
|
+
if plot and total_affected > 0:
|
|
203
203
|
self.plot(show_masked=True)
|
|
204
204
|
|
|
205
205
|
return affected
|
|
@@ -240,9 +240,9 @@ def ADC_issues(self, mask=True, plot=True, check_headers=False):
|
|
|
240
240
|
total_affected = intersect.sum()
|
|
241
241
|
|
|
242
242
|
if self.verbose:
|
|
243
|
-
n = total_affected
|
|
244
|
-
logger.info(f"there {'are'
|
|
245
|
-
|
|
243
|
+
n, i = total_affected, int(total_affected != 1)
|
|
244
|
+
logger.info(f"there {['is', 'are'][i]} {n} frame{['', 's'][i]} "
|
|
245
|
+
"affected by ADC issues")
|
|
246
246
|
|
|
247
247
|
if mask:
|
|
248
248
|
self.mask[intersect] = False
|
|
@@ -276,9 +276,9 @@ def blue_cryostat_issues(self, mask=True, plot=True):
|
|
|
276
276
|
total_affected = intersect.sum()
|
|
277
277
|
|
|
278
278
|
if self.verbose:
|
|
279
|
-
n = total_affected
|
|
280
|
-
logger.info(f"there {'are'
|
|
281
|
-
|
|
279
|
+
n, i = total_affected, int(total_affected != 1)
|
|
280
|
+
logger.info(f"there {['is', 'are'][i]} {n} frame{['', 's'][i]} "
|
|
281
|
+
"affected by blue cryostat issues")
|
|
282
282
|
|
|
283
283
|
if mask:
|
|
284
284
|
self.mask[intersect] = False
|
|
@@ -322,8 +322,9 @@ def qc_scired_issues(self, plot=False, **kwargs):
|
|
|
322
322
|
n = affected.sum()
|
|
323
323
|
|
|
324
324
|
if self.verbose:
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
i = int(n != 1)
|
|
326
|
+
logger.info(f"there {['is', 'are'][i]} {n} frame{['', 's'][i]} "
|
|
327
|
+
"where QC SCIRED CHECK is 0")
|
|
327
328
|
|
|
328
329
|
if n == 0:
|
|
329
330
|
return
|
arvi/kima_wrapper.py
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import numpy as np
|
|
3
3
|
|
|
4
|
-
from .setup_logger import
|
|
4
|
+
from .setup_logger import setup_logger
|
|
5
5
|
|
|
6
6
|
try:
|
|
7
7
|
import kima
|
|
8
8
|
from kima.pykima.utils import chdir
|
|
9
9
|
from kima import distributions
|
|
10
|
-
from kima import RVData,
|
|
10
|
+
from kima import RVData, HGPMdata
|
|
11
|
+
from kima import RVmodel, GPmodel, RVHGPMmodel
|
|
11
12
|
kima_available = True
|
|
12
13
|
except ImportError:
|
|
13
14
|
kima_available = False
|
|
@@ -21,9 +22,12 @@ def try_to_guess_prior(model, prior):
|
|
|
21
22
|
return None
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
def run_kima(self, run=False, load=False, run_directory=None,
|
|
25
|
+
def run_kima(self, run=False, load=False, run_directory=None,
|
|
26
|
+
model=RVmodel, priors={}, **kwargs):
|
|
25
27
|
if not kima_available:
|
|
26
28
|
raise ImportError('kima not available, please install with `pip install kima`')
|
|
29
|
+
|
|
30
|
+
logger = setup_logger()
|
|
27
31
|
|
|
28
32
|
instruments = [inst for inst in self.instruments if self.NN[inst] > 1]
|
|
29
33
|
time = [getattr(self, inst).mtime for inst in instruments]
|
|
@@ -33,12 +37,34 @@ def run_kima(self, run=False, load=False, run_directory=None, priors={}, **kwarg
|
|
|
33
37
|
|
|
34
38
|
fix = kwargs.pop('fix', False)
|
|
35
39
|
npmax = kwargs.pop('npmax', 1)
|
|
36
|
-
|
|
40
|
+
|
|
41
|
+
if isinstance(model, str):
|
|
42
|
+
try:
|
|
43
|
+
model = {
|
|
44
|
+
'RVmodel': RVmodel,
|
|
45
|
+
'GPmodel': GPmodel,
|
|
46
|
+
'RVHGPMmodel': RVHGPMmodel
|
|
47
|
+
}[model]
|
|
48
|
+
except KeyError:
|
|
49
|
+
raise ValueError(f'unknown model: {model}')
|
|
50
|
+
|
|
51
|
+
if model is RVHGPMmodel:
|
|
52
|
+
pm_data = HGPMdata(self.simbad.gaia_id)
|
|
53
|
+
model = model(fix=fix, npmax=npmax, data=data, pm_data=pm_data)
|
|
54
|
+
else:
|
|
55
|
+
model = model(fix=fix, npmax=npmax, data=data)
|
|
37
56
|
|
|
38
57
|
model.trend = kwargs.pop('trend', False)
|
|
39
58
|
model.degree = kwargs.pop('degree', 0)
|
|
40
59
|
|
|
41
|
-
|
|
60
|
+
if isinstance(model, RVmodel):
|
|
61
|
+
model.studentt = kwargs.pop('studentt', False)
|
|
62
|
+
|
|
63
|
+
if isinstance(model, GPmodel):
|
|
64
|
+
if 'kernel' in kwargs:
|
|
65
|
+
model.kernel = kwargs.pop('kernel')
|
|
66
|
+
|
|
67
|
+
|
|
42
68
|
model.enforce_stability = kwargs.pop('enforce_stability', False)
|
|
43
69
|
model.star_mass = kwargs.pop('star_mass', 1.0)
|
|
44
70
|
|
|
@@ -49,6 +75,13 @@ def run_kima(self, run=False, load=False, run_directory=None, priors={}, **kwarg
|
|
|
49
75
|
if kwargs.pop('kuma', False):
|
|
50
76
|
model.conditional.eprior = distributions.Kumaraswamy(0.867, 3.03)
|
|
51
77
|
|
|
78
|
+
if isinstance(model, RVHGPMmodel):
|
|
79
|
+
model.pm_ra_bary_prior = priors.pop('pm_ra_bary_prior',
|
|
80
|
+
distributions.Gaussian(pm_data.pm_ra_hg, pm_data.sig_hg_ra))
|
|
81
|
+
model.pm_dec_bary_prior = priors.pop('pm_dec_bary_prior',
|
|
82
|
+
distributions.Gaussian(pm_data.pm_dec_hg, pm_data.sig_hg_dec))
|
|
83
|
+
|
|
84
|
+
|
|
52
85
|
for k, v in priors.items():
|
|
53
86
|
try:
|
|
54
87
|
if 'conditional' in k:
|
|
@@ -67,7 +100,6 @@ def run_kima(self, run=False, load=False, run_directory=None, priors={}, **kwarg
|
|
|
67
100
|
run_directory = os.getcwd()
|
|
68
101
|
|
|
69
102
|
if run:
|
|
70
|
-
|
|
71
103
|
# TODO: use signature of kima.run to pop the correct kwargs
|
|
72
104
|
# model_name = model.__class__.__name__
|
|
73
105
|
# model_name = f'kima.{model_name}.{model_name}'
|
|
@@ -75,7 +107,10 @@ def run_kima(self, run=False, load=False, run_directory=None, priors={}, **kwarg
|
|
|
75
107
|
|
|
76
108
|
with chdir(run_directory):
|
|
77
109
|
kima.run(model, **kwargs)
|
|
78
|
-
|
|
110
|
+
|
|
111
|
+
if isinstance(model, RVHGPMmodel):
|
|
112
|
+
data = (data, pm_data)
|
|
113
|
+
|
|
79
114
|
if load:
|
|
80
115
|
with chdir(run_directory):
|
|
81
116
|
res = kima.load_results(model)
|
arvi/programs.py
CHANGED
|
@@ -3,11 +3,13 @@ import multiprocessing
|
|
|
3
3
|
from functools import partial, lru_cache
|
|
4
4
|
from itertools import chain
|
|
5
5
|
from collections import namedtuple
|
|
6
|
-
from multiprocessing.pool import ThreadPool
|
|
6
|
+
from multiprocessing.pool import ThreadPool, Pool
|
|
7
|
+
import concurrent.futures
|
|
8
|
+
import sys
|
|
7
9
|
from tqdm import tqdm
|
|
8
10
|
# import numpy as np
|
|
9
11
|
|
|
10
|
-
from .setup_logger import
|
|
12
|
+
from .setup_logger import setup_logger
|
|
11
13
|
from .timeseries import RV
|
|
12
14
|
|
|
13
15
|
__all__ = ['ESPRESSO_GTO']
|
|
@@ -22,13 +24,14 @@ def get_star(star, instrument=None, verbose=False, **kwargs):
|
|
|
22
24
|
|
|
23
25
|
class LazyRV:
|
|
24
26
|
def __init__(self, stars: list, instrument: str = None,
|
|
25
|
-
_parallel_limit=10):
|
|
27
|
+
_parallel_limit=10, _parallel_workers=8):
|
|
26
28
|
self.stars = stars
|
|
27
29
|
if isinstance(self.stars, str):
|
|
28
30
|
self.stars = [self.stars]
|
|
29
31
|
self.instrument = instrument
|
|
30
32
|
self._saved = None
|
|
31
33
|
self._parallel_limit = _parallel_limit
|
|
34
|
+
self._parallel_workers = _parallel_workers
|
|
32
35
|
|
|
33
36
|
@property
|
|
34
37
|
def N(self):
|
|
@@ -38,10 +41,11 @@ class LazyRV:
|
|
|
38
41
|
return f"RV({self.N} stars)"
|
|
39
42
|
|
|
40
43
|
def _get(self, **kwargs):
|
|
44
|
+
logger = setup_logger()
|
|
41
45
|
if self.N > self._parallel_limit:
|
|
42
46
|
# logger.info('Querying DACE...')
|
|
43
47
|
_get_star = partial(get_star, instrument=self.instrument, **kwargs)
|
|
44
|
-
with
|
|
48
|
+
with Pool(self._parallel_workers) as pool:
|
|
45
49
|
result = list(tqdm(pool.imap(_get_star, self.stars),
|
|
46
50
|
total=self.N, unit='star',
|
|
47
51
|
desc='Querying DACE (can take a while)'))
|
arvi/simbad_wrapper.py
CHANGED
|
@@ -70,6 +70,17 @@ FROM ident AS id1 JOIN ident AS id2 USING(oidref)
|
|
|
70
70
|
WHERE id1.id = '{star}' AND id2.id LIKE '{name}%';
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
|
+
RA_DEC_QUERY = """
|
|
74
|
+
SELECT DISTINCT basic.OID,
|
|
75
|
+
RA,
|
|
76
|
+
DEC,
|
|
77
|
+
main_id,
|
|
78
|
+
DISTANCE(POINT('ICRS', RA, DEC), POINT('ICRS', {ra}, {dec})) as "dist"
|
|
79
|
+
FROM basic JOIN flux ON oidref = oid
|
|
80
|
+
WHERE CONTAINS(POINT('ICRS', RA, DEC), CIRCLE('ICRS', {ra}, {dec}, 0.02)) = 1
|
|
81
|
+
ORDER BY "dist";
|
|
82
|
+
"""
|
|
83
|
+
|
|
73
84
|
def find_identifier(identifier, star):
|
|
74
85
|
response = run_query(HD_GJ_HIP_QUERY.format(name=identifier, star=star))
|
|
75
86
|
if identifier in response:
|
|
@@ -288,6 +299,15 @@ class simbad:
|
|
|
288
299
|
def bmv(self):
|
|
289
300
|
return self.B - self.V
|
|
290
301
|
|
|
302
|
+
@classmethod
|
|
303
|
+
def from_ra_dec(cls, ra, dec, **kwargs):
|
|
304
|
+
table1 = run_query(query=RA_DEC_QUERY.format(ra=ra, dec=dec))
|
|
305
|
+
cols, values = parse_tablen(table1)
|
|
306
|
+
if len(values) == 0:
|
|
307
|
+
raise ValueError(f'no Simbad results for ra={ra}, dec={dec}')
|
|
308
|
+
assert cols == ['oid', 'ra', 'dec', 'main_id', 'dist']
|
|
309
|
+
star = values[0][cols.index('main_id')].replace('"', '')
|
|
310
|
+
return cls(star, **kwargs)
|
|
291
311
|
|
|
292
312
|
def argsort_by_spectral_type(sptypes):
|
|
293
313
|
STs = [f'{letter}{n}' for letter in ('F', 'G', 'K', 'M') for n in range(10)]
|
arvi/timeseries.py
CHANGED
|
@@ -408,16 +408,41 @@ class RV(ISSUES, REPORTS):
|
|
|
408
408
|
self._did_correct_berv = False
|
|
409
409
|
self.__post_init__()
|
|
410
410
|
|
|
411
|
-
def snapshot(self):
|
|
411
|
+
def snapshot(self, directory=None, delete_others=False):
|
|
412
412
|
import pickle
|
|
413
413
|
from datetime import datetime
|
|
414
414
|
ts = datetime.now().timestamp()
|
|
415
415
|
star_name = self.star.replace(' ', '')
|
|
416
416
|
file = f'{star_name}_{ts}.pkl'
|
|
417
|
-
|
|
417
|
+
|
|
418
|
+
if directory is None:
|
|
419
|
+
directory = '.'
|
|
420
|
+
else:
|
|
421
|
+
os.makedirs(directory, exist_ok=True)
|
|
422
|
+
|
|
423
|
+
file = os.path.join(directory, file)
|
|
424
|
+
|
|
425
|
+
if delete_others:
|
|
426
|
+
import re
|
|
427
|
+
other_pkls = [
|
|
428
|
+
f for f in os.listdir(directory)
|
|
429
|
+
if re.search(fr'{star_name}_\d+.\d+.pkl', f)
|
|
430
|
+
]
|
|
431
|
+
for pkl in other_pkls:
|
|
432
|
+
os.remove(os.path.join(directory, pkl))
|
|
433
|
+
|
|
434
|
+
metadata = {
|
|
435
|
+
'star': self.star,
|
|
436
|
+
'timestamp': ts,
|
|
437
|
+
'description': 'arvi snapshot'
|
|
438
|
+
}
|
|
439
|
+
pickle.dump((self, metadata), open(file, 'wb'), protocol=0)
|
|
440
|
+
|
|
418
441
|
if self.verbose:
|
|
419
442
|
logger.info(f'saved snapshot to {file}')
|
|
420
443
|
|
|
444
|
+
return file
|
|
445
|
+
|
|
421
446
|
@property
|
|
422
447
|
def N(self) -> int:
|
|
423
448
|
"""Total number of observations"""
|
|
@@ -618,6 +643,8 @@ class RV(ISSUES, REPORTS):
|
|
|
618
643
|
logger.info(f'reading snapshot of {star} from {dt}')
|
|
619
644
|
|
|
620
645
|
s = pickle.load(open(file, 'rb'))
|
|
646
|
+
if isinstance(s, tuple) and len(s) == 2:
|
|
647
|
+
s, _metadata = s
|
|
621
648
|
s._snapshot = file
|
|
622
649
|
return s
|
|
623
650
|
|
|
@@ -659,10 +686,11 @@ class RV(ISSUES, REPORTS):
|
|
|
659
686
|
file_object = hasattr(files, 'read')
|
|
660
687
|
files = [files]
|
|
661
688
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
689
|
+
if len(files) == 0:
|
|
690
|
+
if verbose:
|
|
691
|
+
logger.error('from_rdb: no files found')
|
|
692
|
+
return
|
|
693
|
+
|
|
666
694
|
def get_star_name(file):
|
|
667
695
|
return splitext(basename(file))[0].split('_')[0].replace('-', '_')
|
|
668
696
|
|
|
@@ -1260,8 +1288,9 @@ class RV(ISSUES, REPORTS):
|
|
|
1260
1288
|
logger.warning('may need to provide `top_level` in kwargs to find file')
|
|
1261
1289
|
do_symlink_filetype('CCF', files[:limit], directory, **kwargs)
|
|
1262
1290
|
else:
|
|
1263
|
-
do_download_filetype('CCF', files[:limit], directory,
|
|
1264
|
-
|
|
1291
|
+
downloaded = do_download_filetype('CCF', files[:limit], directory,
|
|
1292
|
+
clobber=clobber, verbose=self.verbose,
|
|
1293
|
+
user=self.user, **kwargs)
|
|
1265
1294
|
|
|
1266
1295
|
if load:
|
|
1267
1296
|
try:
|
|
@@ -1273,17 +1302,26 @@ class RV(ISSUES, REPORTS):
|
|
|
1273
1302
|
for f in files[:limit]
|
|
1274
1303
|
]
|
|
1275
1304
|
downloaded = [
|
|
1276
|
-
skysub
|
|
1305
|
+
skysub
|
|
1277
1306
|
if exists(skysub := f.replace('CCF_A.fits', 'CCF_SKYSUB_A.fits')) else f
|
|
1278
1307
|
for f in downloaded
|
|
1279
1308
|
]
|
|
1280
1309
|
if self.verbose:
|
|
1281
1310
|
logger.info('loading the CCF(s) into `.CCF` attribute')
|
|
1282
1311
|
|
|
1283
|
-
self.CCF = iCCF.from_file(downloaded)
|
|
1312
|
+
self.CCF = iCCF.from_file(downloaded, verbose=False)
|
|
1313
|
+
if len(self.CCF) == 1:
|
|
1314
|
+
self.CCF = [self.CCF]
|
|
1284
1315
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1316
|
+
if self.simbad is None:
|
|
1317
|
+
if self.verbose:
|
|
1318
|
+
logger.info('querying Simbad with RA/DEC from CCF header')
|
|
1319
|
+
ra = self.CCF[0].HDU[0].header['RA']
|
|
1320
|
+
dec = self.CCF[0].HDU[0].header['DEC']
|
|
1321
|
+
self._simbad = simbad.from_ra_dec(ra, dec)
|
|
1322
|
+
|
|
1323
|
+
except (ImportError, ValueError, FileNotFoundError):
|
|
1324
|
+
logger.error('could not load CCF(s) into `.CCF` attribute')
|
|
1287
1325
|
|
|
1288
1326
|
def download_s1d(self, instrument=None, index=None, limit=None,
|
|
1289
1327
|
directory=None, clobber=False, apply_mask=True, symlink=False, **kwargs):
|
|
@@ -1633,6 +1671,9 @@ class RV(ISSUES, REPORTS):
|
|
|
1633
1671
|
inst = self.instruments[self.obs[m] - 1]
|
|
1634
1672
|
n_before = (self.obs < self.obs[m]).sum()
|
|
1635
1673
|
getattr(self, inst).mask[m - n_before] = False
|
|
1674
|
+
for inst in self.instruments:
|
|
1675
|
+
if getattr(self, inst).mtime.size == 0:
|
|
1676
|
+
self.remove_instrument(inst, strict=True)
|
|
1636
1677
|
|
|
1637
1678
|
def secular_acceleration(self, epoch=None, just_compute=False, force_simbad=False):
|
|
1638
1679
|
"""
|
|
@@ -1806,9 +1847,11 @@ class RV(ISSUES, REPORTS):
|
|
|
1806
1847
|
for inst in instruments:
|
|
1807
1848
|
m = self.instrument_array == inst
|
|
1808
1849
|
result = dosigmaclip(self.vrad[m], low=sigma, high=sigma)
|
|
1809
|
-
n = self.vrad[m].size - result.clipped.size
|
|
1850
|
+
# n = self.vrad[m].size - result.clipped.size
|
|
1810
1851
|
|
|
1811
|
-
ind = m &
|
|
1852
|
+
ind = m & self.mask & \
|
|
1853
|
+
((self.vrad < result.lower) | (self.vrad > result.upper))
|
|
1854
|
+
n = ind.sum()
|
|
1812
1855
|
|
|
1813
1856
|
if self.verbose and n > 0:
|
|
1814
1857
|
s = 's' if (n == 0 or n > 1) else ''
|
|
@@ -4,25 +4,25 @@ arvi/ariadne_wrapper.py,sha256=YvilopJa9T4NwPcj3Nah_U8smSeSAU5-HYZMb_GJ-BQ,2232
|
|
|
4
4
|
arvi/berv.py,sha256=eKnpuPC1w45UrUEyFRbs9F9j3bXz3kxYzNXbnRgvFQM,17596
|
|
5
5
|
arvi/binning.py,sha256=NK9y9bUrdyWCbh79LkcRABHG-n5MtlETMHMvLj1z-OM,15437
|
|
6
6
|
arvi/config.py,sha256=JkHSwF-EEqwwbcc8thGgbFc9udDZPjQH-9XFjqDepBY,2337
|
|
7
|
-
arvi/dace_wrapper.py,sha256=
|
|
7
|
+
arvi/dace_wrapper.py,sha256=zgA8cT5eqYvHVMBfBO8aqua24FDfDilnDdPA3AajVew,25896
|
|
8
8
|
arvi/exofop_wrapper.py,sha256=8S7UEcrBAgANIweMV0-CvaWaVTPgGVo8vQQk_KRa0nU,2414
|
|
9
9
|
arvi/extra_data.py,sha256=Xi65pI5kkzqlMmHGl9xFoumtH699611pJJ5PV-a_IfU,3397
|
|
10
10
|
arvi/gaia_wrapper.py,sha256=HTuigIduin3raWfSC7QYuQxDk2dEXYH_4egRkzzg7Xw,4379
|
|
11
11
|
arvi/headers.py,sha256=uvdJebw1M5YkGjE3vJJwYBOnLikib75uuZE9FXB5JJM,1673
|
|
12
|
-
arvi/instrument_specific.py,sha256=
|
|
13
|
-
arvi/kima_wrapper.py,sha256=
|
|
12
|
+
arvi/instrument_specific.py,sha256=ycLhtT3oeNtSREm9bmWICaT8uureYcl3NFzbdDYRMVY,11624
|
|
13
|
+
arvi/kima_wrapper.py,sha256=GrAZWkDCg8ukhW41M1VTadSbab0GBa6BIzjtAtvjk58,3891
|
|
14
14
|
arvi/lbl_wrapper.py,sha256=_ViGVkpakvuBR_xhu9XJRV5EKHpj5Go6jBZGJZMIS2Y,11850
|
|
15
15
|
arvi/nasaexo_wrapper.py,sha256=mWt7eHgSZe4MBKCmUvMPTyUPGuiwGTqKugNBvmjOg9s,7306
|
|
16
16
|
arvi/plots.py,sha256=fHc6ScATCzvM4KQ77TYfHYmY6HSZ4N4oMYsLEUvxJpU,35279
|
|
17
|
-
arvi/programs.py,sha256=
|
|
17
|
+
arvi/programs.py,sha256=M8o8hXr6W22dMiIX3Nxz4pgb8lsJXApDlq7HStyTfqs,9047
|
|
18
18
|
arvi/reports.py,sha256=CKmtg5rewMyT26gbWeoZDYrL0z5Sbb6cTJry0HWk_rs,7445
|
|
19
19
|
arvi/setup_logger.py,sha256=dHzO2gPjw6CaKWpYZd2f83z09tmxgi--qpp7k1jROjI,615
|
|
20
|
-
arvi/simbad_wrapper.py,sha256=
|
|
20
|
+
arvi/simbad_wrapper.py,sha256=uZc8mcfNijXsQi29LReRTabZb2hRPhYdLsDLMgq1OEI,9927
|
|
21
21
|
arvi/sophie_wrapper.py,sha256=KUeWccXud5_Lrx72S1HSemHIZRdjd2oLvqyofwsL0QQ,3440
|
|
22
22
|
arvi/spectra.py,sha256=ebF1ocodTastLx0CyqLSpE8EZNDXBF8riyfxMr3L6H0,7491
|
|
23
23
|
arvi/stats.py,sha256=ilzzGL9ew-SyVa9eEdrYCpD3DliOAwhoNUg9LIlHjzU,2583
|
|
24
24
|
arvi/stellar.py,sha256=GQ7yweuBRnfkJ0M5eWjvLd8uvGq_by81PbXfidBvWis,4918
|
|
25
|
-
arvi/timeseries.py,sha256=
|
|
25
|
+
arvi/timeseries.py,sha256=HUsJE5F6-urGNjt5Q-SX0IeREM_vo9M8WdXZ2WR24b8,97260
|
|
26
26
|
arvi/translations.py,sha256=PUSrn4zvYO2MqGzUxlFGwev_tBkgJaJrIYs6NKHzbWo,951
|
|
27
27
|
arvi/utils.py,sha256=EY4hdwGcTUZg_tPT3yQ7ShLIVm9dAfmJC0c7toAVSKI,7221
|
|
28
28
|
arvi/data/info.svg,sha256=0IMI6W-eFoTD8acnury79WJJakpBwLa4qKS4JWpsXiI,489
|
|
@@ -31,8 +31,8 @@ arvi/data/obs_affected_blue_cryostat_issues.dat,sha256=z4AK17xfz8tGTDv1FjRvQFnio
|
|
|
31
31
|
arvi/data/extra/HD86226_PFS1.rdb,sha256=vfAozbrKHM_j8dYkCBJsuHyD01KEM1asghe2KInwVao,3475
|
|
32
32
|
arvi/data/extra/HD86226_PFS2.rdb,sha256=F2P7dB6gVyzCglUjNheB0hIHVClC5RmARrGwbrY1cfo,4114
|
|
33
33
|
arvi/data/extra/metadata.json,sha256=C69hIw6CohyES6BI9vDWjxwSz7N4VOYX0PCgjXtYFmU,178
|
|
34
|
-
arvi-0.2.
|
|
35
|
-
arvi-0.2.
|
|
36
|
-
arvi-0.2.
|
|
37
|
-
arvi-0.2.
|
|
38
|
-
arvi-0.2.
|
|
34
|
+
arvi-0.2.8.dist-info/licenses/LICENSE,sha256=6JfQgl7SpM55t0EHMFNMnNh-AdkpGW25MwMiTnhdWQg,1068
|
|
35
|
+
arvi-0.2.8.dist-info/METADATA,sha256=f3ma5e17xovCE6ImErgCAkYANL6wRvaXbqN65xVZExw,1932
|
|
36
|
+
arvi-0.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
37
|
+
arvi-0.2.8.dist-info/top_level.txt,sha256=4EeiKDVLD45ztuflTGfQ3TU8GVjJg5Y95xS5XjI-utU,5
|
|
38
|
+
arvi-0.2.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|