From 9ac29c8becb95ea6c68352551d852b669d155901 Mon Sep 17 00:00:00 2001 From: Steven Murray Date: Tue, 2 Jul 2024 09:46:05 +0200 Subject: [PATCH 1/5] maint: add ruff with same basic rules as flake8 --- pyproject.toml | 19 +++++++++++++++++++ setup.py | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 278ad67c6..377b52804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,3 +16,22 @@ filterwarnings = [ 'ignore:telescope_location is not set\. Using known values for HERA\.:UserWarning', "ignore:invalid value encountered in divide:RuntimeWarning", ] + +[tool.ruff] +line-length = 88 +target-version = "py39" + +[tool.ruff.lint] +select = [ + "E", + "W" +] + +ignore = [ + "E402", + "E501", + "W291", + "W293", + "W503", + "W601", +] diff --git a/setup.py b/setup.py index 75c93ea01..fb9d0120f 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,8 @@ def package_files(package_dir, subdirectory): "pytest-cov", "hera_sim", "pytest-xdist", - "hypothesis" + "hypothesis", + "ruff", ] }, 'zip_safe': False, From 9e2c383e5d2c5136db92bf05e5c0569e3db217bf Mon Sep 17 00:00:00 2001 From: Steven Murray Date: Tue, 2 Jul 2024 14:11:52 +0200 Subject: [PATCH 2/5] style: ensure all rules are obeyed --- .coveragerc | 2 - .pre-commit-config.yaml | 12 +- hera_cal/_cli_tools.py | 75 +++-- hera_cal/calibrations/__init__.py | 2 - hera_cal/calibrations/hera_test_calfile.py | 330 -------------------- hera_cal/calibrations/herahex_ex_ants.txt | 304 ------------------- hera_cal/calibrations/hsa7458_v000.py | 332 --------------------- hera_cal/calibrations/hsa7458_v001.py | 330 -------------------- hera_cal/chunker.py | 4 +- hera_cal/datacontainer.py | 6 +- hera_cal/delay_filter.py | 2 +- hera_cal/io.py | 6 +- hera_cal/lstbin.py | 5 +- hera_cal/noise.py | 6 +- hera_cal/nucal.py | 251 ++++++++-------- hera_cal/redcal.py | 12 +- hera_cal/tests/test_abscal.py | 6 +- hera_cal/tests/test_cli_utils.py | 24 +- hera_cal/tests/test_datacontainer.py | 4 +- hera_cal/tests/test_flag_utils.py | 2 +- hera_cal/tests/test_io.py | 16 +- hera_cal/tests/test_nucal.py | 68 +++-- hera_cal/tests/test_utils.py | 2 +- pyproject.toml | 2 - scripts/auto_reflection_run.py | 6 +- scripts/baseline_chunker.py | 2 +- scripts/chunk_files.py | 2 +- scripts/delay_filter_run.py | 8 +- scripts/lstbin_run.py | 1 - scripts/noise_from_autos.py | 6 +- scripts/smooth_cal_run.py | 37 ++- scripts/subselect.py | 35 ++- scripts/time_average.py | 5 +- scripts/tophat_frfilter_run.py | 8 +- setup.py | 2 +- 35 files changed, 340 insertions(+), 1575 deletions(-) delete mode 100644 hera_cal/calibrations/__init__.py delete mode 100644 hera_cal/calibrations/hera_test_calfile.py delete mode 100644 hera_cal/calibrations/herahex_ex_ants.txt delete mode 100644 hera_cal/calibrations/hsa7458_v000.py delete mode 100644 hera_cal/calibrations/hsa7458_v001.py diff --git a/.coveragerc b/.coveragerc index 6db1ff217..53959800c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,11 +1,9 @@ [run] omit = */tests/* - */calibrations/* */data/* hera_cal/lstbin.py [report] omit = */tests/* - */calibrations/* */data/* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47fb1ff03..80aa39a7f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,11 @@ repos: - id: mixed-line-ending args: ['--fix=no'] -- repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 # pick a git hash / tag to point to - hooks: - - id: flake8 + +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.5.0 + hooks: + # Run the linter. + - id: ruff + args: ['--fix','--preview'] diff --git a/hera_cal/_cli_tools.py b/hera_cal/_cli_tools.py index 909a107c7..9feda099e 100644 --- a/hera_cal/_cli_tools.py +++ b/hera_cal/_cli_tools.py @@ -2,15 +2,15 @@ This module contains functions that add groups of arguments to an argparse.ArgumentParser. For instance, it adds a group of arguments that determine how logging proceeds, and -also a group of arguments that determine if line-profiling is run, and how. +also a group of arguments that determine if line-profiling is run, and how. What This Module Adds to the Logging Experience =============================================== See the :func:`setup_logger` function for details on what is added to the logger by -this module. Note that this function must be called for logging to be altered at all -(see the "how to use" section below for details). +this module. Note that this function must be called for logging to be altered at all +(see the "how to use" section below for details). -Note that logging in python is only used if you actually use the ``logging`` module +Note that logging in python is only used if you actually use the ``logging`` module and make logging statements. To get the most out of this, do the following in all ``hera_cal`` modules:: @@ -25,7 +25,7 @@ logger.error("This is an error message") logger.debug("This is a debug message") -By setting the ``--log-level`` argument to a script (that is set up according to the +By setting the ``--log-level`` argument to a script (that is set up according to the guidelines in this module), you can control how much actually is printed out on any given run. Furthermore, the logged messages include extra information, such as the current time, the log level of the message, and optionally other info. For example, @@ -45,9 +45,9 @@ What This Module Does for Line-Profiling ======================================== -Line-profiling is a way to see how much time is spent in each line of code. This is +Line-profiling is a way to see how much time is spent in each line of code. This is useful for identifying bottlenecks in code. This module adds the ability to run a -script with line-profiling, and to save the results to a human-readable file. +script with line-profiling, and to save the results to a human-readable file. Importantly, it also adds the ability to specify from the command line which functions are included in the line-profilng. See :func:`run_with_profiling` for details. @@ -58,7 +58,7 @@ say you have written a script called ``script.py``, with the following contents:: import argparse - + # An argument parser for the script. Could be constructed from an imported function. parser = argparse.ArgumentParser() parser.add_argument("foo", type=int) @@ -75,7 +75,7 @@ def run_script(**kwargs): run_script(**kwargs) You can add better logging options and line-profiling options to this script simply by -applying ``parse_args`` to the ``args``, and running the main function through the +applying ``parse_args`` to the ``args``, and running the main function through the ``run_with_profiling`` function:: import argparse @@ -131,17 +131,18 @@ def run_script(**kwargs): logger = logging.getLogger(__name__) + def setup_logger( - level: str = 'INFO', - width: int=160, - show_time_as_diff: bool=True, - rich_tracebacks: bool=True, + level: str = 'INFO', + width: int = 160, + show_time_as_diff: bool = True, + rich_tracebacks: bool = True, show_mem: bool = True, mem_backend: Literal["tracemalloc", "psutil"] = "tracemalloc", show_path: bool = False, ): """Setup the logger for hera_cal scripts. - + Parameters ---------- level : str, optional @@ -181,7 +182,7 @@ def setup_logger( ], force=True, ) - + class DeltaTemplate(Template): delimiter = "%" @@ -193,7 +194,7 @@ def _strfdelta(tdelta, fmt): minutes, seconds = divmod(rem, 60) d = { "D": f"{days:02d}", - "H": f"{hours + 24*days:02d}", + "H": f"{hours + 24 * days:02d}", "h": f"{hours:02d}", "M": f"{minutes:02d}", "S": f"{seconds:02d}", @@ -232,7 +233,7 @@ def __init__( ) -> None: """ A class for rendering a log message. - + Parameters ---------- show_time : bool, optional @@ -404,7 +405,7 @@ def __init__( ): """ A RichHandler that adds memory usage and time difference to the log. - + See https://rich.readthedocs.io/en/stable/logging.html for details on the base class. @@ -437,14 +438,14 @@ def __init__( def add_logging_args(parser: ArgumentParser): """ Add logging arguments to an argparse parser. - + All arguments are optional and have sensible defaults. All arguments begin with "log-" so they can be easily identified. """ grp = parser.add_argument_group(title="Options for logging") grp.add_argument( - "--log-level", type=str, default='INFO', + "--log-level", type=str, default='INFO', choices=['INFO', 'ERROR', 'WARNING', 'CRITICAL', "DEBUG"], help="logging level to display. " ) @@ -453,7 +454,7 @@ def add_logging_args(parser: ArgumentParser): help="width of logging output" ) grp.add_argument( - "--log-plain-tracebacks", action='store_true', + "--log-plain-tracebacks", action='store_true', help="use plain instead of rich tracebacks" ) grp.add_argument( @@ -469,7 +470,7 @@ def add_logging_args(parser: ArgumentParser): grp.add_argument( "--log-show-path", action='store_true', help='show path of code in log msg' ) - + def init_logger_from_args(args): """Call :func:`setup_logger` with arguments from an argparse parser.""" @@ -497,6 +498,7 @@ def _add_profile_funcs(profiler, profile_funcs): _fnc = getattr(_fnc, att) profiler.add_function(_fnc) + def run_with_profiling(function: Callable, args: Namespace, *posargs, **kwargs): """Run a function with profiling if the user has requested it. @@ -532,7 +534,7 @@ def run_with_profiling(function: Callable, args: Namespace, *posargs, **kwargs): # "path.to.module:Class.method". if args.profile_funcs: _add_profile_funcs(profiler, args.profile_funcs) - + pth = Path(args.profile_output) if not pth.parent.exists(): pth.parent.mkdir(parents=True) @@ -541,30 +543,36 @@ def run_with_profiling(function: Callable, args: Namespace, *posargs, **kwargs): with open(pth, "w") as fl: profiler.print_stats(stream=fl, stripzeros=True) - + return out else: return function(*posargs, **kwargs) + def add_profiling_args(parser: ArgumentParser): """ Add profiling arguments to an argparse parser. - + All arguments are optional and have sensible defaults. All arguments begin with "profile-" so they can be easily identified. """ grp = parser.add_argument_group(title="Options for line-profiling") - grp.add_argument("--profile", action="store_true", - help="Line-Profile the script") - grp.add_argument("--profile-funcs", type=str, default='', - help="List of functions to profile") - grp.add_argument("--profile-output", type=str, help="Output file for profiling info.") + grp.add_argument( + "--profile", action="store_true", help="Line-Profile the script" + ) + grp.add_argument( + "--profile-funcs", type=str, default='', help="List of functions to profile" + ) + grp.add_argument( + "--profile-output", type=str, help="Output file for profiling info." + ) + def parse_args(parser: ArgumentParser): """Convenience function for setting up CLI goodies from this module. - + This function adds both profiling and logging arguments to the parser, parses the args, and sets up the logger. It returns the parsed args. """ @@ -574,12 +582,13 @@ def parse_args(parser: ArgumentParser): init_logger_from_args(args) return args + def filter_kwargs(kwargs: dict) -> dict: """Filter out kwargs that are used for logging and profiling.""" return { k: v for k, v in kwargs.items() if ( - k != "profile" and - not k.startswith("profile_") and + k != "profile" and + not k.startswith("profile_") and not k.startswith("log_") ) } diff --git a/hera_cal/calibrations/__init__.py b/hera_cal/calibrations/__init__.py deleted file mode 100644 index 49c1139f3..000000000 --- a/hera_cal/calibrations/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -"""Init file for calibrations directory.""" -CAL_PATH = __path__[0] diff --git a/hera_cal/calibrations/hera_test_calfile.py b/hera_cal/calibrations/hera_test_calfile.py deleted file mode 100644 index 2bb52c1b0..000000000 --- a/hera_cal/calibrations/hera_test_calfile.py +++ /dev/null @@ -1,330 +0,0 @@ -# v001 has a fix to two issues with antpos_ideal. The first was that the separation was 14.0 m, not 14.6 m. -# The second was an error in the transciption of positions that led to -# slight non-redundancy on the 10 cm scale. -Josh - -import aipy as a -import numpy as n -cm_p_m = 100 - - -class AntennaArray(a.pol.AntennaArray): - - def __init__(self, *args, **kwargs): - a.pol.AntennaArray.__init__(self, *args, **kwargs) - self.antpos_ideal = kwargs.pop('antpos_ideal') - - def update_gains(self): - gains = self.gain * self.amp_coeffs - for i, gain in zip(self.ant_layout.flatten(), gains.flatten()): - self[i].set_params({'amp_x': gain}) - self[i].set_params({'amp_y': gain}) - - def update_delays(self): - ns, ew = n.indices(self.ant_layout.shape) - dlys = ns * self.tau_ns + ew * self.tau_ew + self.dly_coeffs - for i, tau in zip(self.ant_layout.flatten(), dlys.flatten()): - self[i].set_params({'dly_x': tau}) - self[i].set_params({'dly_y': tau + self.dly_xx_to_yy.flatten()[i]}) - - def update(self): - # self.update_gains() - # self.update_delays() - a.pol.AntennaArray.update(self) - - def get_params(self, ant_prms={'*': '*'}): - try: - prms = a.pol.AntennaArray.get_params(self, ant_prms) - except(IndexError): - return {} - for k in ant_prms: - if k == 'aa': - if 'aa' not in prms: - prms['aa'] = {} - for val in ant_prms[k]: - if val == 'tau_ns': - prms['aa']['tau_ns'] = self.tau_ns - elif val == 'tau_ew': - prms['aa']['tau_ew'] = self.tau_ew - elif val == 'gain': - prms['aa']['gain'] = self.gain - else: - try: - top_pos = n.dot(self._eq2zen, self[int(k)].pos) - # XXX should multiply this by len_ns to match set_params. - except(ValueError): - continue - if ant_prms[k] == '*': - prms[k].update( - {'top_x': top_pos[0], 'top_y': top_pos[1], 'top_z': top_pos[2]}) - else: - for val in ant_prms[k]: - if val == 'top_x': - prms[k]['top_x'] = top_pos[0] - elif val == 'top_y': - prms[k]['top_y'] = top_pos[1] - elif val == 'top_z': - prms[k]['top_z'] = top_pos[2] - return prms - - def set_params(self, prms): - changed = a.pol.AntennaArray.set_params(self, prms) - for i, ant in enumerate(self): - ant_changed = False - top_pos = n.dot(self._eq2zen, ant.pos) - try: - top_pos[0] = prms[str(i)]['top_x'] - ant_changed = True - except(KeyError): - pass - try: - top_pos[1] = prms[str(i)]['top_y'] - ant_changed = True - except(KeyError): - pass - try: - top_pos[2] = prms[str(i)]['top_z'] - ant_changed = True - except(KeyError): - pass - if ant_changed: - ant.pos = n.dot(n.linalg.inv(self._eq2zen), - top_pos) / a.const.len_ns * cm_p_m - changed |= ant_changed - try: - self.tau_ns, changed = prms['aa']['tau_ns'], 1 - except(KeyError): - pass - try: - self.tau_ew, changed = prms['aa']['tau_ew'], 1 - except(KeyError): - pass - try: - self.gain, changed = prms['aa']['gain'], 1 - except(KeyError): - pass - if changed: - self.update() - return changed - - -prms = { - 'loc': ('-30:43:17.5', '21:25:41.9'), # KAT, SA (GPS) - 'antpos_ideal': { - 80: {'top_x': -14.6, 'top_y': -25.28794179, 'top_z': 0.0}, # a0 - 104: {'top_x': 0.0, 'top_y': -25.28794179, 'top_z': 0.0}, # a1 - 96: {'top_x': 14.6, 'top_y': -25.28794179, 'top_z': 0.0}, # a2 - - 64: {'top_x': -21.9, 'top_y': -12.6439709, 'top_z': 0.0}, # a3 - 53: {'top_x': -7.3, 'top_y': -12.6439709, 'top_z': 0.0}, # a4 - 31: {'top_x': 7.3, 'top_y': -12.6439709, 'top_z': 0.0}, # a5 - 65: {'top_x': 21.9, 'top_y': -12.6439709, 'top_z': 0.0}, # a5 - - - 88: {'top_x': -29.2, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 9: {'top_x': -14.6, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 20: {'top_x': 0.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 89: {'top_x': 14.6, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 43: {'top_x': 29.2, 'top_y': 0.0, 'top_z': 0.0}, # a5 - - 105: {'top_x': -21.9, 'top_y': 12.6439709, 'top_z': 0.0}, # a3 - 22: {'top_x': -7.3, 'top_y': 12.6439709, 'top_z': 0.0}, # a4 - 81: {'top_x': 7.3, 'top_y': 12.6439709, 'top_z': 0.0}, # a5 - 10: {'top_x': 21.9, 'top_y': 12.6439709, 'top_z': 0.0}, # a5 - - - 72: {'top_x': -14.6, 'top_y': 25.28794179, 'top_z': 0.0}, # a0 - 112: {'top_x': 0.0, 'top_y': 25.28794179, 'top_z': 0.0}, # a1 - 97: {'top_x': 14.6, 'top_y': 25.28794179, 'top_z': 0.0}, # a2 - - 0: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 1: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 2: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 3: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 4: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 5: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 6: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 7: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 8: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 11: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 12: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 13: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 14: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 15: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 16: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 17: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 18: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 19: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 21: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 23: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 24: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 25: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 26: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 27: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 28: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 29: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 30: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 32: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 33: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 34: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 35: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 36: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 37: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 38: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 39: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 40: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 41: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 42: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 44: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 45: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 46: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 47: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 48: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 49: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 50: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 51: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 52: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 54: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 55: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 56: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 57: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 58: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 59: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 60: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 61: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 62: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 63: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 66: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 67: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 68: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 69: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 70: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 71: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 73: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 74: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 75: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 76: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 77: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 78: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 79: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 82: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 83: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 84: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 85: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 86: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 87: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 90: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 91: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 92: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 93: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 94: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 95: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 98: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 99: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 100: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 101: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 102: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 103: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 106: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 107: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 108: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 109: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 110: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 111: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 113: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 114: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 115: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 116: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 117: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 118: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 119: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 120: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 121: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 122: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 123: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 124: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 125: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 126: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 127: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - }, - 'amps': dict(zip(range(128), n.ones(128))), - 'amp_coeffs': n.array([1] * 128), - 'bp_r': n.array([[1.]] * 128), - 'bp_i': n.array([[0., 0., 0.]] * 128), - 'twist': n.array([0] * 128), - 'beam': a.fit.BeamAlm, - 'bm_prms': { - 'alm7': n.array( - [-1081324093.5604355, 0.0, 0.0, 0.0, -262155437.14744619, -40523.293875736716, -1144639049.4450433, 0.0, 0.0, 0.0, -1209061567.4856892, -62596.955398614278, 0.0, 0.0, 234574880.79412466, -59373.276068766572, 0.0, 0.0, 204426224.06441718, 55114.563591448132, 1729080775.5577424, 0.0, 0.0, 0.0, -5627870.2693141159, 8441.4522962633619, 0.0, 0.0, -957871468.02796948, -26154.972628033676, 0.0, 0.0, -87102252.471384808, -50052.73968168487, 0.0, 0.0, 191828502.26962891, -10048.43132508696, 0.0, 0.0, 110776547.27628954, -37351.826990050504, -906797537.4834379, 0.0, 0.0, 0.0, 329222817.13445771, -29060.739352269207, 0.0, 0.0, 546809652.71201193, -115946.69818003669, 0.0, 0.0, -591134355.63541889, 62683.080456769902, 0.0, 0.0, -144055745.14333308, -3344.9767162177391, 0.0, 0.0, -368656232.30881768, -1608.1983129602879, 0.0, 0.0, -118801805.27812727, 31905.336279017167, 0.0, 0.0, -70225720.747015119, -37865.877995669623, 235419758.4512482, 0.0, 0.0, 0.0, 361579085.9617995, 79072.147640181458, 0.0, 0.0, 146429964.96514896, -102117.14213434084, 0.0, 0.0, 106427393.26674381, -60107.204182634705, 0.0, 0.0, 59154166.248101547, -20388.350978482271, 0.0, 0.0, 176029459.26438314, 33285.591239419438, 0.0, 0.0, 527618634.93934166, 66884.303920780934, 0.0, 0.0, 95913693.41127409, -79300.923099238891, 0.0, 0.0, 152734050.03753135, -21615.518484261818, 0.0, 0.0, 230694358.5770939, 22922.170838031663, -383288562.70426351, 0.0, 0.0, 0.0, -126281330.72650661, -26736.867629611937, 0.0, 0.0, 108175824.49057513, -73826.154995947072, 0.0, 0.0, -105130427.45878558, -27109.647812448158, 0.0, 0.0, -495130497.4338429, -43312.494575842124, 0.0, 0.0, -162294563.70339859, -78644.408483291132, 0.0, 0.0, -446143155.07499522, 35049.023211568106, 0.0, 0.0, -434372911.29877228, 74645.281954757884, 0.0, 0.0, 88535885.916778564, -59658.181174639933, 0.0, 0.0, -154524011.19535148, -64925.569280836324, 0.0, 0.0, -197013303.49254256, -57546.998199721042, 0.0, 0.0, 60578806.739350073, 60269.144321032669, 614919978.78591418, 0.0, 0.0, 0.0, -177976472.87455249, 83517.765491276004, 0.0, 0.0, -136301559.45860973, -2057.5912754017359, 0.0, 0.0, 613862755.05429029, -126093.29111144203, 0.0, 0.0, 330986019.80497843, -171293.91106101952, 0.0, 0.0, -29154749.084786706, -23698.75128392793, 0.0, 0.0, 118909415.76059921, 260.4906139722309, 0.0, 0.0, 258338224.08025572, 34588.968913224162, 0.0, 0.0, 3785397.5870792689, -32603.464627771926, 0.0, 0.0, -23259161.770430245, -32648.547687113882, 0.0, 0.0, 104427443.08076131, 5749.4319312391553, 0.0, 0.0, 6766465.5382205453, 3241.742220615246, 0.0, 0.0, -60284503.8862499, -59902.508087108952, 0.0, 0.0, 70947908.65981704, -50046.164234017422, 71592751.406619206, 0.0, 0.0, 0.0, 114423944.11037378, -29629.639271339391, 0.0, 0.0, -16162405.156746721, -22843.554219456128, 0.0, 0.0, -391208214.49301404, 85360.748577972205, 0.0, 0.0, -180559385.64929616, -232405.39276717394, 0.0, 0.0, -173999368.48403537, - \ - 154535.5223811192, 0.0, 0.0, 21379759.421723526, -49363.223340975463, 0.0, 0.0, -65362589.496401452, 56497.722354469195, 0.0, 0.0, -59068349.756921723, -22203.228234489961, 0.0, 0.0, 178895590.72285667, -36778.476704805165, 0.0, 0.0, -7977531.617536407, -19838.626327764079, 0.0, 0.0, 80425490.578405693, 27831.980826245854, 0.0, 0.0, 114611568.72714353, -107486.07299270081, 0.0, 0.0, 20196073.66257038, 21928.884663855733, 0.0, 0.0, -77682176.577698827, 29213.006661709769, 0.0, 0.0, 15123630.35168907, -28694.812017467506, -22259183.296553552, 0.0, 0.0, 0.0, -44195359.795093246, 51184.417790776875, 0.0, 0.0, 416191946.56073493, -71732.351641676665, 0.0, 0.0, 205663263.71618012, 3388.5589815610024, 0.0, 0.0, -130943398.42767963, -131143.82698794606, 0.0, 0.0, 61651470.898734599, -81217.981804434457, 0.0, 0.0, -67180046.491523147, -146577.21040483299, 0.0, 0.0, -152936171.75485, -9306.3668560189235, 0.0, 0.0, -78432624.898623183, -16457.284767487032, 0.0, 0.0, -182188345.51379466, -28943.200208655751, 0.0, 0.0, -230936841.81174293, -69881.661699287171, 0.0, 0.0, -48611744.075940624, -45613.670555435718, 0.0, 0.0, -137135254.63530335, 89602.425289011473, 0.0, 0.0, -122086433.73023096, 10038.304046797484, 0.0, 0.0, 4230108.1019680994, -125434.25870475314, 0.0, 0.0, -88554513.106125027, -65172.061009842495, 0.0, 0.0, -48016889.768255182, 6514.6442567450413, 0.0, 0.0, -7234862.3567767777, 29462.421170785103, 23975873.985774957, 0.0, 0.0, 0.0, 150246363.27382952, -4635.0397663657277, 0.0, 0.0, -47057107.317354918, -61032.384893401948, 0.0, 0.0, -145067771.71055323, 30340.435422360377, 0.0, 0.0, 130479661.43167895, -11379.689478798271, 0.0, 0.0, 26361229.859195136, -125845.83502669417, 0.0, 0.0, 169502237.90273514, -190856.12211173368, 0.0, 0.0, -93899694.259581938, 9428.9987870662444, 0.0, 0.0, -197490720.78410134, 21312.280548650102, 0.0, 0.0, 39647940.551049069, -68437.045331174842, 0.0, 0.0, 69474226.516149923, -51031.516066011136, 0.0, 0.0, 183898889.91059858, 25427.755216915164, 0.0, 0.0, 105935367.66732898, 47267.944906588062, 0.0, 0.0, 91688077.289836451, 19266.763736649074, 0.0, 0.0, 107771149.47695087, -67938.256377686776, 0.0, 0.0, -29850724.42625796, 21607.473853242802, 0.0, 0.0, 105178954.14601882, -69775.134273171891, 0.0, 0.0, -57617253.476713084, -65410.799885873028, 0.0, 0.0, 3261331.2317122123, -32217.75104223685, 0.0, 0.0, 16472425.803737164, 79582.269607468625, -272848871.13511133, 0.0, 0.0, 0.0, -166763480.12559777, 33090.611564668841, 0.0, 0.0, 108954734.6009059, -403.73869004175492, 0.0, 0.0, -17283151.399917897, -68588.699644901702, 0.0, 0.0, -21492440.153302398, -17597.541258704674, 0.0, 0.0, -38441136.647693813, 64579.571492712137, 0.0, 0.0, 4505100.6340750242, -300117.69352899096, 0.0, 0.0, 549992.16794250254, -197163.89229418512, 0.0, 0.0, -127963651.33731289, -10644.866941283586, 0.0, 0.0, 100807969.57532065, 29015.182801835355, 0.0, 0.0, -7278488.9224838661, 7477.4234534004445] - ), - 'alm6': n.array( - [797385716.91804504, 0.0, 0.0, 0.0, 189967106.19923255, 29537.10693528819, 846600538.89322472, 0.0, 0.0, 0.0, 872926192.63071275, 44904.233226988472, 0.0, 0.0, -169861745.64221448, 42971.448932979642, 0.0, 0.0, -147906900.75269288, -39808.417875855441, -1253273886.731957, 0.0, 0.0, 0.0, 7956724.3034045501, -6356.2955966941372, 0.0, 0.0, 699223699.88883495, 19020.68326448747, 0.0, 0.0, 62573658.414382517, 35470.424362177982, 0.0, 0.0, -138953239.49548644, 7299.6975745242362, 0.0, 0.0, -79806306.899763986, 26921.147432152444, 655475892.86221838, 0.0, 0.0, 0.0, -238869250.08572152, 20663.930342020343, 0.0, 0.0, -395488561.2668637, 84491.317123754401, 0.0, 0.0, 426316351.0672881, -45085.033036303044, 0.0, 0.0, 103665104.62868968, 2246.2873997537672, 0.0, 0.0, 264983020.48203912, 1892.1499981893205, 0.0, 0.0, 84976114.845701993, -23012.274489893702, 0.0, 0.0, 50771408.628350258, 27079.015870586507, -174485451.73842844, 0.0, 0.0, 0.0, -264289472.79323781, -56715.616631217796, 0.0, 0.0, -106222730.444833, 74901.88337064792, 0.0, 0.0, -76714164.675549507, 42894.665025885537, 0.0, 0.0, -44453338.477396756, 14708.146540980564, 0.0, 0.0, -127030875.23670675, -23573.026026034317, 0.0, 0.0, -380764603.20410013, -47356.176563799374, 0.0, 0.0, -70038599.590872958, 57096.578562188763, 0.0, 0.0, -110338759.44084603, 15618.47767476493, 0.0, 0.0, -166316476.72216225, -16378.749845538387, 271936085.48576093, 0.0, 0.0, 0.0, 92433839.952875465, 19519.099424088534, 0.0, 0.0, -77618380.050654531, 54389.716587842369, 0.0, 0.0, 77410628.333828956, 18890.257217773775, 0.0, 0.0, 359407589.92209935, 31728.327458281798, 0.0, 0.0, 117813006.27702276, 56694.00896615073, 0.0, 0.0, 322163097.63930309, -24474.159721000109, 0.0, 0.0, 313393639.11823243, -53880.392102794642, 0.0, 0.0, -63859274.184436947, 42560.437368084611, 0.0, 0.0, 111161686.03953889, 46744.631315417995, 0.0, 0.0, 142346033.48720458, 41862.95645676343, 0.0, 0.0, -43818886.848100305, -43470.280716078254, -442768171.11322945, 0.0, 0.0, 0.0, 132501506.90008594, -60540.916997092565, 0.0, 0.0, 93942945.610904098, 2481.2147707751869, 0.0, 0.0, -441000417.33351082, 90293.217816417338, 0.0, 0.0, -237336783.93090552, 124693.18798191204, 0.0, 0.0, 20623105.645757515, 16780.788665236021, 0.0, 0.0, -86673347.981770217, -111.29751227977317, 0.0, 0.0, -187034693.45671436, -25193.745737031823, 0.0, 0.0, -2135530.3974111909, 23393.093986819636, 0.0, 0.0, 16698628.352701169, 22791.910128108695, 0.0, 0.0, -75207242.986817583, -3478.3017686277117, 0.0, 0.0, -4262714.0713599836, -1495.1668203620484, 0.0, 0.0, 43275301.615728691, 43375.651892071954, 0.0, 0.0, -51358762.141454875, 35744.562531746327, -55977125.17363143, 0.0, 0.0, 0.0, -80891874.204180971, 21169.676736598227, 0.0, 0.0, 11039910.066945948, 17564.401170771853, 0.0, 0.0, 282861419.72051185, -61850.098505863178, 0.0, 0.0, 128362573.7168542, 169414.68024107264, 0.0, 0.0, 124330006.22390915, - 110718.99879655795, 0.0, 0.0, -16841657.337382279, 35657.177598049217, 0.0, 0.0, 47349371.812364854, -40707.611029805084, 0.0, 0.0, 42010956.049356803, 15687.679769475246, 0.0, 0.0, -129069297.57474856, 25830.387752163271, 0.0, 0.0, 5910511.5135691371, 13697.037347944815, 0.0, 0.0, -58821740.432719804, -19405.588572920107, 0.0, 0.0, -82547653.248470947, 77731.66933892775, 0.0, 0.0, -14433978.003370205, -15837.572457110891, 0.0, 0.0, 55786893.745701335, -21124.411201972158, 0.0, 0.0, -11046375.71224675, 20616.212993154164, 14107144.447629577, 0.0, 0.0, 0.0, 33774805.041091383, -36859.336437719656, 0.0, 0.0, -301070957.00480914, 52878.121995111564, 0.0, 0.0, -146653601.39361849, -2198.0942705195794, 0.0, 0.0, 94168406.841010004, 96760.717803226478, 0.0, 0.0, -43478941.173792779, 57375.658488987028, 0.0, 0.0, 48353110.436083667, 106201.96001161895, 0.0, 0.0, 112485321.00221781, 6382.1773339061747, 0.0, 0.0, 57189418.603424326, 11901.926954900946, 0.0, 0.0, 131280556.01794536, 20435.530265815629, 0.0, 0.0, 166170342.25571772, 50100.982288524996, 0.0, 0.0, 35409830.459971406, 33124.972929883166, 0.0, 0.0, 98747876.406133488, -63736.080320002809, 0.0, 0.0, 88071880.266417414, -7100.2184152616755, 0.0, 0.0, -3067340.9423153657, 91162.549369077489, 0.0, 0.0, 63897911.553277262, 46684.560473517355, 0.0, 0.0, 34498206.032984555, -4537.3240835134584, 0.0, 0.0, 5168843.1048901472, -21320.40983260217, -15835543.717267705, 0.0, 0.0, 0.0, -108625585.50132097, 3294.6252010393659, 0.0, 0.0, 33621479.273489162, 44729.560439200985, 0.0, 0.0, 103347563.63279098, -21767.597065975646, 0.0, 0.0, -94941255.180099696, 9685.7584460242178, 0.0, 0.0, -18528876.37688531, 90099.006466248247, 0.0, 0.0, -121579532.1146235, 139213.3284709499, 0.0, 0.0, 71246149.768020689, -6806.3276870759018, 0.0, 0.0, 145604934.16640645, -15090.6173931348, 0.0, 0.0, -29251884.513770111, 49390.368939568521, 0.0, 0.0, -49586552.469104417, 36886.524239895676, 0.0, 0.0, -132737515.14220525, -18372.148025799193, 0.0, 0.0, -76491981.799765065, -33802.178523338815, 0.0, 0.0, -65923648.161891818, -13764.57393849405, 0.0, 0.0, -77827781.713095531, 47692.036396206728, 0.0, 0.0, 21647589.21944366, -14133.730494852018, 0.0, 0.0, -76290028.632632598, 51182.252677407232, 0.0, 0.0, 41455286.640109941, 47157.905514409278, 0.0, 0.0, -2303036.9134609378, 23541.969363905846, 0.0, 0.0, -11918806.087500827, -57397.776327919324, 197612684.36048445, 0.0, 0.0, 0.0, 118955416.99244839, -24087.627570760262, 0.0, 0.0, -77491887.254076943, 728.30824844376821, 0.0, 0.0, 12207030.001704402, 49466.405483031638, 0.0, 0.0, 14932883.729976833, 14239.9646008034, 0.0, 0.0, 27192582.807980306, -46905.646869159398, 0.0, 0.0, -3736072.351231684, 218791.39737395261, 0.0, 0.0, 938468.7842925014, 140973.07684057893, 0.0, 0.0, 94550054.572198883, 7941.4520718544645, 0.0, 0.0, -74181966.616232648, -21044.559100278962, 0.0, 0.0, 5019241.6634857096, -5304.694057288676] - ), - 'alm5': n.array( - [-197735155.01929793, 0.0, 0.0, 0.0, -46053418.11639905, -7226.397802963189, -210520973.5427039, 0.0, 0.0, 0.0, -210657534.4115783, -10745.785564600596, 0.0, 0.0, 41148658.926344283, -10416.636060571493, 0.0, 0.0, 35784980.360108547, 9612.9840553492686, 304168753.30395395, 0.0, 0.0, 0.0, -3117586.5713760527, 1632.8412811888347, 0.0, 0.0, -171090196.95194718, -4632.55322212383, 0.0, 0.0, -15011356.299438834, -8364.6158748977232, 0.0, 0.0, 33676784.554911196, -1772.7269020579031, 0.0, 0.0, 19210024.26669988, -6481.5616124462031, -158387393.28245038, 0.0, 0.0, 0.0, 57914671.611356676, -4885.2721544610504, 0.0, 0.0, 95684065.272677362, -20637.725554880592, 0.0, 0.0, -102657366.72310401, 10831.674992370326, 0.0, 0.0, -24919568.123357572, -493.6485726144798, 0.0, 0.0, -63605529.998098962, -674.09128358241719, 0.0, 0.0, -20267019.847643819, 5547.5212175440292, 0.0, 0.0, -12278347.932371413, -6453.4324016264673, 43450364.563942656, 0.0, 0.0, 0.0, 64756329.325183183, 13568.438404067152, 0.0, 0.0, 25774658.376369122, -18443.874764878143, 0.0, 0.0, 18490347.059644662, -10189.922507207644, 0.0, 0.0, 11237512.512576636, -3548.1511247369526, 0.0, 0.0, 30643195.288836252, 5554.058991234795, 0.0, 0.0, 91852213.821721107, 11152.354180029373, 0.0, 0.0, 17136791.711244829, -13738.340482599324, 0.0, 0.0, 26654802.354939841, -3772.9607028607643, 0.0, 0.0, 40080801.777484469, 3898.1337497247532, -64205745.592204437, 0.0, 0.0, 0.0, -22659883.342662893, -4778.0834184917312, 0.0, 0.0, 18555022.616979484, -13473.030524613543, 0.0, 0.0, -19158703.781450976, -4325.618633195475, 0.0, 0.0, -87303680.674776122, -7798.5650239280103, 0.0, 0.0, -28630028.187836513, -13657.289990676993, 0.0, 0.0, -77776433.152057096, 5663.1889376592408, 0.0, 0.0, -75576903.129559204, 12998.603107606816, 0.0, 0.0, 15394598.358521122, -10123.752482296954, 0.0, 0.0, -26711379.163051497, -11242.177700866312, 0.0, 0.0, -34392594.777521037, -10202.774681930312, 0.0, 0.0, 10602956.226330029, 10479.795259434368, 106491522.00151923, 0.0, 0.0, 0.0, -33138240.729237858, 14693.306846559934, 0.0, 0.0, -21364417.055660442, -922.28831526417491, 0.0, 0.0, 105835946.52125469, -21543.372550449742, 0.0, 0.0, 56811774.725853391, -30413.430161657085, 0.0, 0.0, -4861543.3597652912, -3938.4477312154736, 0.0, 0.0, 21178757.320129372, 3.5425208576304499, 0.0, 0.0, 45298346.835260376, 6143.2888814262978, 0.0, 0.0, 335546.7987198591, -5597.459067079385, 0.0, 0.0, -3999171.3806912508, -5264.6744997915521, 0.0, 0.0, 18095332.294255983, 638.8459776001049, 0.0, 0.0, 840929.63493319822, 107.15833138602918, 0.0, 0.0, -10371226.677820578, -10505.444300287199, 0.0, 0.0, 12436856.257415403, -8511.9205882707138, 14784850.940883569, 0.0, 0.0, 0.0, 19007856.207817975, -5034.9923737995823, 0.0, 0.0, -2498879.0170426308, -4590.8614967715039, 0.0, 0.0, -68376948.624012321, 15000.851884991811, 0.0, 0.0, -30424090.555139855, -41397.471186152834, 0.0, 0.0, -29616739.442200258, - \ - 26436.200386076027, 0.0, 0.0, 4504589.81844257, -8603.13572616479, 0.0, 0.0, -11478082.127457535, 9801.1835365541247, 0.0, 0.0, -9949835.1498631909, -3681.9065933991928, 0.0, 0.0, 31127145.710026521, -6023.8911849642827, 0.0, 0.0, -1474616.7280308811, -3120.8527051806514, 0.0, 0.0, 14424342.151320595, 4478.0547817086999, 0.0, 0.0, 19870777.76114646, -18798.894308055569, 0.0, 0.0, 3439581.5227250052, 3824.0816135823075, 0.0, 0.0, -13375210.583126174, 5111.8038311824457, 0.0, 0.0, 2704300.4055295889, -4943.7362257902059, -2820776.3819985995, 0.0, 0.0, 0.0, -8716712.5975790638, 8870.4368321870552, 0.0, 0.0, 72838691.512315914, -13115.675171949872, 0.0, 0.0, 34868715.134384163, 445.01372842380943, 0.0, 0.0, -22648556.756227445, -24007.562182239992, 0.0, 0.0, 10225496.43410253, -13429.948589291756, 0.0, 0.0, -11648114.4951357, -25752.408984327056, 0.0, 0.0, -27790363.240071055, -1440.4752597467768, 0.0, 0.0, -13972388.61876422, -2880.3368818686808, 0.0, 0.0, -31611811.476835247, -4796.544240381837, 0.0, 0.0, -39940933.139877774, -11990.248686645078, 0.0, 0.0, -8637664.214980036, -8054.465313268588, 0.0, 0.0, -23757834.173265617, 15100.165734198441, 0.0, 0.0, -21240042.369048979, 1670.9006386179863, 0.0, 0.0, 745992.55951904377, -22177.201914765799, 0.0, 0.0, -15411608.939690793, -11155.870022900486, 0.0, 0.0, -8277784.326783523, 1045.3560798711144, 0.0, 0.0, -1230781.1765813681, 5157.2676594239729, 3371226.6051944932, 0.0, 0.0, 0.0, 26258888.926003013, -781.11690680106267, 0.0, 0.0, -7982799.094995562, -11012.550602180869, 0.0, 0.0, -24555994.147887498, 5209.5952756182242, 0.0, 0.0, 23146703.87589569, -2812.6513443658323, 0.0, 0.0, 4318014.4979850184, -21492.21656303855, 0.0, 0.0, 29058640.345119234, -34037.549503927024, 0.0, 0.0, -18242673.078121372, 1656.8324467507082, 0.0, 0.0, -36072862.830247574, 3551.0799378540246, 0.0, 0.0, 7252934.6827932158, -11913.82448328409, 0.0, 0.0, 11797958.62110701, -8915.0206777991007, 0.0, 0.0, 32028437.321352843, 4440.2513551878992, 0.0, 0.0, 18463453.022954959, 8064.832811994861, 0.0, 0.0, 15830357.645304311, 3278.6002973079399, 0.0, 0.0, 18792715.22209141, -11110.350620979698, 0.0, 0.0, -5254231.7428235617, 2977.060123896787, 0.0, 0.0, 18517061.004637863, -12596.961454058939, 0.0, 0.0, -9965178.2132176459, -11359.992935143997, 0.0, 0.0, 541776.1522784296, -5769.2477330948705, 0.0, 0.0, 2885107.8830083506, 13837.858540130937, -47862763.656404138, 0.0, 0.0, 0.0, -28298286.980327792, 5873.9680203106927, 0.0, 0.0, 18362400.235881787, -315.51705578927215, 0.0, 0.0, -2874422.5857720273, -11929.116229145047, 0.0, 0.0, -3417477.3191902661, -3924.658545164405, 0.0, 0.0, -6421891.4478960913, 11416.933954008207, 0.0, 0.0, 1037940.6079158594, -53486.786972605179, 0.0, 0.0, -613407.33829156274, -33589.737764611818, 0.0, 0.0, -23490363.036867645, -2004.1753650588878, 0.0, 0.0, 18333266.803092051, 5109.7982999645592, 0.0, 0.0, -1138365.5078694951, 1253.4638702863897] - ), - 'alm4': n.array( - [7200724.2174806157, 0.0, 0.0, 0.0, 1507578.5364308401, 249.09445266642169, 7725779.5666901879, 0.0, 0.0, 0.0, 6747539.2579509569, 329.36641952671226, 0.0, 0.0, -1343001.5699128646, 343.36792991568888, 0.0, 0.0, -1159855.5653791095, -308.92769367092768, -10045128.444344388, 0.0, 0.0, 0.0, 288589.31376132951, -70.980762890053413, 0.0, 0.0, 5851186.7774917074, 155.21204435663131, 0.0, 0.0, 467714.86876319919, 238.59930858441089, 0.0, 0.0, -1101842.335750744, 58.096309466026973, 0.0, 0.0, -608138.07580545719, 204.95821814484245, 5101024.1326503837, 0.0, 0.0, 0.0, -1885231.9571066336, 139.59983322242354, 0.0, 0.0, -3105913.7215474164, 701.68124144120748, 0.0, 0.0, 3239644.93434321, -339.82491448090769, 0.0, 0.0, 783855.81893535459, 8.7527052982549058, 0.0, 0.0, 1986537.8514804086, 54.774986424606197, 0.0, 0.0, 612170.88910865143, -176.99708425924547, 0.0, 0.0, 398007.89088467637, 193.56614271468877, -1596925.8860192283, 0.0, 0.0, 0.0, -2227878.7078425568, -415.01509470166883, 0.0, 0.0, -844775.91825557721, 650.38469558451084, 0.0, 0.0, -590632.35791223042, 299.36217992006749, 0.0, 0.0, -437078.74958942051, 113.79355867828019, 0.0, 0.0, -980335.68394004204, -157.54883485169805, 0.0, 0.0, -2938603.615868886, -315.29147746550342, 0.0, 0.0, -584687.47979809716, 434.71263424168563, 0.0, 0.0, -858991.85386585491, 121.46105830492419, 0.0, 0.0, -1277548.8225962832, -115.89194500169798, 1840668.8290774515, 0.0, 0.0, 0.0, 775421.56337957992, 164.00611331607877, 0.0, 0.0, -562088.42813265021, 488.74685971765177, 0.0, 0.0, 691778.87208729645, 97.689901957009482, 0.0, 0.0, 2882651.1565228878, 272.52207724336955, 0.0, 0.0, 948662.06765682506, 433.74488550190046, 0.0, 0.0, 2497867.2332102088, -144.98233385054755, 0.0, 0.0, 2414321.2649437124, -415.58171649203098, 0.0, 0.0, -490977.9606196385, 302.58764598967997, 0.0, 0.0, 838801.66186270467, 354.24491208439002, 0.0, 0.0, 1109240.4625873815, 343.14609143330898, 0.0, 0.0, -344528.03137613513, -334.26528674880853, -3354305.0711071114, 0.0, 0.0, 0.0, 1235458.4567361525, -485.19168633800058, 0.0, 0.0, 487397.2070375224, 83.880871552662413, 0.0, 0.0, -3308936.6858345182, 647.62704156274015, 0.0, 0.0, -1751740.8660837077, 1026.5527017383265, 0.0, 0.0, 139846.54955892122, 106.93161870083593, 0.0, 0.0, -721404.82398454682, 3.6015241937210991, 0.0, 0.0, -1476829.0591856656, -205.98964494497451, 0.0, 0.0, 17074.077977673544, 171.31880268277882, 0.0, 0.0, 123060.47869451297, 132.0062185627576, 0.0, 0.0, -571603.6917338561, 10.396528401168975, 0.0, 0.0, 2106.5454300025908, 35.752699013801632, 0.0, 0.0, 321464.4592717489, 342.34076722166759, 0.0, 0.0, -405230.5941204023, 255.2360120010726, -670296.34645801655, 0.0, 0.0, 0.0, -529100.52793346881, 148.57741762277331, 0.0, 0.0, 57471.51362526336, 206.86269211261629, 0.0, 0.0, 2207181.4600743535, -493.51422675565459, 0.0, 0.0, 895463.30568390526, 1409.934585353082, 0.0, 0.0, 888776.11402601667, 798.19028910433144, - 0.0, 0.0, -215643.35608039363, 274.1110708271608, 0.0, 0.0, 376051.83866420202, -310.73247764113745, 0.0, 0.0, 289955.29165051226, 101.76182819162518, 0.0, 0.0, -994834.62761617475, 161.69117608964245, 0.0, 0.0, 55076.980514253126, 72.037278617768209, 0.0, 0.0, -497694.41516721481, -112.23417665406721, 0.0, 0.0, -630133.16098474909, 608.3926186109635, 0.0, 0.0, -103502.07506563514, -122.78257869786432, 0.0, 0.0, 415209.12744939065, -166.58248247027083, 0.0, 0.0, -92606.301129069601, 153.27094286810689, -155.133754694667, 0.0, 0.0, 0.0, 368304.00212202733, -280.867215040259, 0.0, 0.0, -2362905.2792973067, 479.92664306566542, 0.0, 0.0, -1040034.2467855478, 0.76582903775922517, 0.0, 0.0, 718560.8191561898, 876.24115424409968, 0.0, 0.0, -292721.47833479074, 359.34134632343324, 0.0, 0.0, 372865.53641371639, 845.74282823210956, 0.0, 0.0, 993400.71737590164, 30.865235806642321, 0.0, 0.0, 474280.45441336668, 93.872153111048078, 0.0, 0.0, 1002907.9299558332, 133.19243145625578, 0.0, 0.0, 1255885.0030796861, 369.38663831551793, 0.0, 0.0, 290708.02660839848, 267.74414177703102, 0.0, 0.0, 750690.63702933991, -441.17311505823324, 0.0, 0.0, 679277.21542988182, -47.164992914979038, 0.0, 0.0, -25034.048713920944, 737.20036885145737, 0.0, 0.0, 492703.18828978809, 340.11997934964194, 0.0, 0.0, 258268.03397987972, -25.875498151930167, 0.0, 0.0, 36841.386016291726, -166.58153344592151, -37632.524860587197, 0.0, 0.0, 0.0, -846970.57810843072, 23.067138772739717, 0.0, 0.0, 231772.05047900774, 389.59227512856796, 0.0, 0.0, 731573.15687432117, -159.47722701117917, 0.0, 0.0, -779636.79196457902, 169.42221635624287, 0.0, 0.0, -114048.4415545105, 645.30053706908575, 0.0, 0.0, -881108.21860260586, 1161.5099955044125, 0.0, 0.0, 748235.23576389183, -57.690368801478542, 0.0, 0.0, 1304114.5518882216, -99.391608662850047, 0.0, 0.0, -263144.21203343244, 380.80042850864618, 0.0, 0.0, -352403.58508126321, 287.70856589182199, 0.0, 0.0, -1026027.1112983709, -143.58640740725582, 0.0, 0.0, -592252.06919899839, -244.84725404024846, 0.0, 0.0, -495445.89352101792, -98.364381497365002, 0.0, 0.0, -604362.59029897652, 295.72251912004111, 0.0, 0.0, 173141.05309468889, -29.437403866957482, 0.0, 0.0, -609597.44962526858, 441.85413291552464, 0.0, 0.0, 313734.85551236029, 360.67490478600058, 0.0, 0.0, -15401.76767474161, 198.95971188667156, 0.0, 0.0, -93905.143248108579, -441.64480338592182, 1557834.4870206926, 0.0, 0.0, 0.0, 846825.25105827861, -197.83739354926948, 0.0, 0.0, -537733.70476057276, 33.21990588911023, 0.0, 0.0, 82182.540697250195, 381.92187491491592, 0.0, 0.0, 79199.852686637649, 206.0957338460905, 0.0, 0.0, 188168.68771215889, -382.92038636172128, 0.0, 0.0, -53095.127393283889, 1828.4815368321251, 0.0, 0.0, 77039.429637870722, 1006.0372475571642, 0.0, 0.0, 860002.40107733512, 79.645120143879822, 0.0, 0.0, -655526.16343116295, -168.77744731668088, 0.0, 0.0, 24864.210627988363, -36.250655713179249] - ), - 'alm3': n.array( - [5498273.867212004, 0.0, 0.0, 0.0, 1278787.6144197686, 200.69631150016968, 5855938.7480396256, 0.0, 0.0, 0.0, 5847379.6897321241, 298.14002897401355, 0.0, 0.0, -1142519.2128262592, 289.14639793614521, 0.0, 0.0, -993520.89184620359, -266.85901085140711, -8445890.7411452159, 0.0, 0.0, 0.0, 88960.996282732958, -45.404243903980827, 0.0, 0.0, 4753726.6035505533, 128.65976222572772, 0.0, 0.0, 416486.45794872148, 231.75264200679231, 0.0, 0.0, -935084.04088520445, 49.245386113225521, 0.0, 0.0, -533118.40524846269, 179.90326954511633, 4396953.9195928695, 0.0, 0.0, 0.0, -1608349.7299925357, 135.45560067565393, 0.0, 0.0, -2656511.2093055765, 573.27704161730151, 0.0, 0.0, 2849651.3732845969, -300.56300083744014, 0.0, 0.0, 691500.88130568538, 13.583711800361833, 0.0, 0.0, 1764810.4259444436, 19.179618441300519, 0.0, 0.0, 562066.86523355253, -153.96198960788544, 0.0, 0.0, 340862.09253124218, 178.98642747530579, -1208920.608357993, 0.0, 0.0, 0.0, -1799262.1597735337, -376.45318693479493, 0.0, 0.0, -715874.06723833689, 512.60274437112969, 0.0, 0.0, -513195.85187474889, 282.61204774423248, 0.0, 0.0, -312987.8115696148, 98.476599955903495, 0.0, 0.0, -850554.04150807834, -153.88002183190986, 0.0, 0.0, -2549521.2039438705, -308.97811247523509, 0.0, 0.0, -476185.0271458606, 381.24956233215812, 0.0, 0.0, -739921.59786708606, 104.73864708094125, 0.0, 0.0, -1112406.7067007029, -108.11473746144854, 1779181.7167289439, 0.0, 0.0, 0.0, 629948.71285196778, 132.75183050912085, 0.0, 0.0, -514848.34386742389, 374.55990412960182, 0.0, 0.0, 532627.3153818252, 119.77835605693443, 0.0, 0.0, 2424622.4174201251, 216.72201228006872, 0.0, 0.0, 795108.48625639779, 379.06163904571338, 0.0, 0.0, 2158946.4330264404, -156.65280944607056, 0.0, 0.0, 2097723.367115201, -360.82043797325053, 0.0, 0.0, -427280.22268814908, 280.67854240034717, 0.0, 0.0, 741194.31265485799, 311.98234210405832, 0.0, 0.0, 954730.11413698632, 283.38882535844346, 0.0, 0.0, -294365.82031801599, -290.87943522870074, -2955385.5772971096, 0.0, 0.0, 0.0, 922348.17132076842, -407.96866449942939, 0.0, 0.0, 590219.54455448966, 26.085003675834287, 0.0, 0.0, -2936385.3988425806, 597.68610206583253, 0.0, 0.0, -1575950.5946588507, 844.75891669718953, 0.0, 0.0, 134649.35790006144, 109.16816207238172, 0.0, 0.0, -588332.72589620715, -0.060434616306956457, 0.0, 0.0, -1257716.4221816759, -170.68406812560957, 0.0, 0.0, -8941.0779337873792, 155.29124403630357, 0.0, 0.0, 110950.05042145777, 145.66225385101623, 0.0, 0.0, -502170.41979421745, -17.325868884214849, 0.0, 0.0, -22949.505096291126, -2.4551467208407827, 0.0, 0.0, 287724.38079964806, 291.68391922333836, 0.0, 0.0, -345306.35353751393, 236.04471625211903, -412926.76103576075, 0.0, 0.0, 0.0, -526646.50936312054, 139.67052359284023, 0.0, 0.0, 68989.951308911957, 127.92940529824081, 0.0, 0.0, 1898231.0764858185, -416.49200396660581, 0.0, 0.0, 843251.14376973349, 1149.9715407003903, 0.0, 0.0, 821330.99892625911, - 733.43891047406044, 0.0, 0.0, -125797.69610716954, 238.84073917328871, 0.0, 0.0, 318711.61841675505, -272.01264234407392, 0.0, 0.0, 275787.48754996213, 101.98949961733558, 0.0, 0.0, -863964.31932292669, 166.75001032516667, 0.0, 0.0, 41026.459186118453, 86.226676317826517, 0.0, 0.0, -400863.91227860982, -123.85056930956991, 0.0, 0.0, -551443.79119247897, 521.92551449632617, 0.0, 0.0, -95383.356716058464, -106.16353997548579, 0.0, 0.0, 371079.83600833849, -141.89502251030711, 0.0, 0.0, -75145.763091870656, 137.17426779366033, 77215.485549988181, 0.0, 0.0, 0.0, 243010.03290878746, -246.16028356941868, 0.0, 0.0, -2022146.4903465142, 364.58173021633223, 0.0, 0.0, -966729.65752818203, -12.242870088295632, 0.0, 0.0, 628405.85512085771, 667.51076371889519, 0.0, 0.0, -283104.73741182394, 372.19399604828794, 0.0, 0.0, 323261.32509660453, 715.00664543583957, 0.0, 0.0, 772628.27728037443, 39.783619682754797, 0.0, 0.0, 388194.79034767463, 79.95535765348265, 0.0, 0.0, 877314.47408925625, 132.86186416546855, 0.0, 0.0, 1108321.017616556, 332.59517110546255, 0.0, 0.0, 239961.36277227409, 223.69078367662058, 0.0, 0.0, 659299.35428607883, -418.54744902859727, 0.0, 0.0, 589532.25215103338, -46.289537699833957, 0.0, 0.0, -20714.541405546493, 615.98609025910253, 0.0, 0.0, 427769.59997919854, 309.46495603679875, 0.0, 0.0, 229667.51363210069, -28.911630023187641, 0.0, 0.0, 34129.567905943033, -143.20187626491094, -92640.48420559497, 0.0, 0.0, 0.0, -729109.33367109543, 21.654587090135621, 0.0, 0.0, 221416.5410305266, 306.01150060926915, 0.0, 0.0, 680747.43978198699, -144.57062058568377, 0.0, 0.0, -642943.0025409261, 78.812483102076229, 0.0, 0.0, -119574.15208283922, 596.2647968341123, 0.0, 0.0, -806204.14766925236, 945.57520214706699, 0.0, 0.0, 508496.6306797663, -45.935683181243427, 0.0, 0.0, 1003116.1598382751, -98.403721000389453, 0.0, 0.0, -201696.11249167149, 330.7020816302512, 0.0, 0.0, -327125.10138588975, 247.48897983897257, 0.0, 0.0, -889021.40818739205, -123.25802427575343, 0.0, 0.0, -512511.74050718872, -223.64554240580921, 0.0, 0.0, -439243.26699259342, -90.926884091497826, 0.0, 0.0, -521657.70312392223, 307.52889167500388, 0.0, 0.0, 145905.88035071047, -81.706295272192676, 0.0, 0.0, -514217.75957826863, 350.16556747675372, 0.0, 0.0, 276521.46974886092, 315.29551730855343, 0.0, 0.0, -15005.362914721836, 160.30373127823759, 0.0, 0.0, -80100.914586450817, -384.07908162118889, 1329022.0543307522, 0.0, 0.0, 0.0, 784583.09379498218, -163.16917368552592, 0.0, 0.0, -508966.00275964983, 8.9839949262181413, 0.0, 0.0, 79637.436419199701, 331.08436496876726, 0.0, 0.0, 94517.825357591864, 109.72964748155799, 0.0, 0.0, 177860.45162952511, -317.03718781317883, 0.0, 0.0, -29122.396674515963, 1485.7265036016379, 0.0, 0.0, 17912.116468879263, 931.65335058043877, 0.0, 0.0, 653330.83172917052, 55.731087572455294, 0.0, 0.0, -509734.47426063882, -141.90121461573341, 0.0, 0.0, 31458.886496181502, -34.732735905242301] - ), - 'alm2': n.array( - [-1103414.2044201535, 0.0, 0.0, 0.0, -249216.4175125043, -39.729408989111761, -1176577.5024123464, 0.0, 0.0, 0.0, -1133438.0896773722, -57.136484321740362, 0.0, 0.0, 222514.96389323997, -56.54701176052766, 0.0, 0.0, 193125.4799435687, 51.765853432263377, 1650813.1434357744, 0.0, 0.0, 0.0, -25180.167167042251, 9.706549888877543, 0.0, 0.0, -937103.70299756597, -25.235430095798019, 0.0, 0.0, -80206.951061589556, -43.737009902656311, 0.0, 0.0, 182236.99738128181, -9.5841647270127233, 0.0, 0.0, 103053.30746878275, -34.746107248883426, -853322.86337260832, 0.0, 0.0, 0.0, 312646.94046925154, -25.503097047283237, 0.0, 0.0, 516702.80610491917, -112.8995326796007, 0.0, 0.0, -549784.93980406516, 57.973309366387355, 0.0, 0.0, -133464.03856328354, -2.3579576847100228, 0.0, 0.0, -340036.97046563891, -5.0761598513730801, 0.0, 0.0, -107417.89539361646, 29.82477180699183, 0.0, 0.0, -66288.742088489264, -34.12677027245843, 242761.66286661208, 0.0, 0.0, 0.0, 355299.14864236064, 72.099452268713861, 0.0, 0.0, 139443.07563040542, -101.94519349600016, 0.0, 0.0, 99457.074090162219, -53.571788791621884, 0.0, 0.0, 63825.321563384627, -19.106242946089228, 0.0, 0.0, 164839.16754470853, 28.99853104429242, 0.0, 0.0, 494099.56746437453, 58.175733468573178, 0.0, 0.0, 93765.53513571863, -73.705546017026805, 0.0, 0.0, 143668.77177549744, -20.327210721837712, 0.0, 0.0, 215432.54358751758, 20.561875291271971, -336035.2869258151, 0.0, 0.0, 0.0, -123952.11552198855, -26.20554895407496, 0.0, 0.0, 98272.253111928076, -75.114433478302843, 0.0, 0.0, -106650.06951936896, -21.330579531982103, 0.0, 0.0, -473476.94996891997, -42.98730216491024, 0.0, 0.0, -155456.52564638408, -73.316932421345186, 0.0, 0.0, -418808.97740108712, 28.899145302574603, 0.0, 0.0, -406392.02990293864, 69.897831029364852, 0.0, 0.0, 82745.855904357944, -53.543664420697027, 0.0, 0.0, -143003.38259869698, -60.231381402686893, 0.0, 0.0, -185414.39992036307, -55.638999723792324, 0.0, 0.0, 57277.617390907042, 56.327787434392484, 570416.63114454073, 0.0, 0.0, 0.0, -185825.17149148285, 79.745406813858992, 0.0, 0.0, -106401.39466975507, -7.4871873591579607, 0.0, 0.0, 566118.44264289935, -113.91061252917012, 0.0, 0.0, 302767.57112975762, -166.02607098229137, 0.0, 0.0, -25511.390371765974, -20.284633946514809, 0.0, 0.0, 115918.21036339784, -0.14909046442531992, 0.0, 0.0, 244883.77982795733, 33.441292469906351, 0.0, 0.0, 578.97737984670971, -29.749816407437436, 0.0, 0.0, -21287.86151421025, -26.705101674036737, 0.0, 0.0, 97016.665438425509, 2.0789083598333034, 0.0, 0.0, 3245.3467862179295, -1.1507130817224245, 0.0, 0.0, -55339.697968340421, -56.781836595897254, 0.0, 0.0, 67224.568837156505, -45.034112413907174, 88228.413091622468, 0.0, 0.0, 0.0, 98729.870790065805, -26.490575176241236, 0.0, 0.0, -12521.061489840857, -27.498884777435311, 0.0, 0.0, -368630.92316534434, 81.327104401357062, 0.0, 0.0, -160372.31410858282, -226.57241037930862, 0.0, 0.0, -156704.90196554124, - \ - 139.95065504138012, 0.0, 0.0, 27482.694924666503, -46.191163980334068, 0.0, 0.0, -62136.927476522571, 52.599397698604172, 0.0, 0.0, -52277.755677365676, -19.094727148594099, 0.0, 0.0, 167405.17967058913, -31.063717548123311, 0.0, 0.0, -8289.0844077842721, -15.577974192081774, 0.0, 0.0, 79186.162530883637, 22.734818682221846, 0.0, 0.0, 106668.34326342445, -101.41692049139429, 0.0, 0.0, 18214.641074740575, 20.585373531073557, 0.0, 0.0, -71390.592043344805, 27.649348022334909, 0.0, 0.0, 14814.590103047942, -26.36849999764064, -11157.116779309097, 0.0, 0.0, 0.0, -50884.637809017622, 47.597477185206181, 0.0, 0.0, 393267.6756285142, -73.354139067332838, 0.0, 0.0, 184321.32496451217, 1.6799736455904748, 0.0, 0.0, -121684.25286297864, -134.07023722185465, 0.0, 0.0, 53659.100234631303, -68.944001271453899, 0.0, 0.0, -62729.732767350608, -139.53389739397599, 0.0, 0.0, -154172.64228266297, -7.0791581577233611, 0.0, 0.0, -76362.086452639225, -15.578970227018429, 0.0, 0.0, -169687.45011097338, -24.916016619164235, 0.0, 0.0, -213898.37319506073, -63.888596650200135, 0.0, 0.0, -47086.22333360646, -43.77647795152663, 0.0, 0.0, -127397.09602717002, 79.396693346221724, 0.0, 0.0, -114260.87383607897, 8.715503344160485, 0.0, 0.0, 4070.2158591931084, -120.48808286434839, 0.0, 0.0, -82888.947500125505, -59.255380108883756, 0.0, 0.0, -44246.638222694237, 5.2910059817257249, 0.0, 0.0, -6508.0061320476525, 27.794706552026138, 15023.702290156509, 0.0, 0.0, 0.0, 141495.08754248972, -4.1209650818827823, 0.0, 0.0, -41796.81177522293, -60.968327854584736, 0.0, 0.0, -129810.40849011859, 27.679103738189752, 0.0, 0.0, 126273.89360457758, -18.804328613744513, 0.0, 0.0, 22145.352034173586, -113.60303290931722, 0.0, 0.0, 153991.20384008222, -186.36981064621975, 0.0, 0.0, -105424.03359466669, 9.1868043948482665, 0.0, 0.0, -200753.94837883816, 18.462385825155181, 0.0, 0.0, 40407.548132653654, -64.063903113355181, 0.0, 0.0, 62369.105084695089, -48.063478622828697, 0.0, 0.0, 172352.2462180329, 23.959278790922735, 0.0, 0.0, 99384.432937844947, 42.821236641167104, 0.0, 0.0, 84676.398507017133, 17.345700727270732, 0.0, 0.0, 101237.19550751503, -57.169603738392134, 0.0, 0.0, -28488.049510846889, 13.144012068357325, 0.0, 0.0, 100356.14379977378, -69.478218605370571, 0.0, 0.0, -53390.779412722877, -60.97825600786021, 0.0, 0.0, 2834.413225208727, -31.681493659170407, 0.0, 0.0, 15592.097028410077, 74.394985075632434, -258548.41923429139, 0.0, 0.0, 0.0, -149722.17678243664, 32.038106652580687, 0.0, 0.0, 96622.532589511451, -2.7613786699687144, 0.0, 0.0, -15055.185742227035, -64.205006666819855, 0.0, 0.0, -17013.860784224202, -24.8088027258508, 0.0, 0.0, -33891.222331880599, 62.248672839967249, 0.0, 0.0, 6427.1304293357562, -293.13055304372818, 0.0, 0.0, -5760.4541098594109, -177.54384831356066, 0.0, 0.0, -131226.58104731468, -11.521255308232114, 0.0, 0.0, 101695.66103538357, 27.724077681902834, 0.0, 0.0, -5604.4363708451438, 6.5783684475226076] - ), - 'alm1': n.array( - [86105.710512555146, 0.0, 0.0, 0.0, 19016.380367371166, 3.0740357044470707, 91816.647180154585, 0.0, 0.0, 0.0, 86145.045560129452, 4.3020547568553216, 0.0, 0.0, -16972.06932406019, 4.333570009765352, 0.0, 0.0, -14707.42362132396, -3.9359863782863593, -126310.12023278416, 0.0, 0.0, 0.0, 2368.7338648797499, -0.79901363129630532, 0.0, 0.0, 72128.060366414618, 1.9360586501514283, 0.0, 0.0, 6067.5004453349093, 3.2592178193264738, 0.0, 0.0, -13907.351529879181, 0.72938468470238693, 0.0, 0.0, -7816.9761497748268, 2.6322124359613301, 64909.319748412963, 0.0, 0.0, 0.0, -23791.780691604748, 1.8910793637963941, 0.0, 0.0, -39372.579704928015, 8.6889053485660135, 0.0, 0.0, 41595.230960589914, -4.3902339481535977, 0.0, 0.0, 10112.272928799337, 0.16506107444965337, 0.0, 0.0, 25731.219155667335, 0.46130897945539479, 0.0, 0.0, 8077.6340416862104, -2.2666842985329221, 0.0, 0.0, 5051.6471594700961, 2.5599044818704457, -18922.572614424953, 0.0, 0.0, 0.0, -27390.862431652142, -5.4254510820269397, 0.0, 0.0, -10626.922204020999, 7.903933319447022, 0.0, 0.0, -7559.5767299673462, 3.9958477189129846, 0.0, 0.0, -5027.7625354094725, 1.4539966351419851, 0.0, 0.0, -12527.616585359714, -2.1579613556381956, 0.0, 0.0, -37550.570759319402, -4.3258197514406094, 0.0, 0.0, -7207.8131427431153, 5.5923007167559113, 0.0, 0.0, -10934.659788070483, 1.5462056815557303, 0.0, 0.0, -16366.37241348215, -1.5385747155059879, 25047.6062182438, 0.0, 0.0, 0.0, 9508.0248644387575, 2.0198784164358696, 0.0, 0.0, -7368.9903795998471, 5.8623209779020256, 0.0, 0.0, 8311.3736131828646, 1.4992901950620758, 0.0, 0.0, 36177.02133195733, 3.3258195341825103, 0.0, 0.0, 11892.087203873632, 5.562433896593574, 0.0, 0.0, 31851.760738854839, -2.1167769777232954, 0.0, 0.0, 30876.553443434816, -5.3089330153539027, 0.0, 0.0, -6285.2177188078704, 4.0232333154977864, 0.0, 0.0, 10832.588384515837, 4.5638689140627484, 0.0, 0.0, 14114.002386595224, 4.2710132435130523, 0.0, 0.0, -4366.4936621754323, -4.2778156918589874, -43204.449024641232, 0.0, 0.0, 0.0, 14511.687075286822, -6.1034572760433603, 0.0, 0.0, 7644.0705070270978, 0.72112747834405599, 0.0, 0.0, -42871.395371724895, 8.5324010467773128, 0.0, 0.0, -22864.270680876944, 12.756935623709822, 0.0, 0.0, 1910.6385733283935, 1.4860435822542193, 0.0, 0.0, -8923.3811275360677, 0.021156295435269104, 0.0, 0.0, -18674.466081287377, -2.5596759713678492, 0.0, 0.0, 21.296692666388893, 2.2396721751367372, 0.0, 0.0, 1605.0199334129031, 1.942000053562025, 0.0, 0.0, -7355.8052917157866, -0.085178977736855899, 0.0, 0.0, -178.73958595323569, 0.17989586109817998, 0.0, 0.0, 4182.3341200215764, 4.3294838255467267, 0.0, 0.0, -5126.0780933967171, 3.3816336872697645, -7175.178402542273, 0.0, 0.0, 0.0, -7308.3848104788049, 1.9755604776273612, 0.0, 0.0, 907.5844769826324, 2.2609766986638453, 0.0, 0.0, 28054.862415791838, -6.2191983569260829, 0.0, 0.0, 12026.118122357248, 17.443247158460427, 0.0, 0.0, 11766.474070554848, - 10.494782611360524, 0.0, 0.0, -2275.6047141099889, 3.5015128439030572, 0.0, 0.0, 4743.4119902921057, -3.990800723023967, 0.0, 0.0, 3907.2171582824712, 1.4127861605729506, 0.0, 0.0, -12721.282992510121, 2.2920569832139255, 0.0, 0.0, 649.69038288480999, 1.1212365594407105, 0.0, 0.0, -6102.494402847844, -1.6577620524144914, 0.0, 0.0, -8096.9210297207674, 7.7205045824876493, 0.0, 0.0, -1368.9920705052045, -1.5642694932314585, 0.0, 0.0, 5395.9666599335242, -2.1117569522013517, 0.0, 0.0, -1140.01405051295, 1.9906879133936171, 624.80869328162123, 0.0, 0.0, 0.0, 4089.5349396056608, -3.6121520177209665, 0.0, 0.0, -29968.531010741684, 5.7439378149575493, 0.0, 0.0, -13842.366747404836, -0.083076507030891034, 0.0, 0.0, 9251.74658998427, 10.474210268762711, 0.0, 0.0, -4025.1724808612594, 5.0376737683049297, 0.0, 0.0, 4775.3783570389587, 10.664547039447074, 0.0, 0.0, 11976.191214257957, 0.50201620991965934, 0.0, 0.0, 5867.2639428163502, 1.1896716103905389, 0.0, 0.0, 12877.657067925986, 1.8465660318979775, 0.0, 0.0, 16206.111609433263, 4.8246843405078863, 0.0, 0.0, 3610.4854996584972, 3.3516070780476195, 0.0, 0.0, 9661.5351796437808, -5.9380430259292645, 0.0, 0.0, 8685.2531087868465, -0.64821232890848268, 0.0, 0.0, -312.91711936827596, 9.2168609777382926, 0.0, 0.0, 6298.759850966494, 4.4602580767723747, 0.0, 0.0, 3348.3045543307935, -0.38462078919272813, 0.0, 0.0, 488.51289926704931, -2.1128912645941416, -975.52305859373428, 0.0, 0.0, 0.0, -10755.129903571918, 0.30884068431632339, 0.0, 0.0, 3104.2277033433138, 4.7372665647730328, 0.0, 0.0, 9752.9130898821077, -2.0804460962139686, 0.0, 0.0, -9694.8281227787666, 1.64808120580346, 0.0, 0.0, -1622.3829558462212, 8.5067132512126111, 0.0, 0.0, -11558.805406892518, 14.350648555418546, 0.0, 0.0, 8405.0851462397623, -0.72112972624099048, 0.0, 0.0, 15625.638555235859, -1.3670451022237979, 0.0, 0.0, -3147.7771182901865, 4.8662303313693354, 0.0, 0.0, -4682.4501917588223, 3.6582047312104793, 0.0, 0.0, -13101.93913472442, -1.8255379688292537, 0.0, 0.0, -7556.06062439787, -3.2266823357474479, 0.0, 0.0, -6410.2917754375831, -1.3019240449467371, 0.0, 0.0, -7702.2742811075941, 4.2106258495163953, 0.0, 0.0, 2177.1234415980966, -0.84924429602420592, 0.0, 0.0, -7665.7128282976337, 5.3720471902173932, 0.0, 0.0, 4046.9940657058983, 4.6261175146435791, 0.0, 0.0, -211.63279451514836, 2.4440216742659922, 0.0, 0.0, -1188.9555539240885, -5.6516925299338743, 19695.857081475006, 0.0, 0.0, 0.0, 11252.737508494711, -2.458785211828749, 0.0, 0.0, -7232.0338690955987, 0.27253953774259326, 0.0, 0.0, 1123.7638154174197, 4.8837214488794061, 0.0, 0.0, 1215.3034770015856, 2.1029499497563773, 0.0, 0.0, 2552.3298189366842, -4.7821392334415531, 0.0, 0.0, -529.94244708716974, 22.599584036997086, 0.0, 0.0, 560.40615094398663, 13.309094105051802, 0.0, 0.0, 10242.089928115463, 0.92276408985565261, 0.0, 0.0, -7896.9507053769803, -2.1196969544998265, 0.0, 0.0, 397.11700299896523, -0.49174517770122583] - ), - 'alm0': n.array( - [-2509.795308092424, 0.0, 0.0, 0.0, -542.95304808539447, -0.089103865486498762, -2674.8921085852267, 0.0, 0.0, 0.0, -2450.8275459460328, -0.12122968266255646, 0.0, 0.0, 484.43258693118355, -0.12444162654967923, 0.0, 0.0, 419.14889644597554, 0.11199842018396657, 3617.1180506112255, 0.0, 0.0, 0.0, -79.345837595100249, 0.024609457915114472, 0.0, 0.0, -2076.1775181825979, -0.055599716031520682, 0.0, 0.0, -171.89694983456775, -0.09107814601572882, 0.0, 0.0, 397.16303975126743, -0.020743466595031901, 0.0, 0.0, 222.00188556890657, -0.074614425553248653, -1848.0514375785062, 0.0, 0.0, 0.0, 677.25212936706521, -0.052427769472071402, 0.0, 0.0, 1122.7561396675696, -0.25026343574461934, 0.0, 0.0, -1177.2398993868574, 0.12448795077559982, 0.0, 0.0, -286.89042984494125, -0.0043671055576578813, 0.0, 0.0, -729.16457065597024, -0.015059272877281931, 0.0, 0.0, -227.54986446468334, 0.064518156065887025, 0.0, 0.0, -144.09526163269231, -0.071896777739056492, 550.56142446132162, 0.0, 0.0, 0.0, 789.95305777447186, 0.15278481548345677, 0.0, 0.0, 302.80826664285104, -0.2292455172036138, 0.0, 0.0, 215.07203955470834, -0.11148641690072135, 0.0, 0.0, 147.6300094316332, -0.041438137068600535, 0.0, 0.0, 356.40663808704829, 0.06020981998761786, 0.0, 0.0, 1068.2809150343332, 0.12059322351429408, 0.0, 0.0, 207.15070625717203, -0.15887907500986867, 0.0, 0.0, 311.51955894051775, -0.044013176018082217, 0.0, 0.0, 465.50514676183599, 0.043086930173945374, -699.91994003413959, 0.0, 0.0, 0.0, -272.30205269131108, -0.058237464090315841, 0.0, 0.0, 206.6696629058103, -0.17113397512837467, 0.0, 0.0, -242.17697804400967, -0.03904696709972983, 0.0, 0.0, -1034.0461250086307, -0.096263366639788267, 0.0, 0.0, -340.36959713926638, -0.157959637524269, 0.0, 0.0, -906.76535925870894, 0.05822882111324016, 0.0, 0.0, -878.19034673650174, 0.15090747340518335, 0.0, 0.0, 178.72710693016728, -0.1133137878039443, 0.0, 0.0, -307.2732605638983, -0.12946761060311943, 0.0, 0.0, -402.15039831465805, -0.12267742876829732, 0.0, 0.0, 124.58755428476331, 0.12160615484632728, 1224.8966172274097, 0.0, 0.0, 0.0, -422.81125499888446, 0.17489349085562872, 0.0, 0.0, -206.13215938425151, -0.024918238081632359, 0.0, 0.0, 1216.0021828633653, -0.23903462262346217, 0.0, 0.0, 646.76999409163841, -0.36686036191363569, 0.0, 0.0, -53.748641101219171, -0.040657195610747071, 0.0, 0.0, 257.01496034832354, -0.00088397200625506657, 0.0, 0.0, 532.92627524275213, 0.073231868546206474, 0.0, 0.0, -2.3123718843121193, -0.063116998506782929, 0.0, 0.0, -45.312170650102566, -0.052918508044701933, 0.0, 0.0, 208.81448662099027, 0.00049665368894422079, 0.0, 0.0, 3.3145191420192557, -0.0075522336446495145, 0.0, 0.0, -118.38406740379477, -0.1235450612088997, 0.0, 0.0, 146.27931891595969, -0.095112431509793954, 216.66543016969877, 0.0, 0.0, 0.0, 202.62032812415652, -0.055071980987297146, 0.0, 0.0, -24.732380939749305, -0.069324586041150008, 0.0, 0.0, -799.12852251187439, 0.17805739075476529, 0.0, 0.0, -338.13613885263197, -0.50258751799301171, 0.0, 0.0, -330.92377568750896, - \ - 0.29439745258184846, 0.0, 0.0, 69.955703609112916, -0.099300574356904758, 0.0, 0.0, -135.50283401710723, 0.11336055781808395, 0.0, 0.0, -109.4473303776138, -0.039179921416761625, 0.0, 0.0, 361.89296520495282, -0.063457640307326188, 0.0, 0.0, -19.011530990712416, -0.030296155915062021, 0.0, 0.0, 175.81242107703684, 0.045380812776882037, 0.0, 0.0, 230.1356975837636, -0.21991370682307745, 0.0, 0.0, 38.548063220604263, 0.04447052463281953, 0.0, 0.0, -152.74099867458406, 0.060411014726151104, 0.0, 0.0, 32.799893279193917, -0.05625755938421767, -11.671167858413597, 0.0, 0.0, 0.0, -122.41338733578932, 0.10265761851708999, 0.0, 0.0, 854.8147788993241, -0.16832987784539305, 0.0, 0.0, 389.59483422670991, 0.0010515097421338222, 0.0, 0.0, -263.54000762919696, -0.30602620404886061, 0.0, 0.0, 113.5268590131072, -0.13743520219127883, 0.0, 0.0, -136.1177227410563, -0.30517270252912371, 0.0, 0.0, -347.71640981466663, -0.013328197668937738, 0.0, 0.0, -168.59066374139138, -0.034021615854743656, 0.0, 0.0, -365.89920330695344, -0.05129511900796007, 0.0, 0.0, -459.7707625930787, -0.13649377467013135, 0.0, 0.0, -103.53308934238288, -0.096015678120849338, 0.0, 0.0, -274.34912938228803, 0.16645409598440561, 0.0, 0.0, -247.15567235290939, 0.01807845821834346, 0.0, 0.0, 9.0053572040052821, -0.26370903611326263, 0.0, 0.0, -179.18044921665742, -0.12568774597726795, 0.0, 0.0, -94.892883913068388, 0.010492867772354359, 0.0, 0.0, -13.737508814272434, 0.060075070519419876, 23.415415276762271, 0.0, 0.0, 0.0, 305.72805905313203, -0.0086614331104518417, 0.0, 0.0, -86.195790327242264, -0.13777706251196414, 0.0, 0.0, -274.69250181433779, 0.058458297086366275, 0.0, 0.0, 278.482105784417, -0.053177711988373275, 0.0, 0.0, 44.501303461749991, -0.23822638212032041, 0.0, 0.0, 324.63764111477315, -0.41352873710279964, 0.0, 0.0, -249.4983121147516, 0.021301518932652769, 0.0, 0.0, -454.42693460024361, 0.037898208796734653, 0.0, 0.0, 91.623643436443217, -0.1383467576541032, 0.0, 0.0, 131.72531033239599, -0.10421407678062951, 0.0, 0.0, 372.83411450176357, 0.052076206062910413, 0.0, 0.0, 215.03659811564501, 0.091125817672451065, 0.0, 0.0, 181.72640460655063, 0.036584421520065045, 0.0, 0.0, 219.35570781570911, -0.11636865323780578, 0.0, 0.0, -62.255991452941828, 0.020311442840686849, 0.0, 0.0, 219.08103501446959, -0.15524342747668779, 0.0, 0.0, -114.87121517016, -0.13136769824434186, 0.0, 0.0, 5.9304785270308358, -0.070526493957355579, 0.0, 0.0, 33.931301137524464, 0.16072691130852704, -561.3125186753964, 0.0, 0.0, 0.0, -316.97903860259953, 0.070590200246086601, 0.0, 0.0, 202.91117550362088, -0.009538018080419413, 0.0, 0.0, -31.44408160859355, -0.13909745805711646, 0.0, 0.0, -32.437126472037825, -0.066025505043034366, 0.0, 0.0, -72.232731834313483, 0.13754930097467863, 0.0, 0.0, 16.089915969260041, -0.65224932808333158, 0.0, 0.0, -18.960925699756704, -0.37344958578008358, 0.0, 0.0, -298.63181385705462, -0.027681501480277509, 0.0, 0.0, 229.16214842560413, 0.06063401187656968, 0.0, 0.0, -10.520311488826575, 0.013786299852551351] - ), - } -} - - -def get_aa(freqs): - '''Return the AntennaArray to be used for simulation.''' - location = prms['loc'] - antennas = [] - if 'antpos' not in prms: - prms['antpos'] = prms['antpos_ideal'] - nants = len(prms['antpos']) - antpos_ideal = n.zeros(shape=(nants, 3), dtype=float) - tops = {'top_x': 0, 'top_y': 1, 'top_z': 2} - for k in prms['antpos_ideal'].keys(): - for i, m in enumerate(prms['antpos_ideal'][k]): - antpos_ideal[k, tops[m]] = prms['antpos_ideal'][k][m] - for i in range(nants): - beam = prms['beam'](freqs, nside=32, lmax=20, mmax=20, deg=7) - try: - beam.set_params(prms['bm_prms']) - except(AttributeError): - pass - phsoff = {'x': [0., 0.], 'y': [0., 0.]} - amp = prms['amps'].get(i, 4e-3) - amp = {'x': amp, 'y': amp} - bp_r = prms['bp_r'][i] - bp_r = {'x': bp_r, 'y': bp_r} - bp_i = prms['bp_i'][i] - bp_i = {'x': bp_i, 'y': bp_i} - twist = prms['twist'][i] - antennas.append(a.pol.Antenna(0., 0., 0., beam, phsoff=phsoff, - amp=amp, bp_r=bp_r, bp_i=bp_i, pointing=(0., n.pi / 2, twist))) -# antennas.append(a.pol.Antenna(0., 0., 0., beam, phsoff=phsoff)) -# aa = AntennaArray(prms['loc'], antennas, tau_ew=prms['tau_ew'], tau_ns=prms['tau_ns'], -# gain=prms['gain'], amp_coeffs=prms['amp_coeffs'], -# dly_coeffs=prms['dly_coeffs'], dly_xx_to_yy=prms['dly_xx_to_yy'], -# ant_layout=prms['ant_layout']) - aa = AntennaArray(prms['loc'], antennas, antpos_ideal=antpos_ideal) - pos_prms = {} - for i in range(nants): - pos_prms[str(i)] = prms['antpos'][i] - aa.set_params(pos_prms) - return aa diff --git a/hera_cal/calibrations/herahex_ex_ants.txt b/hera_cal/calibrations/herahex_ex_ants.txt deleted file mode 100644 index 2a752faac..000000000 --- a/hera_cal/calibrations/herahex_ex_ants.txt +++ /dev/null @@ -1,304 +0,0 @@ -3 -4 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -21 -22 -28 -29 -30 -31 -32 -33 -34 -35 -42 -43 -44 -45 -46 -47 -48 -49 -50 -56 -57 -58 -59 -60 -61 -62 -63 -64 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -89 -90 -91 -92 -93 -94 -95 -96 -97 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 diff --git a/hera_cal/calibrations/hsa7458_v000.py b/hera_cal/calibrations/hsa7458_v000.py deleted file mode 100644 index 36b3b4d37..000000000 --- a/hera_cal/calibrations/hsa7458_v000.py +++ /dev/null @@ -1,332 +0,0 @@ -import aipy as a -import numpy as n -cm_p_m = 100 - - -class AntennaArray(a.pol.AntennaArray): - def __init__(self, *args, **kwargs): - a.pol.AntennaArray.__init__(self, *args, **kwargs) - self.antpos_ideal = kwargs.pop('antpos_ideal') - - def update_gains(self): - gains = self.gain * self.amp_coeffs - for i, gain in zip(self.ant_layout.flatten(), gains.flatten()): - self[i].set_params({'amp_x': gain}) - self[i].set_params({'amp_y': gain}) - - def update_delays(self): - ns, ew = n.indices(self.ant_layout.shape) - dlys = ns * self.tau_ns + ew * self.tau_ew + self.dly_coeffs - for i, tau in zip(self.ant_layout.flatten(), dlys.flatten()): - self[i].set_params({'dly_x': tau}) - self[i].set_params({'dly_y': tau + self.dly_xx_to_yy.flatten()[i]}) - - def update(self): - # self.update_gains() - # self.update_delays() - a.pol.AntennaArray.update(self) - - def get_params(self, ant_prms={'*': '*'}): - try: - prms = a.pol.AntennaArray.get_params(self, ant_prms) - except(IndexError): - return {} - for k in ant_prms: - if k == 'aa': - if 'aa' not in prms: - prms['aa'] = {} - for val in ant_prms[k]: - if val == 'tau_ns': - prms['aa']['tau_ns'] = self.tau_ns - elif val == 'tau_ew': - prms['aa']['tau_ew'] = self.tau_ew - elif val == 'gain': - prms['aa']['gain'] = self.gain - else: - try: - top_pos = n.dot(self._eq2zen, self[int(k)].pos) - # XXX should multiply this by len_ns to match set_params. - except(ValueError): - continue - if ant_prms[k] == '*': - prms[k].update({'top_x': top_pos[0], 'top_y': top_pos[1], 'top_z': top_pos[2]}) - else: - for val in ant_prms[k]: - if val == 'top_x': - prms[k]['top_x'] = top_pos[0] - elif val == 'top_y': - prms[k]['top_y'] = top_pos[1] - elif val == 'top_z': - prms[k]['top_z'] = top_pos[2] - return prms - - def set_params(self, prms): - changed = a.pol.AntennaArray.set_params(self, prms) - for i, ant in enumerate(self): - ant_changed = False - top_pos = n.dot(self._eq2zen, ant.pos) - try: - top_pos[0] = prms[str(i)]['top_x'] - ant_changed = True - except(KeyError): - pass - try: - top_pos[1] = prms[str(i)]['top_y'] - ant_changed = True - except(KeyError): - pass - try: - top_pos[2] = prms[str(i)]['top_z'] - ant_changed = True - except(KeyError): - pass - if ant_changed: - ant.pos = n.dot(n.linalg.inv(self._eq2zen), top_pos) / a.const.len_ns * cm_p_m - changed |= ant_changed - try: - self.tau_ns, changed = prms['aa']['tau_ns'], 1 - except(KeyError): - pass - try: - self.tau_ew, changed = prms['aa']['tau_ew'], 1 - except(KeyError): - pass - try: - self.gain, changed = prms['aa']['gain'], 1 - except(KeyError): - pass - if changed: - self.update() - return changed - - -prms = { - 'loc': ('-30:43:17.5', '21:25:41.9'), # KAT, SA (GPS) - 'antpos_ideal': { - 80: {'top_x': -14.0, 'top_y': -24.2871131, 'top_z': 0.0}, # a0 - 104: {'top_x': 0.0, 'top_y': -24.2871131, 'top_z': 0.0}, # a1 - 96: {'top_x': 14.0, 'top_y': -24.2871131, 'top_z': 0.0}, # a2 - - 64: {'top_x': -21.0, 'top_y': -12.12435565, 'top_z': 0.0}, # a3 - 53: {'top_x': -7.0, 'top_y': -12.12435565, 'top_z': 0.0}, # a4 - 31: {'top_x': 7.0, 'top_y': -12.12435565, 'top_z': 0.0}, # a5 - 65: {'top_x': 21.0, 'top_y': -12.12435565, 'top_z': 0.0}, # a5 - - - 88: {'top_x': -28.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 9: {'top_x': -14.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 20: {'top_x': 0.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 89: {'top_x': 14.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 43: {'top_x': 28.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - - 105: {'top_x': -21.0, 'top_y': 12.12435565, 'top_z': 0.0}, # a3 - 22: {'top_x': -7.0, 'top_y': 12.12435565, 'top_z': 0.0}, # a4 - 81: {'top_x': 7.0, 'top_y': 12.12435565, 'top_z': 0.0}, # a5 - 10: {'top_x': 21.0, 'top_y': 12.12435565, 'top_z': 0.0}, # a5 - - - 72: {'top_x': -14.0, 'top_y': 24.2871131, 'top_z': 0.0}, # a0 - 112: {'top_x': 0.0, 'top_y': 24.2871131, 'top_z': 0.0}, # a1 - 97: {'top_x': 14.0, 'top_y': 24.2871131, 'top_z': 0.0}, # a2 - - 0: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 1: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 2: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 3: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 4: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 5: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 6: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 7: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 8: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 11: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 12: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 13: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 14: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 15: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 16: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 17: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 18: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 19: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 21: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 23: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 24: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 25: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 26: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 27: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 28: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 29: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 30: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 32: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 33: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 34: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 35: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 36: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 37: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 38: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 39: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 40: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 41: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 42: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 44: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 45: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 46: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 47: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 48: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 49: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 50: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 51: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 52: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 54: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 55: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 56: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 57: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 58: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 59: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 60: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 61: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 62: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 63: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 66: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 67: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 68: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 69: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 70: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 71: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 73: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 74: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 75: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 76: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 77: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 78: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 79: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 82: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 83: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 84: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 85: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 86: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 87: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 90: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 91: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 92: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 93: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 94: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 95: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 98: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 99: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 100: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 101: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 102: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 103: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 106: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 107: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 108: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 109: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 110: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 111: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 113: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 114: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 115: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 116: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 117: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 118: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 119: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 120: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 121: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 122: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 123: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 124: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 125: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 126: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 127: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - }, - 'amps': dict(zip(range(128), n.ones(128))), - 'amp_coeffs': n.array([1] * 128), - 'bp_r': n.array([[1.]] * 128), - 'bp_i': n.array([[0., 0., 0.]] * 128), - 'twist': n.array([0] * 128), - 'beam': a.fit.BeamAlm, - 'bm_prms': { - 'alm7': n.array( - [-1081324093.5604355, 0.0, 0.0, 0.0, -262155437.14744619, -40523.293875736716, -1144639049.4450433, 0.0, 0.0, 0.0, -1209061567.4856892, -62596.955398614278, 0.0, 0.0, 234574880.79412466, -59373.276068766572, 0.0, 0.0, 204426224.06441718, 55114.563591448132, 1729080775.5577424, 0.0, 0.0, 0.0, -5627870.2693141159, 8441.4522962633619, 0.0, 0.0, -957871468.02796948, -26154.972628033676, 0.0, 0.0, -87102252.471384808, -50052.73968168487, 0.0, 0.0, 191828502.26962891, -10048.43132508696, 0.0, 0.0, 110776547.27628954, -37351.826990050504, -906797537.4834379, 0.0, 0.0, 0.0, 329222817.13445771, -29060.739352269207, 0.0, 0.0, 546809652.71201193, -115946.69818003669, 0.0, 0.0, -591134355.63541889, 62683.080456769902, 0.0, 0.0, -144055745.14333308, -3344.9767162177391, 0.0, 0.0, -368656232.30881768, -1608.1983129602879, 0.0, 0.0, -118801805.27812727, 31905.336279017167, 0.0, 0.0, -70225720.747015119, -37865.877995669623, 235419758.4512482, 0.0, 0.0, 0.0, 361579085.9617995, 79072.147640181458, 0.0, 0.0, 146429964.96514896, -102117.14213434084, 0.0, 0.0, 106427393.26674381, -60107.204182634705, 0.0, 0.0, 59154166.248101547, -20388.350978482271, 0.0, 0.0, 176029459.26438314, 33285.591239419438, 0.0, 0.0, 527618634.93934166, 66884.303920780934, 0.0, 0.0, 95913693.41127409, -79300.923099238891, 0.0, 0.0, 152734050.03753135, -21615.518484261818, 0.0, 0.0, 230694358.5770939, 22922.170838031663, -383288562.70426351, 0.0, 0.0, 0.0, -126281330.72650661, -26736.867629611937, 0.0, 0.0, 108175824.49057513, -73826.154995947072, 0.0, 0.0, -105130427.45878558, -27109.647812448158, 0.0, 0.0, -495130497.4338429, -43312.494575842124, 0.0, 0.0, -162294563.70339859, -78644.408483291132, 0.0, 0.0, -446143155.07499522, 35049.023211568106, 0.0, 0.0, -434372911.29877228, 74645.281954757884, 0.0, 0.0, 88535885.916778564, -59658.181174639933, 0.0, 0.0, -154524011.19535148, -64925.569280836324, 0.0, 0.0, -197013303.49254256, -57546.998199721042, 0.0, 0.0, 60578806.739350073, 60269.144321032669, 614919978.78591418, 0.0, 0.0, 0.0, -177976472.87455249, 83517.765491276004, 0.0, 0.0, -136301559.45860973, -2057.5912754017359, 0.0, 0.0, 613862755.05429029, -126093.29111144203, 0.0, 0.0, 330986019.80497843, -171293.91106101952, 0.0, 0.0, -29154749.084786706, -23698.75128392793, 0.0, 0.0, 118909415.76059921, 260.4906139722309, 0.0, 0.0, 258338224.08025572, 34588.968913224162, 0.0, 0.0, 3785397.5870792689, -32603.464627771926, 0.0, 0.0, -23259161.770430245, -32648.547687113882, 0.0, 0.0, 104427443.08076131, 5749.4319312391553, 0.0, 0.0, 6766465.5382205453, 3241.742220615246, 0.0, 0.0, -60284503.8862499, -59902.508087108952, 0.0, 0.0, 70947908.65981704, -50046.164234017422, 71592751.406619206, 0.0, 0.0, 0.0, 114423944.11037378, -29629.639271339391, 0.0, 0.0, -16162405.156746721, -22843.554219456128, 0.0, 0.0, -391208214.49301404, 85360.748577972205, 0.0, 0.0, -180559385.64929616, -232405.39276717394, 0.0, 0.0, -173999368.48403537, - \ - 154535.5223811192, 0.0, 0.0, 21379759.421723526, -49363.223340975463, 0.0, 0.0, -65362589.496401452, 56497.722354469195, 0.0, 0.0, -59068349.756921723, -22203.228234489961, 0.0, 0.0, 178895590.72285667, -36778.476704805165, 0.0, 0.0, -7977531.617536407, -19838.626327764079, 0.0, 0.0, 80425490.578405693, 27831.980826245854, 0.0, 0.0, 114611568.72714353, -107486.07299270081, 0.0, 0.0, 20196073.66257038, 21928.884663855733, 0.0, 0.0, -77682176.577698827, 29213.006661709769, 0.0, 0.0, 15123630.35168907, -28694.812017467506, -22259183.296553552, 0.0, 0.0, 0.0, -44195359.795093246, 51184.417790776875, 0.0, 0.0, 416191946.56073493, -71732.351641676665, 0.0, 0.0, 205663263.71618012, 3388.5589815610024, 0.0, 0.0, -130943398.42767963, -131143.82698794606, 0.0, 0.0, 61651470.898734599, -81217.981804434457, 0.0, 0.0, -67180046.491523147, -146577.21040483299, 0.0, 0.0, -152936171.75485, -9306.3668560189235, 0.0, 0.0, -78432624.898623183, -16457.284767487032, 0.0, 0.0, -182188345.51379466, -28943.200208655751, 0.0, 0.0, -230936841.81174293, -69881.661699287171, 0.0, 0.0, -48611744.075940624, -45613.670555435718, 0.0, 0.0, -137135254.63530335, 89602.425289011473, 0.0, 0.0, -122086433.73023096, 10038.304046797484, 0.0, 0.0, 4230108.1019680994, -125434.25870475314, 0.0, 0.0, -88554513.106125027, -65172.061009842495, 0.0, 0.0, -48016889.768255182, 6514.6442567450413, 0.0, 0.0, -7234862.3567767777, 29462.421170785103, 23975873.985774957, 0.0, 0.0, 0.0, 150246363.27382952, -4635.0397663657277, 0.0, 0.0, -47057107.317354918, -61032.384893401948, 0.0, 0.0, -145067771.71055323, 30340.435422360377, 0.0, 0.0, 130479661.43167895, -11379.689478798271, 0.0, 0.0, 26361229.859195136, -125845.83502669417, 0.0, 0.0, 169502237.90273514, -190856.12211173368, 0.0, 0.0, -93899694.259581938, 9428.9987870662444, 0.0, 0.0, -197490720.78410134, 21312.280548650102, 0.0, 0.0, 39647940.551049069, -68437.045331174842, 0.0, 0.0, 69474226.516149923, -51031.516066011136, 0.0, 0.0, 183898889.91059858, 25427.755216915164, 0.0, 0.0, 105935367.66732898, 47267.944906588062, 0.0, 0.0, 91688077.289836451, 19266.763736649074, 0.0, 0.0, 107771149.47695087, -67938.256377686776, 0.0, 0.0, -29850724.42625796, 21607.473853242802, 0.0, 0.0, 105178954.14601882, -69775.134273171891, 0.0, 0.0, -57617253.476713084, -65410.799885873028, 0.0, 0.0, 3261331.2317122123, -32217.75104223685, 0.0, 0.0, 16472425.803737164, 79582.269607468625, -272848871.13511133, 0.0, 0.0, 0.0, -166763480.12559777, 33090.611564668841, 0.0, 0.0, 108954734.6009059, -403.73869004175492, 0.0, 0.0, -17283151.399917897, -68588.699644901702, 0.0, 0.0, -21492440.153302398, -17597.541258704674, 0.0, 0.0, -38441136.647693813, 64579.571492712137, 0.0, 0.0, 4505100.6340750242, -300117.69352899096, 0.0, 0.0, 549992.16794250254, -197163.89229418512, 0.0, 0.0, -127963651.33731289, -10644.866941283586, 0.0, 0.0, 100807969.57532065, 29015.182801835355, 0.0, 0.0, -7278488.9224838661, 7477.4234534004445] - ), - 'alm6': n.array( - [797385716.91804504, 0.0, 0.0, 0.0, 189967106.19923255, 29537.10693528819, 846600538.89322472, 0.0, 0.0, 0.0, 872926192.63071275, 44904.233226988472, 0.0, 0.0, -169861745.64221448, 42971.448932979642, 0.0, 0.0, -147906900.75269288, -39808.417875855441, -1253273886.731957, 0.0, 0.0, 0.0, 7956724.3034045501, -6356.2955966941372, 0.0, 0.0, 699223699.88883495, 19020.68326448747, 0.0, 0.0, 62573658.414382517, 35470.424362177982, 0.0, 0.0, -138953239.49548644, 7299.6975745242362, 0.0, 0.0, -79806306.899763986, 26921.147432152444, 655475892.86221838, 0.0, 0.0, 0.0, -238869250.08572152, 20663.930342020343, 0.0, 0.0, -395488561.2668637, 84491.317123754401, 0.0, 0.0, 426316351.0672881, -45085.033036303044, 0.0, 0.0, 103665104.62868968, 2246.2873997537672, 0.0, 0.0, 264983020.48203912, 1892.1499981893205, 0.0, 0.0, 84976114.845701993, -23012.274489893702, 0.0, 0.0, 50771408.628350258, 27079.015870586507, -174485451.73842844, 0.0, 0.0, 0.0, -264289472.79323781, -56715.616631217796, 0.0, 0.0, -106222730.444833, 74901.88337064792, 0.0, 0.0, -76714164.675549507, 42894.665025885537, 0.0, 0.0, -44453338.477396756, 14708.146540980564, 0.0, 0.0, -127030875.23670675, -23573.026026034317, 0.0, 0.0, -380764603.20410013, -47356.176563799374, 0.0, 0.0, -70038599.590872958, 57096.578562188763, 0.0, 0.0, -110338759.44084603, 15618.47767476493, 0.0, 0.0, -166316476.72216225, -16378.749845538387, 271936085.48576093, 0.0, 0.0, 0.0, 92433839.952875465, 19519.099424088534, 0.0, 0.0, -77618380.050654531, 54389.716587842369, 0.0, 0.0, 77410628.333828956, 18890.257217773775, 0.0, 0.0, 359407589.92209935, 31728.327458281798, 0.0, 0.0, 117813006.27702276, 56694.00896615073, 0.0, 0.0, 322163097.63930309, -24474.159721000109, 0.0, 0.0, 313393639.11823243, -53880.392102794642, 0.0, 0.0, -63859274.184436947, 42560.437368084611, 0.0, 0.0, 111161686.03953889, 46744.631315417995, 0.0, 0.0, 142346033.48720458, 41862.95645676343, 0.0, 0.0, -43818886.848100305, -43470.280716078254, -442768171.11322945, 0.0, 0.0, 0.0, 132501506.90008594, -60540.916997092565, 0.0, 0.0, 93942945.610904098, 2481.2147707751869, 0.0, 0.0, -441000417.33351082, 90293.217816417338, 0.0, 0.0, -237336783.93090552, 124693.18798191204, 0.0, 0.0, 20623105.645757515, 16780.788665236021, 0.0, 0.0, -86673347.981770217, -111.29751227977317, 0.0, 0.0, -187034693.45671436, -25193.745737031823, 0.0, 0.0, -2135530.3974111909, 23393.093986819636, 0.0, 0.0, 16698628.352701169, 22791.910128108695, 0.0, 0.0, -75207242.986817583, -3478.3017686277117, 0.0, 0.0, -4262714.0713599836, -1495.1668203620484, 0.0, 0.0, 43275301.615728691, 43375.651892071954, 0.0, 0.0, -51358762.141454875, 35744.562531746327, -55977125.17363143, 0.0, 0.0, 0.0, -80891874.204180971, 21169.676736598227, 0.0, 0.0, 11039910.066945948, 17564.401170771853, 0.0, 0.0, 282861419.72051185, -61850.098505863178, 0.0, 0.0, 128362573.7168542, 169414.68024107264, 0.0, 0.0, 124330006.22390915, - 110718.99879655795, 0.0, 0.0, -16841657.337382279, 35657.177598049217, 0.0, 0.0, 47349371.812364854, -40707.611029805084, 0.0, 0.0, 42010956.049356803, 15687.679769475246, 0.0, 0.0, -129069297.57474856, 25830.387752163271, 0.0, 0.0, 5910511.5135691371, 13697.037347944815, 0.0, 0.0, -58821740.432719804, -19405.588572920107, 0.0, 0.0, -82547653.248470947, 77731.66933892775, 0.0, 0.0, -14433978.003370205, -15837.572457110891, 0.0, 0.0, 55786893.745701335, -21124.411201972158, 0.0, 0.0, -11046375.71224675, 20616.212993154164, 14107144.447629577, 0.0, 0.0, 0.0, 33774805.041091383, -36859.336437719656, 0.0, 0.0, -301070957.00480914, 52878.121995111564, 0.0, 0.0, -146653601.39361849, -2198.0942705195794, 0.0, 0.0, 94168406.841010004, 96760.717803226478, 0.0, 0.0, -43478941.173792779, 57375.658488987028, 0.0, 0.0, 48353110.436083667, 106201.96001161895, 0.0, 0.0, 112485321.00221781, 6382.1773339061747, 0.0, 0.0, 57189418.603424326, 11901.926954900946, 0.0, 0.0, 131280556.01794536, 20435.530265815629, 0.0, 0.0, 166170342.25571772, 50100.982288524996, 0.0, 0.0, 35409830.459971406, 33124.972929883166, 0.0, 0.0, 98747876.406133488, -63736.080320002809, 0.0, 0.0, 88071880.266417414, -7100.2184152616755, 0.0, 0.0, -3067340.9423153657, 91162.549369077489, 0.0, 0.0, 63897911.553277262, 46684.560473517355, 0.0, 0.0, 34498206.032984555, -4537.3240835134584, 0.0, 0.0, 5168843.1048901472, -21320.40983260217, -15835543.717267705, 0.0, 0.0, 0.0, -108625585.50132097, 3294.6252010393659, 0.0, 0.0, 33621479.273489162, 44729.560439200985, 0.0, 0.0, 103347563.63279098, -21767.597065975646, 0.0, 0.0, -94941255.180099696, 9685.7584460242178, 0.0, 0.0, -18528876.37688531, 90099.006466248247, 0.0, 0.0, -121579532.1146235, 139213.3284709499, 0.0, 0.0, 71246149.768020689, -6806.3276870759018, 0.0, 0.0, 145604934.16640645, -15090.6173931348, 0.0, 0.0, -29251884.513770111, 49390.368939568521, 0.0, 0.0, -49586552.469104417, 36886.524239895676, 0.0, 0.0, -132737515.14220525, -18372.148025799193, 0.0, 0.0, -76491981.799765065, -33802.178523338815, 0.0, 0.0, -65923648.161891818, -13764.57393849405, 0.0, 0.0, -77827781.713095531, 47692.036396206728, 0.0, 0.0, 21647589.21944366, -14133.730494852018, 0.0, 0.0, -76290028.632632598, 51182.252677407232, 0.0, 0.0, 41455286.640109941, 47157.905514409278, 0.0, 0.0, -2303036.9134609378, 23541.969363905846, 0.0, 0.0, -11918806.087500827, -57397.776327919324, 197612684.36048445, 0.0, 0.0, 0.0, 118955416.99244839, -24087.627570760262, 0.0, 0.0, -77491887.254076943, 728.30824844376821, 0.0, 0.0, 12207030.001704402, 49466.405483031638, 0.0, 0.0, 14932883.729976833, 14239.9646008034, 0.0, 0.0, 27192582.807980306, -46905.646869159398, 0.0, 0.0, -3736072.351231684, 218791.39737395261, 0.0, 0.0, 938468.7842925014, 140973.07684057893, 0.0, 0.0, 94550054.572198883, 7941.4520718544645, 0.0, 0.0, -74181966.616232648, -21044.559100278962, 0.0, 0.0, 5019241.6634857096, -5304.694057288676] - ), - 'alm5': n.array( - [-197735155.01929793, 0.0, 0.0, 0.0, -46053418.11639905, -7226.397802963189, -210520973.5427039, 0.0, 0.0, 0.0, -210657534.4115783, -10745.785564600596, 0.0, 0.0, 41148658.926344283, -10416.636060571493, 0.0, 0.0, 35784980.360108547, 9612.9840553492686, 304168753.30395395, 0.0, 0.0, 0.0, -3117586.5713760527, 1632.8412811888347, 0.0, 0.0, -171090196.95194718, -4632.55322212383, 0.0, 0.0, -15011356.299438834, -8364.6158748977232, 0.0, 0.0, 33676784.554911196, -1772.7269020579031, 0.0, 0.0, 19210024.26669988, -6481.5616124462031, -158387393.28245038, 0.0, 0.0, 0.0, 57914671.611356676, -4885.2721544610504, 0.0, 0.0, 95684065.272677362, -20637.725554880592, 0.0, 0.0, -102657366.72310401, 10831.674992370326, 0.0, 0.0, -24919568.123357572, -493.6485726144798, 0.0, 0.0, -63605529.998098962, -674.09128358241719, 0.0, 0.0, -20267019.847643819, 5547.5212175440292, 0.0, 0.0, -12278347.932371413, -6453.4324016264673, 43450364.563942656, 0.0, 0.0, 0.0, 64756329.325183183, 13568.438404067152, 0.0, 0.0, 25774658.376369122, -18443.874764878143, 0.0, 0.0, 18490347.059644662, -10189.922507207644, 0.0, 0.0, 11237512.512576636, -3548.1511247369526, 0.0, 0.0, 30643195.288836252, 5554.058991234795, 0.0, 0.0, 91852213.821721107, 11152.354180029373, 0.0, 0.0, 17136791.711244829, -13738.340482599324, 0.0, 0.0, 26654802.354939841, -3772.9607028607643, 0.0, 0.0, 40080801.777484469, 3898.1337497247532, -64205745.592204437, 0.0, 0.0, 0.0, -22659883.342662893, -4778.0834184917312, 0.0, 0.0, 18555022.616979484, -13473.030524613543, 0.0, 0.0, -19158703.781450976, -4325.618633195475, 0.0, 0.0, -87303680.674776122, -7798.5650239280103, 0.0, 0.0, -28630028.187836513, -13657.289990676993, 0.0, 0.0, -77776433.152057096, 5663.1889376592408, 0.0, 0.0, -75576903.129559204, 12998.603107606816, 0.0, 0.0, 15394598.358521122, -10123.752482296954, 0.0, 0.0, -26711379.163051497, -11242.177700866312, 0.0, 0.0, -34392594.777521037, -10202.774681930312, 0.0, 0.0, 10602956.226330029, 10479.795259434368, 106491522.00151923, 0.0, 0.0, 0.0, -33138240.729237858, 14693.306846559934, 0.0, 0.0, -21364417.055660442, -922.28831526417491, 0.0, 0.0, 105835946.52125469, -21543.372550449742, 0.0, 0.0, 56811774.725853391, -30413.430161657085, 0.0, 0.0, -4861543.3597652912, -3938.4477312154736, 0.0, 0.0, 21178757.320129372, 3.5425208576304499, 0.0, 0.0, 45298346.835260376, 6143.2888814262978, 0.0, 0.0, 335546.7987198591, -5597.459067079385, 0.0, 0.0, -3999171.3806912508, -5264.6744997915521, 0.0, 0.0, 18095332.294255983, 638.8459776001049, 0.0, 0.0, 840929.63493319822, 107.15833138602918, 0.0, 0.0, -10371226.677820578, -10505.444300287199, 0.0, 0.0, 12436856.257415403, -8511.9205882707138, 14784850.940883569, 0.0, 0.0, 0.0, 19007856.207817975, -5034.9923737995823, 0.0, 0.0, -2498879.0170426308, -4590.8614967715039, 0.0, 0.0, -68376948.624012321, 15000.851884991811, 0.0, 0.0, -30424090.555139855, -41397.471186152834, 0.0, 0.0, -29616739.442200258, - \ - 26436.200386076027, 0.0, 0.0, 4504589.81844257, -8603.13572616479, 0.0, 0.0, -11478082.127457535, 9801.1835365541247, 0.0, 0.0, -9949835.1498631909, -3681.9065933991928, 0.0, 0.0, 31127145.710026521, -6023.8911849642827, 0.0, 0.0, -1474616.7280308811, -3120.8527051806514, 0.0, 0.0, 14424342.151320595, 4478.0547817086999, 0.0, 0.0, 19870777.76114646, -18798.894308055569, 0.0, 0.0, 3439581.5227250052, 3824.0816135823075, 0.0, 0.0, -13375210.583126174, 5111.8038311824457, 0.0, 0.0, 2704300.4055295889, -4943.7362257902059, -2820776.3819985995, 0.0, 0.0, 0.0, -8716712.5975790638, 8870.4368321870552, 0.0, 0.0, 72838691.512315914, -13115.675171949872, 0.0, 0.0, 34868715.134384163, 445.01372842380943, 0.0, 0.0, -22648556.756227445, -24007.562182239992, 0.0, 0.0, 10225496.43410253, -13429.948589291756, 0.0, 0.0, -11648114.4951357, -25752.408984327056, 0.0, 0.0, -27790363.240071055, -1440.4752597467768, 0.0, 0.0, -13972388.61876422, -2880.3368818686808, 0.0, 0.0, -31611811.476835247, -4796.544240381837, 0.0, 0.0, -39940933.139877774, -11990.248686645078, 0.0, 0.0, -8637664.214980036, -8054.465313268588, 0.0, 0.0, -23757834.173265617, 15100.165734198441, 0.0, 0.0, -21240042.369048979, 1670.9006386179863, 0.0, 0.0, 745992.55951904377, -22177.201914765799, 0.0, 0.0, -15411608.939690793, -11155.870022900486, 0.0, 0.0, -8277784.326783523, 1045.3560798711144, 0.0, 0.0, -1230781.1765813681, 5157.2676594239729, 3371226.6051944932, 0.0, 0.0, 0.0, 26258888.926003013, -781.11690680106267, 0.0, 0.0, -7982799.094995562, -11012.550602180869, 0.0, 0.0, -24555994.147887498, 5209.5952756182242, 0.0, 0.0, 23146703.87589569, -2812.6513443658323, 0.0, 0.0, 4318014.4979850184, -21492.21656303855, 0.0, 0.0, 29058640.345119234, -34037.549503927024, 0.0, 0.0, -18242673.078121372, 1656.8324467507082, 0.0, 0.0, -36072862.830247574, 3551.0799378540246, 0.0, 0.0, 7252934.6827932158, -11913.82448328409, 0.0, 0.0, 11797958.62110701, -8915.0206777991007, 0.0, 0.0, 32028437.321352843, 4440.2513551878992, 0.0, 0.0, 18463453.022954959, 8064.832811994861, 0.0, 0.0, 15830357.645304311, 3278.6002973079399, 0.0, 0.0, 18792715.22209141, -11110.350620979698, 0.0, 0.0, -5254231.7428235617, 2977.060123896787, 0.0, 0.0, 18517061.004637863, -12596.961454058939, 0.0, 0.0, -9965178.2132176459, -11359.992935143997, 0.0, 0.0, 541776.1522784296, -5769.2477330948705, 0.0, 0.0, 2885107.8830083506, 13837.858540130937, -47862763.656404138, 0.0, 0.0, 0.0, -28298286.980327792, 5873.9680203106927, 0.0, 0.0, 18362400.235881787, -315.51705578927215, 0.0, 0.0, -2874422.5857720273, -11929.116229145047, 0.0, 0.0, -3417477.3191902661, -3924.658545164405, 0.0, 0.0, -6421891.4478960913, 11416.933954008207, 0.0, 0.0, 1037940.6079158594, -53486.786972605179, 0.0, 0.0, -613407.33829156274, -33589.737764611818, 0.0, 0.0, -23490363.036867645, -2004.1753650588878, 0.0, 0.0, 18333266.803092051, 5109.7982999645592, 0.0, 0.0, -1138365.5078694951, 1253.4638702863897] - ), - 'alm4': n.array( - [7200724.2174806157, 0.0, 0.0, 0.0, 1507578.5364308401, 249.09445266642169, 7725779.5666901879, 0.0, 0.0, 0.0, 6747539.2579509569, 329.36641952671226, 0.0, 0.0, -1343001.5699128646, 343.36792991568888, 0.0, 0.0, -1159855.5653791095, -308.92769367092768, -10045128.444344388, 0.0, 0.0, 0.0, 288589.31376132951, -70.980762890053413, 0.0, 0.0, 5851186.7774917074, 155.21204435663131, 0.0, 0.0, 467714.86876319919, 238.59930858441089, 0.0, 0.0, -1101842.335750744, 58.096309466026973, 0.0, 0.0, -608138.07580545719, 204.95821814484245, 5101024.1326503837, 0.0, 0.0, 0.0, -1885231.9571066336, 139.59983322242354, 0.0, 0.0, -3105913.7215474164, 701.68124144120748, 0.0, 0.0, 3239644.93434321, -339.82491448090769, 0.0, 0.0, 783855.81893535459, 8.7527052982549058, 0.0, 0.0, 1986537.8514804086, 54.774986424606197, 0.0, 0.0, 612170.88910865143, -176.99708425924547, 0.0, 0.0, 398007.89088467637, 193.56614271468877, -1596925.8860192283, 0.0, 0.0, 0.0, -2227878.7078425568, -415.01509470166883, 0.0, 0.0, -844775.91825557721, 650.38469558451084, 0.0, 0.0, -590632.35791223042, 299.36217992006749, 0.0, 0.0, -437078.74958942051, 113.79355867828019, 0.0, 0.0, -980335.68394004204, -157.54883485169805, 0.0, 0.0, -2938603.615868886, -315.29147746550342, 0.0, 0.0, -584687.47979809716, 434.71263424168563, 0.0, 0.0, -858991.85386585491, 121.46105830492419, 0.0, 0.0, -1277548.8225962832, -115.89194500169798, 1840668.8290774515, 0.0, 0.0, 0.0, 775421.56337957992, 164.00611331607877, 0.0, 0.0, -562088.42813265021, 488.74685971765177, 0.0, 0.0, 691778.87208729645, 97.689901957009482, 0.0, 0.0, 2882651.1565228878, 272.52207724336955, 0.0, 0.0, 948662.06765682506, 433.74488550190046, 0.0, 0.0, 2497867.2332102088, -144.98233385054755, 0.0, 0.0, 2414321.2649437124, -415.58171649203098, 0.0, 0.0, -490977.9606196385, 302.58764598967997, 0.0, 0.0, 838801.66186270467, 354.24491208439002, 0.0, 0.0, 1109240.4625873815, 343.14609143330898, 0.0, 0.0, -344528.03137613513, -334.26528674880853, -3354305.0711071114, 0.0, 0.0, 0.0, 1235458.4567361525, -485.19168633800058, 0.0, 0.0, 487397.2070375224, 83.880871552662413, 0.0, 0.0, -3308936.6858345182, 647.62704156274015, 0.0, 0.0, -1751740.8660837077, 1026.5527017383265, 0.0, 0.0, 139846.54955892122, 106.93161870083593, 0.0, 0.0, -721404.82398454682, 3.6015241937210991, 0.0, 0.0, -1476829.0591856656, -205.98964494497451, 0.0, 0.0, 17074.077977673544, 171.31880268277882, 0.0, 0.0, 123060.47869451297, 132.0062185627576, 0.0, 0.0, -571603.6917338561, 10.396528401168975, 0.0, 0.0, 2106.5454300025908, 35.752699013801632, 0.0, 0.0, 321464.4592717489, 342.34076722166759, 0.0, 0.0, -405230.5941204023, 255.2360120010726, -670296.34645801655, 0.0, 0.0, 0.0, -529100.52793346881, 148.57741762277331, 0.0, 0.0, 57471.51362526336, 206.86269211261629, 0.0, 0.0, 2207181.4600743535, -493.51422675565459, 0.0, 0.0, 895463.30568390526, 1409.934585353082, 0.0, 0.0, 888776.11402601667, 798.19028910433144, - 0.0, 0.0, -215643.35608039363, 274.1110708271608, 0.0, 0.0, 376051.83866420202, -310.73247764113745, 0.0, 0.0, 289955.29165051226, 101.76182819162518, 0.0, 0.0, -994834.62761617475, 161.69117608964245, 0.0, 0.0, 55076.980514253126, 72.037278617768209, 0.0, 0.0, -497694.41516721481, -112.23417665406721, 0.0, 0.0, -630133.16098474909, 608.3926186109635, 0.0, 0.0, -103502.07506563514, -122.78257869786432, 0.0, 0.0, 415209.12744939065, -166.58248247027083, 0.0, 0.0, -92606.301129069601, 153.27094286810689, -155.133754694667, 0.0, 0.0, 0.0, 368304.00212202733, -280.867215040259, 0.0, 0.0, -2362905.2792973067, 479.92664306566542, 0.0, 0.0, -1040034.2467855478, 0.76582903775922517, 0.0, 0.0, 718560.8191561898, 876.24115424409968, 0.0, 0.0, -292721.47833479074, 359.34134632343324, 0.0, 0.0, 372865.53641371639, 845.74282823210956, 0.0, 0.0, 993400.71737590164, 30.865235806642321, 0.0, 0.0, 474280.45441336668, 93.872153111048078, 0.0, 0.0, 1002907.9299558332, 133.19243145625578, 0.0, 0.0, 1255885.0030796861, 369.38663831551793, 0.0, 0.0, 290708.02660839848, 267.74414177703102, 0.0, 0.0, 750690.63702933991, -441.17311505823324, 0.0, 0.0, 679277.21542988182, -47.164992914979038, 0.0, 0.0, -25034.048713920944, 737.20036885145737, 0.0, 0.0, 492703.18828978809, 340.11997934964194, 0.0, 0.0, 258268.03397987972, -25.875498151930167, 0.0, 0.0, 36841.386016291726, -166.58153344592151, -37632.524860587197, 0.0, 0.0, 0.0, -846970.57810843072, 23.067138772739717, 0.0, 0.0, 231772.05047900774, 389.59227512856796, 0.0, 0.0, 731573.15687432117, -159.47722701117917, 0.0, 0.0, -779636.79196457902, 169.42221635624287, 0.0, 0.0, -114048.4415545105, 645.30053706908575, 0.0, 0.0, -881108.21860260586, 1161.5099955044125, 0.0, 0.0, 748235.23576389183, -57.690368801478542, 0.0, 0.0, 1304114.5518882216, -99.391608662850047, 0.0, 0.0, -263144.21203343244, 380.80042850864618, 0.0, 0.0, -352403.58508126321, 287.70856589182199, 0.0, 0.0, -1026027.1112983709, -143.58640740725582, 0.0, 0.0, -592252.06919899839, -244.84725404024846, 0.0, 0.0, -495445.89352101792, -98.364381497365002, 0.0, 0.0, -604362.59029897652, 295.72251912004111, 0.0, 0.0, 173141.05309468889, -29.437403866957482, 0.0, 0.0, -609597.44962526858, 441.85413291552464, 0.0, 0.0, 313734.85551236029, 360.67490478600058, 0.0, 0.0, -15401.76767474161, 198.95971188667156, 0.0, 0.0, -93905.143248108579, -441.64480338592182, 1557834.4870206926, 0.0, 0.0, 0.0, 846825.25105827861, -197.83739354926948, 0.0, 0.0, -537733.70476057276, 33.21990588911023, 0.0, 0.0, 82182.540697250195, 381.92187491491592, 0.0, 0.0, 79199.852686637649, 206.0957338460905, 0.0, 0.0, 188168.68771215889, -382.92038636172128, 0.0, 0.0, -53095.127393283889, 1828.4815368321251, 0.0, 0.0, 77039.429637870722, 1006.0372475571642, 0.0, 0.0, 860002.40107733512, 79.645120143879822, 0.0, 0.0, -655526.16343116295, -168.77744731668088, 0.0, 0.0, 24864.210627988363, -36.250655713179249] - ), - 'alm3': n.array( - [5498273.867212004, 0.0, 0.0, 0.0, 1278787.6144197686, 200.69631150016968, 5855938.7480396256, 0.0, 0.0, 0.0, 5847379.6897321241, 298.14002897401355, 0.0, 0.0, -1142519.2128262592, 289.14639793614521, 0.0, 0.0, -993520.89184620359, -266.85901085140711, -8445890.7411452159, 0.0, 0.0, 0.0, 88960.996282732958, -45.404243903980827, 0.0, 0.0, 4753726.6035505533, 128.65976222572772, 0.0, 0.0, 416486.45794872148, 231.75264200679231, 0.0, 0.0, -935084.04088520445, 49.245386113225521, 0.0, 0.0, -533118.40524846269, 179.90326954511633, 4396953.9195928695, 0.0, 0.0, 0.0, -1608349.7299925357, 135.45560067565393, 0.0, 0.0, -2656511.2093055765, 573.27704161730151, 0.0, 0.0, 2849651.3732845969, -300.56300083744014, 0.0, 0.0, 691500.88130568538, 13.583711800361833, 0.0, 0.0, 1764810.4259444436, 19.179618441300519, 0.0, 0.0, 562066.86523355253, -153.96198960788544, 0.0, 0.0, 340862.09253124218, 178.98642747530579, -1208920.608357993, 0.0, 0.0, 0.0, -1799262.1597735337, -376.45318693479493, 0.0, 0.0, -715874.06723833689, 512.60274437112969, 0.0, 0.0, -513195.85187474889, 282.61204774423248, 0.0, 0.0, -312987.8115696148, 98.476599955903495, 0.0, 0.0, -850554.04150807834, -153.88002183190986, 0.0, 0.0, -2549521.2039438705, -308.97811247523509, 0.0, 0.0, -476185.0271458606, 381.24956233215812, 0.0, 0.0, -739921.59786708606, 104.73864708094125, 0.0, 0.0, -1112406.7067007029, -108.11473746144854, 1779181.7167289439, 0.0, 0.0, 0.0, 629948.71285196778, 132.75183050912085, 0.0, 0.0, -514848.34386742389, 374.55990412960182, 0.0, 0.0, 532627.3153818252, 119.77835605693443, 0.0, 0.0, 2424622.4174201251, 216.72201228006872, 0.0, 0.0, 795108.48625639779, 379.06163904571338, 0.0, 0.0, 2158946.4330264404, -156.65280944607056, 0.0, 0.0, 2097723.367115201, -360.82043797325053, 0.0, 0.0, -427280.22268814908, 280.67854240034717, 0.0, 0.0, 741194.31265485799, 311.98234210405832, 0.0, 0.0, 954730.11413698632, 283.38882535844346, 0.0, 0.0, -294365.82031801599, -290.87943522870074, -2955385.5772971096, 0.0, 0.0, 0.0, 922348.17132076842, -407.96866449942939, 0.0, 0.0, 590219.54455448966, 26.085003675834287, 0.0, 0.0, -2936385.3988425806, 597.68610206583253, 0.0, 0.0, -1575950.5946588507, 844.75891669718953, 0.0, 0.0, 134649.35790006144, 109.16816207238172, 0.0, 0.0, -588332.72589620715, -0.060434616306956457, 0.0, 0.0, -1257716.4221816759, -170.68406812560957, 0.0, 0.0, -8941.0779337873792, 155.29124403630357, 0.0, 0.0, 110950.05042145777, 145.66225385101623, 0.0, 0.0, -502170.41979421745, -17.325868884214849, 0.0, 0.0, -22949.505096291126, -2.4551467208407827, 0.0, 0.0, 287724.38079964806, 291.68391922333836, 0.0, 0.0, -345306.35353751393, 236.04471625211903, -412926.76103576075, 0.0, 0.0, 0.0, -526646.50936312054, 139.67052359284023, 0.0, 0.0, 68989.951308911957, 127.92940529824081, 0.0, 0.0, 1898231.0764858185, -416.49200396660581, 0.0, 0.0, 843251.14376973349, 1149.9715407003903, 0.0, 0.0, 821330.99892625911, - 733.43891047406044, 0.0, 0.0, -125797.69610716954, 238.84073917328871, 0.0, 0.0, 318711.61841675505, -272.01264234407392, 0.0, 0.0, 275787.48754996213, 101.98949961733558, 0.0, 0.0, -863964.31932292669, 166.75001032516667, 0.0, 0.0, 41026.459186118453, 86.226676317826517, 0.0, 0.0, -400863.91227860982, -123.85056930956991, 0.0, 0.0, -551443.79119247897, 521.92551449632617, 0.0, 0.0, -95383.356716058464, -106.16353997548579, 0.0, 0.0, 371079.83600833849, -141.89502251030711, 0.0, 0.0, -75145.763091870656, 137.17426779366033, 77215.485549988181, 0.0, 0.0, 0.0, 243010.03290878746, -246.16028356941868, 0.0, 0.0, -2022146.4903465142, 364.58173021633223, 0.0, 0.0, -966729.65752818203, -12.242870088295632, 0.0, 0.0, 628405.85512085771, 667.51076371889519, 0.0, 0.0, -283104.73741182394, 372.19399604828794, 0.0, 0.0, 323261.32509660453, 715.00664543583957, 0.0, 0.0, 772628.27728037443, 39.783619682754797, 0.0, 0.0, 388194.79034767463, 79.95535765348265, 0.0, 0.0, 877314.47408925625, 132.86186416546855, 0.0, 0.0, 1108321.017616556, 332.59517110546255, 0.0, 0.0, 239961.36277227409, 223.69078367662058, 0.0, 0.0, 659299.35428607883, -418.54744902859727, 0.0, 0.0, 589532.25215103338, -46.289537699833957, 0.0, 0.0, -20714.541405546493, 615.98609025910253, 0.0, 0.0, 427769.59997919854, 309.46495603679875, 0.0, 0.0, 229667.51363210069, -28.911630023187641, 0.0, 0.0, 34129.567905943033, -143.20187626491094, -92640.48420559497, 0.0, 0.0, 0.0, -729109.33367109543, 21.654587090135621, 0.0, 0.0, 221416.5410305266, 306.01150060926915, 0.0, 0.0, 680747.43978198699, -144.57062058568377, 0.0, 0.0, -642943.0025409261, 78.812483102076229, 0.0, 0.0, -119574.15208283922, 596.2647968341123, 0.0, 0.0, -806204.14766925236, 945.57520214706699, 0.0, 0.0, 508496.6306797663, -45.935683181243427, 0.0, 0.0, 1003116.1598382751, -98.403721000389453, 0.0, 0.0, -201696.11249167149, 330.7020816302512, 0.0, 0.0, -327125.10138588975, 247.48897983897257, 0.0, 0.0, -889021.40818739205, -123.25802427575343, 0.0, 0.0, -512511.74050718872, -223.64554240580921, 0.0, 0.0, -439243.26699259342, -90.926884091497826, 0.0, 0.0, -521657.70312392223, 307.52889167500388, 0.0, 0.0, 145905.88035071047, -81.706295272192676, 0.0, 0.0, -514217.75957826863, 350.16556747675372, 0.0, 0.0, 276521.46974886092, 315.29551730855343, 0.0, 0.0, -15005.362914721836, 160.30373127823759, 0.0, 0.0, -80100.914586450817, -384.07908162118889, 1329022.0543307522, 0.0, 0.0, 0.0, 784583.09379498218, -163.16917368552592, 0.0, 0.0, -508966.00275964983, 8.9839949262181413, 0.0, 0.0, 79637.436419199701, 331.08436496876726, 0.0, 0.0, 94517.825357591864, 109.72964748155799, 0.0, 0.0, 177860.45162952511, -317.03718781317883, 0.0, 0.0, -29122.396674515963, 1485.7265036016379, 0.0, 0.0, 17912.116468879263, 931.65335058043877, 0.0, 0.0, 653330.83172917052, 55.731087572455294, 0.0, 0.0, -509734.47426063882, -141.90121461573341, 0.0, 0.0, 31458.886496181502, -34.732735905242301] - ), - 'alm2': n.array( - [-1103414.2044201535, 0.0, 0.0, 0.0, -249216.4175125043, -39.729408989111761, -1176577.5024123464, 0.0, 0.0, 0.0, -1133438.0896773722, -57.136484321740362, 0.0, 0.0, 222514.96389323997, -56.54701176052766, 0.0, 0.0, 193125.4799435687, 51.765853432263377, 1650813.1434357744, 0.0, 0.0, 0.0, -25180.167167042251, 9.706549888877543, 0.0, 0.0, -937103.70299756597, -25.235430095798019, 0.0, 0.0, -80206.951061589556, -43.737009902656311, 0.0, 0.0, 182236.99738128181, -9.5841647270127233, 0.0, 0.0, 103053.30746878275, -34.746107248883426, -853322.86337260832, 0.0, 0.0, 0.0, 312646.94046925154, -25.503097047283237, 0.0, 0.0, 516702.80610491917, -112.8995326796007, 0.0, 0.0, -549784.93980406516, 57.973309366387355, 0.0, 0.0, -133464.03856328354, -2.3579576847100228, 0.0, 0.0, -340036.97046563891, -5.0761598513730801, 0.0, 0.0, -107417.89539361646, 29.82477180699183, 0.0, 0.0, -66288.742088489264, -34.12677027245843, 242761.66286661208, 0.0, 0.0, 0.0, 355299.14864236064, 72.099452268713861, 0.0, 0.0, 139443.07563040542, -101.94519349600016, 0.0, 0.0, 99457.074090162219, -53.571788791621884, 0.0, 0.0, 63825.321563384627, -19.106242946089228, 0.0, 0.0, 164839.16754470853, 28.99853104429242, 0.0, 0.0, 494099.56746437453, 58.175733468573178, 0.0, 0.0, 93765.53513571863, -73.705546017026805, 0.0, 0.0, 143668.77177549744, -20.327210721837712, 0.0, 0.0, 215432.54358751758, 20.561875291271971, -336035.2869258151, 0.0, 0.0, 0.0, -123952.11552198855, -26.20554895407496, 0.0, 0.0, 98272.253111928076, -75.114433478302843, 0.0, 0.0, -106650.06951936896, -21.330579531982103, 0.0, 0.0, -473476.94996891997, -42.98730216491024, 0.0, 0.0, -155456.52564638408, -73.316932421345186, 0.0, 0.0, -418808.97740108712, 28.899145302574603, 0.0, 0.0, -406392.02990293864, 69.897831029364852, 0.0, 0.0, 82745.855904357944, -53.543664420697027, 0.0, 0.0, -143003.38259869698, -60.231381402686893, 0.0, 0.0, -185414.39992036307, -55.638999723792324, 0.0, 0.0, 57277.617390907042, 56.327787434392484, 570416.63114454073, 0.0, 0.0, 0.0, -185825.17149148285, 79.745406813858992, 0.0, 0.0, -106401.39466975507, -7.4871873591579607, 0.0, 0.0, 566118.44264289935, -113.91061252917012, 0.0, 0.0, 302767.57112975762, -166.02607098229137, 0.0, 0.0, -25511.390371765974, -20.284633946514809, 0.0, 0.0, 115918.21036339784, -0.14909046442531992, 0.0, 0.0, 244883.77982795733, 33.441292469906351, 0.0, 0.0, 578.97737984670971, -29.749816407437436, 0.0, 0.0, -21287.86151421025, -26.705101674036737, 0.0, 0.0, 97016.665438425509, 2.0789083598333034, 0.0, 0.0, 3245.3467862179295, -1.1507130817224245, 0.0, 0.0, -55339.697968340421, -56.781836595897254, 0.0, 0.0, 67224.568837156505, -45.034112413907174, 88228.413091622468, 0.0, 0.0, 0.0, 98729.870790065805, -26.490575176241236, 0.0, 0.0, -12521.061489840857, -27.498884777435311, 0.0, 0.0, -368630.92316534434, 81.327104401357062, 0.0, 0.0, -160372.31410858282, -226.57241037930862, 0.0, 0.0, -156704.90196554124, - \ - 139.95065504138012, 0.0, 0.0, 27482.694924666503, -46.191163980334068, 0.0, 0.0, -62136.927476522571, 52.599397698604172, 0.0, 0.0, -52277.755677365676, -19.094727148594099, 0.0, 0.0, 167405.17967058913, -31.063717548123311, 0.0, 0.0, -8289.0844077842721, -15.577974192081774, 0.0, 0.0, 79186.162530883637, 22.734818682221846, 0.0, 0.0, 106668.34326342445, -101.41692049139429, 0.0, 0.0, 18214.641074740575, 20.585373531073557, 0.0, 0.0, -71390.592043344805, 27.649348022334909, 0.0, 0.0, 14814.590103047942, -26.36849999764064, -11157.116779309097, 0.0, 0.0, 0.0, -50884.637809017622, 47.597477185206181, 0.0, 0.0, 393267.6756285142, -73.354139067332838, 0.0, 0.0, 184321.32496451217, 1.6799736455904748, 0.0, 0.0, -121684.25286297864, -134.07023722185465, 0.0, 0.0, 53659.100234631303, -68.944001271453899, 0.0, 0.0, -62729.732767350608, -139.53389739397599, 0.0, 0.0, -154172.64228266297, -7.0791581577233611, 0.0, 0.0, -76362.086452639225, -15.578970227018429, 0.0, 0.0, -169687.45011097338, -24.916016619164235, 0.0, 0.0, -213898.37319506073, -63.888596650200135, 0.0, 0.0, -47086.22333360646, -43.77647795152663, 0.0, 0.0, -127397.09602717002, 79.396693346221724, 0.0, 0.0, -114260.87383607897, 8.715503344160485, 0.0, 0.0, 4070.2158591931084, -120.48808286434839, 0.0, 0.0, -82888.947500125505, -59.255380108883756, 0.0, 0.0, -44246.638222694237, 5.2910059817257249, 0.0, 0.0, -6508.0061320476525, 27.794706552026138, 15023.702290156509, 0.0, 0.0, 0.0, 141495.08754248972, -4.1209650818827823, 0.0, 0.0, -41796.81177522293, -60.968327854584736, 0.0, 0.0, -129810.40849011859, 27.679103738189752, 0.0, 0.0, 126273.89360457758, -18.804328613744513, 0.0, 0.0, 22145.352034173586, -113.60303290931722, 0.0, 0.0, 153991.20384008222, -186.36981064621975, 0.0, 0.0, -105424.03359466669, 9.1868043948482665, 0.0, 0.0, -200753.94837883816, 18.462385825155181, 0.0, 0.0, 40407.548132653654, -64.063903113355181, 0.0, 0.0, 62369.105084695089, -48.063478622828697, 0.0, 0.0, 172352.2462180329, 23.959278790922735, 0.0, 0.0, 99384.432937844947, 42.821236641167104, 0.0, 0.0, 84676.398507017133, 17.345700727270732, 0.0, 0.0, 101237.19550751503, -57.169603738392134, 0.0, 0.0, -28488.049510846889, 13.144012068357325, 0.0, 0.0, 100356.14379977378, -69.478218605370571, 0.0, 0.0, -53390.779412722877, -60.97825600786021, 0.0, 0.0, 2834.413225208727, -31.681493659170407, 0.0, 0.0, 15592.097028410077, 74.394985075632434, -258548.41923429139, 0.0, 0.0, 0.0, -149722.17678243664, 32.038106652580687, 0.0, 0.0, 96622.532589511451, -2.7613786699687144, 0.0, 0.0, -15055.185742227035, -64.205006666819855, 0.0, 0.0, -17013.860784224202, -24.8088027258508, 0.0, 0.0, -33891.222331880599, 62.248672839967249, 0.0, 0.0, 6427.1304293357562, -293.13055304372818, 0.0, 0.0, -5760.4541098594109, -177.54384831356066, 0.0, 0.0, -131226.58104731468, -11.521255308232114, 0.0, 0.0, 101695.66103538357, 27.724077681902834, 0.0, 0.0, -5604.4363708451438, 6.5783684475226076] - ), - 'alm1': n.array( - [86105.710512555146, 0.0, 0.0, 0.0, 19016.380367371166, 3.0740357044470707, 91816.647180154585, 0.0, 0.0, 0.0, 86145.045560129452, 4.3020547568553216, 0.0, 0.0, -16972.06932406019, 4.333570009765352, 0.0, 0.0, -14707.42362132396, -3.9359863782863593, -126310.12023278416, 0.0, 0.0, 0.0, 2368.7338648797499, -0.79901363129630532, 0.0, 0.0, 72128.060366414618, 1.9360586501514283, 0.0, 0.0, 6067.5004453349093, 3.2592178193264738, 0.0, 0.0, -13907.351529879181, 0.72938468470238693, 0.0, 0.0, -7816.9761497748268, 2.6322124359613301, 64909.319748412963, 0.0, 0.0, 0.0, -23791.780691604748, 1.8910793637963941, 0.0, 0.0, -39372.579704928015, 8.6889053485660135, 0.0, 0.0, 41595.230960589914, -4.3902339481535977, 0.0, 0.0, 10112.272928799337, 0.16506107444965337, 0.0, 0.0, 25731.219155667335, 0.46130897945539479, 0.0, 0.0, 8077.6340416862104, -2.2666842985329221, 0.0, 0.0, 5051.6471594700961, 2.5599044818704457, -18922.572614424953, 0.0, 0.0, 0.0, -27390.862431652142, -5.4254510820269397, 0.0, 0.0, -10626.922204020999, 7.903933319447022, 0.0, 0.0, -7559.5767299673462, 3.9958477189129846, 0.0, 0.0, -5027.7625354094725, 1.4539966351419851, 0.0, 0.0, -12527.616585359714, -2.1579613556381956, 0.0, 0.0, -37550.570759319402, -4.3258197514406094, 0.0, 0.0, -7207.8131427431153, 5.5923007167559113, 0.0, 0.0, -10934.659788070483, 1.5462056815557303, 0.0, 0.0, -16366.37241348215, -1.5385747155059879, 25047.6062182438, 0.0, 0.0, 0.0, 9508.0248644387575, 2.0198784164358696, 0.0, 0.0, -7368.9903795998471, 5.8623209779020256, 0.0, 0.0, 8311.3736131828646, 1.4992901950620758, 0.0, 0.0, 36177.02133195733, 3.3258195341825103, 0.0, 0.0, 11892.087203873632, 5.562433896593574, 0.0, 0.0, 31851.760738854839, -2.1167769777232954, 0.0, 0.0, 30876.553443434816, -5.3089330153539027, 0.0, 0.0, -6285.2177188078704, 4.0232333154977864, 0.0, 0.0, 10832.588384515837, 4.5638689140627484, 0.0, 0.0, 14114.002386595224, 4.2710132435130523, 0.0, 0.0, -4366.4936621754323, -4.2778156918589874, -43204.449024641232, 0.0, 0.0, 0.0, 14511.687075286822, -6.1034572760433603, 0.0, 0.0, 7644.0705070270978, 0.72112747834405599, 0.0, 0.0, -42871.395371724895, 8.5324010467773128, 0.0, 0.0, -22864.270680876944, 12.756935623709822, 0.0, 0.0, 1910.6385733283935, 1.4860435822542193, 0.0, 0.0, -8923.3811275360677, 0.021156295435269104, 0.0, 0.0, -18674.466081287377, -2.5596759713678492, 0.0, 0.0, 21.296692666388893, 2.2396721751367372, 0.0, 0.0, 1605.0199334129031, 1.942000053562025, 0.0, 0.0, -7355.8052917157866, -0.085178977736855899, 0.0, 0.0, -178.73958595323569, 0.17989586109817998, 0.0, 0.0, 4182.3341200215764, 4.3294838255467267, 0.0, 0.0, -5126.0780933967171, 3.3816336872697645, -7175.178402542273, 0.0, 0.0, 0.0, -7308.3848104788049, 1.9755604776273612, 0.0, 0.0, 907.5844769826324, 2.2609766986638453, 0.0, 0.0, 28054.862415791838, -6.2191983569260829, 0.0, 0.0, 12026.118122357248, 17.443247158460427, 0.0, 0.0, 11766.474070554848, - 10.494782611360524, 0.0, 0.0, -2275.6047141099889, 3.5015128439030572, 0.0, 0.0, 4743.4119902921057, -3.990800723023967, 0.0, 0.0, 3907.2171582824712, 1.4127861605729506, 0.0, 0.0, -12721.282992510121, 2.2920569832139255, 0.0, 0.0, 649.69038288480999, 1.1212365594407105, 0.0, 0.0, -6102.494402847844, -1.6577620524144914, 0.0, 0.0, -8096.9210297207674, 7.7205045824876493, 0.0, 0.0, -1368.9920705052045, -1.5642694932314585, 0.0, 0.0, 5395.9666599335242, -2.1117569522013517, 0.0, 0.0, -1140.01405051295, 1.9906879133936171, 624.80869328162123, 0.0, 0.0, 0.0, 4089.5349396056608, -3.6121520177209665, 0.0, 0.0, -29968.531010741684, 5.7439378149575493, 0.0, 0.0, -13842.366747404836, -0.083076507030891034, 0.0, 0.0, 9251.74658998427, 10.474210268762711, 0.0, 0.0, -4025.1724808612594, 5.0376737683049297, 0.0, 0.0, 4775.3783570389587, 10.664547039447074, 0.0, 0.0, 11976.191214257957, 0.50201620991965934, 0.0, 0.0, 5867.2639428163502, 1.1896716103905389, 0.0, 0.0, 12877.657067925986, 1.8465660318979775, 0.0, 0.0, 16206.111609433263, 4.8246843405078863, 0.0, 0.0, 3610.4854996584972, 3.3516070780476195, 0.0, 0.0, 9661.5351796437808, -5.9380430259292645, 0.0, 0.0, 8685.2531087868465, -0.64821232890848268, 0.0, 0.0, -312.91711936827596, 9.2168609777382926, 0.0, 0.0, 6298.759850966494, 4.4602580767723747, 0.0, 0.0, 3348.3045543307935, -0.38462078919272813, 0.0, 0.0, 488.51289926704931, -2.1128912645941416, -975.52305859373428, 0.0, 0.0, 0.0, -10755.129903571918, 0.30884068431632339, 0.0, 0.0, 3104.2277033433138, 4.7372665647730328, 0.0, 0.0, 9752.9130898821077, -2.0804460962139686, 0.0, 0.0, -9694.8281227787666, 1.64808120580346, 0.0, 0.0, -1622.3829558462212, 8.5067132512126111, 0.0, 0.0, -11558.805406892518, 14.350648555418546, 0.0, 0.0, 8405.0851462397623, -0.72112972624099048, 0.0, 0.0, 15625.638555235859, -1.3670451022237979, 0.0, 0.0, -3147.7771182901865, 4.8662303313693354, 0.0, 0.0, -4682.4501917588223, 3.6582047312104793, 0.0, 0.0, -13101.93913472442, -1.8255379688292537, 0.0, 0.0, -7556.06062439787, -3.2266823357474479, 0.0, 0.0, -6410.2917754375831, -1.3019240449467371, 0.0, 0.0, -7702.2742811075941, 4.2106258495163953, 0.0, 0.0, 2177.1234415980966, -0.84924429602420592, 0.0, 0.0, -7665.7128282976337, 5.3720471902173932, 0.0, 0.0, 4046.9940657058983, 4.6261175146435791, 0.0, 0.0, -211.63279451514836, 2.4440216742659922, 0.0, 0.0, -1188.9555539240885, -5.6516925299338743, 19695.857081475006, 0.0, 0.0, 0.0, 11252.737508494711, -2.458785211828749, 0.0, 0.0, -7232.0338690955987, 0.27253953774259326, 0.0, 0.0, 1123.7638154174197, 4.8837214488794061, 0.0, 0.0, 1215.3034770015856, 2.1029499497563773, 0.0, 0.0, 2552.3298189366842, -4.7821392334415531, 0.0, 0.0, -529.94244708716974, 22.599584036997086, 0.0, 0.0, 560.40615094398663, 13.309094105051802, 0.0, 0.0, 10242.089928115463, 0.92276408985565261, 0.0, 0.0, -7896.9507053769803, -2.1196969544998265, 0.0, 0.0, 397.11700299896523, -0.49174517770122583] - ), - 'alm0': n.array( - [-2509.795308092424, 0.0, 0.0, 0.0, -542.95304808539447, -0.089103865486498762, -2674.8921085852267, 0.0, 0.0, 0.0, -2450.8275459460328, -0.12122968266255646, 0.0, 0.0, 484.43258693118355, -0.12444162654967923, 0.0, 0.0, 419.14889644597554, 0.11199842018396657, 3617.1180506112255, 0.0, 0.0, 0.0, -79.345837595100249, 0.024609457915114472, 0.0, 0.0, -2076.1775181825979, -0.055599716031520682, 0.0, 0.0, -171.89694983456775, -0.09107814601572882, 0.0, 0.0, 397.16303975126743, -0.020743466595031901, 0.0, 0.0, 222.00188556890657, -0.074614425553248653, -1848.0514375785062, 0.0, 0.0, 0.0, 677.25212936706521, -0.052427769472071402, 0.0, 0.0, 1122.7561396675696, -0.25026343574461934, 0.0, 0.0, -1177.2398993868574, 0.12448795077559982, 0.0, 0.0, -286.89042984494125, -0.0043671055576578813, 0.0, 0.0, -729.16457065597024, -0.015059272877281931, 0.0, 0.0, -227.54986446468334, 0.064518156065887025, 0.0, 0.0, -144.09526163269231, -0.071896777739056492, 550.56142446132162, 0.0, 0.0, 0.0, 789.95305777447186, 0.15278481548345677, 0.0, 0.0, 302.80826664285104, -0.2292455172036138, 0.0, 0.0, 215.07203955470834, -0.11148641690072135, 0.0, 0.0, 147.6300094316332, -0.041438137068600535, 0.0, 0.0, 356.40663808704829, 0.06020981998761786, 0.0, 0.0, 1068.2809150343332, 0.12059322351429408, 0.0, 0.0, 207.15070625717203, -0.15887907500986867, 0.0, 0.0, 311.51955894051775, -0.044013176018082217, 0.0, 0.0, 465.50514676183599, 0.043086930173945374, -699.91994003413959, 0.0, 0.0, 0.0, -272.30205269131108, -0.058237464090315841, 0.0, 0.0, 206.6696629058103, -0.17113397512837467, 0.0, 0.0, -242.17697804400967, -0.03904696709972983, 0.0, 0.0, -1034.0461250086307, -0.096263366639788267, 0.0, 0.0, -340.36959713926638, -0.157959637524269, 0.0, 0.0, -906.76535925870894, 0.05822882111324016, 0.0, 0.0, -878.19034673650174, 0.15090747340518335, 0.0, 0.0, 178.72710693016728, -0.1133137878039443, 0.0, 0.0, -307.2732605638983, -0.12946761060311943, 0.0, 0.0, -402.15039831465805, -0.12267742876829732, 0.0, 0.0, 124.58755428476331, 0.12160615484632728, 1224.8966172274097, 0.0, 0.0, 0.0, -422.81125499888446, 0.17489349085562872, 0.0, 0.0, -206.13215938425151, -0.024918238081632359, 0.0, 0.0, 1216.0021828633653, -0.23903462262346217, 0.0, 0.0, 646.76999409163841, -0.36686036191363569, 0.0, 0.0, -53.748641101219171, -0.040657195610747071, 0.0, 0.0, 257.01496034832354, -0.00088397200625506657, 0.0, 0.0, 532.92627524275213, 0.073231868546206474, 0.0, 0.0, -2.3123718843121193, -0.063116998506782929, 0.0, 0.0, -45.312170650102566, -0.052918508044701933, 0.0, 0.0, 208.81448662099027, 0.00049665368894422079, 0.0, 0.0, 3.3145191420192557, -0.0075522336446495145, 0.0, 0.0, -118.38406740379477, -0.1235450612088997, 0.0, 0.0, 146.27931891595969, -0.095112431509793954, 216.66543016969877, 0.0, 0.0, 0.0, 202.62032812415652, -0.055071980987297146, 0.0, 0.0, -24.732380939749305, -0.069324586041150008, 0.0, 0.0, -799.12852251187439, 0.17805739075476529, 0.0, 0.0, -338.13613885263197, -0.50258751799301171, 0.0, 0.0, -330.92377568750896, - \ - 0.29439745258184846, 0.0, 0.0, 69.955703609112916, -0.099300574356904758, 0.0, 0.0, -135.50283401710723, 0.11336055781808395, 0.0, 0.0, -109.4473303776138, -0.039179921416761625, 0.0, 0.0, 361.89296520495282, -0.063457640307326188, 0.0, 0.0, -19.011530990712416, -0.030296155915062021, 0.0, 0.0, 175.81242107703684, 0.045380812776882037, 0.0, 0.0, 230.1356975837636, -0.21991370682307745, 0.0, 0.0, 38.548063220604263, 0.04447052463281953, 0.0, 0.0, -152.74099867458406, 0.060411014726151104, 0.0, 0.0, 32.799893279193917, -0.05625755938421767, -11.671167858413597, 0.0, 0.0, 0.0, -122.41338733578932, 0.10265761851708999, 0.0, 0.0, 854.8147788993241, -0.16832987784539305, 0.0, 0.0, 389.59483422670991, 0.0010515097421338222, 0.0, 0.0, -263.54000762919696, -0.30602620404886061, 0.0, 0.0, 113.5268590131072, -0.13743520219127883, 0.0, 0.0, -136.1177227410563, -0.30517270252912371, 0.0, 0.0, -347.71640981466663, -0.013328197668937738, 0.0, 0.0, -168.59066374139138, -0.034021615854743656, 0.0, 0.0, -365.89920330695344, -0.05129511900796007, 0.0, 0.0, -459.7707625930787, -0.13649377467013135, 0.0, 0.0, -103.53308934238288, -0.096015678120849338, 0.0, 0.0, -274.34912938228803, 0.16645409598440561, 0.0, 0.0, -247.15567235290939, 0.01807845821834346, 0.0, 0.0, 9.0053572040052821, -0.26370903611326263, 0.0, 0.0, -179.18044921665742, -0.12568774597726795, 0.0, 0.0, -94.892883913068388, 0.010492867772354359, 0.0, 0.0, -13.737508814272434, 0.060075070519419876, 23.415415276762271, 0.0, 0.0, 0.0, 305.72805905313203, -0.0086614331104518417, 0.0, 0.0, -86.195790327242264, -0.13777706251196414, 0.0, 0.0, -274.69250181433779, 0.058458297086366275, 0.0, 0.0, 278.482105784417, -0.053177711988373275, 0.0, 0.0, 44.501303461749991, -0.23822638212032041, 0.0, 0.0, 324.63764111477315, -0.41352873710279964, 0.0, 0.0, -249.4983121147516, 0.021301518932652769, 0.0, 0.0, -454.42693460024361, 0.037898208796734653, 0.0, 0.0, 91.623643436443217, -0.1383467576541032, 0.0, 0.0, 131.72531033239599, -0.10421407678062951, 0.0, 0.0, 372.83411450176357, 0.052076206062910413, 0.0, 0.0, 215.03659811564501, 0.091125817672451065, 0.0, 0.0, 181.72640460655063, 0.036584421520065045, 0.0, 0.0, 219.35570781570911, -0.11636865323780578, 0.0, 0.0, -62.255991452941828, 0.020311442840686849, 0.0, 0.0, 219.08103501446959, -0.15524342747668779, 0.0, 0.0, -114.87121517016, -0.13136769824434186, 0.0, 0.0, 5.9304785270308358, -0.070526493957355579, 0.0, 0.0, 33.931301137524464, 0.16072691130852704, -561.3125186753964, 0.0, 0.0, 0.0, -316.97903860259953, 0.070590200246086601, 0.0, 0.0, 202.91117550362088, -0.009538018080419413, 0.0, 0.0, -31.44408160859355, -0.13909745805711646, 0.0, 0.0, -32.437126472037825, -0.066025505043034366, 0.0, 0.0, -72.232731834313483, 0.13754930097467863, 0.0, 0.0, 16.089915969260041, -0.65224932808333158, 0.0, 0.0, -18.960925699756704, -0.37344958578008358, 0.0, 0.0, -298.63181385705462, -0.027681501480277509, 0.0, 0.0, 229.16214842560413, 0.06063401187656968, 0.0, 0.0, -10.520311488826575, 0.013786299852551351] - ), - } -} - - -def get_aa(freqs): - '''Return the AntennaArray to be used for simulation.''' - location = prms['loc'] - antennas = [] - if 'antpos' not in prms: - prms['antpos'] = prms['antpos_ideal'] - nants = len(prms['antpos']) - antpos_ideal = n.zeros(shape=(nants, 3), dtype=float) - tops = {'top_x': 0, 'top_y': 1, 'top_z': 2} - for k in prms['antpos_ideal'].keys(): - for i, m in enumerate(prms['antpos_ideal'][k]): - antpos_ideal[k, tops[m]] = prms['antpos_ideal'][k][m] - for i in range(nants): - beam = prms['beam'](freqs, nside=32, lmax=20, mmax=20, deg=7) - try: - beam.set_params(prms['bm_prms']) - except(AttributeError): - pass - phsoff = {'x': [0., 0.], 'y': [0., 0.]} - amp = prms['amps'].get(i, 4e-3) - amp = {'x': amp, 'y': amp} - bp_r = prms['bp_r'][i] - bp_r = {'x': bp_r, 'y': bp_r} - bp_i = prms['bp_i'][i] - bp_i = {'x': bp_i, 'y': bp_i} - twist = prms['twist'][i] - antennas.append(a.pol.Antenna(0., 0., 0., beam, phsoff=phsoff, - amp=amp, bp_r=bp_r, bp_i=bp_i, pointing=(0., n.pi / 2, twist))) -# antennas.append(a.pol.Antenna(0., 0., 0., beam, phsoff=phsoff)) -# aa = AntennaArray(prms['loc'], antennas, tau_ew=prms['tau_ew'], tau_ns=prms['tau_ns'], -# gain=prms['gain'], amp_coeffs=prms['amp_coeffs'], -# dly_coeffs=prms['dly_coeffs'], dly_xx_to_yy=prms['dly_xx_to_yy'], ant_layout=prms['ant_layout']) - aa = AntennaArray(prms['loc'], antennas, antpos_ideal=antpos_ideal) - pos_prms = {} - for i in range(nants): - pos_prms[str(i)] = prms['antpos'][i] - aa.set_params(pos_prms) - return aa - -# src_prms = { -# 'J071717.6-250454':{'ra':109.32351, 'dec':-25.0817}} -# -# def get_catalog(srcs=None, cutoff= None, catalogs=['helm','misc']): -# custom_srcs = ['J071717.6-250454', 'J020012.1-305327', 'J002549.1-260210'] -# if srcs is None: -# cat = a.src.get_catalog(srcs=[s for s in srcs if not s in custom_srcs], cutoff=cutoff, catalogs=catalogs) -# for src in [s for s in srcs if s in custom_srcs]: -# cat[src] = a.fit.RadioFixedBody( diff --git a/hera_cal/calibrations/hsa7458_v001.py b/hera_cal/calibrations/hsa7458_v001.py deleted file mode 100644 index 2bb52c1b0..000000000 --- a/hera_cal/calibrations/hsa7458_v001.py +++ /dev/null @@ -1,330 +0,0 @@ -# v001 has a fix to two issues with antpos_ideal. The first was that the separation was 14.0 m, not 14.6 m. -# The second was an error in the transciption of positions that led to -# slight non-redundancy on the 10 cm scale. -Josh - -import aipy as a -import numpy as n -cm_p_m = 100 - - -class AntennaArray(a.pol.AntennaArray): - - def __init__(self, *args, **kwargs): - a.pol.AntennaArray.__init__(self, *args, **kwargs) - self.antpos_ideal = kwargs.pop('antpos_ideal') - - def update_gains(self): - gains = self.gain * self.amp_coeffs - for i, gain in zip(self.ant_layout.flatten(), gains.flatten()): - self[i].set_params({'amp_x': gain}) - self[i].set_params({'amp_y': gain}) - - def update_delays(self): - ns, ew = n.indices(self.ant_layout.shape) - dlys = ns * self.tau_ns + ew * self.tau_ew + self.dly_coeffs - for i, tau in zip(self.ant_layout.flatten(), dlys.flatten()): - self[i].set_params({'dly_x': tau}) - self[i].set_params({'dly_y': tau + self.dly_xx_to_yy.flatten()[i]}) - - def update(self): - # self.update_gains() - # self.update_delays() - a.pol.AntennaArray.update(self) - - def get_params(self, ant_prms={'*': '*'}): - try: - prms = a.pol.AntennaArray.get_params(self, ant_prms) - except(IndexError): - return {} - for k in ant_prms: - if k == 'aa': - if 'aa' not in prms: - prms['aa'] = {} - for val in ant_prms[k]: - if val == 'tau_ns': - prms['aa']['tau_ns'] = self.tau_ns - elif val == 'tau_ew': - prms['aa']['tau_ew'] = self.tau_ew - elif val == 'gain': - prms['aa']['gain'] = self.gain - else: - try: - top_pos = n.dot(self._eq2zen, self[int(k)].pos) - # XXX should multiply this by len_ns to match set_params. - except(ValueError): - continue - if ant_prms[k] == '*': - prms[k].update( - {'top_x': top_pos[0], 'top_y': top_pos[1], 'top_z': top_pos[2]}) - else: - for val in ant_prms[k]: - if val == 'top_x': - prms[k]['top_x'] = top_pos[0] - elif val == 'top_y': - prms[k]['top_y'] = top_pos[1] - elif val == 'top_z': - prms[k]['top_z'] = top_pos[2] - return prms - - def set_params(self, prms): - changed = a.pol.AntennaArray.set_params(self, prms) - for i, ant in enumerate(self): - ant_changed = False - top_pos = n.dot(self._eq2zen, ant.pos) - try: - top_pos[0] = prms[str(i)]['top_x'] - ant_changed = True - except(KeyError): - pass - try: - top_pos[1] = prms[str(i)]['top_y'] - ant_changed = True - except(KeyError): - pass - try: - top_pos[2] = prms[str(i)]['top_z'] - ant_changed = True - except(KeyError): - pass - if ant_changed: - ant.pos = n.dot(n.linalg.inv(self._eq2zen), - top_pos) / a.const.len_ns * cm_p_m - changed |= ant_changed - try: - self.tau_ns, changed = prms['aa']['tau_ns'], 1 - except(KeyError): - pass - try: - self.tau_ew, changed = prms['aa']['tau_ew'], 1 - except(KeyError): - pass - try: - self.gain, changed = prms['aa']['gain'], 1 - except(KeyError): - pass - if changed: - self.update() - return changed - - -prms = { - 'loc': ('-30:43:17.5', '21:25:41.9'), # KAT, SA (GPS) - 'antpos_ideal': { - 80: {'top_x': -14.6, 'top_y': -25.28794179, 'top_z': 0.0}, # a0 - 104: {'top_x': 0.0, 'top_y': -25.28794179, 'top_z': 0.0}, # a1 - 96: {'top_x': 14.6, 'top_y': -25.28794179, 'top_z': 0.0}, # a2 - - 64: {'top_x': -21.9, 'top_y': -12.6439709, 'top_z': 0.0}, # a3 - 53: {'top_x': -7.3, 'top_y': -12.6439709, 'top_z': 0.0}, # a4 - 31: {'top_x': 7.3, 'top_y': -12.6439709, 'top_z': 0.0}, # a5 - 65: {'top_x': 21.9, 'top_y': -12.6439709, 'top_z': 0.0}, # a5 - - - 88: {'top_x': -29.2, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 9: {'top_x': -14.6, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 20: {'top_x': 0.0, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 89: {'top_x': 14.6, 'top_y': 0.0, 'top_z': 0.0}, # a5 - 43: {'top_x': 29.2, 'top_y': 0.0, 'top_z': 0.0}, # a5 - - 105: {'top_x': -21.9, 'top_y': 12.6439709, 'top_z': 0.0}, # a3 - 22: {'top_x': -7.3, 'top_y': 12.6439709, 'top_z': 0.0}, # a4 - 81: {'top_x': 7.3, 'top_y': 12.6439709, 'top_z': 0.0}, # a5 - 10: {'top_x': 21.9, 'top_y': 12.6439709, 'top_z': 0.0}, # a5 - - - 72: {'top_x': -14.6, 'top_y': 25.28794179, 'top_z': 0.0}, # a0 - 112: {'top_x': 0.0, 'top_y': 25.28794179, 'top_z': 0.0}, # a1 - 97: {'top_x': 14.6, 'top_y': 25.28794179, 'top_z': 0.0}, # a2 - - 0: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 1: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 2: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 3: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 4: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 5: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 6: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 7: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 8: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 11: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 12: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 13: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 14: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 15: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 16: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 17: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 18: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 19: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 21: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 23: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 24: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 25: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 26: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 27: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 28: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 29: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 30: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 32: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 33: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 34: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 35: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 36: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 37: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 38: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 39: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 40: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 41: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 42: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 44: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 45: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 46: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 47: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 48: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 49: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 50: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 51: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 52: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 54: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 55: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 56: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 57: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 58: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 59: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 60: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 61: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 62: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 63: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 66: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 67: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 68: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 69: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 70: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 71: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 73: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 74: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 75: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 76: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 77: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 78: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 79: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 82: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 83: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 84: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 85: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 86: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 87: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 90: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 91: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 92: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 93: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 94: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 95: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 98: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 99: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 100: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 101: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 102: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 103: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 106: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 107: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 108: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 109: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 110: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 111: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 113: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 114: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 115: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 116: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 117: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 118: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 119: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 120: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 121: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 122: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 123: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 124: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 125: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 126: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - 127: {'top_x': -1, 'top_y': -1, 'top_z': -1}, - }, - 'amps': dict(zip(range(128), n.ones(128))), - 'amp_coeffs': n.array([1] * 128), - 'bp_r': n.array([[1.]] * 128), - 'bp_i': n.array([[0., 0., 0.]] * 128), - 'twist': n.array([0] * 128), - 'beam': a.fit.BeamAlm, - 'bm_prms': { - 'alm7': n.array( - [-1081324093.5604355, 0.0, 0.0, 0.0, -262155437.14744619, -40523.293875736716, -1144639049.4450433, 0.0, 0.0, 0.0, -1209061567.4856892, -62596.955398614278, 0.0, 0.0, 234574880.79412466, -59373.276068766572, 0.0, 0.0, 204426224.06441718, 55114.563591448132, 1729080775.5577424, 0.0, 0.0, 0.0, -5627870.2693141159, 8441.4522962633619, 0.0, 0.0, -957871468.02796948, -26154.972628033676, 0.0, 0.0, -87102252.471384808, -50052.73968168487, 0.0, 0.0, 191828502.26962891, -10048.43132508696, 0.0, 0.0, 110776547.27628954, -37351.826990050504, -906797537.4834379, 0.0, 0.0, 0.0, 329222817.13445771, -29060.739352269207, 0.0, 0.0, 546809652.71201193, -115946.69818003669, 0.0, 0.0, -591134355.63541889, 62683.080456769902, 0.0, 0.0, -144055745.14333308, -3344.9767162177391, 0.0, 0.0, -368656232.30881768, -1608.1983129602879, 0.0, 0.0, -118801805.27812727, 31905.336279017167, 0.0, 0.0, -70225720.747015119, -37865.877995669623, 235419758.4512482, 0.0, 0.0, 0.0, 361579085.9617995, 79072.147640181458, 0.0, 0.0, 146429964.96514896, -102117.14213434084, 0.0, 0.0, 106427393.26674381, -60107.204182634705, 0.0, 0.0, 59154166.248101547, -20388.350978482271, 0.0, 0.0, 176029459.26438314, 33285.591239419438, 0.0, 0.0, 527618634.93934166, 66884.303920780934, 0.0, 0.0, 95913693.41127409, -79300.923099238891, 0.0, 0.0, 152734050.03753135, -21615.518484261818, 0.0, 0.0, 230694358.5770939, 22922.170838031663, -383288562.70426351, 0.0, 0.0, 0.0, -126281330.72650661, -26736.867629611937, 0.0, 0.0, 108175824.49057513, -73826.154995947072, 0.0, 0.0, -105130427.45878558, -27109.647812448158, 0.0, 0.0, -495130497.4338429, -43312.494575842124, 0.0, 0.0, -162294563.70339859, -78644.408483291132, 0.0, 0.0, -446143155.07499522, 35049.023211568106, 0.0, 0.0, -434372911.29877228, 74645.281954757884, 0.0, 0.0, 88535885.916778564, -59658.181174639933, 0.0, 0.0, -154524011.19535148, -64925.569280836324, 0.0, 0.0, -197013303.49254256, -57546.998199721042, 0.0, 0.0, 60578806.739350073, 60269.144321032669, 614919978.78591418, 0.0, 0.0, 0.0, -177976472.87455249, 83517.765491276004, 0.0, 0.0, -136301559.45860973, -2057.5912754017359, 0.0, 0.0, 613862755.05429029, -126093.29111144203, 0.0, 0.0, 330986019.80497843, -171293.91106101952, 0.0, 0.0, -29154749.084786706, -23698.75128392793, 0.0, 0.0, 118909415.76059921, 260.4906139722309, 0.0, 0.0, 258338224.08025572, 34588.968913224162, 0.0, 0.0, 3785397.5870792689, -32603.464627771926, 0.0, 0.0, -23259161.770430245, -32648.547687113882, 0.0, 0.0, 104427443.08076131, 5749.4319312391553, 0.0, 0.0, 6766465.5382205453, 3241.742220615246, 0.0, 0.0, -60284503.8862499, -59902.508087108952, 0.0, 0.0, 70947908.65981704, -50046.164234017422, 71592751.406619206, 0.0, 0.0, 0.0, 114423944.11037378, -29629.639271339391, 0.0, 0.0, -16162405.156746721, -22843.554219456128, 0.0, 0.0, -391208214.49301404, 85360.748577972205, 0.0, 0.0, -180559385.64929616, -232405.39276717394, 0.0, 0.0, -173999368.48403537, - \ - 154535.5223811192, 0.0, 0.0, 21379759.421723526, -49363.223340975463, 0.0, 0.0, -65362589.496401452, 56497.722354469195, 0.0, 0.0, -59068349.756921723, -22203.228234489961, 0.0, 0.0, 178895590.72285667, -36778.476704805165, 0.0, 0.0, -7977531.617536407, -19838.626327764079, 0.0, 0.0, 80425490.578405693, 27831.980826245854, 0.0, 0.0, 114611568.72714353, -107486.07299270081, 0.0, 0.0, 20196073.66257038, 21928.884663855733, 0.0, 0.0, -77682176.577698827, 29213.006661709769, 0.0, 0.0, 15123630.35168907, -28694.812017467506, -22259183.296553552, 0.0, 0.0, 0.0, -44195359.795093246, 51184.417790776875, 0.0, 0.0, 416191946.56073493, -71732.351641676665, 0.0, 0.0, 205663263.71618012, 3388.5589815610024, 0.0, 0.0, -130943398.42767963, -131143.82698794606, 0.0, 0.0, 61651470.898734599, -81217.981804434457, 0.0, 0.0, -67180046.491523147, -146577.21040483299, 0.0, 0.0, -152936171.75485, -9306.3668560189235, 0.0, 0.0, -78432624.898623183, -16457.284767487032, 0.0, 0.0, -182188345.51379466, -28943.200208655751, 0.0, 0.0, -230936841.81174293, -69881.661699287171, 0.0, 0.0, -48611744.075940624, -45613.670555435718, 0.0, 0.0, -137135254.63530335, 89602.425289011473, 0.0, 0.0, -122086433.73023096, 10038.304046797484, 0.0, 0.0, 4230108.1019680994, -125434.25870475314, 0.0, 0.0, -88554513.106125027, -65172.061009842495, 0.0, 0.0, -48016889.768255182, 6514.6442567450413, 0.0, 0.0, -7234862.3567767777, 29462.421170785103, 23975873.985774957, 0.0, 0.0, 0.0, 150246363.27382952, -4635.0397663657277, 0.0, 0.0, -47057107.317354918, -61032.384893401948, 0.0, 0.0, -145067771.71055323, 30340.435422360377, 0.0, 0.0, 130479661.43167895, -11379.689478798271, 0.0, 0.0, 26361229.859195136, -125845.83502669417, 0.0, 0.0, 169502237.90273514, -190856.12211173368, 0.0, 0.0, -93899694.259581938, 9428.9987870662444, 0.0, 0.0, -197490720.78410134, 21312.280548650102, 0.0, 0.0, 39647940.551049069, -68437.045331174842, 0.0, 0.0, 69474226.516149923, -51031.516066011136, 0.0, 0.0, 183898889.91059858, 25427.755216915164, 0.0, 0.0, 105935367.66732898, 47267.944906588062, 0.0, 0.0, 91688077.289836451, 19266.763736649074, 0.0, 0.0, 107771149.47695087, -67938.256377686776, 0.0, 0.0, -29850724.42625796, 21607.473853242802, 0.0, 0.0, 105178954.14601882, -69775.134273171891, 0.0, 0.0, -57617253.476713084, -65410.799885873028, 0.0, 0.0, 3261331.2317122123, -32217.75104223685, 0.0, 0.0, 16472425.803737164, 79582.269607468625, -272848871.13511133, 0.0, 0.0, 0.0, -166763480.12559777, 33090.611564668841, 0.0, 0.0, 108954734.6009059, -403.73869004175492, 0.0, 0.0, -17283151.399917897, -68588.699644901702, 0.0, 0.0, -21492440.153302398, -17597.541258704674, 0.0, 0.0, -38441136.647693813, 64579.571492712137, 0.0, 0.0, 4505100.6340750242, -300117.69352899096, 0.0, 0.0, 549992.16794250254, -197163.89229418512, 0.0, 0.0, -127963651.33731289, -10644.866941283586, 0.0, 0.0, 100807969.57532065, 29015.182801835355, 0.0, 0.0, -7278488.9224838661, 7477.4234534004445] - ), - 'alm6': n.array( - [797385716.91804504, 0.0, 0.0, 0.0, 189967106.19923255, 29537.10693528819, 846600538.89322472, 0.0, 0.0, 0.0, 872926192.63071275, 44904.233226988472, 0.0, 0.0, -169861745.64221448, 42971.448932979642, 0.0, 0.0, -147906900.75269288, -39808.417875855441, -1253273886.731957, 0.0, 0.0, 0.0, 7956724.3034045501, -6356.2955966941372, 0.0, 0.0, 699223699.88883495, 19020.68326448747, 0.0, 0.0, 62573658.414382517, 35470.424362177982, 0.0, 0.0, -138953239.49548644, 7299.6975745242362, 0.0, 0.0, -79806306.899763986, 26921.147432152444, 655475892.86221838, 0.0, 0.0, 0.0, -238869250.08572152, 20663.930342020343, 0.0, 0.0, -395488561.2668637, 84491.317123754401, 0.0, 0.0, 426316351.0672881, -45085.033036303044, 0.0, 0.0, 103665104.62868968, 2246.2873997537672, 0.0, 0.0, 264983020.48203912, 1892.1499981893205, 0.0, 0.0, 84976114.845701993, -23012.274489893702, 0.0, 0.0, 50771408.628350258, 27079.015870586507, -174485451.73842844, 0.0, 0.0, 0.0, -264289472.79323781, -56715.616631217796, 0.0, 0.0, -106222730.444833, 74901.88337064792, 0.0, 0.0, -76714164.675549507, 42894.665025885537, 0.0, 0.0, -44453338.477396756, 14708.146540980564, 0.0, 0.0, -127030875.23670675, -23573.026026034317, 0.0, 0.0, -380764603.20410013, -47356.176563799374, 0.0, 0.0, -70038599.590872958, 57096.578562188763, 0.0, 0.0, -110338759.44084603, 15618.47767476493, 0.0, 0.0, -166316476.72216225, -16378.749845538387, 271936085.48576093, 0.0, 0.0, 0.0, 92433839.952875465, 19519.099424088534, 0.0, 0.0, -77618380.050654531, 54389.716587842369, 0.0, 0.0, 77410628.333828956, 18890.257217773775, 0.0, 0.0, 359407589.92209935, 31728.327458281798, 0.0, 0.0, 117813006.27702276, 56694.00896615073, 0.0, 0.0, 322163097.63930309, -24474.159721000109, 0.0, 0.0, 313393639.11823243, -53880.392102794642, 0.0, 0.0, -63859274.184436947, 42560.437368084611, 0.0, 0.0, 111161686.03953889, 46744.631315417995, 0.0, 0.0, 142346033.48720458, 41862.95645676343, 0.0, 0.0, -43818886.848100305, -43470.280716078254, -442768171.11322945, 0.0, 0.0, 0.0, 132501506.90008594, -60540.916997092565, 0.0, 0.0, 93942945.610904098, 2481.2147707751869, 0.0, 0.0, -441000417.33351082, 90293.217816417338, 0.0, 0.0, -237336783.93090552, 124693.18798191204, 0.0, 0.0, 20623105.645757515, 16780.788665236021, 0.0, 0.0, -86673347.981770217, -111.29751227977317, 0.0, 0.0, -187034693.45671436, -25193.745737031823, 0.0, 0.0, -2135530.3974111909, 23393.093986819636, 0.0, 0.0, 16698628.352701169, 22791.910128108695, 0.0, 0.0, -75207242.986817583, -3478.3017686277117, 0.0, 0.0, -4262714.0713599836, -1495.1668203620484, 0.0, 0.0, 43275301.615728691, 43375.651892071954, 0.0, 0.0, -51358762.141454875, 35744.562531746327, -55977125.17363143, 0.0, 0.0, 0.0, -80891874.204180971, 21169.676736598227, 0.0, 0.0, 11039910.066945948, 17564.401170771853, 0.0, 0.0, 282861419.72051185, -61850.098505863178, 0.0, 0.0, 128362573.7168542, 169414.68024107264, 0.0, 0.0, 124330006.22390915, - 110718.99879655795, 0.0, 0.0, -16841657.337382279, 35657.177598049217, 0.0, 0.0, 47349371.812364854, -40707.611029805084, 0.0, 0.0, 42010956.049356803, 15687.679769475246, 0.0, 0.0, -129069297.57474856, 25830.387752163271, 0.0, 0.0, 5910511.5135691371, 13697.037347944815, 0.0, 0.0, -58821740.432719804, -19405.588572920107, 0.0, 0.0, -82547653.248470947, 77731.66933892775, 0.0, 0.0, -14433978.003370205, -15837.572457110891, 0.0, 0.0, 55786893.745701335, -21124.411201972158, 0.0, 0.0, -11046375.71224675, 20616.212993154164, 14107144.447629577, 0.0, 0.0, 0.0, 33774805.041091383, -36859.336437719656, 0.0, 0.0, -301070957.00480914, 52878.121995111564, 0.0, 0.0, -146653601.39361849, -2198.0942705195794, 0.0, 0.0, 94168406.841010004, 96760.717803226478, 0.0, 0.0, -43478941.173792779, 57375.658488987028, 0.0, 0.0, 48353110.436083667, 106201.96001161895, 0.0, 0.0, 112485321.00221781, 6382.1773339061747, 0.0, 0.0, 57189418.603424326, 11901.926954900946, 0.0, 0.0, 131280556.01794536, 20435.530265815629, 0.0, 0.0, 166170342.25571772, 50100.982288524996, 0.0, 0.0, 35409830.459971406, 33124.972929883166, 0.0, 0.0, 98747876.406133488, -63736.080320002809, 0.0, 0.0, 88071880.266417414, -7100.2184152616755, 0.0, 0.0, -3067340.9423153657, 91162.549369077489, 0.0, 0.0, 63897911.553277262, 46684.560473517355, 0.0, 0.0, 34498206.032984555, -4537.3240835134584, 0.0, 0.0, 5168843.1048901472, -21320.40983260217, -15835543.717267705, 0.0, 0.0, 0.0, -108625585.50132097, 3294.6252010393659, 0.0, 0.0, 33621479.273489162, 44729.560439200985, 0.0, 0.0, 103347563.63279098, -21767.597065975646, 0.0, 0.0, -94941255.180099696, 9685.7584460242178, 0.0, 0.0, -18528876.37688531, 90099.006466248247, 0.0, 0.0, -121579532.1146235, 139213.3284709499, 0.0, 0.0, 71246149.768020689, -6806.3276870759018, 0.0, 0.0, 145604934.16640645, -15090.6173931348, 0.0, 0.0, -29251884.513770111, 49390.368939568521, 0.0, 0.0, -49586552.469104417, 36886.524239895676, 0.0, 0.0, -132737515.14220525, -18372.148025799193, 0.0, 0.0, -76491981.799765065, -33802.178523338815, 0.0, 0.0, -65923648.161891818, -13764.57393849405, 0.0, 0.0, -77827781.713095531, 47692.036396206728, 0.0, 0.0, 21647589.21944366, -14133.730494852018, 0.0, 0.0, -76290028.632632598, 51182.252677407232, 0.0, 0.0, 41455286.640109941, 47157.905514409278, 0.0, 0.0, -2303036.9134609378, 23541.969363905846, 0.0, 0.0, -11918806.087500827, -57397.776327919324, 197612684.36048445, 0.0, 0.0, 0.0, 118955416.99244839, -24087.627570760262, 0.0, 0.0, -77491887.254076943, 728.30824844376821, 0.0, 0.0, 12207030.001704402, 49466.405483031638, 0.0, 0.0, 14932883.729976833, 14239.9646008034, 0.0, 0.0, 27192582.807980306, -46905.646869159398, 0.0, 0.0, -3736072.351231684, 218791.39737395261, 0.0, 0.0, 938468.7842925014, 140973.07684057893, 0.0, 0.0, 94550054.572198883, 7941.4520718544645, 0.0, 0.0, -74181966.616232648, -21044.559100278962, 0.0, 0.0, 5019241.6634857096, -5304.694057288676] - ), - 'alm5': n.array( - [-197735155.01929793, 0.0, 0.0, 0.0, -46053418.11639905, -7226.397802963189, -210520973.5427039, 0.0, 0.0, 0.0, -210657534.4115783, -10745.785564600596, 0.0, 0.0, 41148658.926344283, -10416.636060571493, 0.0, 0.0, 35784980.360108547, 9612.9840553492686, 304168753.30395395, 0.0, 0.0, 0.0, -3117586.5713760527, 1632.8412811888347, 0.0, 0.0, -171090196.95194718, -4632.55322212383, 0.0, 0.0, -15011356.299438834, -8364.6158748977232, 0.0, 0.0, 33676784.554911196, -1772.7269020579031, 0.0, 0.0, 19210024.26669988, -6481.5616124462031, -158387393.28245038, 0.0, 0.0, 0.0, 57914671.611356676, -4885.2721544610504, 0.0, 0.0, 95684065.272677362, -20637.725554880592, 0.0, 0.0, -102657366.72310401, 10831.674992370326, 0.0, 0.0, -24919568.123357572, -493.6485726144798, 0.0, 0.0, -63605529.998098962, -674.09128358241719, 0.0, 0.0, -20267019.847643819, 5547.5212175440292, 0.0, 0.0, -12278347.932371413, -6453.4324016264673, 43450364.563942656, 0.0, 0.0, 0.0, 64756329.325183183, 13568.438404067152, 0.0, 0.0, 25774658.376369122, -18443.874764878143, 0.0, 0.0, 18490347.059644662, -10189.922507207644, 0.0, 0.0, 11237512.512576636, -3548.1511247369526, 0.0, 0.0, 30643195.288836252, 5554.058991234795, 0.0, 0.0, 91852213.821721107, 11152.354180029373, 0.0, 0.0, 17136791.711244829, -13738.340482599324, 0.0, 0.0, 26654802.354939841, -3772.9607028607643, 0.0, 0.0, 40080801.777484469, 3898.1337497247532, -64205745.592204437, 0.0, 0.0, 0.0, -22659883.342662893, -4778.0834184917312, 0.0, 0.0, 18555022.616979484, -13473.030524613543, 0.0, 0.0, -19158703.781450976, -4325.618633195475, 0.0, 0.0, -87303680.674776122, -7798.5650239280103, 0.0, 0.0, -28630028.187836513, -13657.289990676993, 0.0, 0.0, -77776433.152057096, 5663.1889376592408, 0.0, 0.0, -75576903.129559204, 12998.603107606816, 0.0, 0.0, 15394598.358521122, -10123.752482296954, 0.0, 0.0, -26711379.163051497, -11242.177700866312, 0.0, 0.0, -34392594.777521037, -10202.774681930312, 0.0, 0.0, 10602956.226330029, 10479.795259434368, 106491522.00151923, 0.0, 0.0, 0.0, -33138240.729237858, 14693.306846559934, 0.0, 0.0, -21364417.055660442, -922.28831526417491, 0.0, 0.0, 105835946.52125469, -21543.372550449742, 0.0, 0.0, 56811774.725853391, -30413.430161657085, 0.0, 0.0, -4861543.3597652912, -3938.4477312154736, 0.0, 0.0, 21178757.320129372, 3.5425208576304499, 0.0, 0.0, 45298346.835260376, 6143.2888814262978, 0.0, 0.0, 335546.7987198591, -5597.459067079385, 0.0, 0.0, -3999171.3806912508, -5264.6744997915521, 0.0, 0.0, 18095332.294255983, 638.8459776001049, 0.0, 0.0, 840929.63493319822, 107.15833138602918, 0.0, 0.0, -10371226.677820578, -10505.444300287199, 0.0, 0.0, 12436856.257415403, -8511.9205882707138, 14784850.940883569, 0.0, 0.0, 0.0, 19007856.207817975, -5034.9923737995823, 0.0, 0.0, -2498879.0170426308, -4590.8614967715039, 0.0, 0.0, -68376948.624012321, 15000.851884991811, 0.0, 0.0, -30424090.555139855, -41397.471186152834, 0.0, 0.0, -29616739.442200258, - \ - 26436.200386076027, 0.0, 0.0, 4504589.81844257, -8603.13572616479, 0.0, 0.0, -11478082.127457535, 9801.1835365541247, 0.0, 0.0, -9949835.1498631909, -3681.9065933991928, 0.0, 0.0, 31127145.710026521, -6023.8911849642827, 0.0, 0.0, -1474616.7280308811, -3120.8527051806514, 0.0, 0.0, 14424342.151320595, 4478.0547817086999, 0.0, 0.0, 19870777.76114646, -18798.894308055569, 0.0, 0.0, 3439581.5227250052, 3824.0816135823075, 0.0, 0.0, -13375210.583126174, 5111.8038311824457, 0.0, 0.0, 2704300.4055295889, -4943.7362257902059, -2820776.3819985995, 0.0, 0.0, 0.0, -8716712.5975790638, 8870.4368321870552, 0.0, 0.0, 72838691.512315914, -13115.675171949872, 0.0, 0.0, 34868715.134384163, 445.01372842380943, 0.0, 0.0, -22648556.756227445, -24007.562182239992, 0.0, 0.0, 10225496.43410253, -13429.948589291756, 0.0, 0.0, -11648114.4951357, -25752.408984327056, 0.0, 0.0, -27790363.240071055, -1440.4752597467768, 0.0, 0.0, -13972388.61876422, -2880.3368818686808, 0.0, 0.0, -31611811.476835247, -4796.544240381837, 0.0, 0.0, -39940933.139877774, -11990.248686645078, 0.0, 0.0, -8637664.214980036, -8054.465313268588, 0.0, 0.0, -23757834.173265617, 15100.165734198441, 0.0, 0.0, -21240042.369048979, 1670.9006386179863, 0.0, 0.0, 745992.55951904377, -22177.201914765799, 0.0, 0.0, -15411608.939690793, -11155.870022900486, 0.0, 0.0, -8277784.326783523, 1045.3560798711144, 0.0, 0.0, -1230781.1765813681, 5157.2676594239729, 3371226.6051944932, 0.0, 0.0, 0.0, 26258888.926003013, -781.11690680106267, 0.0, 0.0, -7982799.094995562, -11012.550602180869, 0.0, 0.0, -24555994.147887498, 5209.5952756182242, 0.0, 0.0, 23146703.87589569, -2812.6513443658323, 0.0, 0.0, 4318014.4979850184, -21492.21656303855, 0.0, 0.0, 29058640.345119234, -34037.549503927024, 0.0, 0.0, -18242673.078121372, 1656.8324467507082, 0.0, 0.0, -36072862.830247574, 3551.0799378540246, 0.0, 0.0, 7252934.6827932158, -11913.82448328409, 0.0, 0.0, 11797958.62110701, -8915.0206777991007, 0.0, 0.0, 32028437.321352843, 4440.2513551878992, 0.0, 0.0, 18463453.022954959, 8064.832811994861, 0.0, 0.0, 15830357.645304311, 3278.6002973079399, 0.0, 0.0, 18792715.22209141, -11110.350620979698, 0.0, 0.0, -5254231.7428235617, 2977.060123896787, 0.0, 0.0, 18517061.004637863, -12596.961454058939, 0.0, 0.0, -9965178.2132176459, -11359.992935143997, 0.0, 0.0, 541776.1522784296, -5769.2477330948705, 0.0, 0.0, 2885107.8830083506, 13837.858540130937, -47862763.656404138, 0.0, 0.0, 0.0, -28298286.980327792, 5873.9680203106927, 0.0, 0.0, 18362400.235881787, -315.51705578927215, 0.0, 0.0, -2874422.5857720273, -11929.116229145047, 0.0, 0.0, -3417477.3191902661, -3924.658545164405, 0.0, 0.0, -6421891.4478960913, 11416.933954008207, 0.0, 0.0, 1037940.6079158594, -53486.786972605179, 0.0, 0.0, -613407.33829156274, -33589.737764611818, 0.0, 0.0, -23490363.036867645, -2004.1753650588878, 0.0, 0.0, 18333266.803092051, 5109.7982999645592, 0.0, 0.0, -1138365.5078694951, 1253.4638702863897] - ), - 'alm4': n.array( - [7200724.2174806157, 0.0, 0.0, 0.0, 1507578.5364308401, 249.09445266642169, 7725779.5666901879, 0.0, 0.0, 0.0, 6747539.2579509569, 329.36641952671226, 0.0, 0.0, -1343001.5699128646, 343.36792991568888, 0.0, 0.0, -1159855.5653791095, -308.92769367092768, -10045128.444344388, 0.0, 0.0, 0.0, 288589.31376132951, -70.980762890053413, 0.0, 0.0, 5851186.7774917074, 155.21204435663131, 0.0, 0.0, 467714.86876319919, 238.59930858441089, 0.0, 0.0, -1101842.335750744, 58.096309466026973, 0.0, 0.0, -608138.07580545719, 204.95821814484245, 5101024.1326503837, 0.0, 0.0, 0.0, -1885231.9571066336, 139.59983322242354, 0.0, 0.0, -3105913.7215474164, 701.68124144120748, 0.0, 0.0, 3239644.93434321, -339.82491448090769, 0.0, 0.0, 783855.81893535459, 8.7527052982549058, 0.0, 0.0, 1986537.8514804086, 54.774986424606197, 0.0, 0.0, 612170.88910865143, -176.99708425924547, 0.0, 0.0, 398007.89088467637, 193.56614271468877, -1596925.8860192283, 0.0, 0.0, 0.0, -2227878.7078425568, -415.01509470166883, 0.0, 0.0, -844775.91825557721, 650.38469558451084, 0.0, 0.0, -590632.35791223042, 299.36217992006749, 0.0, 0.0, -437078.74958942051, 113.79355867828019, 0.0, 0.0, -980335.68394004204, -157.54883485169805, 0.0, 0.0, -2938603.615868886, -315.29147746550342, 0.0, 0.0, -584687.47979809716, 434.71263424168563, 0.0, 0.0, -858991.85386585491, 121.46105830492419, 0.0, 0.0, -1277548.8225962832, -115.89194500169798, 1840668.8290774515, 0.0, 0.0, 0.0, 775421.56337957992, 164.00611331607877, 0.0, 0.0, -562088.42813265021, 488.74685971765177, 0.0, 0.0, 691778.87208729645, 97.689901957009482, 0.0, 0.0, 2882651.1565228878, 272.52207724336955, 0.0, 0.0, 948662.06765682506, 433.74488550190046, 0.0, 0.0, 2497867.2332102088, -144.98233385054755, 0.0, 0.0, 2414321.2649437124, -415.58171649203098, 0.0, 0.0, -490977.9606196385, 302.58764598967997, 0.0, 0.0, 838801.66186270467, 354.24491208439002, 0.0, 0.0, 1109240.4625873815, 343.14609143330898, 0.0, 0.0, -344528.03137613513, -334.26528674880853, -3354305.0711071114, 0.0, 0.0, 0.0, 1235458.4567361525, -485.19168633800058, 0.0, 0.0, 487397.2070375224, 83.880871552662413, 0.0, 0.0, -3308936.6858345182, 647.62704156274015, 0.0, 0.0, -1751740.8660837077, 1026.5527017383265, 0.0, 0.0, 139846.54955892122, 106.93161870083593, 0.0, 0.0, -721404.82398454682, 3.6015241937210991, 0.0, 0.0, -1476829.0591856656, -205.98964494497451, 0.0, 0.0, 17074.077977673544, 171.31880268277882, 0.0, 0.0, 123060.47869451297, 132.0062185627576, 0.0, 0.0, -571603.6917338561, 10.396528401168975, 0.0, 0.0, 2106.5454300025908, 35.752699013801632, 0.0, 0.0, 321464.4592717489, 342.34076722166759, 0.0, 0.0, -405230.5941204023, 255.2360120010726, -670296.34645801655, 0.0, 0.0, 0.0, -529100.52793346881, 148.57741762277331, 0.0, 0.0, 57471.51362526336, 206.86269211261629, 0.0, 0.0, 2207181.4600743535, -493.51422675565459, 0.0, 0.0, 895463.30568390526, 1409.934585353082, 0.0, 0.0, 888776.11402601667, 798.19028910433144, - 0.0, 0.0, -215643.35608039363, 274.1110708271608, 0.0, 0.0, 376051.83866420202, -310.73247764113745, 0.0, 0.0, 289955.29165051226, 101.76182819162518, 0.0, 0.0, -994834.62761617475, 161.69117608964245, 0.0, 0.0, 55076.980514253126, 72.037278617768209, 0.0, 0.0, -497694.41516721481, -112.23417665406721, 0.0, 0.0, -630133.16098474909, 608.3926186109635, 0.0, 0.0, -103502.07506563514, -122.78257869786432, 0.0, 0.0, 415209.12744939065, -166.58248247027083, 0.0, 0.0, -92606.301129069601, 153.27094286810689, -155.133754694667, 0.0, 0.0, 0.0, 368304.00212202733, -280.867215040259, 0.0, 0.0, -2362905.2792973067, 479.92664306566542, 0.0, 0.0, -1040034.2467855478, 0.76582903775922517, 0.0, 0.0, 718560.8191561898, 876.24115424409968, 0.0, 0.0, -292721.47833479074, 359.34134632343324, 0.0, 0.0, 372865.53641371639, 845.74282823210956, 0.0, 0.0, 993400.71737590164, 30.865235806642321, 0.0, 0.0, 474280.45441336668, 93.872153111048078, 0.0, 0.0, 1002907.9299558332, 133.19243145625578, 0.0, 0.0, 1255885.0030796861, 369.38663831551793, 0.0, 0.0, 290708.02660839848, 267.74414177703102, 0.0, 0.0, 750690.63702933991, -441.17311505823324, 0.0, 0.0, 679277.21542988182, -47.164992914979038, 0.0, 0.0, -25034.048713920944, 737.20036885145737, 0.0, 0.0, 492703.18828978809, 340.11997934964194, 0.0, 0.0, 258268.03397987972, -25.875498151930167, 0.0, 0.0, 36841.386016291726, -166.58153344592151, -37632.524860587197, 0.0, 0.0, 0.0, -846970.57810843072, 23.067138772739717, 0.0, 0.0, 231772.05047900774, 389.59227512856796, 0.0, 0.0, 731573.15687432117, -159.47722701117917, 0.0, 0.0, -779636.79196457902, 169.42221635624287, 0.0, 0.0, -114048.4415545105, 645.30053706908575, 0.0, 0.0, -881108.21860260586, 1161.5099955044125, 0.0, 0.0, 748235.23576389183, -57.690368801478542, 0.0, 0.0, 1304114.5518882216, -99.391608662850047, 0.0, 0.0, -263144.21203343244, 380.80042850864618, 0.0, 0.0, -352403.58508126321, 287.70856589182199, 0.0, 0.0, -1026027.1112983709, -143.58640740725582, 0.0, 0.0, -592252.06919899839, -244.84725404024846, 0.0, 0.0, -495445.89352101792, -98.364381497365002, 0.0, 0.0, -604362.59029897652, 295.72251912004111, 0.0, 0.0, 173141.05309468889, -29.437403866957482, 0.0, 0.0, -609597.44962526858, 441.85413291552464, 0.0, 0.0, 313734.85551236029, 360.67490478600058, 0.0, 0.0, -15401.76767474161, 198.95971188667156, 0.0, 0.0, -93905.143248108579, -441.64480338592182, 1557834.4870206926, 0.0, 0.0, 0.0, 846825.25105827861, -197.83739354926948, 0.0, 0.0, -537733.70476057276, 33.21990588911023, 0.0, 0.0, 82182.540697250195, 381.92187491491592, 0.0, 0.0, 79199.852686637649, 206.0957338460905, 0.0, 0.0, 188168.68771215889, -382.92038636172128, 0.0, 0.0, -53095.127393283889, 1828.4815368321251, 0.0, 0.0, 77039.429637870722, 1006.0372475571642, 0.0, 0.0, 860002.40107733512, 79.645120143879822, 0.0, 0.0, -655526.16343116295, -168.77744731668088, 0.0, 0.0, 24864.210627988363, -36.250655713179249] - ), - 'alm3': n.array( - [5498273.867212004, 0.0, 0.0, 0.0, 1278787.6144197686, 200.69631150016968, 5855938.7480396256, 0.0, 0.0, 0.0, 5847379.6897321241, 298.14002897401355, 0.0, 0.0, -1142519.2128262592, 289.14639793614521, 0.0, 0.0, -993520.89184620359, -266.85901085140711, -8445890.7411452159, 0.0, 0.0, 0.0, 88960.996282732958, -45.404243903980827, 0.0, 0.0, 4753726.6035505533, 128.65976222572772, 0.0, 0.0, 416486.45794872148, 231.75264200679231, 0.0, 0.0, -935084.04088520445, 49.245386113225521, 0.0, 0.0, -533118.40524846269, 179.90326954511633, 4396953.9195928695, 0.0, 0.0, 0.0, -1608349.7299925357, 135.45560067565393, 0.0, 0.0, -2656511.2093055765, 573.27704161730151, 0.0, 0.0, 2849651.3732845969, -300.56300083744014, 0.0, 0.0, 691500.88130568538, 13.583711800361833, 0.0, 0.0, 1764810.4259444436, 19.179618441300519, 0.0, 0.0, 562066.86523355253, -153.96198960788544, 0.0, 0.0, 340862.09253124218, 178.98642747530579, -1208920.608357993, 0.0, 0.0, 0.0, -1799262.1597735337, -376.45318693479493, 0.0, 0.0, -715874.06723833689, 512.60274437112969, 0.0, 0.0, -513195.85187474889, 282.61204774423248, 0.0, 0.0, -312987.8115696148, 98.476599955903495, 0.0, 0.0, -850554.04150807834, -153.88002183190986, 0.0, 0.0, -2549521.2039438705, -308.97811247523509, 0.0, 0.0, -476185.0271458606, 381.24956233215812, 0.0, 0.0, -739921.59786708606, 104.73864708094125, 0.0, 0.0, -1112406.7067007029, -108.11473746144854, 1779181.7167289439, 0.0, 0.0, 0.0, 629948.71285196778, 132.75183050912085, 0.0, 0.0, -514848.34386742389, 374.55990412960182, 0.0, 0.0, 532627.3153818252, 119.77835605693443, 0.0, 0.0, 2424622.4174201251, 216.72201228006872, 0.0, 0.0, 795108.48625639779, 379.06163904571338, 0.0, 0.0, 2158946.4330264404, -156.65280944607056, 0.0, 0.0, 2097723.367115201, -360.82043797325053, 0.0, 0.0, -427280.22268814908, 280.67854240034717, 0.0, 0.0, 741194.31265485799, 311.98234210405832, 0.0, 0.0, 954730.11413698632, 283.38882535844346, 0.0, 0.0, -294365.82031801599, -290.87943522870074, -2955385.5772971096, 0.0, 0.0, 0.0, 922348.17132076842, -407.96866449942939, 0.0, 0.0, 590219.54455448966, 26.085003675834287, 0.0, 0.0, -2936385.3988425806, 597.68610206583253, 0.0, 0.0, -1575950.5946588507, 844.75891669718953, 0.0, 0.0, 134649.35790006144, 109.16816207238172, 0.0, 0.0, -588332.72589620715, -0.060434616306956457, 0.0, 0.0, -1257716.4221816759, -170.68406812560957, 0.0, 0.0, -8941.0779337873792, 155.29124403630357, 0.0, 0.0, 110950.05042145777, 145.66225385101623, 0.0, 0.0, -502170.41979421745, -17.325868884214849, 0.0, 0.0, -22949.505096291126, -2.4551467208407827, 0.0, 0.0, 287724.38079964806, 291.68391922333836, 0.0, 0.0, -345306.35353751393, 236.04471625211903, -412926.76103576075, 0.0, 0.0, 0.0, -526646.50936312054, 139.67052359284023, 0.0, 0.0, 68989.951308911957, 127.92940529824081, 0.0, 0.0, 1898231.0764858185, -416.49200396660581, 0.0, 0.0, 843251.14376973349, 1149.9715407003903, 0.0, 0.0, 821330.99892625911, - 733.43891047406044, 0.0, 0.0, -125797.69610716954, 238.84073917328871, 0.0, 0.0, 318711.61841675505, -272.01264234407392, 0.0, 0.0, 275787.48754996213, 101.98949961733558, 0.0, 0.0, -863964.31932292669, 166.75001032516667, 0.0, 0.0, 41026.459186118453, 86.226676317826517, 0.0, 0.0, -400863.91227860982, -123.85056930956991, 0.0, 0.0, -551443.79119247897, 521.92551449632617, 0.0, 0.0, -95383.356716058464, -106.16353997548579, 0.0, 0.0, 371079.83600833849, -141.89502251030711, 0.0, 0.0, -75145.763091870656, 137.17426779366033, 77215.485549988181, 0.0, 0.0, 0.0, 243010.03290878746, -246.16028356941868, 0.0, 0.0, -2022146.4903465142, 364.58173021633223, 0.0, 0.0, -966729.65752818203, -12.242870088295632, 0.0, 0.0, 628405.85512085771, 667.51076371889519, 0.0, 0.0, -283104.73741182394, 372.19399604828794, 0.0, 0.0, 323261.32509660453, 715.00664543583957, 0.0, 0.0, 772628.27728037443, 39.783619682754797, 0.0, 0.0, 388194.79034767463, 79.95535765348265, 0.0, 0.0, 877314.47408925625, 132.86186416546855, 0.0, 0.0, 1108321.017616556, 332.59517110546255, 0.0, 0.0, 239961.36277227409, 223.69078367662058, 0.0, 0.0, 659299.35428607883, -418.54744902859727, 0.0, 0.0, 589532.25215103338, -46.289537699833957, 0.0, 0.0, -20714.541405546493, 615.98609025910253, 0.0, 0.0, 427769.59997919854, 309.46495603679875, 0.0, 0.0, 229667.51363210069, -28.911630023187641, 0.0, 0.0, 34129.567905943033, -143.20187626491094, -92640.48420559497, 0.0, 0.0, 0.0, -729109.33367109543, 21.654587090135621, 0.0, 0.0, 221416.5410305266, 306.01150060926915, 0.0, 0.0, 680747.43978198699, -144.57062058568377, 0.0, 0.0, -642943.0025409261, 78.812483102076229, 0.0, 0.0, -119574.15208283922, 596.2647968341123, 0.0, 0.0, -806204.14766925236, 945.57520214706699, 0.0, 0.0, 508496.6306797663, -45.935683181243427, 0.0, 0.0, 1003116.1598382751, -98.403721000389453, 0.0, 0.0, -201696.11249167149, 330.7020816302512, 0.0, 0.0, -327125.10138588975, 247.48897983897257, 0.0, 0.0, -889021.40818739205, -123.25802427575343, 0.0, 0.0, -512511.74050718872, -223.64554240580921, 0.0, 0.0, -439243.26699259342, -90.926884091497826, 0.0, 0.0, -521657.70312392223, 307.52889167500388, 0.0, 0.0, 145905.88035071047, -81.706295272192676, 0.0, 0.0, -514217.75957826863, 350.16556747675372, 0.0, 0.0, 276521.46974886092, 315.29551730855343, 0.0, 0.0, -15005.362914721836, 160.30373127823759, 0.0, 0.0, -80100.914586450817, -384.07908162118889, 1329022.0543307522, 0.0, 0.0, 0.0, 784583.09379498218, -163.16917368552592, 0.0, 0.0, -508966.00275964983, 8.9839949262181413, 0.0, 0.0, 79637.436419199701, 331.08436496876726, 0.0, 0.0, 94517.825357591864, 109.72964748155799, 0.0, 0.0, 177860.45162952511, -317.03718781317883, 0.0, 0.0, -29122.396674515963, 1485.7265036016379, 0.0, 0.0, 17912.116468879263, 931.65335058043877, 0.0, 0.0, 653330.83172917052, 55.731087572455294, 0.0, 0.0, -509734.47426063882, -141.90121461573341, 0.0, 0.0, 31458.886496181502, -34.732735905242301] - ), - 'alm2': n.array( - [-1103414.2044201535, 0.0, 0.0, 0.0, -249216.4175125043, -39.729408989111761, -1176577.5024123464, 0.0, 0.0, 0.0, -1133438.0896773722, -57.136484321740362, 0.0, 0.0, 222514.96389323997, -56.54701176052766, 0.0, 0.0, 193125.4799435687, 51.765853432263377, 1650813.1434357744, 0.0, 0.0, 0.0, -25180.167167042251, 9.706549888877543, 0.0, 0.0, -937103.70299756597, -25.235430095798019, 0.0, 0.0, -80206.951061589556, -43.737009902656311, 0.0, 0.0, 182236.99738128181, -9.5841647270127233, 0.0, 0.0, 103053.30746878275, -34.746107248883426, -853322.86337260832, 0.0, 0.0, 0.0, 312646.94046925154, -25.503097047283237, 0.0, 0.0, 516702.80610491917, -112.8995326796007, 0.0, 0.0, -549784.93980406516, 57.973309366387355, 0.0, 0.0, -133464.03856328354, -2.3579576847100228, 0.0, 0.0, -340036.97046563891, -5.0761598513730801, 0.0, 0.0, -107417.89539361646, 29.82477180699183, 0.0, 0.0, -66288.742088489264, -34.12677027245843, 242761.66286661208, 0.0, 0.0, 0.0, 355299.14864236064, 72.099452268713861, 0.0, 0.0, 139443.07563040542, -101.94519349600016, 0.0, 0.0, 99457.074090162219, -53.571788791621884, 0.0, 0.0, 63825.321563384627, -19.106242946089228, 0.0, 0.0, 164839.16754470853, 28.99853104429242, 0.0, 0.0, 494099.56746437453, 58.175733468573178, 0.0, 0.0, 93765.53513571863, -73.705546017026805, 0.0, 0.0, 143668.77177549744, -20.327210721837712, 0.0, 0.0, 215432.54358751758, 20.561875291271971, -336035.2869258151, 0.0, 0.0, 0.0, -123952.11552198855, -26.20554895407496, 0.0, 0.0, 98272.253111928076, -75.114433478302843, 0.0, 0.0, -106650.06951936896, -21.330579531982103, 0.0, 0.0, -473476.94996891997, -42.98730216491024, 0.0, 0.0, -155456.52564638408, -73.316932421345186, 0.0, 0.0, -418808.97740108712, 28.899145302574603, 0.0, 0.0, -406392.02990293864, 69.897831029364852, 0.0, 0.0, 82745.855904357944, -53.543664420697027, 0.0, 0.0, -143003.38259869698, -60.231381402686893, 0.0, 0.0, -185414.39992036307, -55.638999723792324, 0.0, 0.0, 57277.617390907042, 56.327787434392484, 570416.63114454073, 0.0, 0.0, 0.0, -185825.17149148285, 79.745406813858992, 0.0, 0.0, -106401.39466975507, -7.4871873591579607, 0.0, 0.0, 566118.44264289935, -113.91061252917012, 0.0, 0.0, 302767.57112975762, -166.02607098229137, 0.0, 0.0, -25511.390371765974, -20.284633946514809, 0.0, 0.0, 115918.21036339784, -0.14909046442531992, 0.0, 0.0, 244883.77982795733, 33.441292469906351, 0.0, 0.0, 578.97737984670971, -29.749816407437436, 0.0, 0.0, -21287.86151421025, -26.705101674036737, 0.0, 0.0, 97016.665438425509, 2.0789083598333034, 0.0, 0.0, 3245.3467862179295, -1.1507130817224245, 0.0, 0.0, -55339.697968340421, -56.781836595897254, 0.0, 0.0, 67224.568837156505, -45.034112413907174, 88228.413091622468, 0.0, 0.0, 0.0, 98729.870790065805, -26.490575176241236, 0.0, 0.0, -12521.061489840857, -27.498884777435311, 0.0, 0.0, -368630.92316534434, 81.327104401357062, 0.0, 0.0, -160372.31410858282, -226.57241037930862, 0.0, 0.0, -156704.90196554124, - \ - 139.95065504138012, 0.0, 0.0, 27482.694924666503, -46.191163980334068, 0.0, 0.0, -62136.927476522571, 52.599397698604172, 0.0, 0.0, -52277.755677365676, -19.094727148594099, 0.0, 0.0, 167405.17967058913, -31.063717548123311, 0.0, 0.0, -8289.0844077842721, -15.577974192081774, 0.0, 0.0, 79186.162530883637, 22.734818682221846, 0.0, 0.0, 106668.34326342445, -101.41692049139429, 0.0, 0.0, 18214.641074740575, 20.585373531073557, 0.0, 0.0, -71390.592043344805, 27.649348022334909, 0.0, 0.0, 14814.590103047942, -26.36849999764064, -11157.116779309097, 0.0, 0.0, 0.0, -50884.637809017622, 47.597477185206181, 0.0, 0.0, 393267.6756285142, -73.354139067332838, 0.0, 0.0, 184321.32496451217, 1.6799736455904748, 0.0, 0.0, -121684.25286297864, -134.07023722185465, 0.0, 0.0, 53659.100234631303, -68.944001271453899, 0.0, 0.0, -62729.732767350608, -139.53389739397599, 0.0, 0.0, -154172.64228266297, -7.0791581577233611, 0.0, 0.0, -76362.086452639225, -15.578970227018429, 0.0, 0.0, -169687.45011097338, -24.916016619164235, 0.0, 0.0, -213898.37319506073, -63.888596650200135, 0.0, 0.0, -47086.22333360646, -43.77647795152663, 0.0, 0.0, -127397.09602717002, 79.396693346221724, 0.0, 0.0, -114260.87383607897, 8.715503344160485, 0.0, 0.0, 4070.2158591931084, -120.48808286434839, 0.0, 0.0, -82888.947500125505, -59.255380108883756, 0.0, 0.0, -44246.638222694237, 5.2910059817257249, 0.0, 0.0, -6508.0061320476525, 27.794706552026138, 15023.702290156509, 0.0, 0.0, 0.0, 141495.08754248972, -4.1209650818827823, 0.0, 0.0, -41796.81177522293, -60.968327854584736, 0.0, 0.0, -129810.40849011859, 27.679103738189752, 0.0, 0.0, 126273.89360457758, -18.804328613744513, 0.0, 0.0, 22145.352034173586, -113.60303290931722, 0.0, 0.0, 153991.20384008222, -186.36981064621975, 0.0, 0.0, -105424.03359466669, 9.1868043948482665, 0.0, 0.0, -200753.94837883816, 18.462385825155181, 0.0, 0.0, 40407.548132653654, -64.063903113355181, 0.0, 0.0, 62369.105084695089, -48.063478622828697, 0.0, 0.0, 172352.2462180329, 23.959278790922735, 0.0, 0.0, 99384.432937844947, 42.821236641167104, 0.0, 0.0, 84676.398507017133, 17.345700727270732, 0.0, 0.0, 101237.19550751503, -57.169603738392134, 0.0, 0.0, -28488.049510846889, 13.144012068357325, 0.0, 0.0, 100356.14379977378, -69.478218605370571, 0.0, 0.0, -53390.779412722877, -60.97825600786021, 0.0, 0.0, 2834.413225208727, -31.681493659170407, 0.0, 0.0, 15592.097028410077, 74.394985075632434, -258548.41923429139, 0.0, 0.0, 0.0, -149722.17678243664, 32.038106652580687, 0.0, 0.0, 96622.532589511451, -2.7613786699687144, 0.0, 0.0, -15055.185742227035, -64.205006666819855, 0.0, 0.0, -17013.860784224202, -24.8088027258508, 0.0, 0.0, -33891.222331880599, 62.248672839967249, 0.0, 0.0, 6427.1304293357562, -293.13055304372818, 0.0, 0.0, -5760.4541098594109, -177.54384831356066, 0.0, 0.0, -131226.58104731468, -11.521255308232114, 0.0, 0.0, 101695.66103538357, 27.724077681902834, 0.0, 0.0, -5604.4363708451438, 6.5783684475226076] - ), - 'alm1': n.array( - [86105.710512555146, 0.0, 0.0, 0.0, 19016.380367371166, 3.0740357044470707, 91816.647180154585, 0.0, 0.0, 0.0, 86145.045560129452, 4.3020547568553216, 0.0, 0.0, -16972.06932406019, 4.333570009765352, 0.0, 0.0, -14707.42362132396, -3.9359863782863593, -126310.12023278416, 0.0, 0.0, 0.0, 2368.7338648797499, -0.79901363129630532, 0.0, 0.0, 72128.060366414618, 1.9360586501514283, 0.0, 0.0, 6067.5004453349093, 3.2592178193264738, 0.0, 0.0, -13907.351529879181, 0.72938468470238693, 0.0, 0.0, -7816.9761497748268, 2.6322124359613301, 64909.319748412963, 0.0, 0.0, 0.0, -23791.780691604748, 1.8910793637963941, 0.0, 0.0, -39372.579704928015, 8.6889053485660135, 0.0, 0.0, 41595.230960589914, -4.3902339481535977, 0.0, 0.0, 10112.272928799337, 0.16506107444965337, 0.0, 0.0, 25731.219155667335, 0.46130897945539479, 0.0, 0.0, 8077.6340416862104, -2.2666842985329221, 0.0, 0.0, 5051.6471594700961, 2.5599044818704457, -18922.572614424953, 0.0, 0.0, 0.0, -27390.862431652142, -5.4254510820269397, 0.0, 0.0, -10626.922204020999, 7.903933319447022, 0.0, 0.0, -7559.5767299673462, 3.9958477189129846, 0.0, 0.0, -5027.7625354094725, 1.4539966351419851, 0.0, 0.0, -12527.616585359714, -2.1579613556381956, 0.0, 0.0, -37550.570759319402, -4.3258197514406094, 0.0, 0.0, -7207.8131427431153, 5.5923007167559113, 0.0, 0.0, -10934.659788070483, 1.5462056815557303, 0.0, 0.0, -16366.37241348215, -1.5385747155059879, 25047.6062182438, 0.0, 0.0, 0.0, 9508.0248644387575, 2.0198784164358696, 0.0, 0.0, -7368.9903795998471, 5.8623209779020256, 0.0, 0.0, 8311.3736131828646, 1.4992901950620758, 0.0, 0.0, 36177.02133195733, 3.3258195341825103, 0.0, 0.0, 11892.087203873632, 5.562433896593574, 0.0, 0.0, 31851.760738854839, -2.1167769777232954, 0.0, 0.0, 30876.553443434816, -5.3089330153539027, 0.0, 0.0, -6285.2177188078704, 4.0232333154977864, 0.0, 0.0, 10832.588384515837, 4.5638689140627484, 0.0, 0.0, 14114.002386595224, 4.2710132435130523, 0.0, 0.0, -4366.4936621754323, -4.2778156918589874, -43204.449024641232, 0.0, 0.0, 0.0, 14511.687075286822, -6.1034572760433603, 0.0, 0.0, 7644.0705070270978, 0.72112747834405599, 0.0, 0.0, -42871.395371724895, 8.5324010467773128, 0.0, 0.0, -22864.270680876944, 12.756935623709822, 0.0, 0.0, 1910.6385733283935, 1.4860435822542193, 0.0, 0.0, -8923.3811275360677, 0.021156295435269104, 0.0, 0.0, -18674.466081287377, -2.5596759713678492, 0.0, 0.0, 21.296692666388893, 2.2396721751367372, 0.0, 0.0, 1605.0199334129031, 1.942000053562025, 0.0, 0.0, -7355.8052917157866, -0.085178977736855899, 0.0, 0.0, -178.73958595323569, 0.17989586109817998, 0.0, 0.0, 4182.3341200215764, 4.3294838255467267, 0.0, 0.0, -5126.0780933967171, 3.3816336872697645, -7175.178402542273, 0.0, 0.0, 0.0, -7308.3848104788049, 1.9755604776273612, 0.0, 0.0, 907.5844769826324, 2.2609766986638453, 0.0, 0.0, 28054.862415791838, -6.2191983569260829, 0.0, 0.0, 12026.118122357248, 17.443247158460427, 0.0, 0.0, 11766.474070554848, - 10.494782611360524, 0.0, 0.0, -2275.6047141099889, 3.5015128439030572, 0.0, 0.0, 4743.4119902921057, -3.990800723023967, 0.0, 0.0, 3907.2171582824712, 1.4127861605729506, 0.0, 0.0, -12721.282992510121, 2.2920569832139255, 0.0, 0.0, 649.69038288480999, 1.1212365594407105, 0.0, 0.0, -6102.494402847844, -1.6577620524144914, 0.0, 0.0, -8096.9210297207674, 7.7205045824876493, 0.0, 0.0, -1368.9920705052045, -1.5642694932314585, 0.0, 0.0, 5395.9666599335242, -2.1117569522013517, 0.0, 0.0, -1140.01405051295, 1.9906879133936171, 624.80869328162123, 0.0, 0.0, 0.0, 4089.5349396056608, -3.6121520177209665, 0.0, 0.0, -29968.531010741684, 5.7439378149575493, 0.0, 0.0, -13842.366747404836, -0.083076507030891034, 0.0, 0.0, 9251.74658998427, 10.474210268762711, 0.0, 0.0, -4025.1724808612594, 5.0376737683049297, 0.0, 0.0, 4775.3783570389587, 10.664547039447074, 0.0, 0.0, 11976.191214257957, 0.50201620991965934, 0.0, 0.0, 5867.2639428163502, 1.1896716103905389, 0.0, 0.0, 12877.657067925986, 1.8465660318979775, 0.0, 0.0, 16206.111609433263, 4.8246843405078863, 0.0, 0.0, 3610.4854996584972, 3.3516070780476195, 0.0, 0.0, 9661.5351796437808, -5.9380430259292645, 0.0, 0.0, 8685.2531087868465, -0.64821232890848268, 0.0, 0.0, -312.91711936827596, 9.2168609777382926, 0.0, 0.0, 6298.759850966494, 4.4602580767723747, 0.0, 0.0, 3348.3045543307935, -0.38462078919272813, 0.0, 0.0, 488.51289926704931, -2.1128912645941416, -975.52305859373428, 0.0, 0.0, 0.0, -10755.129903571918, 0.30884068431632339, 0.0, 0.0, 3104.2277033433138, 4.7372665647730328, 0.0, 0.0, 9752.9130898821077, -2.0804460962139686, 0.0, 0.0, -9694.8281227787666, 1.64808120580346, 0.0, 0.0, -1622.3829558462212, 8.5067132512126111, 0.0, 0.0, -11558.805406892518, 14.350648555418546, 0.0, 0.0, 8405.0851462397623, -0.72112972624099048, 0.0, 0.0, 15625.638555235859, -1.3670451022237979, 0.0, 0.0, -3147.7771182901865, 4.8662303313693354, 0.0, 0.0, -4682.4501917588223, 3.6582047312104793, 0.0, 0.0, -13101.93913472442, -1.8255379688292537, 0.0, 0.0, -7556.06062439787, -3.2266823357474479, 0.0, 0.0, -6410.2917754375831, -1.3019240449467371, 0.0, 0.0, -7702.2742811075941, 4.2106258495163953, 0.0, 0.0, 2177.1234415980966, -0.84924429602420592, 0.0, 0.0, -7665.7128282976337, 5.3720471902173932, 0.0, 0.0, 4046.9940657058983, 4.6261175146435791, 0.0, 0.0, -211.63279451514836, 2.4440216742659922, 0.0, 0.0, -1188.9555539240885, -5.6516925299338743, 19695.857081475006, 0.0, 0.0, 0.0, 11252.737508494711, -2.458785211828749, 0.0, 0.0, -7232.0338690955987, 0.27253953774259326, 0.0, 0.0, 1123.7638154174197, 4.8837214488794061, 0.0, 0.0, 1215.3034770015856, 2.1029499497563773, 0.0, 0.0, 2552.3298189366842, -4.7821392334415531, 0.0, 0.0, -529.94244708716974, 22.599584036997086, 0.0, 0.0, 560.40615094398663, 13.309094105051802, 0.0, 0.0, 10242.089928115463, 0.92276408985565261, 0.0, 0.0, -7896.9507053769803, -2.1196969544998265, 0.0, 0.0, 397.11700299896523, -0.49174517770122583] - ), - 'alm0': n.array( - [-2509.795308092424, 0.0, 0.0, 0.0, -542.95304808539447, -0.089103865486498762, -2674.8921085852267, 0.0, 0.0, 0.0, -2450.8275459460328, -0.12122968266255646, 0.0, 0.0, 484.43258693118355, -0.12444162654967923, 0.0, 0.0, 419.14889644597554, 0.11199842018396657, 3617.1180506112255, 0.0, 0.0, 0.0, -79.345837595100249, 0.024609457915114472, 0.0, 0.0, -2076.1775181825979, -0.055599716031520682, 0.0, 0.0, -171.89694983456775, -0.09107814601572882, 0.0, 0.0, 397.16303975126743, -0.020743466595031901, 0.0, 0.0, 222.00188556890657, -0.074614425553248653, -1848.0514375785062, 0.0, 0.0, 0.0, 677.25212936706521, -0.052427769472071402, 0.0, 0.0, 1122.7561396675696, -0.25026343574461934, 0.0, 0.0, -1177.2398993868574, 0.12448795077559982, 0.0, 0.0, -286.89042984494125, -0.0043671055576578813, 0.0, 0.0, -729.16457065597024, -0.015059272877281931, 0.0, 0.0, -227.54986446468334, 0.064518156065887025, 0.0, 0.0, -144.09526163269231, -0.071896777739056492, 550.56142446132162, 0.0, 0.0, 0.0, 789.95305777447186, 0.15278481548345677, 0.0, 0.0, 302.80826664285104, -0.2292455172036138, 0.0, 0.0, 215.07203955470834, -0.11148641690072135, 0.0, 0.0, 147.6300094316332, -0.041438137068600535, 0.0, 0.0, 356.40663808704829, 0.06020981998761786, 0.0, 0.0, 1068.2809150343332, 0.12059322351429408, 0.0, 0.0, 207.15070625717203, -0.15887907500986867, 0.0, 0.0, 311.51955894051775, -0.044013176018082217, 0.0, 0.0, 465.50514676183599, 0.043086930173945374, -699.91994003413959, 0.0, 0.0, 0.0, -272.30205269131108, -0.058237464090315841, 0.0, 0.0, 206.6696629058103, -0.17113397512837467, 0.0, 0.0, -242.17697804400967, -0.03904696709972983, 0.0, 0.0, -1034.0461250086307, -0.096263366639788267, 0.0, 0.0, -340.36959713926638, -0.157959637524269, 0.0, 0.0, -906.76535925870894, 0.05822882111324016, 0.0, 0.0, -878.19034673650174, 0.15090747340518335, 0.0, 0.0, 178.72710693016728, -0.1133137878039443, 0.0, 0.0, -307.2732605638983, -0.12946761060311943, 0.0, 0.0, -402.15039831465805, -0.12267742876829732, 0.0, 0.0, 124.58755428476331, 0.12160615484632728, 1224.8966172274097, 0.0, 0.0, 0.0, -422.81125499888446, 0.17489349085562872, 0.0, 0.0, -206.13215938425151, -0.024918238081632359, 0.0, 0.0, 1216.0021828633653, -0.23903462262346217, 0.0, 0.0, 646.76999409163841, -0.36686036191363569, 0.0, 0.0, -53.748641101219171, -0.040657195610747071, 0.0, 0.0, 257.01496034832354, -0.00088397200625506657, 0.0, 0.0, 532.92627524275213, 0.073231868546206474, 0.0, 0.0, -2.3123718843121193, -0.063116998506782929, 0.0, 0.0, -45.312170650102566, -0.052918508044701933, 0.0, 0.0, 208.81448662099027, 0.00049665368894422079, 0.0, 0.0, 3.3145191420192557, -0.0075522336446495145, 0.0, 0.0, -118.38406740379477, -0.1235450612088997, 0.0, 0.0, 146.27931891595969, -0.095112431509793954, 216.66543016969877, 0.0, 0.0, 0.0, 202.62032812415652, -0.055071980987297146, 0.0, 0.0, -24.732380939749305, -0.069324586041150008, 0.0, 0.0, -799.12852251187439, 0.17805739075476529, 0.0, 0.0, -338.13613885263197, -0.50258751799301171, 0.0, 0.0, -330.92377568750896, - \ - 0.29439745258184846, 0.0, 0.0, 69.955703609112916, -0.099300574356904758, 0.0, 0.0, -135.50283401710723, 0.11336055781808395, 0.0, 0.0, -109.4473303776138, -0.039179921416761625, 0.0, 0.0, 361.89296520495282, -0.063457640307326188, 0.0, 0.0, -19.011530990712416, -0.030296155915062021, 0.0, 0.0, 175.81242107703684, 0.045380812776882037, 0.0, 0.0, 230.1356975837636, -0.21991370682307745, 0.0, 0.0, 38.548063220604263, 0.04447052463281953, 0.0, 0.0, -152.74099867458406, 0.060411014726151104, 0.0, 0.0, 32.799893279193917, -0.05625755938421767, -11.671167858413597, 0.0, 0.0, 0.0, -122.41338733578932, 0.10265761851708999, 0.0, 0.0, 854.8147788993241, -0.16832987784539305, 0.0, 0.0, 389.59483422670991, 0.0010515097421338222, 0.0, 0.0, -263.54000762919696, -0.30602620404886061, 0.0, 0.0, 113.5268590131072, -0.13743520219127883, 0.0, 0.0, -136.1177227410563, -0.30517270252912371, 0.0, 0.0, -347.71640981466663, -0.013328197668937738, 0.0, 0.0, -168.59066374139138, -0.034021615854743656, 0.0, 0.0, -365.89920330695344, -0.05129511900796007, 0.0, 0.0, -459.7707625930787, -0.13649377467013135, 0.0, 0.0, -103.53308934238288, -0.096015678120849338, 0.0, 0.0, -274.34912938228803, 0.16645409598440561, 0.0, 0.0, -247.15567235290939, 0.01807845821834346, 0.0, 0.0, 9.0053572040052821, -0.26370903611326263, 0.0, 0.0, -179.18044921665742, -0.12568774597726795, 0.0, 0.0, -94.892883913068388, 0.010492867772354359, 0.0, 0.0, -13.737508814272434, 0.060075070519419876, 23.415415276762271, 0.0, 0.0, 0.0, 305.72805905313203, -0.0086614331104518417, 0.0, 0.0, -86.195790327242264, -0.13777706251196414, 0.0, 0.0, -274.69250181433779, 0.058458297086366275, 0.0, 0.0, 278.482105784417, -0.053177711988373275, 0.0, 0.0, 44.501303461749991, -0.23822638212032041, 0.0, 0.0, 324.63764111477315, -0.41352873710279964, 0.0, 0.0, -249.4983121147516, 0.021301518932652769, 0.0, 0.0, -454.42693460024361, 0.037898208796734653, 0.0, 0.0, 91.623643436443217, -0.1383467576541032, 0.0, 0.0, 131.72531033239599, -0.10421407678062951, 0.0, 0.0, 372.83411450176357, 0.052076206062910413, 0.0, 0.0, 215.03659811564501, 0.091125817672451065, 0.0, 0.0, 181.72640460655063, 0.036584421520065045, 0.0, 0.0, 219.35570781570911, -0.11636865323780578, 0.0, 0.0, -62.255991452941828, 0.020311442840686849, 0.0, 0.0, 219.08103501446959, -0.15524342747668779, 0.0, 0.0, -114.87121517016, -0.13136769824434186, 0.0, 0.0, 5.9304785270308358, -0.070526493957355579, 0.0, 0.0, 33.931301137524464, 0.16072691130852704, -561.3125186753964, 0.0, 0.0, 0.0, -316.97903860259953, 0.070590200246086601, 0.0, 0.0, 202.91117550362088, -0.009538018080419413, 0.0, 0.0, -31.44408160859355, -0.13909745805711646, 0.0, 0.0, -32.437126472037825, -0.066025505043034366, 0.0, 0.0, -72.232731834313483, 0.13754930097467863, 0.0, 0.0, 16.089915969260041, -0.65224932808333158, 0.0, 0.0, -18.960925699756704, -0.37344958578008358, 0.0, 0.0, -298.63181385705462, -0.027681501480277509, 0.0, 0.0, 229.16214842560413, 0.06063401187656968, 0.0, 0.0, -10.520311488826575, 0.013786299852551351] - ), - } -} - - -def get_aa(freqs): - '''Return the AntennaArray to be used for simulation.''' - location = prms['loc'] - antennas = [] - if 'antpos' not in prms: - prms['antpos'] = prms['antpos_ideal'] - nants = len(prms['antpos']) - antpos_ideal = n.zeros(shape=(nants, 3), dtype=float) - tops = {'top_x': 0, 'top_y': 1, 'top_z': 2} - for k in prms['antpos_ideal'].keys(): - for i, m in enumerate(prms['antpos_ideal'][k]): - antpos_ideal[k, tops[m]] = prms['antpos_ideal'][k][m] - for i in range(nants): - beam = prms['beam'](freqs, nside=32, lmax=20, mmax=20, deg=7) - try: - beam.set_params(prms['bm_prms']) - except(AttributeError): - pass - phsoff = {'x': [0., 0.], 'y': [0., 0.]} - amp = prms['amps'].get(i, 4e-3) - amp = {'x': amp, 'y': amp} - bp_r = prms['bp_r'][i] - bp_r = {'x': bp_r, 'y': bp_r} - bp_i = prms['bp_i'][i] - bp_i = {'x': bp_i, 'y': bp_i} - twist = prms['twist'][i] - antennas.append(a.pol.Antenna(0., 0., 0., beam, phsoff=phsoff, - amp=amp, bp_r=bp_r, bp_i=bp_i, pointing=(0., n.pi / 2, twist))) -# antennas.append(a.pol.Antenna(0., 0., 0., beam, phsoff=phsoff)) -# aa = AntennaArray(prms['loc'], antennas, tau_ew=prms['tau_ew'], tau_ns=prms['tau_ns'], -# gain=prms['gain'], amp_coeffs=prms['amp_coeffs'], -# dly_coeffs=prms['dly_coeffs'], dly_xx_to_yy=prms['dly_xx_to_yy'], -# ant_layout=prms['ant_layout']) - aa = AntennaArray(prms['loc'], antennas, antpos_ideal=antpos_ideal) - pos_prms = {} - for i in range(nants): - pos_prms[str(i)] = prms['antpos'][i] - aa.set_params(pos_prms) - return aa diff --git a/hera_cal/chunker.py b/hera_cal/chunker.py index 625e34efd..802600222 100644 --- a/hera_cal/chunker.py +++ b/hera_cal/chunker.py @@ -60,7 +60,7 @@ def chunk_files(filenames, inputfile, outputfile, chunk_size, type="data", chunked_files = io.HERACal(filenames[start:end]) else: raise ValueError("Invalid type provided. Must be in ['data', 'gains']") - + if type == 'data': if polarizations is None: if len(chunked_files.filepaths) > 1: @@ -71,7 +71,7 @@ def chunk_files(filenames, inputfile, outputfile, chunk_size, type="data", spw_range = (0, chunked_files.Nfreqs) chunked_files.read( polarizations=polarizations, - freq_chans=range(spw_range[0], spw_range[1]), + freq_chans=range(spw_range[0], spw_range[1]), **read_kwargs ) elif type == 'gains': diff --git a/hera_cal/datacontainer.py b/hera_cal/datacontainer.py index 2beb6da4f..df32c2662 100644 --- a/hera_cal/datacontainer.py +++ b/hera_cal/datacontainer.py @@ -126,7 +126,7 @@ def __getitem__(self, key): complex conjugate when appropriate) and polarization capitalization.''' try: # just see if the key works first return self._data[key] - except(KeyError): + except (KeyError): if isinstance(key, str): # asking for a pol return dict(zip(self._antpairs, [self[make_bl(bl, key)] for bl in self._antpairs])) elif len(key) == 2: # asking for a bl @@ -135,7 +135,7 @@ def __getitem__(self, key): bl = comply_bl(key) try: return self._data[bl] - except(KeyError): + except (KeyError): try: if np.iscomplexobj(self._data[reverse_bl(bl)]): return np.conj(self._data[reverse_bl(bl)]) @@ -435,7 +435,7 @@ def __contains__(self, key): try: bl = comply_bl(key) return (bl in self.keys() or reverse_bl(bl) in self.keys()) - except(BaseException): # if key is unparsable by comply_bl or reverse_bl, then it's not in self.keys() + except (BaseException): # if key is unparsable by comply_bl or reverse_bl, then it's not in self.keys() return False def __iter__(self): diff --git a/hera_cal/delay_filter.py b/hera_cal/delay_filter.py index 2e8908237..0c08a5796 100644 --- a/hera_cal/delay_filter.py +++ b/hera_cal/delay_filter.py @@ -178,7 +178,7 @@ def load_delay_filter_and_write(datafile_list, baseline_list=None, calfile_list= logger.info(f"Number of baselines in file: {len(baseline_list)}. Chunking in {nbl_groups} groups of {Nbls_per_load}.") for i in range(0, nbl_groups): - logger.info(f"Delay-Filtering baseline group {i+1}/{nbl_groups}") + logger.info(f"Delay-Filtering baseline group {i + 1}/{nbl_groups}") df = DelayFilter(hd, input_cal=cals) diff --git a/hera_cal/io.py b/hera_cal/io.py index 07726b2ea..14219f196 100644 --- a/hera_cal/io.py +++ b/hera_cal/io.py @@ -2217,13 +2217,13 @@ def write_vis(fname, data, lst_array, freq_array, antpos, time_array=None, flags for pol in pols: key1, key2 = antpair pol_num = polstr2num(pol, x_orientation=x_orientation) - uvd.set_data(data[antpair + (str(pol),)][:,:,np.newaxis], key1, key2, pol_num) + uvd.set_data(data[antpair + (str(pol),)][:, :, np.newaxis], key1, key2, pol_num) if nsamples is not None: - uvd.set_nsamples(nsamples[antpair + (str(pol),)][:,:,np.newaxis], key1, key2, pol_num) + uvd.set_nsamples(nsamples[antpair + (str(pol),)][:, :, np.newaxis], key1, key2, pol_num) if flags is not None: - uvd.set_flags(flags[antpair + (str(pol),)][:,:,np.newaxis], key1, key2, pol_num) + uvd.set_flags(flags[antpair + (str(pol),)][:, :, np.newaxis], key1, key2, pol_num) if nsamples is None: # default nsamples to all ones diff --git a/hera_cal/lstbin.py b/hera_cal/lstbin.py index f514789a3..117dc9eae 100644 --- a/hera_cal/lstbin.py +++ b/hera_cal/lstbin.py @@ -30,6 +30,7 @@ DeprecationWarning, ) + def baselines_same_across_nights(data_list): """ Check whether the sets of baselines in the datacontainers are consistent. @@ -175,7 +176,7 @@ def lst_bin(data_list, lst_list, flags_list=None, nsamples_list=None, dlst=None, pols = list(set([pol for dc in data_list for pol in dc.pols()])) # iterate over data_list for i, d in enumerate(data_list): - logging.info(f"Doing data {i+1}/{len(data_list)}") + logging.info(f"Doing data {i + 1}/{len(data_list)}") # get lst array li = copy.copy(lst_list[i]) @@ -334,7 +335,7 @@ def lst_bin(data_list, lst_list, flags_list=None, nsamples_list=None, dlst=None, logging.info("Getting statistics") for i, key in enumerate(data.keys()): if i % max(1, (len(data) // 100)) == 0: - logger.info(f"Doing Key {key} [{i+1}/{len(data)}]") + logger.info(f"Doing Key {key} [{i + 1}/{len(data)}]") # create empty lists real_avg = [] diff --git a/hera_cal/noise.py b/hera_cal/noise.py index 87dc3d60c..f73db8752 100644 --- a/hera_cal/noise.py +++ b/hera_cal/noise.py @@ -28,8 +28,8 @@ def interleaved_noise_variance_estimate(vis, kernel=[[1, -2, 1], [-2, 4, -2], [1 Returns: variance: estimate of the noise variance on the input visibility with the same shape ''' - assert(np.sum(kernel) == 0), 'The kernal must sum to zero for difference-based noise estimation.' - assert(np.array(kernel).ndim == 2), 'The kernel must be 2D.' + assert (np.sum(kernel) == 0), 'The kernal must sum to zero for difference-based noise estimation.' + assert (np.array(kernel).ndim == 2), 'The kernel must be 2D.' variance = np.abs(scipy.signal.convolve2d(vis, kernel, mode='same', boundary='wrap'))**2 variance /= np.sum(np.array(kernel)**2) return variance @@ -88,7 +88,7 @@ def predict_noise_variance_from_autos(bl, data, dt=None, df=None, nsamples=None) if dt is None: dt = infer_dt(data.times_by_bl, bl) * units.si.day.in_units(units.si.s) if df is None: - assert(len(data.freqs) > 1) # cannot infer channel width if only one channel is present + assert (len(data.freqs) > 1) # cannot infer channel width if only one channel is present df = np.median(np.ediff1d(data.freqs)) ap1, ap2 = split_pol(bl[2]) diff --git a/hera_cal/nucal.py b/hera_cal/nucal.py index ce7a5ffa9..061a65cf6 100644 --- a/hera_cal/nucal.py +++ b/hera_cal/nucal.py @@ -20,7 +20,7 @@ # Approved Optax Optimizers OPTIMIZERS = { 'adabelief': optax.adabelief, 'adafactor': optax.adafactor, 'adagrad': optax.adagrad, 'adam': optax.adam, - 'adamax': optax.adamax, 'adamaxw': optax.adamaxw, 'amsgrad': optax.amsgrad, 'adamw': optax.adamw, + 'adamax': optax.adamax, 'adamaxw': optax.adamaxw, 'amsgrad': optax.amsgrad, 'adamw': optax.adamw, 'fromage': optax.fromage, 'lamb': optax.lamb, 'lars': optax.lars, 'lion': optax.lion, 'novograd': optax.novograd, 'noisy_sgd': optax.noisy_sgd, 'dpsgd': optax.dpsgd, 'radam': optax.radam, 'rmsprop': optax.rmsprop, 'sgd': optax.sgd, 'sm3': optax.sm3, 'yogi': optax.yogi, 'optimistic_gradient_descent': optax.optimistic_gradient_descent @@ -29,6 +29,7 @@ # Constants SPEED_OF_LIGHT = const.c.si.value + def is_same_orientation(bl1, bl2, antpos, blvec_error_tol=1e-4): """ Determine whether or not two baselines have the same orientation @@ -65,6 +66,7 @@ def is_same_orientation(bl1, bl2, antpos, blvec_error_tol=1e-4): return np.isclose(np.linalg.norm(norm_vec1 - norm_vec2), 0, rtol=blvec_error_tol) + def is_frequency_redundant(bl1, bl2, freqs, antpos, blvec_error_tol=1e-4): """ Determine whether or not two baselines are frequency redundant. Checks that @@ -118,6 +120,7 @@ def is_frequency_redundant(bl1, bl2, freqs, antpos, blvec_error_tol=1e-4): # Last step - return whether or not baselines are in the same orientation return is_same_orientation(bl1, bl2, antpos, blvec_error_tol=blvec_error_tol) + def get_u_bounds(radial_reds, antpos, freqs): """ Calculates the magnitude of the minimum and maximum u-modes values of the radial redundant group @@ -145,12 +148,12 @@ def get_u_bounds(radial_reds, antpos, freqs): ubounds.append((umin, umax)) return ubounds - + def get_unique_orientations(antpos, reds, min_ubl_per_orient=1, blvec_error_tol=1e-4): """ Sort baselines into groups with the same radial heading. These groups of baselines are - radially redundant in a similar way to redcal.get_reds does. Returns a list of list of + radially redundant in a similar way to redcal.get_reds does. Returns a list of list of radially redundant baselines. Parameters: @@ -212,7 +215,7 @@ def get_unique_orientations(antpos, reds, min_ubl_per_orient=1, blvec_error_tol= class RadialRedundancy: - """List-like object that contains lists of baselines that are radially redundant. + """List-like object that contains lists of baselines that are radially redundant. Functions similarly to the output of redcal.get_reds for frequency redundant calibration. In addition to mimicking list functionality, this object also filters radially redundant groups by baseline length and number of baselines in a radially redundant @@ -286,7 +289,7 @@ def _check_new_group(self, group): raise ValueError(f'Baselines {group[0]} and {group[bi]} are not in the same orientation') if group[0][-1] != group[bi][-1]: raise ValueError(f'Baselines {group[0]} and {group[bi]} do not have the same polarization') - + def get_radial_group(self, key): """ Get baselines with the same radial heading as a given baseline @@ -315,13 +318,12 @@ def get_radial_group(self, key): group_key = self._bl_to_spec_red_key[group_key] else: group_key = utils.reverse_bl(self._bl_to_spec_red_key[utils.reverse_bl(group_key)]) - + if group_key in self._mapped_spectral_reds: return self._mapped_spectral_reds[group_key] else: return [utils.reverse_bl(bl) for bl in self._mapped_spectral_reds[utils.reverse_bl(group_key)]] - def get_redundant_group(self, key): """ Get a list of baseline that are spatially redundant with the input baseline @@ -357,7 +359,7 @@ def get_pol(self, pol): def filter_radial_groups(self, min_nbls=1, min_bl_cut=None, max_bl_cut=None): """ Filter each radially redundant group to include/exclude the baselines based on baseline length. - Radially redundant groups can also be completely filtered based on the number of baselines in + Radially redundant groups can also be completely filtered based on the number of baselines in the group. Parameters: @@ -376,7 +378,7 @@ def filter_radial_groups(self, min_nbls=1, min_bl_cut=None, max_bl_cut=None): for bl in group: if (max_bl_cut is None or self.baseline_lengths[bl] < max_bl_cut) and (min_bl_cut is None or self.baseline_lengths[bl] > min_bl_cut): filtered_group.append(bl) - + # Identify groups with fewer than min_nbls baselines if len(filtered_group) > min_nbls: radial_reds.append(filtered_group) @@ -399,7 +401,7 @@ def add_radial_group(self, group): """ # Check to make sure the new group is radially redundant self._check_new_group(group) - + # If group with same heading already exists, add it to that group. Otherwise, append the group to the list for bl in self._mapped_spectral_reds: if is_same_orientation(group[0], bl, self.antpos, blvec_error_tol=self.blvec_error_tol) and bl[-1] == group[0][-1]: @@ -432,17 +434,17 @@ def __getitem__(self, index): def __setitem__(self, index, value): """ - Set a list of baseline tuples that are radially redundant at index in _radial_groups. - Also raises an error if a baseline with the same heading is already in the list of + Set a list of baseline tuples that are radially redundant at index in _radial_groups. + Also raises an error if a baseline with the same heading is already in the list of radially redundant groups """ # Check to make sure the new group is radially redundant self._check_new_group(value) - + for bl in self._mapped_spectral_reds: if is_same_orientation(value[0], bl, self.antpos, blvec_error_tol=self.blvec_error_tol) and bl[-1] == value[0][-1]: raise ValueError('Radially redundant group with same orientation and polarization already exists in the data') - + # Add group at index self._radial_groups[index] = value @@ -459,13 +461,13 @@ def __setitem__(self, index, value): def append(self, value): """ - Append a list of baseline tuples that are radially redundant to the end of _radial_groups. - Also raises an error if a baseline with the same heading is already in the list of + Append a list of baseline tuples that are radially redundant to the end of _radial_groups. + Also raises an error if a baseline with the same heading is already in the list of radially redundant groups """ # Check to make sure the new group is radially redundant self._check_new_group(value) - + for bl in self._mapped_spectral_reds: if is_same_orientation(value[0], bl, self.antpos, blvec_error_tol=self.blvec_error_tol) and bl[-1] == value[0][-1]: raise ValueError('Radially redundant group with same orientation and polarization already exists in the data') @@ -483,7 +485,7 @@ def append(self, value): self._mapped_spectral_reds[value[0]] = value for bl in value: self._bl_to_spec_red_key[bl] = value[0] - + def __iter__(self): """Iterates through the list of redundant groups""" return iter(self._radial_groups) @@ -492,6 +494,7 @@ def sort(self, key=None, reverse=True): """Sorts list by length of the radial groups""" self._radial_groups.sort(key=(len if key is None else key), reverse=reverse) + def compute_spectral_filters(freqs, spectral_filter_half_width, eigenval_cutoff=1e-12): """ Compute discrete prolate spheroidal sequences (DPSS) filters used to model the frequency-axis @@ -527,9 +530,9 @@ def compute_spatial_filters_single_group(group, freqs, bls_lengths, spatial_filt bls_lengths : dict Dictionary of baseline lengths in meters where keys are baseline tuples spatial_filter_half_width : float, optional, default=1 - Fourier half width of the spatial filter. Value corresponds to maximum value from - zenith where foregrounds are found in terms of the sky-coordinates (l, m). Here the - default, 1, is equivalent to a modeling foregrounds out to the horizon, and allowing + Fourier half width of the spatial filter. Value corresponds to maximum value from + zenith where foregrounds are found in terms of the sky-coordinates (l, m). Here the + default, 1, is equivalent to a modeling foregrounds out to the horizon, and allowing the uv-plane to be modeled at half-wavelength scales. eigenval_cutoff : float Cutoff for the eigenvalues of the PSWF filter @@ -539,9 +542,9 @@ def compute_spatial_filters_single_group(group, freqs, bls_lengths, spatial_filt umin. umax : float, optional, default=None Maximum u-mode at which the filters are computed. If None, filter bounds will be computed from the maximum frequency value and longest - baseline length. Restricting the maximum u-mode can significantly decrease the degrees of freedom in a nucal model particularly if the + baseline length. Restricting the maximum u-mode can significantly decrease the degrees of freedom in a nucal model particularly if the baseline group has a few long baselines an one is uininterested in u-modes above umax. - + Returns: ------- spatial_filters : dict @@ -562,26 +565,27 @@ def compute_spatial_filters_single_group(group, freqs, bls_lengths, spatial_filt for bl in group: umodes = bls_lengths[bl] / SPEED_OF_LIGHT * freqs pswf, _ = dspec.pswf_operator( - umodes, filter_centers=[0], filter_half_widths=[spatial_filter_half_width], + umodes, filter_centers=[0], filter_half_widths=[spatial_filter_half_width], eigenval_cutoff=[eigenval_cutoff], xmin=umin, xmax=umax ) - + # Filters should be strictly real-valued spatial_filters[bl] = np.real(pswf) return spatial_filters + def compute_spatial_filters(radial_reds, freqs, spatial_filter_half_width=1, eigenval_cutoff=1e-12, umin=None, umax=None): """ - Compute prolate spheroidal wave function (PSWF) filters for each radially redundant group in radial_reds. + Compute prolate spheroidal wave function (PSWF) filters for each radially redundant group in radial_reds. Note that if you are using a large array with a large range of short and long baselines in an individual radially - redundant group, it is advised to filter radial_reds using radial_reds.filter_reds before running this function + redundant group, it is advised to filter radial_reds using radial_reds.filter_reds before running this function to reduce the size of filters generated Parameters: ---------- radial_reds : RadialRedundancy object - RadialRedundancy object containing lists of radially redundant baselines. + RadialRedundancy object containing lists of radially redundant baselines. freqs : np.ndarray Frequencies found in the data in units of Hz spatial_half_width : float, default=1 @@ -595,14 +599,14 @@ def compute_spatial_filters(radial_reds, freqs, spatial_filter_half_width=1, eig umin. If umin is not None, umin will be applied to all baseline groups in radial reds. umax : float, optional, default=None Maximum u-mode at which the filters are computed. If None, filter bounds will be computed from the maximum frequency value and longest - baseline length. Restricting the maximum u-mode can significantly decrease the degrees of freedom in a nucal model particularly if the - baseline group has a few long baselines an one is uininterested in u-modes above umax. If umax is not None, umax will be applied to all + baseline length. Restricting the maximum u-mode can significantly decrease the degrees of freedom in a nucal model particularly if the + baseline group has a few long baselines an one is uininterested in u-modes above umax. If umax is not None, umax will be applied to all baseline groups in radial reds. Returns: ------- spatial_filters : dictionary - Dictionary containing baseline tuple / PSWF eigenvectors key-value pairs used for modeling + Dictionary containing baseline tuple / PSWF eigenvectors key-value pairs used for modeling foregrounds """ # Create dictionary for all uv pswf eigenvectors @@ -611,15 +615,18 @@ def compute_spatial_filters(radial_reds, freqs, spatial_filter_half_width=1, eig # Loop through each baseline in each radial group for group in radial_reds: # Compute spatial filters for each baseline in the group - spatial_filters.update(compute_spatial_filters_single_group( - group, freqs, radial_reds.baseline_lengths, spatial_filter_half_width, eigenval_cutoff, umin=umin, umax=umax + spatial_filters.update( + compute_spatial_filters_single_group( + group, freqs, radial_reds.baseline_lengths, spatial_filter_half_width, + eigenval_cutoff, umin=umin, umax=umax ) ) return spatial_filters + def build_nucal_wgts(data_flags, data_nsamples, autocorrs, auto_flags, radial_reds, freqs, times_by_bl=None, - df=None, data_is_redsol=False, gain_flags=None, tol=1.0, antpos=None, min_u_cut=None, + df=None, data_is_redsol=False, gain_flags=None, tol=1.0, antpos=None, min_u_cut=None, max_u_cut=None, min_freq_cut=None, max_freq_cut=None, spw_range_flags=None): """ Build linear weights for data in nucal (or calculating loss) defined as @@ -640,7 +647,7 @@ def build_nucal_wgts(data_flags, data_nsamples, autocorrs, auto_flags, radial_re RadialRedundancy object containing a list of list baseline tuples of radially redundant groups freqs : np.ndarray - Frequency values present in the data in units of Hz + Frequency values present in the data in units of Hz times_by_bl : dictionary Maps antenna pairs like (0,1) to float Julian Date. Optional if inferable from data_flags and all times have length > 1. @@ -654,7 +661,7 @@ def build_nucal_wgts(data_flags, data_nsamples, autocorrs, auto_flags, radial_re gain_flags : dictionary, default=None Used to exclude ants from the noise variance calculation from the autocorrelations Ignored if data_is_redsol is False. - tol : float, + tol : float, Distance for baseline match tolerance in units of baseline vectors (e.g. meters). Ignored if data_is_redsol is False. antpos : dictionary @@ -674,13 +681,13 @@ def build_nucal_wgts(data_flags, data_nsamples, autocorrs, auto_flags, radial_re this value will be set to 0. spw_range_flags : list of tuples List of tuples containing the start and stop frequency of each spectral window to flag in units of Hz. - + Returns: ------- wgts: Datacontainer Maps data_flags baseline to weights """ - # Build model flags from + # Build model flags from model_flags = {} for group in radial_reds: for key in group: @@ -707,15 +714,16 @@ def build_nucal_wgts(data_flags, data_nsamples, autocorrs, auto_flags, radial_re # Add flags to DataContainer model_flags = DataContainer(model_flags) - + # Use abscal.build_data_wgts to build wgts for nucal wgts = abscal.build_data_wgts( - data_flags, data_nsamples, model_flags, autocorrs, auto_flags, times_by_bl=times_by_bl, df=df, + data_flags, data_nsamples, model_flags, autocorrs, auto_flags, times_by_bl=times_by_bl, df=df, data_is_redsol=data_is_redsol, gain_flags=gain_flags, tol=tol, antpos=antpos ) return wgts + def _linear_fit(XTX, Xy, solver='lu_solve', alpha=1e-15, cached_input={}): """ Solves a linear system of equations using a variety of methods. This is a light wrapper @@ -731,15 +739,15 @@ def _linear_fit(XTX, Xy, solver='lu_solve', alpha=1e-15, cached_input={}): method : str, default='lu_solve' Method to use to solve the linear system of equations. Options are 'lu_solve', 'solve', 'pinv', 'lstsq'. 'lu_solve' uses scipy.linalg.lu_solve to solve the linear system of equations, 'solve' uses np.linalg.solve. - 'pinv' uses np.linalg.pinv to solve the linear system of equations, and 'lstsq' uses np.linalg.lstsq. 'lu_solve' + 'pinv' uses np.linalg.pinv to solve the linear system of equations, and 'lstsq' uses np.linalg.lstsq. 'lu_solve' and 'solve' tend to be the faster methods, but 'lstsq' and 'pinv' are more robust. alpha : float, default=1e-15 - Parameter used for regularization. If method is 'lu_solve' or 'solve', this is added to the diagonal of XTX. + Parameter used for regularization. If method is 'lu_solve' or 'solve', this is added to the diagonal of XTX. If method is 'pinv' or 'lstsq', this is used as the rcond parameter for np.linalg.pinv and np.linalg.lstsq respectively. cached_input : dictionary, default={} - Dictionary used to speed-up computation of linear fits for the 'lu_solve' and 'pinv' solvers. + Dictionary used to speed-up computation of linear fits for the 'lu_solve' and 'pinv' solvers. WARNING: Solvers will use cached_input if one is provided - + Returns: ------- beta : np.ndarray @@ -747,7 +755,7 @@ def _linear_fit(XTX, Xy, solver='lu_solve', alpha=1e-15, cached_input={}): cached_output: dictionary Dictionary for storing computed results from the linear fit solvers which can speed-up computation if reused with the same XTX input. Dictionary is empty if - solver method is 'lstsq' or 'solve'. Contains the matrix inverse (key 'XTXinv') + solver method is 'lstsq' or 'solve'. Contains the matrix inverse (key 'XTXinv') for 'pinv' method and lu-decomposition for (key 'LU'). """ # Assert that the method is valid @@ -777,14 +785,14 @@ def _linear_fit(XTX, Xy, solver='lu_solve', alpha=1e-15, cached_input={}): # Solve the linear system of equations using scipy.linalg.lu_solve beta = linalg.lu_solve(L, Xy) - + # Save info cached_output = {'LU': L} elif solver == "solve": # Solve the linear system of equations using np.linalg.solve beta = np.linalg.solve(XTX, Xy) - + # Save info cached_output = {} @@ -797,18 +805,19 @@ def _linear_fit(XTX, Xy, solver='lu_solve', alpha=1e-15, cached_input={}): # Compute the model parameters using the pseudo-inverse beta = np.dot(XTXinv, Xy) - + cached_output = {'XTXinv': XTXinv} elif solver == "lstsq": # Compute the model parameters using np.linalg.lstsq beta, res, rank, s = np.linalg.lstsq(XTX, Xy, rcond=alpha) - + # Save info cached_output = {} return beta, cached_output + def evaluate_foreground_model(radial_reds, fg_model_comps, spatial_filters, spectral_filters=None): """ Evaluates a foreground model using the model components, spatial filters, and spectral filters. @@ -819,7 +828,7 @@ def evaluate_foreground_model(radial_reds, fg_model_comps, spatial_filters, spec Parameters: ---------- radial_reds : RadialRedundancy object - List of lists of radially-redundant baseline tuples. + List of lists of radially-redundant baseline tuples. fg_model_comps : dict Dictionary mapping baseline tuples to model components. Model components are fitted to the data using the DPSS filters to model variations in the spatial and spectral axes. If spectral_filters @@ -827,7 +836,7 @@ def evaluate_foreground_model(radial_reds, fg_model_comps, spatial_filters, spec spatial_filters : dict Dictionary mapping baseline tuples to PSWF spatial filters. spectral_filters : np.ndarray, default=None - Array of shape (Nfreqs, Nspec) containing spectral filters for modeling the frequency axis. + Array of shape (Nfreqs, Nspec) containing spectral filters for modeling the frequency axis. If None, the model components are assumed to be restricted to the spatial axis. Returns: @@ -881,10 +890,10 @@ def fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, sp Compute a foreground model for a set of radially redundant baselines. The model is computed by performing a linear least-squares fit using a set of DPSS filters to model visibilities within a radially redundant group. If only spatial filters are provided, the model is restricted to the spatial axis. If spectral filters are also provided, the model is fit - allowing spectral variation at a fixed spatial scale. The model components are returned if return_model_comps is True. + allowing spectral variation at a fixed spatial scale. The model components are returned if return_model_comps is True. Otherwise, the model is evaluated using the model components and the spatial filters (and spectral filters if provided), and the model visibilities are returned. - + Parameters: ----------- data : dictionary, DataContainer @@ -904,14 +913,14 @@ def fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, sp solver : str, optional, Default is 'lu_solve' Solver to use for linear least-squares fit. Options are 'lu_solve', 'solve', 'pinv', and 'lstsq'. alpha : float, optional, Default is 1e-15. - Regularization for linear least-squares fit. + Regularization for linear least-squares fit. share_fg_model : bool, optional, Default is False. - If True, the foreground model for each radially-redundant group is shared across the time axis. + If True, the foreground model for each radially-redundant group is shared across the time axis. Otherwise, a nucal foreground will be independently computed for each time integration individually. return_model_comps: bool, optional, Default is False. If True, the model components for the foreground model are returned. Otherwise, only the model visibilities - are returned. - + are returned. + Returns: -------- if return_model_comps: @@ -923,7 +932,7 @@ def fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, sp model : dictionary Dictionary mapping baseline tuples to model visibilities. Dictionary is of the form {(ant1, ant2, pol): np.array([Ntimes, Nfreqs])}. - """ + """ # Create empty dictionary for model components model_comps = {} @@ -933,7 +942,7 @@ def fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, sp design_matrix = np.array([spatial_filters[bl] for bl in group]) wgts_here = np.array([data_wgts[bl] for bl in group]) data_here = np.array([data[bl] for bl in group]) - + # Get number of fit parameters - this is the number of spectral filters times the number of spatial filters if spectral_filters is not None: ndim = spectral_filters.shape[1] * design_matrix.shape[-1] @@ -950,7 +959,8 @@ def fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, sp # Solve for model components beta, _ = _linear_fit(XTX, Xy, solver=solver, alpha=alpha) else: - XTX = jnp.einsum("fm,afn,atf,fk,afj->mnkj", + XTX = jnp.einsum( + "fm,afn,atf,fk,afj->mnkj", spectral_filters, design_matrix, wgts_here, spectral_filters, design_matrix ).reshape(ndim, ndim) Xy = jnp.einsum("fm,afn,atf->mn", spectral_filters, design_matrix, data_here * wgts_here).reshape(ndim) @@ -977,26 +987,28 @@ def fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, sp beta.append(_linear_fit(XTX, Xy, solver=solver, alpha=alpha)[0]) else: - XTX = jnp.einsum("fm,afn,af,fk,afj->mnkj", + XTX = jnp.einsum( + "fm,afn,af,fk,afj->mnkj", spectral_filters, design_matrix, wgts_here[:, i], spectral_filters, design_matrix ).reshape(ndim, ndim) Xy = jnp.einsum("fm,afn,af->mn", spectral_filters, design_matrix, data_here[:, i] * wgts_here[:, i]).reshape(ndim) - + # Solve for the foreground model components _beta, _ = _linear_fit(XTX, Xy, alpha=alpha, solver=solver) beta.append(_beta.reshape(spectral_filters.shape[-1], design_matrix.shape[-1])) - + # Pack solution into an array beta = np.array(beta) # Store the model components model_comps[group[0]] = beta - + if return_model_comps: return model_comps else: return evaluate_foreground_model(radial_reds, model_comps, spatial_filters=spatial_filters, spectral_filters=spectral_filters) + def project_u_model_comps_on_spec_axis(u_model_comps, spectral_filters): """ Project u-model components on to the spectral axis using a pre-computed set of DPSS-filters for the spectral @@ -1044,7 +1056,7 @@ def _foreground_model(model_parameters, spectral_filters, spatial_filters): spectral_filters : jnp.ndarray Array of spectral filters with shape (Nfreqs, Nfilters) spatial_filters : List of jnp.ndarray - List of jax arrays containing spatial DPSS filters for each baseline in the + List of jax arrays containing spatial DPSS filters for each baseline in the spectrally redundant group Returns: @@ -1066,10 +1078,11 @@ def _foreground_model(model_parameters, spectral_filters, spatial_filters): # Stack models return jnp.vstack(model_r), jnp.vstack(model_i) + @jax.jit def _mean_squared_error(model_parameters, data_r, data_i, wgts, fg_model_r, fg_model_i, idealized_blvecs): """ - Computes the mean squared error between the data and foreground model multiplied by the + Computes the mean squared error between the data and foreground model multiplied by the redundant calibration degenerate parameters. Used as the loss function in the gradient descent in SpectralRedundantCalibrator.post_redcal to solve for the redundant calibration degrees of freedom @@ -1079,7 +1092,7 @@ def _mean_squared_error(model_parameters, data_r, data_i, wgts, fg_model_r, fg_m Parameters used to fit the DPSS-based foreground model and redundant calibration degeneracies. Keys are "fg_r", "fg_i", "amplitude", and "tip_tilt". Parameters "fg_r" and "fg_i" are the real and imaginary components of the DPSS foreground model but are not used in this function. - "amplitude" is redundant calibration amplitude degeneracy and "tip_tilt" are the redundant + "amplitude" is redundant calibration amplitude degeneracy and "tip_tilt" are the redundant calibration phase gradient degeneracies. data_r : np.ndarray Array of real component of data with shape (Ntimes, Nbls) @@ -1106,15 +1119,16 @@ def _mean_squared_error(model_parameters, data_r, data_i, wgts, fg_model_r, fg_m # Compute model from foreground estimates and amplitude model_r = (model_parameters["amplitude"]) * (fg_model_r * jnp.cos(phase) - fg_model_i * jnp.sin(phase)) model_i = (model_parameters["amplitude"]) * (fg_model_i * jnp.cos(phase) + fg_model_r * jnp.sin(phase)) - + # Compute loss using weights and foreground model return jnp.sum((jnp.square(model_r - data_r) + jnp.square(model_i - data_i)) * wgts) + @jax.jit def _calibration_loss_function(model_parameters, data_r, data_i, wgts, spectral_filters, spatial_filters, idealized_blvecs, alpha=0): """ - Function which computes the value of the loss from the degenerate parameters, DPSS foreground components, and the data - + Function which computes the value of the loss from the degenerate parameters, DPSS foreground components, and the data + Parameters: ---------- model_parameters : dictionary @@ -1147,16 +1161,17 @@ def _calibration_loss_function(model_parameters, data_r, data_i, wgts, spectral_ param_loss = 0 for fgr, fgi in zip(model_parameters['fg_r'], model_parameters['fg_i']): param_loss += (jnp.square(fgr).sum() + jnp.square(fgi).sum()) * alpha - + # Compute loss return _mean_squared_error(model_parameters, data_r, data_i, wgts, fg_model_r, fg_model_i, idealized_blvecs) + param_loss + def _nucal_post_redcal( - data_r, data_i, wgts, model_parameters, optimizer, spectral_filters, spatial_filters, idealized_blvecs, - major_cycle_maxiter=100, convergence_criteria=1e-10, minor_cycle_maxiter=10, alpha=1e-12 - ): + data_r, data_i, wgts, model_parameters, optimizer, spectral_filters, spatial_filters, idealized_blvecs, + major_cycle_maxiter=100, convergence_criteria=1e-10, minor_cycle_maxiter=10, alpha=1e-12 +): """ - Function to perform frequency redundant calibration using gradient descent. Calibrates the + Function to perform frequency redundant calibration using gradient descent. Calibrates the data by fitting a foreground model to the data using DPSS filters and estimating the redundant calibration degeneracies that lead to the smoothest calibrated visibilities. Intended to only be only after performing redundant calibration with redcal.RedundantCalibrator. @@ -1173,7 +1188,7 @@ def _nucal_post_redcal( Parameters used to fit the DPSS-based foreground model and redundant calibration degeneracies. Keys are "fg_r", "fg_i", "amplitude", and "tip_tilt". Parameters "fg_r" and "fg_i" are the real and imaginary components of the DPSS foreground model but are not used in this function. - "amplitude" is redundant calibration amplitude degeneracy and "tip_tilt" are the redundant + "amplitude" is redundant calibration amplitude degeneracy and "tip_tilt" are the redundant calibration phase gradient degeneracies. optimizer : optax optimizer Optimizer to use for gradient descent. @@ -1197,7 +1212,7 @@ def _nucal_post_redcal( alpha : float, optional, default=0 Regularization parameter to use for the loss function. If alpha is non-zero, the loss function will be regularized by the sum of the squares of the foreground model parameters. - + Returns: ------- model_parameters : dictionary @@ -1217,13 +1232,13 @@ def _nucal_post_redcal( for step in range(major_cycle_maxiter): # Compute loss and gradient loss, gradient = jax.value_and_grad(_calibration_loss_function)( - model_parameters, data_r, data_i, wgts, spectral_filters=spectral_filters, spatial_filters=spatial_filters, + model_parameters, data_r, data_i, wgts, spectral_filters=spectral_filters, spatial_filters=spatial_filters, idealized_blvecs=idealized_blvecs, alpha=alpha ) # Update optimizer state and parameters updates, opt_state = optimizer.update(gradient, opt_state, model_parameters) model_parameters = optax.apply_updates(model_parameters, updates) - + if minor_cycle_maxiter > 0: minor_cycle_losses = [] @@ -1250,7 +1265,7 @@ def _nucal_post_redcal( # Store loss values losses.append(loss) - + # Stop if subsequent losses are within tolerance if step >= 1 and np.abs(losses[-1] - previous_loss) < convergence_criteria: break @@ -1262,9 +1277,10 @@ def _nucal_post_redcal( return model_parameters, metadata + class SpectrallyRedundantCalibrator: """ - Class for performing spectral redundant calibration using the nucal implementation. This class is designed to + Class for performing spectral redundant calibration using the nucal implementation. This class is designed to be an easy-to-use, high-level interface for performing spectral redundant calibration, similarly to the redcal.RedundantCalibrator class. The main driver function, SpectrallyRedundantCalibrator.calibrate, estimates the DPSS-based foreground model components and redundant calibration degeneracies using gradient descent. The class also provides a number of helper functions for computing @@ -1295,7 +1311,7 @@ def _compute_filters(self, freqs, spectral_filter_half_width, spatial_filter_hal # Get all parameter names and local variables local_vars = locals() local_vars.pop("self") - + if self._filters_computed: # Variable for tracking if the filters need to be recomputed - by default, assume they do not recompute_filters = False @@ -1305,7 +1321,7 @@ def _compute_filters(self, freqs, spectral_filter_half_width, spatial_filter_hal if not np.array_equal(local_vars[key], self._most_recent_filter_params[key]): recompute_filters = True break - + if recompute_filters: self.spectral_filters = compute_spectral_filters(freqs, spectral_filter_half_width, eigenval_cutoff=eigenval_cutoff) self.spatial_filters = compute_spatial_filters( @@ -1355,13 +1371,13 @@ def _estimate_degeneracies(self, data, model, wgts): """ # Get the baselines in the model data_bls = [blkeys for blkeys in data] - + # Estimate the amplitude degeneracies from the model # abs_amp_logcal returns the amplitude degeneracies and works on both pols simulataneously amp_sol = abscal.abs_amp_logcal( data=data, model=model, wgts=wgts, verbose=False, return_gains=False ) - + # Unpack solution into dictionary # Degeneracy as written in gradient descent is exp(2 * eta) because the amplitude degeneracy # in nucal is written as the square of the amplitude degeneracy in the abscal solution @@ -1384,18 +1400,20 @@ def _estimate_degeneracies(self, data, model, wgts): tip_tilt[pol] = np.transpose(meta["Lambda_sol"], (2, 0, 1)) return amplitude, tip_tilt - - def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only=False, linear_solver="lu_solve", alpha=0, share_fg_model=False, - spectral_filter_half_width=30e-9, spatial_filter_half_width=1, eigenval_cutoff=1e-12, umin=None, umax=None, estimate_degeneracies=False, - optimizer_name='novograd', learning_rate=1e-3, major_cycle_maxiter=100, minor_cycle_maxiter=0, convergence_criteria=1e-10, return_model=False): + + def post_redcal_nucal( + self, data, data_wgts, cal_flags={}, spatial_estimate_only=False, linear_solver="lu_solve", alpha=0, share_fg_model=False, + spectral_filter_half_width=30e-9, spatial_filter_half_width=1, eigenval_cutoff=1e-12, umin=None, umax=None, estimate_degeneracies=False, + optimizer_name='novograd', learning_rate=1e-3, major_cycle_maxiter=100, minor_cycle_maxiter=0, convergence_criteria=1e-10, return_model=False + ): """ Estimates redundant calibration degeneracies by building a DPSS-based, sky-model and solving for the parameters which lead to the smoothest - calibrated visibilities. Function starts by estimating a sky-model by using DPSS filters (which can start with spatial dependence or spectral - and spatial dependence) which are fit to the data using linear-least squares. The sky-model is then used to estimate the degeneracies using - traditional abscal techniques, or can be set such that the antenna gains are equal to 1+0j if one assumes that the data are well-calibrated. - The degeneracies and sky-model are then refined using gradient descent. Once the gradient descent has converged, or reached the maximum number + calibrated visibilities. Function starts by estimating a sky-model by using DPSS filters (which can start with spatial dependence or spectral + and spatial dependence) which are fit to the data using linear-least squares. The sky-model is then used to estimate the degeneracies using + traditional abscal techniques, or can be set such that the antenna gains are equal to 1+0j if one assumes that the data are well-calibrated. + The degeneracies and sky-model are then refined using gradient descent. Once the gradient descent has converged, or reached the maximum number of iterations, the degeneracies and sky-model are returned. This function assumes that the input data are redundantly calibrated and redundantly averaged. - + Parameters: ---------- data : DataContainer (or RedDataContainer) @@ -1403,13 +1421,13 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only data_wgts : DataContainer (or RedDataContainer) Weights associated with data. DataContainer is of the form {(ant1, ant2, pol): np.array([Ntimes, Nfreqs])} cal_flags : dictionary, default={} - Dictionary mapping keys like (1, 'Jnn') to flag waterfalls. This dictionary is primarily used for computing the + Dictionary mapping keys like (1, 'Jnn') to flag waterfalls. This dictionary is primarily used for computing the idealized antenna positions. spatial_estimate_only : bool, default=False If True, the initial estimate of the foreground model will be computed from the data assuming that the evolution foreground model is entirely restricted to the spatial axis. This estimate will then be projected onto the eigenmodes of the spectral DPSS modes - for refinement in the gradient descent step. If False, the initial estimate of the foreground model will be computed from the - data giving the model the flexibility to model the spatial and spectral axes. This option fits for fewer foreground parameters + for refinement in the gradient descent step. If False, the initial estimate of the foreground model will be computed from the + data giving the model the flexibility to model the spatial and spectral axes. This option fits for fewer foreground parameters in the least-squares step, but can lead to slower convergence in the gradient descent step. linear_solver : str, default="lu_solve" Method to use for solving the linear system of equations when fitting the foreground models. Options are @@ -1421,10 +1439,10 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only Regularization parameter for linear least-squares fit when computing the initial estimate of the foreground model. Regularization parameter is also used as a regularizer in the gradient descent step. share_fg_model : bool, default=False - If True, the foreground model for each radially-redundant group is shared across the time axis for both the least-squares and + If True, the foreground model for each radially-redundant group is shared across the time axis for both the least-squares and gradient descent steps. One useful application of this option is when performing calibration of data across multiple nights at the same LST where the data have shape (N_nights, Nfreqs). In this case, the foreground model is expected to be the same across nights, so sharing the foreground model - across nights can greatly reduce the number of parameters to fit. This parameter could also be used for subsequent times to share a + across nights can greatly reduce the number of parameters to fit. This parameter could also be used for subsequent times to share a sky model assuming the sky doesn't evolve much in the subsequent integrations. If False, a nucal foreground will be solved for independently for each time integration. spectral_filter_half_width : float, default=20e-9 @@ -1436,15 +1454,15 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only for least-squares and gradient descent steps. umin : float, default=None Minimum u-magnitude value to include in calbration. All u-modes with magnitudes less than - min_u_cut will have their weights set to 0. Can also be useful for decreasing the number + min_u_cut will have their weights set to 0. Can also be useful for decreasing the number for foreground eigenmodes as the number of eigenmodes is roughly proportional to (umax - umin). umax : float, default=None Maximum u-magnitude value to include in calbration. All u-modes with magnitudes greater than - max_u_cut will have their weights set to 0. Can also be useful for decreasing the number + max_u_cut will have their weights set to 0. Can also be useful for decreasing the number for foreground eigenmodes as the number of eigenmodes is roughly proportional to (umax - umin). estimate_degeneracies : bool, default=False - If True, the initial estimates of the redcal degeneracies will be computed from the data using traditional - abscal techniques and the initial nucal model as the sky model. If False, the amplitude degeneracies will be + If True, the initial estimates of the redcal degeneracies will be computed from the data using traditional + abscal techniques and the initial nucal model as the sky model. If False, the amplitude degeneracies will be initialized to 1 and tip-tilt degeneracies will be initialized to 0. If the data are well-calibrated, setting this option to False can improve the runtime of the calibration. optimizer_name : str, default="novograd" @@ -1472,16 +1490,16 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only model_parameters : dictionary Dictionary containing the model parameters for each polarization. Keys are polarization strings and values are metadata : dictionary - Dictionary containing metadata from the optimization. Contains dictionaries for each polarization with the number of + Dictionary containing metadata from the optimization. Contains dictionaries for each polarization with the number of iterations ("niter") and the loss history of the gradient descent ("loss_history"). - + If return_model: model : DataContainer DataContainer containing the model visibilities. DataContainer is of the form {(ant1, ant2, pol): np.array([Ntimes, Nfreqs])} """ # Compute spectral and spatial filters self._compute_filters( - freqs=data.freqs, spectral_filter_half_width=spectral_filter_half_width, + freqs=data.freqs, spectral_filter_half_width=spectral_filter_half_width, spatial_filter_half_width=spatial_filter_half_width, eigenval_cutoff=eigenval_cutoff, umin=umin, umax=umax ) @@ -1493,16 +1511,16 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only # Compute the estimates of the model components from the data if spatial_estimate_only: init_model_comps = fit_nucal_foreground_model( - data, data_wgts, self.radial_reds, self.spatial_filters, solver=linear_solver, share_fg_model=share_fg_model, + data, data_wgts, self.radial_reds, self.spatial_filters, solver=linear_solver, share_fg_model=share_fg_model, return_model_comps=True, alpha=alpha ) init_model_comps = project_u_model_comps_on_spec_axis(init_model_comps, self.spectral_filters) else: init_model_comps = fit_nucal_foreground_model( - data, data_wgts, self.radial_reds, self.spatial_filters, solver=linear_solver, share_fg_model=share_fg_model, + data, data_wgts, self.radial_reds, self.spatial_filters, solver=linear_solver, share_fg_model=share_fg_model, spectral_filters=self.spectral_filters, return_model_comps=True, alpha=alpha ) - + # Compute idealized baseline vectors from antenna positions and calibration flags idealized_antpos = abscal._get_idealized_antpos(cal_flags, self.antpos, data.pols()) @@ -1514,10 +1532,10 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only else: amplitude = {pol: np.ones((data.shape)) for pol in data.pols()} tip_tilt = { - pol: np.zeros((idealized_antpos[list(idealized_antpos.keys())[0]].shape[0], data.shape[0], data.shape[1])) + pol: np.zeros((idealized_antpos[list(idealized_antpos.keys())[0]].shape[0], data.shape[0], data.shape[1])) for pol in data.pols() } - + # Initialize model parameters and metadata dictionaries for storing results model_parameters = {} metadata = {} @@ -1546,9 +1564,9 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only data_wgts[blkey] for rdgrp in self.radial_reds.get_pol(pol) for blkey in rdgrp ]) - # Set spectral filters + # Set spectral filters spatial_filters = [ - jnp.array([self.spatial_filters[blkey] for blkey in rdgrp]) + jnp.array([self.spatial_filters[blkey] for blkey in rdgrp]) for rdgrp in self.radial_reds.get_pol(pol) ] @@ -1560,8 +1578,8 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only # Run optimization model_parameters[pol], metadata[pol] = _nucal_post_redcal( - data_real, data_imag, wgts, init_model_parameters, optimizer, spectral_filters=self.spectral_filters, - spatial_filters=spatial_filters, idealized_blvecs=idealized_blvecs, major_cycle_maxiter=major_cycle_maxiter, + data_real, data_imag, wgts, init_model_parameters, optimizer, spectral_filters=self.spectral_filters, + spatial_filters=spatial_filters, idealized_blvecs=idealized_blvecs, major_cycle_maxiter=major_cycle_maxiter, convergence_criteria=convergence_criteria, minor_cycle_maxiter=minor_cycle_maxiter, alpha=alpha ) @@ -1573,7 +1591,6 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only } model = evaluate_foreground_model(self.radial_reds, fg_model_comps, self.spatial_filters, self.spectral_filters) - # Compute the gains from the model parameters gains = {} for pol in data.pols(): @@ -1585,4 +1602,4 @@ def post_redcal_nucal(self, data, data_wgts, cal_flags={}, spatial_estimate_only if return_model: return gains, model_parameters, metadata, model else: - return gains, model_parameters, metadata \ No newline at end of file + return gains, model_parameters, metadata diff --git a/hera_cal/redcal.py b/hera_cal/redcal.py index 67715e638..b32fb0a04 100644 --- a/hera_cal/redcal.py +++ b/hera_cal/redcal.py @@ -236,8 +236,12 @@ def split_bls(bls): if min_bl_cut is not None or max_bl_cut is not None: assert antpos is not None, 'antpos must be passed in if min_bl_cut or max_bl_cut is specified.' lengths = [np.mean([np.linalg.norm(antpos[bl[1]] - antpos[bl[0]]) for bl in gp]) for gp in reds] - reds = [gp for gp, l in zip(reds, lengths) if ((min_bl_cut is None or l > min_bl_cut) - and (max_bl_cut is None or l < max_bl_cut))] + reds = [ + gp for gp, ln in zip(reds, lengths) if ( + (min_bl_cut is None or ln > min_bl_cut) and + (max_bl_cut is None or ln < max_bl_cut) + ) + ] if max_dims is not None: while True: @@ -659,7 +663,7 @@ def extend_vis(self, data, wgts=None, reds_to_solve=None): None ''' if reds_to_solve is None: - unsolved_reds = [gp for gp in self.reds if not gp[0] in self.vis] + unsolved_reds = [gp for gp in self.reds if gp[0] not in self.vis] reds_to_solve = filter_reds(unsolved_reds, ants=self.gains.keys()) self.update_vis_from_data(data, wgts=wgts, reds_to_update=reds_to_solve) @@ -683,7 +687,7 @@ def extend_gains(self, data, wgts={}, extended_reds=None): for grp in extended_reds: try: u = self.vis[grp[0]] # RedDataContainer will take care of mapping. - except(KeyError): + except (KeyError): # no redundant visibility solution for this group, so skip continue # loop through baselines and select ones that have one solved antenna diff --git a/hera_cal/tests/test_abscal.py b/hera_cal/tests/test_abscal.py index b383fbbba..855ceb770 100644 --- a/hera_cal/tests/test_abscal.py +++ b/hera_cal/tests/test_abscal.py @@ -769,7 +769,7 @@ def setup_method(self): self.input_cal = os.path.join(DATA_PATH, "zen.2458043.12552.xx.HH.uvORA.abs.calfits") # make custom gain keys - d, fl, ap, a, f, t, l, p = io.load_vis(self.data_fname, return_meta=True, pick_data_ants=False) + d, fl, ap, a, f, _, _, p = io.load_vis(self.data_fname, return_meta=True, pick_data_ants=False) self.freq_array = f self.antpos = ap gain_pols = np.unique([split_pol(pp) for pp in p]) @@ -1077,7 +1077,7 @@ def test_fill_dict_nans(self): def test_mock_data(self): # load into pyuvdata object data_file = os.path.join(DATA_PATH, "zen.2458043.12552.xx.HH.uvORA") - data, flgs, ap, a, f, t, l, p = io.load_vis(data_file, return_meta=True) + data, flgs, ap, a, f, t, _, p = io.load_vis(data_file, return_meta=True) wgts = odict() for k in flgs.keys(): wgts[k] = (~flgs[k]).astype(float) @@ -1930,7 +1930,7 @@ def test_post_redcal_abscal_argparser(self): assert a.model_files[0] == 'c' assert a.model_files[1] == 'd' assert len(a.model_files) == 2 - assert type(a.model_files) == list + assert isinstance(a.model_files, list) assert a.nInt_to_load == 6 assert a.verbose is True diff --git a/hera_cal/tests/test_cli_utils.py b/hera_cal/tests/test_cli_utils.py index f42daae3b..eceb1c818 100644 --- a/hera_cal/tests/test_cli_utils.py +++ b/hera_cal/tests/test_cli_utils.py @@ -9,25 +9,30 @@ logger = logging.getLogger(__name__) + # The following simply mocks the runcall method of LineProfiler # so that the `enable_by_count()` method is not called on it. # For some reason, calling this screws with coverage.py. def simplerun(self, func, *args, **kwargs): return func(*args, **kwargs) + LineProfiler.runcall = simplerun + @pytest.fixture(scope="function") def a(): a = ArgumentParser() a.add_argument("thing") return a + def do_some_stuff(thing): logger.info(f"Doing some stuff with {thing}") - np.zeros(10000) + np.zeros(10000) linalg.inv(np.eye(1000)) + def test_cli_logging(capsys, a): sys.argv = [sys.argv[0], "things", '--log-level', 'INFO'] args = parse_args(a) @@ -37,8 +42,9 @@ def test_cli_logging(capsys, a): assert "Doing some stuff with things" in capsys.readouterr().out + @pytest.mark.parametrize( - "param", + "param", [ ["--log-plain-tracebacks"], ["--log-absolute-time"], ['--log-no-mem'], ['--log-mem-backend', 'psutil'], ['--log-show-path'] ] @@ -49,34 +55,38 @@ def test_cli_args(capsys, a, param): print(args) run_with_profiling(do_some_stuff, args, thing=args.thing) + def test_cli_logging_level(capsys, a): sys.argv = [sys.argv[0], "things", '--log-level', 'WARNING'] args = parse_args(a) - + run_with_profiling(do_some_stuff, args, thing=args.thing) assert "Doing some stuff with things" not in capsys.readouterr().out + def test_cli_profiling(tmp_path_factory, a): profile = tmp_path_factory.mktemp("data") / "profile.txt" - + sys.argv = [sys.argv[0], "things", '--log-level', 'INFO', '--profile', '--profile-output', str(profile)] args = parse_args(a) - + run_with_profiling(do_some_stuff, args, thing=args.thing) assert profile.exists() + def test_cli_profile_funcs(tmp_path_factory, a): profile = tmp_path_factory.mktemp("data") / "profile.txt" - + sys.argv = [sys.argv[0], "things", '--log-level', 'INFO', '--profile', '--profile-output', str(profile), '--profile-funcs', 'numpy,scipy.linalg:inv'] args = parse_args(a) - + run_with_profiling(do_some_stuff, args, thing=args.thing) assert profile.exists() + def test_cli_filter_kwargs(a): sys.argv = [sys.argv[0], "things", '--log-level', 'WARNING'] args = parse_args(a) diff --git a/hera_cal/tests/test_datacontainer.py b/hera_cal/tests/test_datacontainer.py index 724b111c1..94afc23e2 100644 --- a/hera_cal/tests/test_datacontainer.py +++ b/hera_cal/tests/test_datacontainer.py @@ -555,8 +555,8 @@ def test_RedDataContainer(): assert id(rdata[bl]) == id(rdata[red[0]]) else: assert id(rdata[reverse_bl(bl)]) == id(rdata[reverse_bl(red[0])]) - assert(rdata.get_ubl_key(bl) in red) - assert(rdata.has_key(rdata.get_ubl_key(bl))) + assert (rdata.get_ubl_key(bl) in red) + assert (rdata.has_key(rdata.get_ubl_key(bl))) assert set(rdata.get_red(bl)) == set(red) assert bl in rdata val_here = deepcopy(rdata[red[0]]) diff --git a/hera_cal/tests/test_flag_utils.py b/hera_cal/tests/test_flag_utils.py index 5b6369b73..4ee4fe947 100644 --- a/hera_cal/tests/test_flag_utils.py +++ b/hera_cal/tests/test_flag_utils.py @@ -18,7 +18,7 @@ def test_solar_flag(): data_fname = os.path.join(DATA_PATH, "zen.2458043.12552.xx.HH.uvORA") uvd = UVData() uvd.read_miriad(data_fname, use_future_array_shapes=True) - data, flags, antp, ant, f, t, l, p = io.load_vis(uvd, return_meta=True) + data, flags, antp, ant, f, t, _, p = io.load_vis(uvd, return_meta=True) # get solar altitude a = utils.get_sun_alt(2458043) assert isinstance(a, (float, np.floating, np.float64)) diff --git a/hera_cal/tests/test_io.py b/hera_cal/tests/test_io.py index e7525d0ba..2d81ef339 100644 --- a/hera_cal/tests/test_io.py +++ b/hera_cal/tests/test_io.py @@ -1069,7 +1069,7 @@ def test_read(self): assert qual.dtype == np.float32 assert qual.shape == shape for key, qual in rv['total_quality'].items(): - assert type(key) == str + assert isinstance(key, str) assert qual.dtype == np.float32 assert qual.shape == shape assert rv['info']['pols'] == set(['Jnn', 'Jee']) @@ -1145,7 +1145,7 @@ def test_load_vis(self): assert flags[(24, 25, 'ee')].shape == (120, 64) # test w/ meta - d, f, ap, a, f, t, l, p = io.load_vis([fname, fname2], return_meta=True) + d, f, ap, a, f, t, _, p = io.load_vis([fname, fname2], return_meta=True) assert len(ap[24]) == 3 assert len(f) == len(self.freq_array) @@ -1156,7 +1156,7 @@ def test_load_vis(self): # test w/ meta pick_data_ants fname = os.path.join(DATA_PATH, "zen.2458043.12552.xx.HH.uvORA") - d, f, ap, a, f, t, l, p = io.load_vis(fname, return_meta=True, pick_data_ants=False) + d, f, ap, a, f, t, _, p = io.load_vis(fname, return_meta=True, pick_data_ants=False) assert len(ap[24]) == 3 assert len(a) == 47 assert len(f) == len(self.freq_array) @@ -1216,13 +1216,13 @@ def test_write_vis(self): # get data uvd = UVData() uvd.read_uvh5(os.path.join(DATA_PATH, "zen.2458044.41632.xx.HH.XRAA.uvh5"), use_future_array_shapes=True) - data, flgs, ap, a, f, t, l, p = io.load_vis(uvd, return_meta=True) + data, flgs, ap, a, f, t, lst, p = io.load_vis(uvd, return_meta=True) nsample = copy.deepcopy(data) for k in nsample.keys(): nsample[k] = np.ones_like(nsample[k], float) # test basic execution - uvd = io.write_vis("ex.uvh5", data, l, f, ap, start_jd=2458044, return_uvd=True, overwrite=True, verbose=True, x_orientation='east', filetype='uvh5') + uvd = io.write_vis("ex.uvh5", data, lst, f, ap, start_jd=2458044, return_uvd=True, overwrite=True, verbose=True, x_orientation='east', filetype='uvh5') uvd.use_future_array_shapes() hd = HERAData("ex.uvh5") hd.read() @@ -1237,7 +1237,7 @@ def test_write_vis(self): os.remove("ex.uvh5") # test with nsample and flags - uvd = io.write_vis("ex.uv", data, l, f, ap, start_jd=2458044, flags=flgs, nsamples=nsample, x_orientation='east', return_uvd=True, overwrite=True, verbose=True) + uvd = io.write_vis("ex.uv", data, lst, f, ap, start_jd=2458044, flags=flgs, nsamples=nsample, x_orientation='east', return_uvd=True, overwrite=True, verbose=True) uvd.use_future_array_shapes() assert uvd.nsample_array.shape == (1680, 64, 1) assert uvd.flag_array.shape == (1680, 64, 1) @@ -1246,8 +1246,8 @@ def test_write_vis(self): assert uvd.x_orientation.lower() == 'east' # test exceptions - pytest.raises(AttributeError, io.write_vis, "ex.uv", data, l, f, ap) - pytest.raises(AttributeError, io.write_vis, "ex.uv", data, l, f, ap, start_jd=2458044, filetype='foo') + pytest.raises(AttributeError, io.write_vis, "ex.uv", data, lst, f, ap) + pytest.raises(AttributeError, io.write_vis, "ex.uv", data, lst, f, ap, start_jd=2458044, filetype='foo') if os.path.exists('ex.uv'): shutil.rmtree('ex.uv') diff --git a/hera_cal/tests/test_nucal.py b/hera_cal/tests/test_nucal.py index 317ace336..4cbe4dd17 100644 --- a/hera_cal/tests/test_nucal.py +++ b/hera_cal/tests/test_nucal.py @@ -7,12 +7,13 @@ from .. import redcal, nucal, utils, abscal, apply_cal from ..datacontainer import DataContainer + def test_get_u_bounds(): antpos = {i: np.array([i, 0, 0]) for i in range(7)} freqs = np.linspace(50e6, 250e6, 10) radial_reds = nucal.RadialRedundancy(antpos) u_bounds = nucal.get_u_bounds(radial_reds, antpos, freqs) - + # List of u-bounds should be the same length as radial reds assert len(u_bounds) == len(radial_reds) @@ -22,9 +23,10 @@ def test_get_u_bounds(): assert np.isclose(u_bounds[0][0], np.min(baseline_lengths) * freqs[0] / nucal.SPEED_OF_LIGHT) assert np.isclose(u_bounds[0][1], np.max(baseline_lengths) * freqs[-1] / nucal.SPEED_OF_LIGHT) + def test_is_same_orientation(): antpos = {i: np.array([i, 0, 0]) for i in range(3)} - + # Add extra orthogonal baseline antpos[3] = np.array([0, 1, 0]) bl1 = (0, 1, 'nn') @@ -37,6 +39,7 @@ def test_is_same_orientation(): # These baselines should not assert not nucal.is_same_orientation(bl1, bl3, antpos) + def test_is_frequency_redundant(): antpos = {i: np.array([i, 0, 0]) for i in range(3)} freqs = np.linspace(1, 2, 10) @@ -65,6 +68,7 @@ def test_is_frequency_redundant(): bl2 = (0, 2, "nn") assert not nucal.is_frequency_redundant(bl1, bl2, freqs, antpos) + def test_get_unique_orientations(): antpos = linear_array(7) @@ -85,6 +89,7 @@ def test_get_unique_orientations(): for group in radial_groups: assert len(group) >= 5 + class TestRadialRedundancy: def setup_method(self): self.antpos = hex_array(4, outriggers=0, split_core=False) @@ -210,7 +215,6 @@ def test_append(self): pytest.raises(ValueError, radial_reds.append, bls) - def test_add_radial_group(self): radial_reds = deepcopy(self.radial_reds) # Find radial group with 1 baseline @@ -225,7 +229,7 @@ def test_add_radial_group(self): # Filter all groups with fewer than 10 baselines radial_reds.filter_radial_groups(min_nbls=10) - + # Add group with a single baseline radial_reds.add_radial_group(group1) @@ -251,7 +255,6 @@ def test_add_radial_group(self): radial_reds.add_radial_group(bls) - def test_sort(self): radial_reds = deepcopy(self.radial_reds) radial_reds.sort(reverse=False) @@ -259,6 +262,7 @@ def test_sort(self): radial_reds.sort(reverse=True) assert len(radial_reds[0]) > len(radial_reds[-1]) + def test_compute_spatial_filters(): # Generate a mock array for generating filters antpos = hex_array(3, split_core=False, outriggers=0) @@ -272,7 +276,7 @@ def test_compute_spatial_filters(): assert len(spatial_filters) == sum(map(len, radial_reds)) # First index of filter should equal number of frequencies - # Second index is number of modeling components, should be less than or + # Second index is number of modeling components, should be less than or # equal to number of frequencies for bl in spatial_filters: assert spatial_filters[bl].shape[0] == freqs.shape[0] @@ -284,7 +288,7 @@ def test_compute_spatial_filters(): for bl in rdgrp: assert filter_shape == spatial_filters[bl].shape - # Show that filters can be used to model a common u-plane with + # Show that filters can be used to model a common u-plane with # uneven sampling antpos = linear_array(6, sep=5) radial_reds = nucal.RadialRedundancy(antpos) @@ -296,7 +300,7 @@ def test_compute_spatial_filters(): blmag = np.linalg.norm(antpos[bl[1]] - antpos[bl[0]]) data.append(np.sin(freqs * blmag / 2.998e8)) design_matrix.append(spatial_filters[bl]) - + # Fit PSWF to mock data design_matrix = np.array(design_matrix) XTXinv = np.linalg.pinv(np.einsum('afm,afn->mn', design_matrix, design_matrix)) @@ -315,6 +319,7 @@ def test_compute_spatial_filters(): umodes = radial_reds.baseline_lengths[bl] * freqs / 2.998e8 assert np.allclose(spatial_filters[bl][umodes > umax], 0) + def test_build_nucal_wgts(): bls = [(0, 1, 'ee'), (0, 2, 'ee'), (1, 2, 'ee')] auto_bls = [(0, 0, 'ee'), (1, 1, 'ee'), (2, 2, 'ee')] @@ -368,6 +373,7 @@ def test_build_nucal_wgts(): for key in abscal_wgts: assert np.allclose(abscal_wgts[key], nucal_wgts[key]) + def test_project_u_model_comps_on_spec_axis(): # Test that the projection of the u-model components on the spectral axis # is the same as the projection of the data on the spectral axis @@ -383,7 +389,7 @@ def test_project_u_model_comps_on_spec_axis(): blmag = np.linalg.norm(antpos[bl[1]] - antpos[bl[0]]) data[bl] = np.sin(freqs * blmag / 2.998e8)[None, :] wgts[bl] = np.ones_like(data[bl]) - + # Get model components for a u-dependent model model_comps = nucal.fit_nucal_foreground_model(data, wgts, radial_reds, spatial_filters, solver='solve', return_model_comps=True) @@ -393,11 +399,12 @@ def test_project_u_model_comps_on_spec_axis(): # Get model for both cases model1 = nucal.evaluate_foreground_model(radial_reds, model_comps, spatial_filters) model2 = nucal.evaluate_foreground_model(radial_reds, model_proj, spatial_filters, spectral_filters) - + # Check that the two models are relatively close for bl in data: assert np.sqrt(np.square(model1[bl] - model2[bl]).mean()) < 1e-4 + def test_linear_fit(): # Create a set of mock data to fit freqs = np.linspace(50e6, 250e6, 200) @@ -438,6 +445,7 @@ def test_linear_fit(): with pytest.raises(AssertionError): b = nucal._linear_fit(XTX, Xy, alpha=-1) + def test_compute_spectral_filters(): # Create a set of mock data to fit freqs = np.linspace(50e6, 250e6, 200) @@ -454,6 +462,7 @@ def test_compute_spectral_filters(): # Test that the spectral filters are correct np.testing.assert_allclose(y, model, atol=1e-6) + def test_evaluate_foreground_model(): antpos = linear_array(6, sep=5) radial_reds = nucal.RadialRedundancy(antpos) @@ -490,6 +499,7 @@ def test_evaluate_foreground_model(): with pytest.raises(AssertionError): model = nucal.evaluate_foreground_model(radial_reds, model_comps, _spatial_filters) + def test_fit_nucal_foreground_model(): antpos = linear_array(6, sep=5) radial_reds = nucal.RadialRedundancy(antpos) @@ -552,18 +562,19 @@ def test_fit_nucal_foreground_model(): # Return model components model_comps = nucal.fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, spectral_filters, return_model_comps=True, share_fg_model=False) u_model_comps = nucal.fit_nucal_foreground_model(data, data_wgts, radial_reds, spatial_filters, return_model_comps=True, share_fg_model=False) - + for k in model_comps: assert model_comps[k].shape[0] == ntimes assert u_model_comps[k].shape[0] == ntimes assert model_comps[k].shape[1:] == (spectral_filters.shape[-1], spatial_filters[k].shape[-1]) assert u_model_comps[k].shape[1:] == (spatial_filters[k].shape[-1],) + class TestGradientDescent: def setup_method(self): self.freqs = np.linspace(50e6, 250e6, 400) self.antpos = linear_array(10, sep=2) - + ns_antpos = linear_array(10, sep=2) for ant in ns_antpos: if ant > 0: @@ -582,19 +593,18 @@ def setup_method(self): self.data.freqs = self.freqs self.frc = nucal.SpectrallyRedundantCalibrator(self.radial_reds) - # Compute the filters + # Compute the filters self.frc._compute_filters(self.freqs, 10e-9) - self.init_model_comps = nucal.fit_nucal_foreground_model( - self.data, self.data_wgts, self.radial_reds, self.frc.spatial_filters, share_fg_model=True, + self.data, self.data_wgts, self.radial_reds, self.frc.spatial_filters, share_fg_model=True, return_model_comps=True ) self.init_model_comps = nucal.project_u_model_comps_on_spec_axis(self.init_model_comps, self.frc.spectral_filters) # Calculate baseline vectors - self.blvecs = np.array([(self.antpos[bl[1]] - self.antpos[bl[0]])[:2] for rdgrp in self.radial_reds for bl in rdgrp])#[:, None] - + self.blvecs = np.array([(self.antpos[bl[1]] - self.antpos[bl[0]])[:2] for rdgrp in self.radial_reds for bl in rdgrp]) # [:, None] + self.model_parameters = { "tip_tilt": np.zeros((2, 2, 400)), "amplitude": np.ones((2, 400)), @@ -603,7 +613,7 @@ def setup_method(self): } self.spatial_filters = [np.array([self.frc.spatial_filters[blkey] for blkey in rdgrp]) for rdgrp in self.radial_reds] - + def test_foreground_model(self): params = { "fg_r": [np.random.normal(0, 1, (self.data.shape[0], self.frc.spectral_filters.shape[-1], f.shape[-1])) for f in self.spatial_filters], @@ -611,13 +621,13 @@ def test_foreground_model(self): } model_r, model_i = nucal._foreground_model(params, self.frc.spectral_filters, self.spatial_filters) - + # Check that the model has the correct shape assert model_r.shape == (len(self.data), self.data.shape[0], self.data.shape[1]) assert model_i.shape == (len(self.data), self.data.shape[0], self.data.shape[1]) def test_mean_squared_error(self): - + # Create a mock model that's the same as the data model = deepcopy(self.data) @@ -629,13 +639,13 @@ def test_mean_squared_error(self): data_r = np.array([self.data[bl].real for rdgrp in self.radial_reds for bl in rdgrp]) data_i = np.array([self.data[bl].imag for rdgrp in self.radial_reds for bl in rdgrp]) wgts = np.ones_like(data_r) - + # Compute the mean squared error mse = nucal._mean_squared_error(self.model_parameters, data_r, data_i, wgts, model_r, model_i, self.blvecs) # Check that the mse is zero assert np.isclose(mse, 0) - + def test_calibration_loss_function(self): # Separate the real and imaginary components data_r = np.array([self.data[bl].real for rdgrp in self.radial_reds for bl in rdgrp]) @@ -655,7 +665,6 @@ def test_nucal_post_redcal(self): data_i = np.array([amp * self.data[bl].imag for rdgrp in self.radial_reds for bl in rdgrp]) wgts = np.ones_like(data_r) - # Make optimizer optimizer = nucal.OPTIMIZERS['novograd'](learning_rate=1e-3) @@ -681,6 +690,7 @@ def test_nucal_post_redcal(self): # Check that final loss with minor cycle is less than without assert metadata['loss_history'][-1] > _metadata['loss_history'][-1] + class TestSpectrallyRedundantCalibrator: def setup_method(self): self.freqs = np.linspace(50e6, 250e6, 400) @@ -698,18 +708,18 @@ def setup_method(self): self.frc = nucal.SpectrallyRedundantCalibrator(self.radial_reds) def test_compute_filters(self): - assert self.frc._filters_computed == False + assert not self.frc._filters_computed # Compute filters self.frc._compute_filters(self.freqs, 20e-9) - assert self.frc._filters_computed == True + assert self.frc._filters_computed # Trigger check that filters are already computed sf = deepcopy(self.frc.spectral_filters) self.frc._compute_filters(self.freqs, 20e-9) assert np.allclose(self.frc.spectral_filters, sf) - # Recompute with different values + # Recompute with different values self.frc._compute_filters(self.freqs, 30e-9) assert sf.shape != self.frc.spectral_filters.shape @@ -725,14 +735,14 @@ def test_estimate_degeneracies(self): # Fit model model = nucal.fit_nucal_foreground_model( - data, self.data_wgts, self.radial_reds, self.frc.spatial_filters, + data, self.data_wgts, self.radial_reds, self.frc.spatial_filters, return_model_comps=False, share_fg_model=True ) # Estimate degeneracies amplitude, tip_tilt = self.frc._estimate_degeneracies(data, model, self.data_wgts) - # Since the data are already "perfectly calibrated" and the model should match the data to high precision, + # Since the data are already "perfectly calibrated" and the model should match the data to high precision, # the estimated tip-tilt should be zero and the amplitude should be 1 assert np.isclose( np.sqrt(np.mean(np.square(amplitude['nn'] - 1))), 0, atol=1e-5 @@ -740,7 +750,7 @@ def test_estimate_degeneracies(self): assert np.isclose( np.sqrt(np.mean(np.square(tip_tilt['nn']))), 0, atol=1e-5 ) - + # Shape of amplitude and tip-tilt should be (ndims, ntimes, nfreqs) assert tip_tilt["nn"].shape == (1, 2, 400) diff --git a/hera_cal/tests/test_utils.py b/hera_cal/tests/test_utils.py index 05960964e..d4fcbcf55 100644 --- a/hera_cal/tests/test_utils.py +++ b/hera_cal/tests/test_utils.py @@ -222,7 +222,7 @@ def test_realistic(self): data_fname = os.path.join(DATA_PATH, "zen.2458043.12552.xx.HH.uvORA") model_fname = os.path.join(DATA_PATH, "zen.2458042.12552.xx.HH.uvXA") # make custom gain keys - d, fl, antpos, a, freqs, t, l, p = io.load_vis(data_fname, return_meta=True, pick_data_ants=False) + d, fl, antpos, a, freqs, t, _, p = io.load_vis(data_fname, return_meta=True, pick_data_ants=False) freqs /= 1e9 # in GHz # test basic execution k1 = (24, 25, 'ee') diff --git a/pyproject.toml b/pyproject.toml index 377b52804..98bfb7961 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,4 @@ ignore = [ "E501", "W291", "W293", - "W503", - "W601", ] diff --git a/scripts/auto_reflection_run.py b/scripts/auto_reflection_run.py index 527f0060e..0fb49438c 100644 --- a/scripts/auto_reflection_run.py +++ b/scripts/auto_reflection_run.py @@ -18,8 +18,8 @@ run_with_profiling( reflections.auto_reflection_run, a, - data=a.data, - delay_ranges=a.dly_ranges, - output_fname=a.output_fname, + data=a.data, + delay_ranges=a.dly_ranges, + output_fname=a.output_fname, **kwargs ) diff --git a/scripts/baseline_chunker.py b/scripts/baseline_chunker.py index 02a2b7291..ce47c58e8 100644 --- a/scripts/baseline_chunker.py +++ b/scripts/baseline_chunker.py @@ -15,7 +15,7 @@ run_with_profiling( io.generate_antpairpol_parallelization_files, a, - filename=a.template_file, + filename=a.template_file, writedir=a.directory, bls_per_chunk=a.bls_per_chunk, polarizations=a.polarizations diff --git a/scripts/chunk_files.py b/scripts/chunk_files.py index a004a864b..3f351a36c 100644 --- a/scripts/chunk_files.py +++ b/scripts/chunk_files.py @@ -10,7 +10,7 @@ from hera_cal._cli_tools import parse_args, run_with_profiling, filter_kwargs ap = chunker.chunk_parser() -args =parse_args(ap) +args = parse_args(ap) run_with_profiling( chunker.chunk_files, diff --git a/scripts/delay_filter_run.py b/scripts/delay_filter_run.py index 8ce3434bb..5314339df 100644 --- a/scripts/delay_filter_run.py +++ b/scripts/delay_filter_run.py @@ -54,8 +54,8 @@ standoff=ap.standoff, horizon=ap.horizon, tol=ap.tol, skip_wgt=ap.skip_wgt, min_dly=ap.min_dly, zeropad=ap.zeropad, filter_spw_ranges=ap.filter_spw_ranges, - skip_contiguous_flags=not(ap.dont_skip_contiguous_flags), max_contiguous_flag=ap.max_contiguous_flag, - skip_flagged_edges=not(ap.dont_skip_flagged_edges), - flag_model_rms_outliers=not(ap.dont_flag_model_rms_outliers), model_rms_threshold=ap.model_rms_threshold, - clean_flags_in_resid_flags=not(ap.clean_flags_not_in_resid_flags), **filter_kwargs + skip_contiguous_flags=not (ap.dont_skip_contiguous_flags), max_contiguous_flag=ap.max_contiguous_flag, + skip_flagged_edges=not (ap.dont_skip_flagged_edges), + flag_model_rms_outliers=not (ap.dont_flag_model_rms_outliers), model_rms_threshold=ap.model_rms_threshold, + clean_flags_in_resid_flags=not (ap.clean_flags_not_in_resid_flags), **filter_kwargs ) diff --git a/scripts/lstbin_run.py b/scripts/lstbin_run.py index 026673408..239532cf8 100755 --- a/scripts/lstbin_run.py +++ b/scripts/lstbin_run.py @@ -78,4 +78,3 @@ args, data_files, input_cals=input_cals, **kwargs ) - diff --git a/scripts/noise_from_autos.py b/scripts/noise_from_autos.py index ea0bdbbd5..041708dd2 100755 --- a/scripts/noise_from_autos.py +++ b/scripts/noise_from_autos.py @@ -13,9 +13,9 @@ a = noise.noise_std_argparser() args = parse_args(a) run_with_profiling( - noise.write_per_antenna_noise_std_from_autos, - args, - infile=args.infile, outfile=args.outfile, calfile=args.calfile, + noise.write_per_antenna_noise_std_from_autos, + args, + infile=args.infile, outfile=args.outfile, calfile=args.calfile, gain_convention=args.gain_convention, add_to_history=' '.join(sys.argv), clobber=args.clobber ) diff --git a/scripts/smooth_cal_run.py b/scripts/smooth_cal_run.py index 6c303a091..fc7d14af1 100755 --- a/scripts/smooth_cal_run.py +++ b/scripts/smooth_cal_run.py @@ -20,7 +20,7 @@ mode = a.method filter_kwargs = {} if mode != 'clean': - filter_kwargs['skip_flagged_edges'] = not(a.dont_skip_flagged_edges) + filter_kwargs['skip_flagged_edges'] = not (a.dont_skip_flagged_edges) filter_kwargs['fit_method'] = a.fit_method if a.axis == 'time': filter_kwargs['eigenval_cutoff'] = [a.eigenval_cutoff] @@ -31,19 +31,27 @@ filter_kwargs['alpha'] = a.alpha filter_kwargs['max_iter'] = a.max_iter + def run(): if a.run_if_first is None or sorted(a.calfits_list)[0] == a.run_if_first: - cs = CalibrationSmoother(a.calfits_list, flag_file_list=a.flag_file_list, flag_filetype=a.flag_filetype, - antflag_thresh=a.antflag_thresh, time_blacklists=a.time_blacklists, - lst_blacklists=a.lst_blacklists, freq_blacklists=a.freq_blacklists, blacklist_wgt=a.blacklist_wgt, - chan_blacklists=a.chan_blacklists, pick_refant=a.pick_refant, freq_threshold=a.freq_threshold, - time_threshold=a.time_threshold, ant_threshold=a.ant_threshold, verbose=a.verbose) + cs = CalibrationSmoother( + a.calfits_list, flag_file_list=a.flag_file_list, flag_filetype=a.flag_filetype, + antflag_thresh=a.antflag_thresh, time_blacklists=a.time_blacklists, + lst_blacklists=a.lst_blacklists, freq_blacklists=a.freq_blacklists, blacklist_wgt=a.blacklist_wgt, + chan_blacklists=a.chan_blacklists, pick_refant=a.pick_refant, freq_threshold=a.freq_threshold, + time_threshold=a.time_threshold, ant_threshold=a.ant_threshold, verbose=a.verbose + ) if a.axis == 'both': - cs.time_freq_2D_filter(freq_scale=a.freq_scale, time_scale=a.time_scale, tol=a.tol, - filter_mode=a.filter_mode, window=a.window, maxiter=a.maxiter, method=a.method, **filter_kwargs) + cs.time_freq_2D_filter( + freq_scale=a.freq_scale, time_scale=a.time_scale, tol=a.tol, + filter_mode=a.filter_mode, window=a.window, maxiter=a.maxiter, method=a.method, + **filter_kwargs + ) elif a.axis == 'freq': - cs.filter_1d(filter_scale=a.freq_scale, tol=a.tol, skip_wgt=a.skip_wgt, mode=a.method, ax=a.axis, - **filter_kwargs) + cs.filter_1d( + filter_scale=a.freq_scale, tol=a.tol, skip_wgt=a.skip_wgt, + mode=a.method, ax=a.axis, **filter_kwargs + ) elif a.axis == 'none': warnings.warn( "No smoothing performed, but files still being written. Set freq_scale " @@ -52,9 +60,12 @@ def run(): else: raise ValueError(f"Unrecognized axis: {a.axis}") - cs.write_smoothed_cal(output_replace=(a.infile_replace, a.outfile_replace), - add_to_history=' '.join(sys.argv), clobber=a.clobber) + cs.write_smoothed_cal( + output_replace=(a.infile_replace, a.outfile_replace), + add_to_history=' '.join(sys.argv), clobber=a.clobber + ) else: print(sorted(a.calfits_list)[0], 'is not', a.run_if_first, '...skipping.') -run_with_profiling(run, a) \ No newline at end of file + +run_with_profiling(run, a) diff --git a/scripts/subselect.py b/scripts/subselect.py index 02c2193a7..179daf6eb 100644 --- a/scripts/subselect.py +++ b/scripts/subselect.py @@ -68,13 +68,14 @@ args = parse_args(ap) kw = filter_kwargs(vars(args)) + def select( - infile: str, outfile: str, - freq_min=None, freq_max=None, freq_spws=None, time_min=None, time_max=None, - time_idxs=None, lst_min=None, lst_max=None, lst_in_hours=False, pols=None, - antennas=None, calfile=None, bls=None, only_autos=False, only_cross=False, + infile: str, outfile: str, + freq_min=None, freq_max=None, freq_spws=None, time_min=None, time_max=None, + time_idxs=None, lst_min=None, lst_max=None, lst_in_hours=False, pols=None, + antennas=None, calfile=None, bls=None, only_autos=False, only_cross=False, min_bl_length=None, max_bl_length=None, min_ew_length=None, max_ew_length=None, - clobber=False, check=False, check_acceptability=False, check_uvw_strict=False, + clobber=False, check=False, check_acceptability=False, check_uvw_strict=False, check_autos=False, fix_autos=False ): if not os.path.exists(infile): @@ -109,12 +110,12 @@ def select( if time_idxs is not None: time_bools = np.zeros_like(times, dtype=bool) time_idxs = [tuple(map(int, idx.split("~"))) for idx in time_idxs.split(",")] - + for idx in time_idxs: time_bools[idx[0]:idx[1]] = True else: time_bools = np.ones_like(times, dtype=bool) - + if time_min is not None: time_bools[times < time_min] = False if time_max is not None: @@ -127,7 +128,7 @@ def select( time_bools[lsts < lst_min] = False if lst_max is not None: time_bools[lsts > lst_max] = False - + times = times[time_bools] else: times = None @@ -151,15 +152,15 @@ def select( if calfile is not None: hc = io.HERACal(calfile) gains, flags, quals, total_qual = hc.read() - bad_ants = [ant for ant,flg in flags.items() if np.all(flg)] + bad_ants = [ant for ant, flg in flags.items() if np.all(flg)] antennas = [ant for ant in antennas if ant not in bad_ants] else: antennas = None # Get baselines if ( - bls is not None or only_autos or only_cross or min_bl_length is not None or - max_bl_length is not None or min_ew_length is not None or + bls is not None or only_autos or only_cross or min_bl_length is not None or + max_bl_length is not None or min_ew_length is not None or max_ew_length is not None or antennas is not None ): @@ -175,11 +176,11 @@ def select( if only_cross: bls = [bl for bl in bls if bl[0] != bl[1]] if ( - min_bl_length is not None or max_bl_length is not None or + min_bl_length is not None or max_bl_length is not None or min_ew_length is not None or max_ew_length is not None ): antpos, ants = hd.get_ENU_antpos() - antpos = {ant:pos for ant,pos in zip(ants, antpos)} + antpos = {ant: pos for ant, pos in zip(ants, antpos)} if min_bl_length is not None or max_bl_length is not None: min_bl_length = min_bl_length or 0 @@ -188,12 +189,13 @@ def select( def bl_length(bl): return np.sqrt(np.sum(np.square(antpos[bl[0]] - antpos[bl[1]]))) - #bllens = np.sqrt(np.sum(np.square(hd.uvw_array), axis=1)) + # bllens = np.sqrt(np.sum(np.square(hd.uvw_array), axis=1)) bls = [bl for bl in bls if min_bl_length <= bl_length(bl) <= max_bl_length] - + if min_ew_length is not None or max_ew_length is not None: min_ew_length = min_ew_length or 0 max_ew_length = max_ew_length or np.inf + def ew_length(bl): return np.abs(antpos[bl[0]][0] - antpos[bl[1]][0]) @@ -205,7 +207,7 @@ def ew_length(bl): hd.read( infile, bls=bls, times=times, frequencies=freqs, polarizations=pols, - run_check=check, + run_check=check, run_check_acceptability=check_acceptability, strict_uvw_antpos_check=check_uvw_strict, check_autos=check_autos, @@ -223,6 +225,7 @@ def ew_length(bl): clobber=clobber ) + run_with_profiling( select, args, diff --git a/scripts/time_average.py b/scripts/time_average.py index c9f0dafc8..0fa23a061 100644 --- a/scripts/time_average.py +++ b/scripts/time_average.py @@ -18,7 +18,7 @@ baseline_list = None run_with_profiling( - frf.time_avg_data_and_write, + frf.time_avg_data_and_write, args, flag_output=args.flag_output, input_data_list=args.input_data_list, @@ -28,9 +28,8 @@ # wgt_by_nsample is default True in frf.time_avg_data_and_write # for this reason, the argparser requests the negation. filetype=args.filetype, - wgt_by_nsample=not(args.dont_wgt_by_nsample), + wgt_by_nsample=not (args.dont_wgt_by_nsample), wgt_by_favg_nsample=args.wgt_by_favg_nsample, clobber=args.clobber, verbose=args.verbose, ninterleave=args.ninterleave, equalize_interleave_times=args.equalize_interleave_times, equalize_interleave_ntimes=args.equalize_interleave_ntimes) - diff --git a/scripts/tophat_frfilter_run.py b/scripts/tophat_frfilter_run.py index 6178524e1..4f80c1f09 100644 --- a/scripts/tophat_frfilter_run.py +++ b/scripts/tophat_frfilter_run.py @@ -56,12 +56,12 @@ min_frate_half_width=ap.min_frate_half_width, max_frate_half_width=ap.max_frate_half_width, beamfitsfile=ap.beamfitsfile, percentile_low=ap.percentile_low, percentile_high=ap.percentile_high, - skip_contiguous_flags=not(ap.dont_skip_contiguous_flags), + skip_contiguous_flags=not (ap.dont_skip_contiguous_flags), max_contiguous_flag=ap.max_contiguous_flag, - skip_flagged_edges=not(ap.dont_skip_flagged_edges), - flag_model_rms_outliers=not(ap.dont_flag_model_rms_outliers), + skip_flagged_edges=not (ap.dont_skip_flagged_edges), + flag_model_rms_outliers=not (ap.dont_flag_model_rms_outliers), model_rms_threshold=ap.model_rms_threshold, - clean_flags_in_resid_flags=not(ap.clean_flags_not_in_resid_flags), + clean_flags_in_resid_flags=not (ap.clean_flags_not_in_resid_flags), pre_filter_modes_between_lobe_minimum_and_zero=ap.pre_filter_modes_between_lobe_minimum_and_zero, param_file=ap.param_file, **filter_kwargs diff --git a/setup.py b/setup.py index fb9d0120f..9880dac2e 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ def package_files(package_dir, subdirectory): return paths -data_files = package_files('hera_cal', 'data') + package_files('hera_cal', 'calibrations') +data_files = package_files('hera_cal', 'data') this_directory = Path(__file__).parent long_description = (this_directory / "README.md").read_text() From 78cb4c082c957e2f471255e21a52460db9256e78 Mon Sep 17 00:00:00 2001 From: Steven Murray Date: Tue, 2 Jul 2024 16:55:09 +0200 Subject: [PATCH 3/5] maint: list ruff rules we might want eventually --- pyproject.toml | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 98bfb7961..184551c93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,38 @@ target-version = "py39" [tool.ruff.lint] select = [ "E", - "W" + "W", + # "A", # builtins + # "ARG", # unused arguments + # "B", # bugbear + # "C4", # comprehensions + # "C90", # mccabe complexity + # "COM", # commas + # "D", # docstyle + # "DTZ", # datetime + # "F", # pyflakes + # "FA", # future annotations + # "FURB", # refurb + # "I", # isort + # "ISC", # implicit string concat + # "LOG", # logging + # "N", # pep8-naming + # "NPY", # numpy-specific rules + # "PERF", # performance + # "UP", # pyupgrade + # "PIE", # flake8-pie + # "PLC", # pylint + # "PLE", # pylint + # "PLR", # pylint + # "PLW", # pylint + # "PT", # pytest-style + # "PTH", # use pathlib + # "Q", # quotes + # "RSE", # flake8-raise + # "RUF", # ruff-specific rules + # "SIM", # flake8-simplify + # "TRY", # tryceratops + # "UP", # pyupgrade ] ignore = [ @@ -32,4 +63,21 @@ ignore = [ "E501", "W291", "W293", + # Following Rulesets we really don't want + "AIR", # airflow - unused library + "ASYNC", # async -- unused library + "DJ", # django -- unused library + "EXE", # executable -- unused features + "G", # logging-format -- this linter gives bad advice a lot + "INT", # gettext -- unknown why we would use this + "PD", # unused library + "PGH", # pygrep hooks? + "PYI", # typing stuff + "S", # flake8-bandit -- security stuff that isn't really applicable + "SLOT", # slots stuff that isn't applicable atm + "TCH", # type-checking + "TD", # todo's + "TID", # tidy imports (should be done with isort) + "TRIO", # trio unused package + "YTT", # py2to3 stuff ] From 855cf6a8f088afb6bfe53c484ae3270bbf87272e Mon Sep 17 00:00:00 2001 From: Steven Murray Date: Tue, 2 Jul 2024 16:56:57 +0200 Subject: [PATCH 4/5] maint: list ruff rules we might want eventually --- docs/conf.py | 2 +- hera_cal/chunker.py | 2 +- hera_cal/utils.py | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ee31d4fb7..e4bae6144 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,7 +64,7 @@ def __getattr__(cls, name): # General information about the project. project = u'hera_cal' -copyright = u'2017, HERA Collaboration' +copyright = u'2017, HERA Collaboration' # noqa: A001 author = u'HERA Collaboration' # The version info for the project you're documenting, acts as replacement for diff --git a/hera_cal/chunker.py b/hera_cal/chunker.py index 802600222..7b06a49fb 100644 --- a/hera_cal/chunker.py +++ b/hera_cal/chunker.py @@ -12,7 +12,7 @@ from pyuvdata import utils as uvutils -def chunk_files(filenames, inputfile, outputfile, chunk_size, type="data", +def chunk_files(filenames, inputfile, outputfile, chunk_size, type="data", # noqa: A002 polarizations=None, spw_range=None, throw_away_flagged_ants=False, clobber=False, ant_flag_yaml=None, **read_kwargs): """Chunk a list of data or cal files together into a single file. diff --git a/hera_cal/utils.py b/hera_cal/utils.py index 4cb117dc2..836200ba2 100644 --- a/hera_cal/utils.py +++ b/hera_cal/utils.py @@ -375,7 +375,7 @@ def interp_peak(data, method='quinn', reject_edges=False): return indices, bin_shifts, peaks, new_peaks -def echo(message, type=0, verbose=True): +def echo(message, type=0, verbose=True): # noqa: A002 if verbose: if type == 0: print(message) diff --git a/pyproject.toml b/pyproject.toml index 184551c93..6f2cae199 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ target-version = "py39" select = [ "E", "W", - # "A", # builtins + "A", # builtins # "ARG", # unused arguments # "B", # bugbear # "C4", # comprehensions From 2fc1633102c65eb820537abcd5be5633713a43ed Mon Sep 17 00:00:00 2001 From: Steven Murray Date: Tue, 2 Jul 2024 16:59:08 +0200 Subject: [PATCH 5/5] maint: remove calibrations import --- hera_cal/tests/test_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/hera_cal/tests/test_utils.py b/hera_cal/tests/test_utils.py index d4fcbcf55..020b0a935 100644 --- a/hera_cal/tests/test_utils.py +++ b/hera_cal/tests/test_utils.py @@ -20,7 +20,6 @@ from astropy.coordinates import EarthLocation from hera_sim.utils import gen_white_noise from .. import utils, abscal, datacontainer, io, redcal -from ..calibrations import CAL_PATH from ..data import DATA_PATH from . import mock_uvdata as mockuvd from pathlib import Path