lofar-clocktec 1.0__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.
- lofar_clocktec/__init__.py +61 -0
- lofar_clocktec/_version.py +24 -0
- lofar_clocktec/clocktec_loglik/__init__.py +0 -0
- lofar_clocktec/clocktec_loglik/fitting_clocktec.py +914 -0
- lofar_clocktec/clocktec_loglik/parameters_handler.py +223 -0
- lofar_clocktec/fit_clock_tec.py +801 -0
- lofar_clocktec/initialize_ct.py +685 -0
- lofar_clocktec/io.py +92 -0
- lofar_clocktec/linear_fit/__init__.py +47 -0
- lofar_clocktec/linear_fit/fit_clock_tec.py +641 -0
- lofar_clocktec/logger.py +58 -0
- lofar_clocktec-1.0.dist-info/METADATA +357 -0
- lofar_clocktec-1.0.dist-info/RECORD +15 -0
- lofar_clocktec-1.0.dist-info/WHEEL +4 -0
- lofar_clocktec-1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
r"""lofar-clocktec: clock/TEC separation from LOFAR calibration phases.
|
|
4
|
+
|
|
5
|
+
Quick start
|
|
6
|
+
-----------
|
|
7
|
+
|
|
8
|
+
.. doctest::
|
|
9
|
+
|
|
10
|
+
>>> from lofar_clocktec import fit_clock_tec, CTInput, CTOutput
|
|
11
|
+
>>> import astropy.units as u
|
|
12
|
+
>>> ct_input = CTInput( # doctest: +SKIP
|
|
13
|
+
... phases=phases * u.rad, # shape (n_times, n_freqs, n_stations)
|
|
14
|
+
... freqs=freqs * u.Hz,
|
|
15
|
+
... flags=flags,
|
|
16
|
+
... stations=["CS002HBA", "CS004HBA"],
|
|
17
|
+
... times=times,
|
|
18
|
+
... )
|
|
19
|
+
>>> result = fit_clock_tec(ct_input, ref_station=0, spatial_fit=True) # doctest: +SKIP
|
|
20
|
+
>>> result.clock # nanoseconds, shape (n_stations, n_times) # doctest: +SKIP
|
|
21
|
+
>>> result.tec # TECU, shape (n_stations, n_times) # doctest: +SKIP
|
|
22
|
+
>>> result.phase0 # radians, shape (n_stations, n_times) # doctest: +SKIP
|
|
23
|
+
|
|
24
|
+
Public API
|
|
25
|
+
----------
|
|
26
|
+
:func:`fit_clock_tec`
|
|
27
|
+
Main entry point. Takes a :class:`CTInput` and returns a :class:`CTOutput`.
|
|
28
|
+
|
|
29
|
+
:class:`CTInput`
|
|
30
|
+
NamedTuple holding the input phases, frequencies, flags, station names,
|
|
31
|
+
and timestamps required for fitting.
|
|
32
|
+
|
|
33
|
+
:class:`CTOutput`
|
|
34
|
+
NamedTuple holding the fitted clock delays, TEC values, phase offsets,
|
|
35
|
+
a validity mask, and the timestamps.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
from __future__ import annotations
|
|
39
|
+
|
|
40
|
+
from importlib import metadata
|
|
41
|
+
|
|
42
|
+
from lofar_clocktec.fit_clock_tec import (
|
|
43
|
+
IDX_CLOCK,
|
|
44
|
+
IDX_PH0,
|
|
45
|
+
IDX_TEC,
|
|
46
|
+
IDX_TEC3,
|
|
47
|
+
fit_clock_tec,
|
|
48
|
+
)
|
|
49
|
+
from lofar_clocktec.io import CTInput, CTOutput
|
|
50
|
+
|
|
51
|
+
__version__ = metadata.version("lofar-clocktec")
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"IDX_CLOCK",
|
|
55
|
+
"IDX_PH0",
|
|
56
|
+
"IDX_TEC",
|
|
57
|
+
"IDX_TEC3",
|
|
58
|
+
"CTInput",
|
|
59
|
+
"CTOutput",
|
|
60
|
+
"fit_clock_tec",
|
|
61
|
+
]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '1.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 0)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|
|
File without changes
|